SlideShare a Scribd company logo
Marker controlled
watershed
segmentation
November 2018
Eng.Ansam Hadi Rashed
Al- Mustansiriya university
college of engineering
Computer Department
Watershed one of the most important method in
image segmentation has interesting properties
that make it useful for much different image
segmentation application. Watershed is a powerful
technique for rapid detection of both edges and
regions. The watershed transformation is a powerful
tool for image segmentation based on mathematical
morphology.
What is watershed?
Marker controlled watershed
• Image segmentation is significance problem in different fields of
computer vision and image processing. Image segmentation is the
process of partitioning a digital image into multiple segments
knows as set of pixels. The goal of segmentation is to simplify
change the representation of an image into something that is
more meaningful and easier to analyze.
• Segmentation by watershed transform is a fast, robust and widely
used in image processing and analysis, but it suffers from over-
segmentation, Over segmentation means a large number of
segmented regions.
Marker controlled watershed
• An approach used to control over segmentation is based on the
concept of markers. A marker is a connected component
belonging to an image.
• Markers are of two types internal and external, internal for
object and external for boundary. The marker-controlled
watershed segmentation has been shown to be a robust and
flexible method for segmentation of objects with closed contours.
• the boundaries of the watershed regions are arranged on the desired
ridges, thus separating each object from its neighbors.
Marker controlled watershed
• The basic idea of marker-controlled
watershed transform is that flooding
the topographic surface from a previously
defined set of markers.The gradient image
is viewed as topographic surface, thus,
pixels with low gradient values will be
flooded with high priority.
• results obtained show the good
performance of this approach specially in
medical branch.
Marker controlled watershed in simple example
1- consider this simple image I. It contains two primary regions, the
blocks of pixels containing the values 13 and 17. The background is
primarily all set to 10, with some pixels set to 11.
Marker controlled watershed in simple example
2- create a marker image Mr is to subtract a constant h from the mask
image I. the constant h is very important, it depends on the processed
image, and we must choose the right value of this constant. In this
example we choose h=2 then Mr = I – 2
Marker controlled watershed in simple example
3-In the output image Ire, note how all the intensity fluctuations except
the intensity peak have been removed .In the output image, all insignifi
cant local maxima will be deleted.
Marker controlled watershed in simple example
morphological reconstruction, consider this simple image. It contains t
wo primary regions, the blocks of pixels containing the values 14 and 1
8. The background is primarily all set to 10, with some pixels set to 11.
Marker controlled watershed in simple example
• Create a marker image
Marker controlled watershed in simple example
Call the imreconstruct function to morphologically reconstruct the imag
e. In the output image, note how all the intensity fluctuations except the
intensity peak have been removed.
recon = imreconstruct(marker, mask)
Recon=
Summarization of watershed steps
1. Compute a segmentation function. This is an image whose dark
regions are the objects you are trying to segment.
2. Compute foreground markers. These are connected blobs of pixels
within each of the objects.
3. Compute background markers. These are pixels that are not part of
any object.
4. Modify the segmentation function so that it only has minima at the
foreground and background marker locations.
5. Compute the watershed transform of the modified segmentation
function
Marker controlled watershed in simple exampleB-watershed
D-watershedwithmarker
Watershed VS Marker controlled watershed
• The result obtained by watershed without markers gives no
information on the regions of the original image. Against the
result obtained by watershed with markers shows the speed of
segmentation.
• Marker controlled method detects all important objects of the origin
al image , and the number of regions obtained was decreased.
• The problem of local minima is eliminated then the problem of over
-segmentation is solved.
• the markers are used to control the watershed to obtain good
results.
Watershed transformation process
1-Read Color Image and Convert it to Gray scale
rgb = imread('pears.png');
I = rgb2gray(rgb);
imshow(I)
text(732,501,'Image courtesy of Corel(R)',...
'FontSize',7,'HorizontalAlignment','right')
Watershed transformation process
2-Use the Gradient Magnitude as the Segmentation Function
The gradient is high at the borders of the objects and low (mostly) inside the objects.
hy = fspecial('sobel');
hx = hy';
Iy = imfilter(double(I), hy, 'replicate');
Ix = imfilter(double(I), hx, 'replicate');
gradmag = sqrt(Ix.^2 + Iy.^2);
figure
imshow(gradmag,[]), title('Gradient magnitude (gradmag)')
Watershed transformation process
3-Mark the Foreground Objects
se = strel('disk',20);
Io = imopen(I,se);
imshow(Io) title('Opening')
compute the opening-by-reconstruction
using imerode and imreconstruct
Ie = imerode(I,se);Iobr = imreconstruct(Ie,I)
;imshow(Iobr)title('Opening-by-Reconstruction')
Watershed transformation process
Following the opening with a closing can remove the dark spots and stem marks.
Ioc = imclose(Io, se);
figure
imshow(Ioc), title('Opening-closing (Ioc)')
Notice we must complement the image inputs
and output of imreconstruct.
Iobrd = imdilate(Iobr,se);
Iobrcbr = imreconstruct(imcomplement(Iobrd)
,imcomplement(Iobr));
Iobrcbr = imcomplement(Iobrcbr);
imshow(Iobrcbr)title('Opening-Closing by Reconstruction')
Watershed transformation process
Calculate the regional maxima of Iobrcbr to obtain good foreground markers.
fgm = imregionalmax(Iobrcbr);
imshow(fgm)
title('Regional Maxima of Opening-Closing by Reconstruction')
superimpose the foreground marker image
on the original image.
I2 = I;
I2(fgm) = 255;
figure
imshow(I2),
title('Regional maxima superimposed on original image (I2)')
Watershed transformation process
cleaning the edges of the marker blobs and then shrinking them a bit
se2 = strel(ones(5,5));
fgm2 = imclose(fgm, se2);
fgm3 = imerode(fgm2, se2);
fgm4 = bwareaopen(fgm3, 20);
I3 = I;
I3(fgm4) = 255;
figure
imshow(I3)
title('Modified regional maxima superimposed
on original image (fgm4)')
• Compute Background Markers
Compute Background Markers,
Starting with thresholding operation
bw = imbinarize(Iobrcbr);
figure
imshow(bw),
title('Thresholded opening-closing by reconstruction (bw)')
Watershed transformation process
The background pixels are in black, but ideally we don't want the background markers to be too close to the edges
of the objects we are trying to segment.
We'll "thin" the background by computing
the "skeleton by influence zones", or SKIZ, of the
foreground of bw. This can be done
by computing the watershed transform of the
distance transform of bw, and then looking for the
watershed ridge lines (DL == 0)
D = bwdist(bw);
DL = watershed(D);
bgm = DL == 0;
figure
imshow(bgm), title('Watershed ridge lines (bgm)')
Compute the Watershed Transform of the Segmentation Function.
gradmag2 = imimposemin(gradmag, bgm | fgm4);
Finally we are ready to compute the watershed-based segmentation.
L = watershed(gradmag2);
Watershed transformation process
6-Visualize the Result
one of the techniques is to superimpose the foreground markers, background markers, and segmented object
boundaries.
I4 = I;
I4(imdilate(L == 0, ones(3, 3)) | bgm | fgm4) = 255;
figure
imshow(I4)
title('Markers and object boundaries superimposed
on original image (I4)')
Another useful visualization technique is to
display the label matrix as a color image
Lrgb = label2rgb(L, 'jet', 'w', 'shuffle');
figure
imshow(Lrgb)
title('Colored watershed label matrix (Lrgb)')
Watershed transformation process
We can use transparency to superimpose this pseudo-color label matrix on top of the original intensity image.
figure
imshow(I)
hold on
himage = imshow(Lrgb);
himage.AlphaData = 0.3;
title('Lrgb superimposed transparently on original image')
color image segmentation with marker controlled with watershed
conclusion
• The application of image processing has widely applied
in our life, Image segmentation is a key step for transition
to the image analysis as low-level processing in digital
Image processing .for this reasons we must find the optimal
method for image segmentation different segmentation
techniques are reviewed and found that marker based is best
in most of cases because it marks the regions then segment
them.
• It is a general method which can be applied in many situa
tions
Thank you
November 2018

More Related Content

What's hot

Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
asodariyabhavesh
 
morphological tecnquies in image processing
morphological tecnquies in image processingmorphological tecnquies in image processing
morphological tecnquies in image processing
soma saikiran
 
Boundary Extraction
Boundary ExtractionBoundary Extraction
Boundary Extraction
Maria Akther
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
shabanam tamboli
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
Ashish Kumar
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
Raghu Kumar
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
Anubhav Kumar
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
Ahmed Daoud
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
shabanam tamboli
 
Contrast enhancement in digital images
Contrast enhancement in digital imagesContrast enhancement in digital images
Contrast enhancement in digital images
Sakher BELOUADAH
 
Log Transformation in Image Processing with Example
Log Transformation in Image Processing with ExampleLog Transformation in Image Processing with Example
Log Transformation in Image Processing with Example
Mustak Ahmmed
 
Hit and-miss transform
Hit and-miss transformHit and-miss transform
Hit and-miss transform
Krish Everglades
 
Cj36511514
Cj36511514Cj36511514
Cj36511514
IJERA Editor
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
Ahmed Daoud
 
Intensity Transformation
Intensity TransformationIntensity Transformation
Intensity Transformation
Amnaakhaan
 
5. gray level transformation
5. gray level transformation5. gray level transformation
5. gray level transformation
MdFazleRabbi18
 
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSINGLAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
Priyanka Rathore
 
image enhancement
 image enhancement image enhancement
image enhancement
Rajendra Prasad
 
Dital Image Processing (Lab 2+3+4)
Dital Image Processing (Lab 2+3+4)Dital Image Processing (Lab 2+3+4)
Dital Image Processing (Lab 2+3+4)
Moe Moe Myint
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
A B Shinde
 

What's hot (20)

Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
 
morphological tecnquies in image processing
morphological tecnquies in image processingmorphological tecnquies in image processing
morphological tecnquies in image processing
 
Boundary Extraction
Boundary ExtractionBoundary Extraction
Boundary Extraction
 
Image enhancement in the spatial domain1
Image enhancement in the spatial domain1Image enhancement in the spatial domain1
Image enhancement in the spatial domain1
 
Enhancement in spatial domain
Enhancement in spatial domainEnhancement in spatial domain
Enhancement in spatial domain
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Contrast enhancement in digital images
Contrast enhancement in digital imagesContrast enhancement in digital images
Contrast enhancement in digital images
 
Log Transformation in Image Processing with Example
Log Transformation in Image Processing with ExampleLog Transformation in Image Processing with Example
Log Transformation in Image Processing with Example
 
Hit and-miss transform
Hit and-miss transformHit and-miss transform
Hit and-miss transform
 
Cj36511514
Cj36511514Cj36511514
Cj36511514
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Intensity Transformation
Intensity TransformationIntensity Transformation
Intensity Transformation
 
5. gray level transformation
5. gray level transformation5. gray level transformation
5. gray level transformation
 
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSINGLAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
LAPLACE TRANSFORM SUITABILITY FOR IMAGE PROCESSING
 
image enhancement
 image enhancement image enhancement
image enhancement
 
Dital Image Processing (Lab 2+3+4)
Dital Image Processing (Lab 2+3+4)Dital Image Processing (Lab 2+3+4)
Dital Image Processing (Lab 2+3+4)
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 

Similar to Watershed image ansam hadi

Marker Controlled Segmentation Technique for Medical application
Marker Controlled Segmentation Technique for Medical applicationMarker Controlled Segmentation Technique for Medical application
Marker Controlled Segmentation Technique for Medical application
Rushin Shah
 
Reversible color Image Watermarking
Reversible color Image WatermarkingReversible color Image Watermarking
Reversible color Image Watermarking
Nadarajan A
 
project_final_seminar
project_final_seminarproject_final_seminar
project_final_seminar
MUKUL BICHKAR
 
IRJET- Digital Watermarking using Integration of DWT & SVD Techniques
IRJET- Digital Watermarking using Integration of DWT & SVD TechniquesIRJET- Digital Watermarking using Integration of DWT & SVD Techniques
IRJET- Digital Watermarking using Integration of DWT & SVD Techniques
IRJET Journal
 
Aw2419401943
Aw2419401943Aw2419401943
Aw2419401943
IJMER
 
Module-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfModule-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdf
vikasmittal92
 
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD Editor
 
QR code decoding and Image Preprocessing
QR code decoding and Image Preprocessing QR code decoding and Image Preprocessing
QR code decoding and Image Preprocessing
Hasini Weerathunge
 
Computer Aided Design visual realism notes
Computer Aided Design visual realism notesComputer Aided Design visual realism notes
Computer Aided Design visual realism notes
KushKumar293234
 
Two marks with answers ME6501 CAD
Two marks with answers ME6501 CADTwo marks with answers ME6501 CAD
Two marks with answers ME6501 CAD
Priscilla CPG
 
Fundamentals of image processing
Fundamentals of image processingFundamentals of image processing
Fundamentals of image processing
RoufulAlamBhat1
 
AUTOMATIC IMAGE PROCESSING ENGINE ORIENTED ON QUALITY CONTROL OF ELECTRONIC B...
AUTOMATIC IMAGE PROCESSING ENGINE ORIENTED ON QUALITY CONTROL OF ELECTRONIC B...AUTOMATIC IMAGE PROCESSING ENGINE ORIENTED ON QUALITY CONTROL OF ELECTRONIC B...
AUTOMATIC IMAGE PROCESSING ENGINE ORIENTED ON QUALITY CONTROL OF ELECTRONIC B...
sipij
 
The automatic license plate recognition(alpr)
The automatic license plate recognition(alpr)The automatic license plate recognition(alpr)
The automatic license plate recognition(alpr)
eSAT Publishing House
 
The automatic license plate recognition(alpr)
The automatic license plate recognition(alpr)The automatic license plate recognition(alpr)
The automatic license plate recognition(alpr)
eSAT Journals
 
A decomposition framework for image denoising algorithms...
A decomposition framework for image denoising algorithms...A decomposition framework for image denoising algorithms...
A decomposition framework for image denoising algorithms...
Sujit73031
 
Image processing
Image processingImage processing
Image processing
kamal330
 
4214ijait01
4214ijait014214ijait01
4214ijait01
ijait
 
An adaptive watermarking process in hadamard transform
An adaptive watermarking process in hadamard transformAn adaptive watermarking process in hadamard transform
An adaptive watermarking process in hadamard transform
ijait
 
A Review on Haze Removal Techniques
A Review on Haze Removal TechniquesA Review on Haze Removal Techniques
A Review on Haze Removal Techniques
IRJET Journal
 
Feature Analyst Extraction of Lockheed Martin building using ArcGIS
Feature Analyst Extraction of Lockheed Martin building using ArcGISFeature Analyst Extraction of Lockheed Martin building using ArcGIS
Feature Analyst Extraction of Lockheed Martin building using ArcGIS
Ariez Reyes
 

Similar to Watershed image ansam hadi (20)

Marker Controlled Segmentation Technique for Medical application
Marker Controlled Segmentation Technique for Medical applicationMarker Controlled Segmentation Technique for Medical application
Marker Controlled Segmentation Technique for Medical application
 
Reversible color Image Watermarking
Reversible color Image WatermarkingReversible color Image Watermarking
Reversible color Image Watermarking
 
project_final_seminar
project_final_seminarproject_final_seminar
project_final_seminar
 
IRJET- Digital Watermarking using Integration of DWT & SVD Techniques
IRJET- Digital Watermarking using Integration of DWT & SVD TechniquesIRJET- Digital Watermarking using Integration of DWT & SVD Techniques
IRJET- Digital Watermarking using Integration of DWT & SVD Techniques
 
Aw2419401943
Aw2419401943Aw2419401943
Aw2419401943
 
Module-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfModule-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdf
 
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
IJERD (www.ijerd.com) International Journal of Engineering Research and Devel...
 
QR code decoding and Image Preprocessing
QR code decoding and Image Preprocessing QR code decoding and Image Preprocessing
QR code decoding and Image Preprocessing
 
Computer Aided Design visual realism notes
Computer Aided Design visual realism notesComputer Aided Design visual realism notes
Computer Aided Design visual realism notes
 
Two marks with answers ME6501 CAD
Two marks with answers ME6501 CADTwo marks with answers ME6501 CAD
Two marks with answers ME6501 CAD
 
Fundamentals of image processing
Fundamentals of image processingFundamentals of image processing
Fundamentals of image processing
 
AUTOMATIC IMAGE PROCESSING ENGINE ORIENTED ON QUALITY CONTROL OF ELECTRONIC B...
AUTOMATIC IMAGE PROCESSING ENGINE ORIENTED ON QUALITY CONTROL OF ELECTRONIC B...AUTOMATIC IMAGE PROCESSING ENGINE ORIENTED ON QUALITY CONTROL OF ELECTRONIC B...
AUTOMATIC IMAGE PROCESSING ENGINE ORIENTED ON QUALITY CONTROL OF ELECTRONIC B...
 
The automatic license plate recognition(alpr)
The automatic license plate recognition(alpr)The automatic license plate recognition(alpr)
The automatic license plate recognition(alpr)
 
The automatic license plate recognition(alpr)
The automatic license plate recognition(alpr)The automatic license plate recognition(alpr)
The automatic license plate recognition(alpr)
 
A decomposition framework for image denoising algorithms...
A decomposition framework for image denoising algorithms...A decomposition framework for image denoising algorithms...
A decomposition framework for image denoising algorithms...
 
Image processing
Image processingImage processing
Image processing
 
4214ijait01
4214ijait014214ijait01
4214ijait01
 
An adaptive watermarking process in hadamard transform
An adaptive watermarking process in hadamard transformAn adaptive watermarking process in hadamard transform
An adaptive watermarking process in hadamard transform
 
A Review on Haze Removal Techniques
A Review on Haze Removal TechniquesA Review on Haze Removal Techniques
A Review on Haze Removal Techniques
 
Feature Analyst Extraction of Lockheed Martin building using ArcGIS
Feature Analyst Extraction of Lockheed Martin building using ArcGISFeature Analyst Extraction of Lockheed Martin building using ArcGIS
Feature Analyst Extraction of Lockheed Martin building using ArcGIS
 

Recently uploaded

DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
gerogepatton
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
rpskprasana
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
171ticu
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
Aditya Rajan Patra
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
abbyasa1014
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
NazakatAliKhoso2
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
KrishnaveniKrishnara1
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 

Recently uploaded (20)

DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODELDEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
DEEP LEARNING FOR SMART GRID INTRUSION DETECTION: A HYBRID CNN-LSTM-BASED MODEL
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
CSM Cloud Service Management Presentarion
CSM Cloud Service Management PresentarionCSM Cloud Service Management Presentarion
CSM Cloud Service Management Presentarion
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样学校原版美国波士顿大学毕业证学历学位证书原版一模一样
学校原版美国波士顿大学毕业证学历学位证书原版一模一样
 
International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Recycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part IIRecycled Concrete Aggregate in Construction Part II
Recycled Concrete Aggregate in Construction Part II
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
Engineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdfEngineering Drawings Lecture Detail Drawings 2014.pdf
Engineering Drawings Lecture Detail Drawings 2014.pdf
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Textile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdfTextile Chemical Processing and Dyeing.pdf
Textile Chemical Processing and Dyeing.pdf
 
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.pptUnit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
Unit-III-ELECTROCHEMICAL STORAGE DEVICES.ppt
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 

Watershed image ansam hadi

  • 1. Marker controlled watershed segmentation November 2018 Eng.Ansam Hadi Rashed Al- Mustansiriya university college of engineering Computer Department
  • 2. Watershed one of the most important method in image segmentation has interesting properties that make it useful for much different image segmentation application. Watershed is a powerful technique for rapid detection of both edges and regions. The watershed transformation is a powerful tool for image segmentation based on mathematical morphology. What is watershed?
  • 3. Marker controlled watershed • Image segmentation is significance problem in different fields of computer vision and image processing. Image segmentation is the process of partitioning a digital image into multiple segments knows as set of pixels. The goal of segmentation is to simplify change the representation of an image into something that is more meaningful and easier to analyze. • Segmentation by watershed transform is a fast, robust and widely used in image processing and analysis, but it suffers from over- segmentation, Over segmentation means a large number of segmented regions.
  • 4. Marker controlled watershed • An approach used to control over segmentation is based on the concept of markers. A marker is a connected component belonging to an image. • Markers are of two types internal and external, internal for object and external for boundary. The marker-controlled watershed segmentation has been shown to be a robust and flexible method for segmentation of objects with closed contours. • the boundaries of the watershed regions are arranged on the desired ridges, thus separating each object from its neighbors.
  • 5. Marker controlled watershed • The basic idea of marker-controlled watershed transform is that flooding the topographic surface from a previously defined set of markers.The gradient image is viewed as topographic surface, thus, pixels with low gradient values will be flooded with high priority. • results obtained show the good performance of this approach specially in medical branch.
  • 6. Marker controlled watershed in simple example 1- consider this simple image I. It contains two primary regions, the blocks of pixels containing the values 13 and 17. The background is primarily all set to 10, with some pixels set to 11.
  • 7. Marker controlled watershed in simple example 2- create a marker image Mr is to subtract a constant h from the mask image I. the constant h is very important, it depends on the processed image, and we must choose the right value of this constant. In this example we choose h=2 then Mr = I – 2
  • 8. Marker controlled watershed in simple example 3-In the output image Ire, note how all the intensity fluctuations except the intensity peak have been removed .In the output image, all insignifi cant local maxima will be deleted.
  • 9. Marker controlled watershed in simple example morphological reconstruction, consider this simple image. It contains t wo primary regions, the blocks of pixels containing the values 14 and 1 8. The background is primarily all set to 10, with some pixels set to 11.
  • 10. Marker controlled watershed in simple example • Create a marker image
  • 11. Marker controlled watershed in simple example Call the imreconstruct function to morphologically reconstruct the imag e. In the output image, note how all the intensity fluctuations except the intensity peak have been removed. recon = imreconstruct(marker, mask) Recon=
  • 12. Summarization of watershed steps 1. Compute a segmentation function. This is an image whose dark regions are the objects you are trying to segment. 2. Compute foreground markers. These are connected blobs of pixels within each of the objects. 3. Compute background markers. These are pixels that are not part of any object. 4. Modify the segmentation function so that it only has minima at the foreground and background marker locations. 5. Compute the watershed transform of the modified segmentation function
  • 13. Marker controlled watershed in simple exampleB-watershed D-watershedwithmarker
  • 14. Watershed VS Marker controlled watershed • The result obtained by watershed without markers gives no information on the regions of the original image. Against the result obtained by watershed with markers shows the speed of segmentation. • Marker controlled method detects all important objects of the origin al image , and the number of regions obtained was decreased. • The problem of local minima is eliminated then the problem of over -segmentation is solved. • the markers are used to control the watershed to obtain good results.
  • 15. Watershed transformation process 1-Read Color Image and Convert it to Gray scale rgb = imread('pears.png'); I = rgb2gray(rgb); imshow(I) text(732,501,'Image courtesy of Corel(R)',... 'FontSize',7,'HorizontalAlignment','right')
  • 16. Watershed transformation process 2-Use the Gradient Magnitude as the Segmentation Function The gradient is high at the borders of the objects and low (mostly) inside the objects. hy = fspecial('sobel'); hx = hy'; Iy = imfilter(double(I), hy, 'replicate'); Ix = imfilter(double(I), hx, 'replicate'); gradmag = sqrt(Ix.^2 + Iy.^2); figure imshow(gradmag,[]), title('Gradient magnitude (gradmag)')
  • 17. Watershed transformation process 3-Mark the Foreground Objects se = strel('disk',20); Io = imopen(I,se); imshow(Io) title('Opening') compute the opening-by-reconstruction using imerode and imreconstruct Ie = imerode(I,se);Iobr = imreconstruct(Ie,I) ;imshow(Iobr)title('Opening-by-Reconstruction')
  • 18. Watershed transformation process Following the opening with a closing can remove the dark spots and stem marks. Ioc = imclose(Io, se); figure imshow(Ioc), title('Opening-closing (Ioc)') Notice we must complement the image inputs and output of imreconstruct. Iobrd = imdilate(Iobr,se); Iobrcbr = imreconstruct(imcomplement(Iobrd) ,imcomplement(Iobr)); Iobrcbr = imcomplement(Iobrcbr); imshow(Iobrcbr)title('Opening-Closing by Reconstruction')
  • 19. Watershed transformation process Calculate the regional maxima of Iobrcbr to obtain good foreground markers. fgm = imregionalmax(Iobrcbr); imshow(fgm) title('Regional Maxima of Opening-Closing by Reconstruction') superimpose the foreground marker image on the original image. I2 = I; I2(fgm) = 255; figure imshow(I2), title('Regional maxima superimposed on original image (I2)')
  • 20. Watershed transformation process cleaning the edges of the marker blobs and then shrinking them a bit se2 = strel(ones(5,5)); fgm2 = imclose(fgm, se2); fgm3 = imerode(fgm2, se2); fgm4 = bwareaopen(fgm3, 20); I3 = I; I3(fgm4) = 255; figure imshow(I3) title('Modified regional maxima superimposed on original image (fgm4)') • Compute Background Markers Compute Background Markers, Starting with thresholding operation bw = imbinarize(Iobrcbr); figure imshow(bw), title('Thresholded opening-closing by reconstruction (bw)')
  • 21. Watershed transformation process The background pixels are in black, but ideally we don't want the background markers to be too close to the edges of the objects we are trying to segment. We'll "thin" the background by computing the "skeleton by influence zones", or SKIZ, of the foreground of bw. This can be done by computing the watershed transform of the distance transform of bw, and then looking for the watershed ridge lines (DL == 0) D = bwdist(bw); DL = watershed(D); bgm = DL == 0; figure imshow(bgm), title('Watershed ridge lines (bgm)') Compute the Watershed Transform of the Segmentation Function. gradmag2 = imimposemin(gradmag, bgm | fgm4); Finally we are ready to compute the watershed-based segmentation. L = watershed(gradmag2);
  • 22. Watershed transformation process 6-Visualize the Result one of the techniques is to superimpose the foreground markers, background markers, and segmented object boundaries. I4 = I; I4(imdilate(L == 0, ones(3, 3)) | bgm | fgm4) = 255; figure imshow(I4) title('Markers and object boundaries superimposed on original image (I4)') Another useful visualization technique is to display the label matrix as a color image Lrgb = label2rgb(L, 'jet', 'w', 'shuffle'); figure imshow(Lrgb) title('Colored watershed label matrix (Lrgb)')
  • 23. Watershed transformation process We can use transparency to superimpose this pseudo-color label matrix on top of the original intensity image. figure imshow(I) hold on himage = imshow(Lrgb); himage.AlphaData = 0.3; title('Lrgb superimposed transparently on original image')
  • 24. color image segmentation with marker controlled with watershed
  • 25. conclusion • The application of image processing has widely applied in our life, Image segmentation is a key step for transition to the image analysis as low-level processing in digital Image processing .for this reasons we must find the optimal method for image segmentation different segmentation techniques are reviewed and found that marker based is best in most of cases because it marks the regions then segment them. • It is a general method which can be applied in many situa tions