F2Quiver, and F2QuiverUV functions transforms image into 2d frequency domain, applies filters and transforms back into image domain. Gaussian or Butterworth band stop, lowcut, high cut and notch filters are designed with circular, or vertical, or horizontal, or point or line symmetry in frequency domain. In addition for F2Quiver, upto two Elliptic notch filters can be specified. Filters can be cascaded. All these filters are available for HomoMorphic proceesing option as well
Filter radial length can be specified. To avoid wrap around error, internally the transforms are in an extended frame size.
Homomorphic filtering :- The input image can be considered as the multiplication of incident light and the reflectivity of objects. While incident light varies usually slowly, the reflectivity varies more quickly. Homomorphic filtering is done to seperate these components with an appropriate low cut (high pass) filter. A mfact parameter scales after this homomorphic filtering. Results may not e appealing
24 types of Standard filters are specified using abbrevated names as below:
First letter is either b for butterworth, or g for gaussian.
Second letter is type of symmetry: v for vertical, h for horizontal,
c for circular, p for point, and l for line.
third letter is either h (high cut) or l (low cut), or b (band stop)
or n( notch). For point symmetry third letter is a numeral 0 to 9.
for line symmetry band stop and notch the fourth letter is a numeral 0 to 9.
The first integer value after filter name is the cut off or central frequency.
For c, l or p symmetry it is the horizontal freq and must be a positive number.
The second number is band or notch width as a %age for v , h, c symmetry.
For p or l symmetry, it is the vertical frequency (can be negative). Some valid number must be specified
even if this entry is not relevant for some filters (bvl, bvh,bhl, bhh,gvl, ghl, ghh, gvh).
The numeral forming part of name is used to get band or notch width.
The cutoff frequency is either a point where amplitude falls to 50%, or to 67%. Similarly band width or notch width corresponds to those points. While a notch reject has a V shape, bandstop has a U shape
The valid filter names are:
gp0, gp1, gp2, gp3, gp4, gp5, gp6, gp7, gp8, gp9
gcb, gcn, gch, gcl, gll, glh,glb0,glb1,..glb9, gln0,gln1,..gln9
bp0, bp1, bp2, bp3, bp4, bp5, bp6, bp7, bp8, bp9
bcb, bcn, bch, bcl, bll, blh,blb0,blb1,..blb9, bln0,bln1,..bln9
bvh, bvl, gvh, gvl, bhh, ghh, ghl, bhl
Degree is the Butterworth filter sharpness degree. This value is used for all Butterworth filters being used in a cascade. Gaussian filter is equivalent to a Butterworth filter of degree 1. Gaussian filters are gentler and produce no ringing. If different degrees are required for butterworth filter, then repeating them and or repeating a gaussian filter of same type and identical parameters it can be achieved for the degree will add up. For example if you specified degree as 2 and for a particular filter "bch",100,10, and you need degree of 5, "bch",100,10, "bch",100,10, "gch",100,10 will get the 2+2+1 degree.
Upto two elliptic areas can be specified as notch filters. This facility is available in F2Quiver only. Number of elliptic filters, freq coordinates along x and y of the two focii of the ellipse, factor to get major axis length and sharpness of filter need to be specified.If sharpness is 1 then Gaussian Filter is designed otherwise Butterworth is designed.
A test facility is included. In this option the power spectrum is shown in the left or right half of screen. The other half displays half of input image (unfiltered). Filters need not be specified in this option. It should be noted that the horizontal and vertical frequencies must be related to the rulers provided
Presence of sharp high amplitude objects (such as logos) may overwhelm the image frequencies and can make finding low level noise frequencies difficult. (Using morph=true for test can bring out these clearly). As a sharp discontinuity requires all frequencies of spectrum to be present, any filtering that affects the balance can create undesirable ringing. If possible cropping and re joining after processing may be useful in those cases.
Rescale facility is available. But Avisynth has better scaling functions. Where low frequencies and the value at origin is affected, rescaling may be needed
Only YUY2 and YV12 formats are acceptable. Y values only are processedby F2Quiver, while U and V values only are processed by F2Quiver UV. Most of the parameters are same for both functions. The differences are shown in the table below. Frame height and width must be multiples of 4.
| Description | Name | Type | Limits | Default |
| Input clip | clip | none | ||
| Array of values | sets of string and integers. First entry is any filter abbrevated name , followed by a frequency and bandwidth % age (or vertical freq) value pair. (Bandwidth is not used for low cut and high cut.but a value must be specified. | |||
| Degree of Butterworth Filters | degree | integer | 0 to 32 | 2 |
| Is this a test run? | test | boolean | true for yes | false |
| Is rescaling of output required? | rescale | boolean | true or false | false |
| gamma value to be used for spectral display scaling | gamma | float | 1.0 is no scaling | 0.1 |
| Is this homomorphic process? | morph | boolean | true or false | false |
| Is spectrum to be displayed in left half of frame? | left | boolean | true or false | true |
| Mult factor to boost image after homomorphic filtering | mfact | integer | 1 to 10000 | 255 |
| Filter radial length | frad | integer | 16 to half of smaller frame dimension | 1/4th frame smaller dimension |
| Number of Elliptical Filters specified (f2quiver only) | nef | integer | 0, 1, or 2 | 0 |
| X freq of foci 1 of filter 1 (f2quiver only) | f1x1 | integer | -256 to 256 | must be specified |
| y freq of foci 1 of filter 1 (f2quiver only) | f1y1 | integer | -256 to 256 | must be specified |
| X freq of foci 2 of filter 1 (f2quiver only) | f1x2 | integer | -256 to 256 | must be specified |
| y freq of foci 2 of filter 1 (f2quiver only) | f1y2 | integer | -256 to 256 | must be specified |
| multiplier of focii distance for filter 1 (f2quiver only) | mf1 | float | 1.0 to 2.0 | 1.05 |
| filter sharpness for filter 1 (f2quiver only) | sh1 | integer | 1 to 9 | 2 |
| X freq of foci 1 of filter 2 (f2quiver only) | f2x1 | integer | -256 to 256 | must be specified |
| y freq of foci 1 of filter 2 (f2quiver only) | f2y1 | integer | -256 to 256 | must be specified |
| X freq of foci 2 of filter 2 (f2quiver only) | f2x2 | integer | -256 to 256 | must be specified |
| y freq of foci 2 of filter 2 (f2quiver only) | f2y2 | integer | -256 to 256 | must be specified |
| multiplier of focii distance for filter 2 (f2quiver only) | mf2 | float | 1.0 to 2.0 | 1.05 |
| filter sharpness for filter 2 (f2quiver only) | sh2 | integer | 1 to 9 | 2 |
| whether U values need to be processed? Not avalable for F2Quiver | uu | boolean | true or false, both uu and vv should not be false | true |
| whether V values need to be processed? Not avalable for F2Quiver | vv | boolean | true or false, both uu and vv should not be false | true |
F2Quiver(img,nef = 2, f1x1 = 77, f1y1=-225,f1x2=77,f1y2=-180,mf1=1.25,sh1=1,f2x1=77, f2y1=27,f2x2=77,f2y2=70,mf2=1.905,sh2=5) test=F2Quiver(test=true, morph = false, gamma = 0.1) crop(test,0,0,360,0)