Generate an ideal highpass filter.
::gen_highpass generates an ideal highpass filter in the frequency domain. The DC term is assumed to lie in the center of the image. The parameter Frequency determines the cutoff frequency of the filter (in pixels). The resulting image contains a circle of radius Frequency with the value 0, and the value 255 outside of this circle.
|
ImageHighpass (output_object) |
image -> Hobject * : HImage ( byte ) |
| Highpass filter in the frequency domain. | |
|
Frequency (input_control) |
real -> HTuple.double |
| Cutoff frequency. | |
| Default value: 20 | |
| Suggested values: 10, 20, 30, 40, 50, 60, 70, 100 | |
| Typical range of values: 1 <= Frequency <= 200 | |
| Minimum increment: 1 | |
|
Recommended increment: 1 | |
| Restriction: Frequency > 0 | |
|
Size (input_control) |
integer -> HTuple.long |
| Size (dimension) of the image (filter). | |
| Default value: 512 | |
| List of values: 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192 | |
my_highpass(Hobject Image, Hobject *Result, int frequency, int size)
{
Hobject FFT, Highpass, FFTConvol;
fft_image(Image,&FFT);
gen_highpass(&Highpass,frequency,size);
convol_fft(FFT,Highpass,&FFTConvol);
clear_obj(Highpass); clear_obj(FFT);
fft_image_inv(FFTConvol,Result);
clear_obj(FFTConvol);
}
::gen_highpass returns H_MSG_TRUE if all parameters are correct. If necessary, an exception handling is raised.
::convol_fft, ::gen_lowpass, ::gen_bandpass, ::gen_bandfilter
Image filters