JeanMarc
3rd June 2013, 18:43
I am typically using the cropdetect filter, generally with ffmpeg or mplayer, to define the crop parameters of my TV recordings.
Some of those have two logos in the top right and left corners, generally above the useful area of the frame. As a result, when I crop the image, the logos are removed, but those logos prevent cropdetect from automatically finding the good crop parameters.
Is there a way to customize cropdetect and tell it to avoid looking at the logo areas, for example the top left and right corners?
For example, the correct cropping parameters are: [712, 360, 4, 58]. The two logos sit above the top line (Y = 58) in the two corners. When finding the top border (at Y = 58) , cropdetect should look only between X = 180 and X = 640.
This would be the only restrictions, as the left, right and bottom borders don't present any problem.
It would almost be possible (but not convenient) to obtain that result in two passes. One pass to find the right, left and bottom lines, and a second pass where the logos would be cropped so that cropdetect could find the top line (Y=58).
I am just wondering if cropdetect could be modified to be told not to look in a small area of the picture.
Some of those have two logos in the top right and left corners, generally above the useful area of the frame. As a result, when I crop the image, the logos are removed, but those logos prevent cropdetect from automatically finding the good crop parameters.
Is there a way to customize cropdetect and tell it to avoid looking at the logo areas, for example the top left and right corners?
For example, the correct cropping parameters are: [712, 360, 4, 58]. The two logos sit above the top line (Y = 58) in the two corners. When finding the top border (at Y = 58) , cropdetect should look only between X = 180 and X = 640.
This would be the only restrictions, as the left, right and bottom borders don't present any problem.
It would almost be possible (but not convenient) to obtain that result in two passes. One pass to find the right, left and bottom lines, and a second pass where the logos would be cropped so that cropdetect could find the top line (Y=58).
I am just wondering if cropdetect could be modified to be told not to look in a small area of the picture.