I need to work in python3 to use mediapipe but even open the camera its not posible
I have a simple_camera.py this is a popular code to start with an CSI camera
that runs in python 2 ok :
python simple_camera.py
BUT
python3 simple_camera.py
doesnt work
and all the cameras work with this pipeline to test it
gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! \
'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1' ! \
nvvidconv flip-method=0 ! 'video/x-raw,width=960, height=540' ! \
nvvidconv ! nvegltransform ! nveglglessink -e
the cameras also work for the python 2 codes
simple_camera.py
dual_camera.py
face_detect.py
even I change with 3 cameras and any can’t work on python3 but in python 2 works
-
https://es.aliexpress.com/item/4001308369043.html?spm=a2g0o.order_list.0.0.7a77194d4H1aV2&gatewayAdapt=glo2esp
2.https://es.aliexpress.com/item/4000901709575.html?spm=a2g0o.order_list.0.0.7a77194d4H1aV2&gatewayAdapt=glo2esp - simple webcam
always the erros code are :
unable to open camera
empty frame
I think that is a problem of opencv versions in opencv o python2 its different at the version of opencv of python3 . I reflashed a jetpak and start from 0 like in this video to use media pipe but the sames error and the same issue
so I cant use a camera on python3