Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Scene Detection
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
bouchert
Posted: Feb 18 2003, 10:29 PM


Unregistered









Maybe this belongs in the newbie section to make sure I know what I'm talking about, but I've been trying to use the scene detection for a while now, and have had a lot of trouble finding a good threshold. It seems either fast camera panning or lots of close-up action will trigger it, or it'll miss a lot of fairly obvious cuts. Looking at the source code, it looks as if the scene detector only considers the difference of two frames when determining if a scene cut has occurred. I'm wondering if the following would be better, and might still perform adequately:

Take three frames. Not only the current frame, but the two preceding frames in the scan direction. Let's call the frames A, B, and C, where C is the "current" frame, B is the one before it, and A is the one before B. Then we calculate the difference between A and B, and the difference between B and C. If the difference between B and C is higher than the difference between A and B by some threshold value, then there is a cut between B and C.

The benefit of this method is that it detects increases in the rate of change between frames, not simply changes between frames. So, even if there is a lot of change between frames, it will not trigger the scene detector as long as the movement starts slowly enough. And even if the start of the movement triggers a scene detection incorrectly, at least it will wait until the motion level jumps again before thinking another scene change has occurred rather than triggering repeatedly as the motion level remains high.

I'd love to have tried this before suggesting it, to make sure my idea wasn't completely bogus, as it seems pretty obvious how to extend the existing code, but unfortunately I don't have access to a development environment anymore. So, I'm just tossing this out there. Is my understanding of the current scene detector correct, and is my idea plausible?

 
  Top
ChristianHJW
Posted: Feb 18 2003, 11:06 PM


Advanced Member


Group: Moderators
Posts: 1768
Member No.: 2
Joined: 7-July 02



As Avery was pointing out here in another thread, most codecs use their own alogos to decide where to place a keyframe ( scene change detection ), Vdub has no influence on that ..... dont ask me though what the threshold settings are good for, i cant remember biggrin.gif !

--------------------
Visit the unofficial Virtualdub support forum on http://forums.virtualdub.org - help to reduce the big number of emails Avery Lee is getting every day !!
Support matroska as container and Gstreamer as the only truely open, x-platform multimedia platform ....
 
       Top
bouchert
Posted: Feb 19 2003, 01:28 AM


Unregistered









Perhaps I wasn't clear. I wasn't referring to scene change detection in codecs for the purpose of keyframe generation. I was referring to the two navigation buttons with the Green and Red wedges on them, and the code that determines what frame they stop on once pressed.
 
  Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
2 replies since Feb 18 2003, 10:29 PM Track this topic | Email this topic | Print this topic

<< Back to VirtualDub Development Forum