Breakthrough / DVR-Scan

:vhs: Tool for extracting scenes with motion from videos (e.g. security camera or DVR footage). Written in Python, uses OpenCV.
http://www.dvr-scan.com/
Other
371 stars 49 forks source link

High Resolution, unable to mouse select roi #59

Closed KevParris closed 2 years ago

KevParris commented 3 years ago

I have video with resolution 2592x1944 and want to select a rectangle of interest using the mouse. The image presented by DVR-Scan for this is full-scale and much larger than my 1920x1080 physical screen. I have not figured out a way to move the image around so the portion where I want to click/drag is visible. If I right-click on the image title bar and choose move, the cursor up-arrow key will move the image up but Windows snaps it back down to keep the title bar visible before I can do anything else.

I realize re-scaling the image to fit the screen will affect precision/accuracy of the click/drag positioning, but I think it would be good enough

Or the image could be presented in a frame with scroll bars perhaps? And maybe with a zoom in/out feature?

Breakthrough commented 3 years ago

Unfortunately right now DVR-Scan just uses the OpenCV GUI for displaying the image, which makes any kind of scrolling difficult to implement. However, it should be feasible to somehow detect the user's resolution, and downscale the preview image accordingly.

As a temporary workaround, you can export a single frame of your video using ffmpeg, and use a photo editor like Paint or GIMP to figure out the exact bounding box you need. Then you can pass those values directly to --roi.

Hope this helps for now, thanks for the report!

Breakthrough commented 2 years ago

Completed in v1.4 branch, will be included in next release.

If you're installing via pip, install the screeninfo package to resolve this issue.

Thanks for the bug report!