About opencv with images

Problem in running this code

Hello @agarwalp,
It will be very hard for us to guide you with this little amount of information.
Kindly add what is the problem.

Thanks :slight_smile:

Not getting the image while running the code

TypeError: Image data cannot be converted to float

Getting this error while installing opencv

twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed. You are using pip version 10.0.1, however version 19.1.1 is available. You should consider upgrading via the ‘python -m pip install --upgrade pip’ command.

Did you tried installing PyHamcrest?
pip install PyHamcrest then try installing openCV


Does not getting the image means the img variable is None? If yes then, please check the path to the image. Kindly ensure that its correct. You can also try plt.imread, it shows path error if the path is wrong unlike openCV.

Thanks :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.