Import numpy as np # stores all the pixels of image #import numpy: the data structure that will handle an image The code I am trying to run is to read and display the image: #!/usr/bin/env python I get this error: read an image from fileįile "/home/candas/catkin_ws/src/read_image/src/show_image.py", line 17, in Ĭv2.imshow("Image",img) # show the image, name of the displayĬv2.error: OpenCV(4.3.0-dev) /home/candas/opencv_build/opencv/modules/highgui/src/window.cpp:376: error: (-215:Assertion failed) size.width>0 & size.height>0 in function 'imshow' When I run this: $ rosrun read_image show_image.py 3.2.0 (this is when I check with: $ pkg-config -modversion opencv).4.3.0-dev (when I check the version via python: >print cv2._version_).There are two versions of OpenCV installed: I have Ubuntu 18.04 installed on WSL and working on ROS. Previously I was able to use the OpenCV but after I did system restore, I am not able to use it anymore.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |