

Those days are long gone, and for the good. There were days when we had to painstakingly go through the manual install process for getting OpenCV running on our systems.

To remove the verbose code, unset the DEBUG variable, i.e, :.That’s it! I’ll upload the code onto a git repo as well soon and provide a link here as well. If you want a verbose version, set the environment variable DEBUG = 1 from the terminal before running the code, i.e.,.of times you click, those many points will get saved. Pass the image path to getXY, and start clicking on the displayed image.In your python code, import this file, i.e.,.save the above source code as getXY.py in your working directory.Print "The selected points are returned as a float64 MATRIX." #obtain the matrix of the selected points Print "Click to select a point OR press ANY KEY to continue." #print "For verbose mode, set DEBUG flag" Print "TASK : Mimic getxy() feature of MATLAB" Print "Using OpenCV version : ",cv2._version_ I tried to recreate that functionality in python based OpenCV, and the result is the following code: The Image Processing Toolbox in MATLAB has this very useful utility called as ginput, which allows manually picking co-ordinate points from an image.
