• Raytracing • | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
> Intro > Overview > Fisheye > Cube > Light > Filter > Plugins • Plugin Filter |
— IBL and HDRI: HDRShop, Plugin Filter — Blur Filter Motion-Blur
Left the source image, right motion blur with Size=20, Sigma=8.0 and Angle=-45.0 Statistical Filter Maxmedin – Maximal, Median, Minimal (opening & closing) The Minimal filter finds the pixel with the lowest value under the mask and inserts this value into the new image. The minimal filter erodes the picture. Conversely, the Maximal filter finds the pixel with the highest value under the mask and inserts that one into the new image. The maximal filter expands the picture. The Median filter fetches all pixel values under the mask, sorts them in ascending or descending order and puts them in a list. The value that can be found in the centre of the list is the one that makes up the new pixel in the new image. If a picture is eroded (minimal filter) and the resulting image expanded (maximal filter) than the picture was Opened. A picture can be Closed if it is first expanded and the result eroded. The mask can be configured in different fashions. The Maxmedin plugin uses a square mask by setting all fields in the mask to 1. Other statistical filters do not set all fields, ordering them to a '+' (cross) or a 'x' (diagonal). Thus, a 3 x 3 mask does only have 5 of 9 fields set and hence only 5 pixels below the mask are taken into account for the result. The filter type and the mask size can be specified:
The picture shows the effect of the filter with Size=5. [1] original, a noisy part of an astronomy photograph taken with a CMOS DSLR without noise reduction engaged. [2] minimal filter, [3] maximal filter, [4] median filter, [5] opened (min & max), [6] closed (max & min). In the picture with the maximal filter, the square mask format is very obvious. MyFilter — Your own filter Here, custom masks for convolving filters can be defined. Statistical filters select pixel values that lie under the mask that meet a particular specification and create a new image with them. Another variant of convolving filters additionally manipulates the values of the pixels found under the mask. Highpass and lowpass filters (sharpen, blur) multiply the values of the pixels that lie under the mask by the value defined in the correspnding mask field and divide the result by the sum of all values found in the fields of the mask. This value is given to the new pixel in the new image at the position corresponding to the centre of the mask. Contour or outline filters are different. The sum of all values in the fields of the mask must be 0. The values of the pixels under the mask are multiplied by the value of the corresponding mask field and the result saved at the position of the centre of the mask in the new picture. The new values may be negative because the mask may contain negative values in its fields. The resulting picture is displayed correctly in HDRShop but once saved and reloaded, it is just black. Prior to saving, all values have to be made positive using Image > Calculate > |A| (see Light > Mathematical Functions). The full file specification (drive, path, file name) must be supplied:
If the filter file cannot be found, a black picture results, even though the plugin reports Success! Well, at least it does not crash. Three examples. The masks for the filters are shown below. [1] is the original picture, [2] blurred with the low pass filter shown just below as example for a filter file, [3] sharpened with the very strong highpass filter (see masks below) and [4] contours emphasised with the diagonal contour filter after Sobel (mask shown below). Format of the Filter File
The example shows the lowpass filter used for the example [2] above. It consists of a 5 x 5 mask (size: 5) and hence needs values in five columns and five rows. The values of the 25 pixels lying under the mask are added and the result is divided by 25. This will be the value for the new pixel. Filter Masks
Filter masks from Hans-Ruedi Wernli «Die CCD
Astrokamera für den Amateur» (Birkhäuser 1995), All convolving filters exhibit a unprocessed frame. This frame is one pixel wide for a 3 x 3 mask, two pixels for a 5 x 5 and three pixels for a 7 x 7 mask. The larger the mask, the more effective the filter gets. For most applications, a 3 x 3 mask suffices nicely, though. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
© 2004 - 2018 by Horo Wernli. |