I am reading an image using OpenCV. It looks like when I click on a pixel then I could display the pixel coordinates and info using the cv2.setMouseCallback()
function. I want to display those info right under the mouse cursor.
I searched Google and it looks like I need to use GUI libraries. Is there a similar function in OpenCV?
CodePudding user response:
Well, it is not impossible, but you do not want to do it. OpenCV can display an image, so you would have to draw anything you need into the image and display the new image in the same window.
CodePudding user response:
maybe you can try matplotlib, because what you want(coordinates and values) is already satisfied in that.
import matplotlib.pyplot as plt
plt.imshow(image)
plt.show()