Forum Archive Home -> Programming -> Video resolution detection
Video resolution detection | ||
| mattyh posted 2009 Mar 25 14:21 | ||
| Hey,
I am trying to detect the difference between a matted/letterboxed 2.23:1 picture and a matted/letterboxed 1.85:1 picture. Is this possible and is there any program available that can do this? Have tried looking through Windows Media Player API, DirectShow API and Windows Media Center API. Came across a couple of potential items, but can anyone shed any light if this is actually possible before I go wasting more time? Cheers, Matt | ||
| minidv2dvd posted 2009 Mar 25 16:09 | ||
| not likely. the only thing the video headers will supply is what the video is now - 4:3, not what it was before the black bars were permanently encoded into the video. | ||
| manono posted 2009 Mar 25 17:45 | ||
If you're asking how to crop and resize them automatically, AutoGK has that feature. Maybe run the 2 of them through AGK and study the AviSynth scripts it generates. AviSynth's Autocrop.dll does the cropping. Otherwise I'm not quite sure what you're asking. I can tell the difference with my eyes. | ||
| JohnnyMalaria posted 2009 Mar 25 18:06 | ||
| Mask the frame with a rectangle exactly the same size and location of the active region of a 2.23:1 image and measure the amount of black in the resulting image. A 2.23:1 will result in a wholly black frame. A 1.85:1 will have residual active image data. You could create a histogram of the masked image to count the number of pixels of a given color. You may need to fine tune things to account for things such as the bars not being perfectly black etc. |
Login/Register to our forum to be able to post here.
