Presentation is loading. Please wait.

Presentation is loading. Please wait.

5th Intensive Course on Soil Micromorphology Naples 2001 12th - 14th September Image Analysis Lecture 5 Thresholding/Segmentation.

Similar presentations


Presentation on theme: "5th Intensive Course on Soil Micromorphology Naples 2001 12th - 14th September Image Analysis Lecture 5 Thresholding/Segmentation."— Presentation transcript:

1 5th Intensive Course on Soil Micromorphology Naples 2001 12th - 14th September Image Analysis Lecture 5 Thresholding/Segmentation

2 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Thresholding: basic interactive methods manual editting removal of isolated Noise pixels using SigmaScan using HIT/MISS filters. pre-use of low-pass filters to overcome illumination problems

3 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation From Lecture 3: Optimum threshold occurs at minimum in intensity histogram But minimum not always present when it is, non-uniform illumination or other illumination issues can prevent ideal segmentation and editting is needed

4 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Often individual particles may touch Or features have holes in them caused by illumination problems

5 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Removing holes using Sigmascan manually using Sigmascan other software using feature analysis facilities [lecture 7 will cover feature analysis in depth] Separating touching particles: manual approach - used in this course A problem: When is a particle one particle or two touching particles?

6 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation a) f)e)d) c) b) Which, if any, of above are considered as touching particles, and which are single particles?

7 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Filling Holes - SigmaScan Method - Step 1 Select best threshold mannually

8 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Filling Holes - SigmaScan Method - Step 2 Edge particles are not filled

9 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Filling Holes - SigmaScan Method - Step 3 Remove edge features

10 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Removing holes - Sigmascan - summary threshold image in manner covered in practical yesterday display threshold in say RED overlay use OVERLAY/MATHS - Fill Holes option if required use OVERLAY/MATHS - Delete Edge objects

11 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Threshold image as well as possible [particle white/background black] Use particle/feature analysis program Select background, and specify minimum area of feature to be much larger than largest hole. This should identify only background and not holes. Makes background white and particles black Negate image so that particles are now white Alternative Approach: where analysis is NOT done in overlay plane:

12 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Manual Editting - to separate particles - step 1 Check drawing mode overlay is green [measurements/settings/o verlays]. Also check pen thickness is 3 pixels Use annotation tool to draw separation

13 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Manual Editting - to separate particles - step 2 Annotation will normally be more than needed, so we need to identify the region which has both the green and red overlay i.e. blue in figure. Select OVERLAY/MATH and options as shown.

14 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Manual Editting - to separate particles - step 3 Blue shows where breaks should be - so above OVERLAY/MATH option will only show where particles are and not join.

15 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Problem where thresholding leaves small isolated pixels. Where software has facilities for HIT and MISS transform, this may be used. With SigmaScan the following may be used.

16 Threshold image into overlay RED OVERLAY/Filters as above gives image at bottom left - i.e. and erosion has reduced size of large particle, but removed small isolated pixels 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation NOTE: this is equivalent to normal erosion

17 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Threshold image into overlay RED OVERLAY/Filters as above gives image at bottom left - i.e. and erosion has reduced size of large particle, but removed small isolated pixels

18 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Using original RED overlay again. OVERLAY/Filters as above gives image at bottom left - i.e. boundary of large particle is highlighted.

19 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation With image at top left: OVERLAY/Maths Select options as above - i.e.where overlay is either green or blue colour output yellow. YELLOW overlay has desired result.

20 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Hit and Miss Filters: - background Most filters operate by using a multiplier for each pixel in an area defined by a kernel. In this example the output image is determined by multiplying the pixel value in question by 2 and all the 8 neighbouring ones by 1. The kernel may be any size from 1 pixel up to almost any size, but many analysis facilities limit overall size (e.g. SigmaScan has a limit of 9 x 9 pixels).

21 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Hit and Miss Filters: These operate differently and only on BINARY IMAGES: a typical HIT and MISS Filter In the example, the kernel is passed over a binary image. The corresponding pixels in the output image are only ste to 1 if the kernel exactly matches the image at the location. In this example, this match only occurs for isolated noise pixels. Many HIT and MISS algorithms, have the ability to directly subtract the output value from the input image and in this way isolated pixels of noise can be removed directly.

22 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Low Pass Filters: Smooth the image over a large radius may be helpful when there is non-uniform illumination which would otherwise cause problems during thresholding. Image has non uniform illumination: It may be possible to generate a blank image to subtract from original. Otherwise, an approximation can be used. Process is known as image restoration

23 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation When a calibration image is available prepare a blank slide of resin of same thickness as normal thin sections. Photograph under same illumination conditions as for slide of interest. Intensity of background may not be exactly same in both images

24 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Identify the intensity in both the actual (Ia) and calibration image (Io) at several locations corresponding to background find the ratio (R) of these intensities Ia/Io Subtract from actual image R * calibration image This should give a good estimate of restored image - usually better than using uncalibrated approach. NOTE: In SIGMASCAN there is no direct way to add/subtract/ multiply an image by a constant - this must be done indirectly using Image/Filter and Image/Maths

25 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Modification to procedure for SIGMASCAN find the ratio (R) of these intensities Ia/Io as above Use calibration image and filter using following custom filter. Note: the divisor should be set to value 100 / R. In this case R = 1.96 and divisor = 100/1.96 = 51

26 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation STEP 1: when a calibration illumination image IS NOT VAILABLE. generate image averaged over large radius Image averaged using a filter radius of 72. Radius must be chosen carefully and be larger than size of features of interest. Usually some experimentation is necessary to find optimum radius

27 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation STEP 2: subtract averaged image from original Though not perfect, the background illumination has been supressed making thresholding much easier.

28 5th Intensive Course on Soil Micromorphology - Naples 2001 Image Analysis - Lecture 5: Thresholding/Segmentation Thresholding in many cases is not easy Aim to get good contrast of features of interest Minimise problems of non-uniform illumination May need Manual Editing to separate touching particles or fill holes or remove noise Accuracy of result will depend on the segmentation and care is needed Subjectivity may cause problems between different operators Concluding Remarks


Download ppt "5th Intensive Course on Soil Micromorphology Naples 2001 12th - 14th September Image Analysis Lecture 5 Thresholding/Segmentation."

Similar presentations


Ads by Google