What i want is to read an image and have it fixed on the screen, then manually draw rectangles on the regions of interest and have them outputed as coordinates of the rectangle as have the rectangle stay on the image to know which region of interest i marked.
The first step is actually reading the image and fixing it on the screen, what i did following the docs http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_gui/py_image_display/py_image_display.html :
img = cv2.imread('/home/user/Desktop/test_pic/1-0.png',0)
cv2.imshow('image',img)
cv2.waitKey(0)
cv2.destroyAllWindows()
it didn't work and gave me this error :
cv2.error: /io/opencv/modules/highgui/src/window.cpp:583: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvShowImage
I have ran these commands:
sudo apt-get install build-essential checkinstall cmake pkg-config yasm
sudo apt-get install qt5-default libgtk2.0-dev libtbb-dev
but still didn't work
The next step is drawing rectangles on the image and having output printed , i checked https://www.python-course.eu/tkinter_events_binds.php as well as Store mouse click event coordinates with matplotlib but the answer is kind of old and i need mine using CV2
not matplotlib unless i have no other choice. So guidance there will be appreciated.