[FFmpeg-user] scaling algorithms
Michael Koch
astroelectronic at t-online.de
Tue Sep 21 09:20:44 EEST 2021
Am 20.09.2021 um 21:51 schrieb Paul B Mahol:
> On Sat, Oct 17, 2015 at 3:58 PM Michael Koch <astroelectronic at t-online.de>
> wrote:
>
>> > That looks like the job for the filter, see inflate, deflate, erosion
>> and dilation filters.
>>
>> I just tested the dilation filter. It's a nice workaround if the
>> downscaling factor is 3:1, as in my example. But if the downscaling
>> factor is smaller, for example from 5472x3648 to 900x600, which is 6:1,
>> then it fails. The star would be visible in 50% of the frames and
>> invisible in the other 50%. What I need is a scaling algorithm which
>> automatically chooses the brightest pixel out of the corresponding
>> pixels from the input file. If the downscaling factor is 6:1, then the
>> neighborhood is 6x6 pixels.
>>
> See new morpho filter, that gonna be in master soon.
>
> It is much faster than current filters and allow custom definition of
> structure/mask (rectangle/circle/etc) by using 2nd stream.
That sounds interesting.
Is the size of the neighborhood over which the filter is working defined
by the size of the 2nd stream?
Which pixel format must be used for the 2nd stream?
What's the meaning of the pixel values in the 2nd stream? White = pixel
is used, black = pixel is not used? What happens if a pixel is gray?
Is the original pixel in the center of the structure or is it the top
left pixel?
What's the meaning of "open" and "close"?
Please add some examples for the structure in the 2nd stream.
Michael
More information about the ffmpeg-user
mailing list