Skip to content

Commit 0625251

Browse files
authored
Merge pull request #1106 from luxonis/fix_device_mngs_stream_ov9782
Fix device manager when streaming OV9782 sensor
2 parents 151b309 + 806aca9 commit 0625251

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

utilities/device_manager.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -312,16 +312,13 @@ def connectAndStartStreaming(dev):
312312
break
313313
else:
314314
camRgb = pipeline.create(dai.node.ColorCamera)
315-
camRgb.setIspScale(1,3)
316-
firstSensor = d.getConnectedCameraFeatures()[0]
317-
camRgb.setPreviewSize(firstSensor.width // 3, firstSensor.height // 3)
318-
camRgb.setColorOrder(camRgb.Properties.ColorOrder.RGB)
315+
camRgb.setIspScale(1,2)
319316

320317
xout = pipeline.create(dai.node.XLinkOut)
321318
xout.input.setQueueSize(2)
322319
xout.input.setBlocking(False)
323320
xout.setStreamName("color")
324-
camRgb.preview.link(xout.input)
321+
camRgb.isp.link(xout.input)
325322

326323
# Start pipeline
327324
d.startPipeline(pipeline)
@@ -343,7 +340,7 @@ def connectAndStartStreaming(dev):
343340
while not d.isClosed():
344341
frame = d.getOutputQueue('color').get()
345342
with io.BytesIO() as output:
346-
rgb = frame.getFrame()
343+
rgb = frame.getCvFrame()[:,:,::-1]
347344
image = Image.fromarray(rgb, "RGB")
348345
image.save(output, format="GIF")
349346
contents = output.getvalue()

0 commit comments

Comments
 (0)