cv-plot icon indicating copy to clipboard operation
cv-plot copied to clipboard

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

Open wystephen opened this issue 2 years ago • 6 comments

wystephen avatar May 30 '22 07:05 wystephen

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

wystephen avatar May 30 '22 07:05 wystephen

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

wpalfi avatar Jun 07 '22 08:06 wpalfi

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

wystephen avatar Jul 20 '22 09:07 wystephen

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.

wpalfi avatar Jul 20 '22 09:07 wpalfi

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.

wystephen avatar Jul 20 '22 09:07 wystephen

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.

wpalfi avatar Jul 20 '22 11:07 wpalfi