File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -312,16 +312,13 @@ def connectAndStartStreaming(dev):
312
312
break
313
313
else :
314
314
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 )
319
316
320
317
xout = pipeline .create (dai .node .XLinkOut )
321
318
xout .input .setQueueSize (2 )
322
319
xout .input .setBlocking (False )
323
320
xout .setStreamName ("color" )
324
- camRgb .preview .link (xout .input )
321
+ camRgb .isp .link (xout .input )
325
322
326
323
# Start pipeline
327
324
d .startPipeline (pipeline )
@@ -343,7 +340,7 @@ def connectAndStartStreaming(dev):
343
340
while not d .isClosed ():
344
341
frame = d .getOutputQueue ('color' ).get ()
345
342
with io .BytesIO () as output :
346
- rgb = frame .getFrame ()
343
+ rgb = frame .getCvFrame ()[:,:,:: - 1 ]
347
344
image = Image .fromarray (rgb , "RGB" )
348
345
image .save (output , format = "GIF" )
349
346
contents = output .getvalue ()
You can’t perform that action at this time.
0 commit comments