knutinh said:Well, I could try recording some tonight. I can offer DVB-T and analog cable recordings (PAL). 30-60 seconds of each channel/format enough?
-k
ziphnor said:It seems ill have to learn DirectShow, damn....
knutinh said:I have found a plugin for visual studio that automtically defines a DirectShow framework Source, renderer, In-place or Transform filter. It basically lets you fill in the core algorithm. Provided, of course, that you dont need any non-standard communication with the outside.
DirectShow is complex yes. But do you really need it to test algos? I am shure that some C# library can utilise windows libs to load one MPEG2 frame at a time?? MATLAB can, although you'd better grab a can of your favourite beverage while witing for the result ;-)
jawbroken said:Thank you for the code, I will need to dust off my copy of Visual Studio as I have been writing mostly Java code for uni at the moment. Your image code should be a helpful starting point to get me up to scratch. I have been thinking that the best way to find corners would be to start in, say, the top left corner and scan down diagonally, say in units of 4 pixels, then backtrack when you find interesting pixels to find the edge. Then you can figure out if it is a horizontal or vertical edge by sampling around the area. Once it has been determined to be horizontal or vertical, the edge can be followed to the corner. Then the same steps can be followed from the bottom right corner. Then it only remains to scan the subtitle area, which is best done in its own special way, I think, as it differs greatly from regular video sections.
jawbroken said:Does a DirectShow filter process video as frames or as a stream?
ziphnor said:Doesnt scanning diagonally put you in danger of 'discovering' logos?(many channels have logos in the top left corner). I think its best to scan down the middle since thats where the 'action' is.
I would prefer to decrease pixel checks by means of binary search. Ie, start by checking the middle of the screen, if it has image content, try 1/4 up/down(depending on scan direction) etc. To further decrease time complexity i am considering the histogram technique suggested, but with one histogram per color component(ie YUV or RGB). The max number of different values over all components seen would then decide if it was image content or not, with an added check for occurrence of high brightness.