Skip to content

Commit

Permalink
Fix processing with missing depth frames
Browse files Browse the repository at this point in the history
  • Loading branch information
oseiskar committed Dec 12, 2023
1 parent d5721f7 commit 0d802a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/cli/process/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ def onMappingOutput(output):
fileName = f"{args.output}/tmp/frame_{frameId:05}.{args.image_format}"
cv2.imwrite(fileName, bgrImage)

if frameSet.depthFrame.image is not None and not useMono:
# Legacy: support SDK versions which also produced images where frameSet.depthFrame.image was None
if frameSet.depthFrame is not None and frameSet.depthFrame.image is not None and not useMono:
alignedDepth = frameSet.getAlignedDepthFrame(undistortedFrame)
depthData = alignedDepth.image.toArray()
depthFrameName = f"{args.output}/tmp/depth_{frameId:05}.png"
Expand Down

0 comments on commit 0d802a7

Please sign in to comment.