Profactor / cv-plot

fast modular opencv plotting library
MIT License
157 stars 29 forks source link

Not well support qt-backend of cv::imshow(). #30

Open wystephen opened 2 years ago

wystephen commented 2 years ago

In detail, the right button of the mouse and the wheel of mouse are handled by cv::imshow.

wpalfi commented 2 years ago

Thank you for reporting, sounds reasonable. I dont have time to look into it. Would you like to provide a fix?

wystephen commented 2 years ago

I want to make some modifications. But I am not familiar with OpenCV imshow() and your project. Could you give me some hints?

wpalfi commented 2 years ago

I have no experience with the qt backend and never used it together with cv-plot. cv-plot's interactive viewer is based on cv::setMouseCallback() and the traditional cv::imshow(). The qt backend supports zooming which interferes with cv-plot's zooming. I guess it may be best to deactivate qt-zooming.

wystephen commented 2 years ago

But I don't think deactivating qt-zooming is easy to implement without modifying OpenCV Lib. Is there any way to handle key press events for each window separately? Using a keyboard may be easier to be implemented.

wpalfi commented 2 years ago

Maybe using cv::WINDOW_GUI_NORMAL works? Another way could be to use an additional modifier key (ctrl/shift/alt) for cv-plot. You could try to subclass (or replace) CvPlot::Window.