Click here to Skip to main content
15,889,096 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
imgRGB = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

 after clicking run the camera turns on but turns off after a second 
and shows me this error:
<pre>Unsupported depth of input image:
>     'VDepth::contains(depth)'
> where
>     'depth' is 6 (CV_64F)


What I have tried:

i have tried to convert its type into float32 and unit8 but didnt work
Posted
Updated 4-Nov-21 6:17am

1 solution

 
Share this answer
 
Comments
SilentH11 5-Nov-21 5:06am    
thanks they were helpful in getting imgRGB = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) to work but still got another error:
'numpy.ndarray' object has no attribute 'hands' after trying alot more examples another error decided to show up
Traceback (most recent call last):
File "C:/Users/hamdan/PycharmProjects/Hamdan/HandTrackingMod.py", line 49, in <module>
main()
File "C:/Users/hamdan/PycharmProjects/Hamdan/HandTrackingMod.py", line 33, in main
detector = handDetector()
File "C:/Users/hamdan/PycharmProjects/Hamdan/HandTrackingMod.py", line 16, in __init__
,self.detectCon, self.trCon)
File "C:\Users\hamdan\PycharmProjects\Hamdan\venv\lib\site-packages\mediapipe\python\solutions\hands.py", line 127, in __init__
outputs=['multi_hand_landmarks', 'multi_handedness'])
File "C:\Users\hamdan\PycharmProjects\Hamdan\venv\lib\site-packages\mediapipe\python\solution_base.py", line 260, in __init__
for name, data in (side_inputs or {}).items()
File "C:\Users\hamdan\PycharmProjects\Hamdan\venv\lib\site-packages\mediapipe\python\solution_base.py", line 260, in <dictcomp>
for name, data in (side_inputs or {}).items()
File "C:\Users\hamdan\PycharmProjects\Hamdan\venv\lib\site-packages\mediapipe\python\solution_base.py", line 513, in _make_packet
return getattr(packet_creator, 'create_' + packet_data_type.value)(data)
TypeError: create_int(): incompatible function arguments. The following argument types are supported:
1. (arg0: int) -> mediapipe.python._framework_bindings.packet.Packet

Invoked with: 0.5
[ WARN:0] global D:\a\opencv-python\opencv-python\opencv\modules\videoio\src\cap_msmf.cpp (438) `anonymous-namespace'::SourceReaderCB::~SourceReaderCB terminating async callback
SilentH11 5-Nov-21 5:19am    
its ok i just solved it thanks mate for the help !!🤗🤗🤗🤗

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900