Skip to content

Commit 0d802a7

Browse files
committed
Fix processing with missing depth frames
1 parent d5721f7 commit 0d802a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/cli/process/process.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def onMappingOutput(output):
259259
fileName = f"{args.output}/tmp/frame_{frameId:05}.{args.image_format}"
260260
cv2.imwrite(fileName, bgrImage)
261261

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

0 commit comments

Comments
 (0)