File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments