Menu description
Here are described the usage of the various buttons and checkboxes visible on the BlueNile window.
Input imageThe image you load for filtering is displayed on the left pane of the BlueNile window. The numbers at it's sides correspond to the pixels on the rows and columns.
You will do the filtering on the middle pane image. It shows a representation of the magnitude of the Fast Fourier Transform (FFT). The FFT is a decomposition of the spatially distributed values of the input image into its defining frequencies (thus the term 'frequency domain' as opposed to the 'spatial domain'). That a signal can be decomposed - and then looseless recomposed - into a series of pure frequencies has been proven by the French mathematician Jean-Baptiste-François Fourier (1768-1830).
Thus a number of parallel, evenly spaced, horizontal lines will apear on the FFT as two bright spots symmetrically disposed in regard to the centre of the FFT, at a distance from the centre equal to their quantity (tick marks on the sides of the FFT let you read this distance) and with a vertical slant corresponding to their actual slant on the image (vertical if the lines are perfectly horizontal). If the lines are not perfectly even spaced, the spots on the FFT will be wider than just one pixel : their spread gives the amount of variation.
The intensity of a spot (or, more precisely, the magnitude of a specific frequency) is proportional to the amount of repetivitiy of a feature in the input image.
Details in the input image are displayed on the margin of the FFT (they are often repeted, thus having a high frequency). Global feature (low frequencies) are present around the centre of the image. Thus by suppressing the outer parts of the FFT you zeros the high frequencies and produce a smoother image; whereas by emphasizing the same frequencies you enhance details in the image.
The filtering is done on the magnitude (or real part) of the FFT, leaving the phase (or imaginary part of the complex FFT values) untouched.
The results of the filtering is show on the right pane. The image is updated at each command that modify it, such as filtering or adjusting. It is this image that you will save when pressing the [ Save ] button.
LoadLoads an image to be filtered and automatically readiest Blue Nile for filtering (the label [ Filter shape ] changes color from gray to red). Supported image formats are jpg, tif (compressed tif's are not supported and such files will be skipped), bmp, png, pcx, hdf, xwd. Sample images are provided in the ..\batch directory.
The name of the file is displayed on the window bar, on the upper part of the BlueNile window.
You don't have to use this button unless you interrupted the filtering.
Remember that the filtering modus is active until you press a key on the keyboard - in which case the label [ Filter shape ] will change from red to gray.
The [ Filter ] button let you restart filtering after an interruption. During an interruption you may change the settings, for example change the power or the shape of the filter. [ Filter ] dose not delete the filters you allready applied to the image, as [ Undo ] does.
Technical note:The filter applied to the FFT is a step function, not a gradually transition. This is OK for small areas of selection. Should however bigger selections made, ripples will appear in the output image. (A new version of BlueNile should offer smooth filters.)
Filtering color images
The filtering of RGB color images is done by transforming them to HSV colorspace, filtering the intensity layer as it where a grayscale image, then recombing it with the original Hue & Saturation layers and bringing them back to RGB.
Filtered images are saved to the same directory from where the input image was read. They are saved along with the complementary image and the mask used for filtering. Two valued masks (when you used just one power value to filter) are saved as black&white images; multivalued masks as grayscale images. The saved mask are useful to keep track of what filter you did apply on your input image.
The name given to the saved files are that of the file itself, plus the following suffixes: _f for the filtered image, _c for its complement and _m for the mask.
To discard all filters and start again from scratch with the same image, press the [ Undo ] button.
Ellipse / RectangleThese two radiobuttons let you choose the shape of the selected region: eliptic or rectangular. By combining these two shapes and with the help appropriate settings of the [ Power ], you can generate various filtering shapes.
For exemple you may whish to have two quarters of a ring with power 0. Do this: set [ Power ] to 0, select [ Ellipse ], uncheck [ Symmetric ], press [ Filter ], define a disk with centre in the middle of the FFT image, press a key to stop filtering, set power to 1, draw again a disk, smaller and inside th previous (now you got a ring of power 0), stop filtering, select [ Rectangle ] and [ Symmetric ], define a rectangular region that overlaps the NE part of the ring. You can visualise the filter by pressing [ Show filter ] on the upper part of the BlueNile window.
BlueNile works by modifying the magnitude of selected regions of the real part of the FFT. [ Power ] tells BlueNile by how much these frequencies should be modified (the frequencies qre multiplied by the figure given in [ Power ]). For exemple, a power of 0 sets all frequencies in the enclosed selection to 0, power 1 does not change anything and power 3 multiplies the frequencies by 3.
You can use positive integers as well as fractional numbers. During a filtering session - that is as long as the label [ Filter shape ] stays red - all the applied filters have the same power as defined in [ Power ]. To apply filters of other powers on the FFT, stop the session by pressing any key on the keyboard, modify [ Power ] and press [ Filter ] to start filtering again
On the displayed FFT image the NW quarter is symmetric to the SE one and the NE quarter to the SW one. The reason is that you cannot have a frequency higher than half of the amount of maximum pixels in every direction (this is one pixel of same intensity every other pixel). Thus the regions you select to filter must be pairs, symmetricaly positioned in regard to the centre of the image.
However, in order to filter the centre of the image or to make composite filters, you can uncheck the [ Symmetric ] checkbox.
SelectionBy defining a filtering region on the FFT representation you modify the specified frequencies by an amount indicated in [ Power ]. In this case you filter the selection.
It is however possible to modify all the frequencies except the ones in the interior of the selection. To see the results, select [ Complement ].
AutoSetting [ Auto ] to on, BlueNile will automatically select regions as you would do manually. The number of regions depends on [ Symmetric ] and [ Passes ] (q.v.).
Autofiltering will work fine for many images - here are some limitations:
- the images should have regular, parallel patterns, that produce small, star-like shapes and not zones spreading over wide regions;
- autofiltering cannot select only the central region - the regions it selects are around the centre;
- the shape of the regions will be equal-sided, but not oblong, that is disks and squares;
- if the centre of a region is to close to the borders of the image, the selection will not be performed - you have to reduce the amount of [ Spread ].
Technical note: Autofiltering is done by low-pass filtering the input image and using the positions of the maximas to filter regions of interest in the unfiltered FFT of the image.
The low-pass filtering is achieved by a NW-SE derivative (A negative of the image is produced with a shift of one pixel downwards and one pixel towards right, then the difference of the two images is computed - on the resulting image the vertical and horizontal lines will be greatly deemphasized, having thus mid and high frequencies much more stronger than the low frequencies. This technique is allows easily to localize strong frequencies without the interference of the low frequencies present around the DC.).
Enabling [ Batch ] BlueNile will automatically process all the images in the directory of the current image (displayed on the window bar, where the number of images processed is also shown). [ Batch ] is available only if [ Auto ] itself is checked.
This input gives the number of spots BlueNile will automatically select. If [ Symmetric ] is on, you will have double as much spots as shown in [ Passes ].
With [ Spread ] you indicate how wide (in number of pixels) the selected region should be. When the selection is elliptic, then [ Spread ] is equal to the radius of a disk with centre on the maxima located in the FFT, if it is rectangular, then [ Spread ] equals half of the side of a square. Automatic selections are always equal-sided. If the selection is so wide that it encompass the border of the image, the automatic selection will not be performed.
EvenIf the output image presents wide spots of same color (that is if the background is uneven), checking [ Even ] can help you equalize the global aspect of the image.
Example: Load the file kb108.jpg, filter out the horizontal lines and then apply in the following order the adjusting filters: [ Contrast ] > [ Denoise ] > [ Even ]. You will see that [ Contrast ] makes the image looks less greyish, [ Denoise ] removes random pixels speckling the image and that [ Even ] wide areas of white and black.
Note: Image adjusting proceeds in the following order regardless of with checkbox you checked first: [ Even ] > [ Contrast ] > [ Denoise ].
Enhances the contrast of the output image, that is (on black&white images) white becomes whiter and black blacker.
Removes random pixels speckling the image.
The human eye is more sensitive to differences in color than to smooth transitions in just one color. Therefore giving different colors to specific ranges of gray intensities in balck&white images helps you better visualise those images. This is particularly clear for the FFT representation, where a colormap display reveals details and shapes hardly discernable on a grayscale.
Coords, ValuesThis functionality will display a cross-hair that you can move with the mouse over the images panes to establish precisely coordinates of specific points and their values (one for grayscale images, three for color images (Red, Green & Blue values)). If you hold the mouse button down and move the mouse you can calculate the distance between points. To stop measuring, click on the [ X ] button on the right of the measuring bar (that you can move around the window by drag-and-drop).
[ Profile ] shows the pixel values of the image along a line that you determine by choosing with the mouse a start and end point (put the cross-hair over the start position, click the left mouse button, get over the end position and click the right mouse button). Profiling is useful to look for maximas in the FFT.
Magnifies the image when you once-clicks with the mouse pointer over the image, brings you back to the original scale with a double-click.
Gives a 3D image of the filter you conceived and applied to the image.
Shows the FFT after filtering. Selections with power 0 will look black (or blue if [ Coloring ] is on), selections with power greater than 1 will look brighter than in the unfiltered FFT.
If [ Auto ] is on, [ Lowpass FFT ] will show the FFT of the lowpass filtered input image that is used to localise maximas to be filtered in the FFT of the unfiltered input image.