Am 14.10.2021 um 12:07 schrieb Paul B Mahol:
Sorry but I'm not on windows, so I can not use your script.

Then try the below (slightly improved) version. It would become much simpler with variables:
ARRAY_H = pow(2,ceil(log(ceil(W*10/9))/log(2)))
ARRAY_V = pow(2,ceil(log(ceil(H*10/9))/log(2)))

The test image contains wavelengths from 4 to 8 (in the center) to 16 pixels per linepair. The filter wavelength is independant of input size. You can change the size in the first command (but it must be 1:1 aspect ratio, otherwise hstack would fail)

Michael


ffmpeg -f lavfi -i color=black:s=230x230 -lavfi geq='r=127.5+127.5*cos((X-W/2)*PI/(pow(2,(1+2*Y/H))))',colorchannelmixer=1:0:0:0:1:0:0:0:1:0:0:0,split[h][v];[v]transpose[v];[v][h]hstack -frames 1 -y test.png

ffmpeg -i test.png -vf scale=2*iw:2*ih,fftfilt=dc_Y=0:dc_U=0:dc_V=0:weight_Y='lte(hypot(X/pow(2,ceil(log(ceil(W*10/9))/log(2))),Y/pow(2,ceil(log(ceil(H*10/9))/log(2)))),1.0/8)':weight_U=1:weight_V=1,scale=iw/2:ih/2 -y lowpass.png

ffmpeg -i test.png -vf scale=2*iw:2*ih,fftfilt=dc_Y=128:dc_U=1:dc_V=1:weight_Y='gte(hypot(X/pow(2,ceil(log(ceil(W*10/9))/log(2))),Y/pow(2,ceil(log(ceil(H*10/9))/log(2)))),1.0/8)':weight_U=1:weight_V=1,scale=iw/2:ih/2 -y highpass.png

ffmpeg -i test.png -vf scale=2*iw:2*ih,fftfilt=dc_Y=128:dc_U=1:dc_V=1:weight_Y='between(hypot(X/pow(2,ceil(log(ceil(W*10/9))/log(2))),Y/pow(2,ceil(log(ceil(H*10/9))/log(2)))),0.8/8,1.2/8)':weight_U=1:weight_V=1,scale=iw/2:ih/2 -y bandpass.png

ffmpeg -i test.png -vf scale=2*iw:2*ih,fftfilt=dc_Y=0:dc_U=0:dc_V=0:weight_Y='1-between(hypot(X/pow(2,ceil(log(ceil(W*10/9))/log(2))),Y/pow(2,ceil(log(ceil(H*10/9))/log(2)))),0.8/8,1.2/8)':weight_U=1:weight_V=1,scale=iw/2:ih/2 -y notch.png


_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to