SlideShare a Scribd company logo
1 of 5
Download to read offline
Comparative between global thresholding and adaptative thresholding
concepts in image processing using Matlab
Assia HAMZA
assia.hamza@etu.usthb.dz
Merwan KHENAK
merwan.khenak@etu.usthb.dz
University of science and technology Houari Boumediene
BP 32, El Alia, Bab Ezzouar, 16111 Algiers, Algeria
Department of instrumentation and control
December 27, 2019
Abstract
A digital image can be considered as a discrete representation of data possessing both spatial (layout) and
intensity (colour) information. Pixel intensities form a gateway communication between human perception
of things and digital image processing.
Image thresholding is a simple form of image segmentation. It is a way to create a binary image from a
grayscale or full-color image. This is typically done in order to separate "object" or foreground pixels from
background pixels to aid in image processing.
In this paper we aim to present a small and modest comparative between two kind of image thresholding.
The local and adapatative concepts may not give the same correct results at the end of a process, and we
aim to demonstrate which kind of the two threshold concept is the best for counting objects in a RGB image
containing a lot of color intensities.
Keywords : Colorimetry - Image processing using Matlab - Threshold - Segmentation - Image analysis
1 Introduction
To understand an image, it has to be divided into differ-
ent meaningful parts called objects which can be easily
identiļ¬ed and depicts some information. This division
process is called image segmentation and threshold-
ing is one of the popular techniques for image seg-
mentation. It has low computational cost when com-
pared to other algorithms Image thresholding works on
the principle of pixel classiļ¬cation. It divides an im-
age into segments depending upon the pixel attributes.
This techniques applies on each pixel and by compar-
ing it to a speciļ¬c threshold value decides whether the
picture belongs to an object or background. For gray
images, the segmentation is carry out on the basis of
image gray levels where the brighter part of an image
is object and darker is background. The objects and
background of gray level images can be easily iden-
tiļ¬ed, but the process becomes more complicated for
color or textured images. So, for color and textured
images requires much more attention and processing
to get segmented. The thresholding is also affected by
the noise and artefacts present in image. Usually some
preprocessing steps are applied to reduce the noise and
artefacts effects.
The principal goal of the segmentation process is to
partition an image into regions that are homogeneous
with respect to one or more characteristics or fea-
tures. Segmentation is an important tool in many ļ¬eld
of applications such as medical image processing and
aerospace image processing.
In this example, we will use image thresholding con-
cepts to automatically calculate the number of objects
present for one image using different algorithms.
Thresholding is the simplest method of segmenting
image. From a grayscale image, it can be used to cre-
ate binary images.
In our project we are gonna use two basic methods of
thresholding the local thresholding and the adaptative
thresholding.
2 Materials and methods
In this project we only need Matlab software with im-
age processing toolbox pre-installed.
We aim to use thresholding methods to calculate au-
tomatically the number of objects present in a RGB
image. The following image in ļ¬gure 1 is the one we
are going to threshold.
1
Figure 1: The base image for the case of study
This image includes plenty of objects in different
shapes, and different colors.
The second step is to process the base image into a
gray scale image, the results is in ļ¬gure ??
And the histogram of the gray scale image is shown
below in ļ¬gure 3.
Figure 2: Processing result of the base image into gray
scale
Figure 3: The histogram of the gray scale image
Now that we have the histogram of the image in
gray scale, we can start our thresholding.
Just notice that the histogram of our image contains
only one peak, we are gonna explain this remark later.
2.1 Global thresholding :
Global threshold is totally dependent on the histogram
of the image. The histograms of images may be af-
fected with noise, contrast, hue, saturation, shadow
and more.
The aim of global threshold is to select a pixel intensity
value from the histogram and set all the greater inten-
sities from that value to the value 1, and the smaller
intensities to 0. We got then a binary image.
In our project we use the local center method on his-
togram to chose the value of threshold.
We devise the number center repeated of intensity
(11000) on the value of intensity repeated (210) we
got then a threshold value equal to 0.6.
We apply then a thresholding with 0.6 value on our
image and we got the segmented image in ļ¬gure 4.
Figure 4: The result of global threshold
We notice that the global threshold with local cen-
ter method made a loss of details in the image, the two
yellow balls disappeared.
2.2 Adaptative thresholding :
Like global thresholding, adaptive thresholding is used
to separate desirable foreground image objects from
the background based on the difference in pixel inten-
sities of each region. There is a lot of algorithms to
calculate the adaptative threshold value, the most well
know is the Otsu algorithm.
But in our project we use a general methode based on
thresholding the image for each RGB intensity.
First, we process the base image to a grey scaled image
2
for each basic color, so we have Red gray scale his-
togram shown in ļ¬gure 5 , Green gray scale histogram
shown in ļ¬gure 6 and Blue gray scale histogram shown
in ļ¬gure 7.
Figure 5: Processing result of Red gray scale his-
togram
Figure 6: Processing result of the Green gray scale his-
togram
Figure 7: Processing result of the Blue gray scale his-
togram
Now we do the same steps of global threshold for
each grey scale image for red, green and blue. The
result are shown below :
Figure 8: Global threshold of the Red gray scale
Figure 9: Global threshold of the Green gray scale
Figure 10: Global threshold of the Blue gray scale
Now to achieve the adaptative threshold to our
base image, all we need to do is to sum the Red gray
scale threshold, the Green gray scale threshold and the
3
Blue gray scale threshold image. The result of adapta-
tive threshold is shown in ļ¬gure 11.
Figure 11: The result of adaptative threshold
We notice that in contrary of the global threshold,
adaptative threshold have not lost objects in the image.
3 Results
Now after we did the global and adaptative threshold-
ing, we procede to the main objective of our applica-
tion that is to make a program capable of detecting
how many objects we have in the image.
To compute how many objects we have in the image
we display an algorithm that does these steps :
- Measure properties of image regions using ā€™region-
propsā€™ then ā€™stats.areaā€™ then ā€™stats.Eccentricityā€™ matlab
commands.
- Find Eccentricity of the Image.
- Make a Bounding box to every object of the image
and show the result of how many objects we have.
The result of the global threshold is shown if ļ¬gure 12
Figure 12: The result of global threshold computing
The result of computing gives as that there is 16
objects in the image which is false.
The two missing objects are the two balls lost in the
global threshold.
The result of the adaptative threshold is shown if ļ¬g-
ure 13
Figure 13: The result of adaptative threshold comput-
ing
The result of computing gives as that there is 18
objects in the image which is correct.
4 Conclusion
The computing error in global threshold is due to the
lost of information during thresholding.
The global thresholding is note intersting for use when
the histogram of the image we work on contains only
one peak. This cause the loss of important details
and informations we need in the image. The global
thresholding could be more for use on histogram that
contains two peaks.
The adaptative approach of threshold has shown sat-
isfying results, because we adapted the threshold for
every RGB scale in the image so we donā€™t lose details
and informations.
4
References
Gaurav Sharma 2003, Electrical engineering and applied signal processing series, Digital Color Imaging Hand-
book
Andreas Koschan, Mongi Abidi 2008, Digital color image processing
Christine Fernandez - Maloigne 2013, Advanced Color Image Processing and Analysis
Wilson, David, Laxminarayan, Swamy 2005, Handbook of Biomedical Image Analysis Volume 1: Segmenta-
tion Models
Uvais Qidwai and C. H. Chen 2009, DIGITAL IMAGE PROCESSING An Algorithmic Approach with MAT-
LAB
Chris Solomon and Toby Breckon 2011, Fundamentals of Digital Image Processing A Practical Approach with
Examples in Matlab
5

More Related Content

What's hot

COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATIONCOLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATIONecij
Ā 
Project report_DTRL_subrat
Project report_DTRL_subratProject report_DTRL_subrat
Project report_DTRL_subratSubrat Prasad
Ā 
Image inpainting
Image inpaintingImage inpainting
Image inpaintingPulkit Goyal
Ā 
Image segmentation based on color
Image segmentation based on colorImage segmentation based on color
Image segmentation based on coloreSAT Publishing House
Ā 
improving differently illuminant images with fuzzy membership based saturatio...
improving differently illuminant images with fuzzy membership based saturatio...improving differently illuminant images with fuzzy membership based saturatio...
improving differently illuminant images with fuzzy membership based saturatio...INFOGAIN PUBLICATION
Ā 
Mathematical operations in image processing
Mathematical operations in image processingMathematical operations in image processing
Mathematical operations in image processingAsad Ali
Ā 
A Novel Color Image Fusion for Multi Sensor Night Vision Images
A Novel Color Image Fusion for Multi Sensor Night Vision ImagesA Novel Color Image Fusion for Multi Sensor Night Vision Images
A Novel Color Image Fusion for Multi Sensor Night Vision ImagesEditor IJCATR
Ā 
Modified clahe an adaptive algorithm for contrast enhancement of aerial medi...
Modified clahe an adaptive algorithm for contrast enhancement of aerial  medi...Modified clahe an adaptive algorithm for contrast enhancement of aerial  medi...
Modified clahe an adaptive algorithm for contrast enhancement of aerial medi...IAEME Publication
Ā 
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...IJCSEA Journal
Ā 
APPLYING R-SPATIOGRAM IN OBJECT TRACKING FOR OCCLUSION HANDLING
APPLYING R-SPATIOGRAM IN OBJECT TRACKING FOR OCCLUSION HANDLINGAPPLYING R-SPATIOGRAM IN OBJECT TRACKING FOR OCCLUSION HANDLING
APPLYING R-SPATIOGRAM IN OBJECT TRACKING FOR OCCLUSION HANDLINGsipij
Ā 
Be03303560361
Be03303560361Be03303560361
Be03303560361ijceronline
Ā 
Multiexposure Image Fusion
Multiexposure Image FusionMultiexposure Image Fusion
Multiexposure Image FusionIJMER
Ā 
A Survey on Image Retrieval By Different Features and Techniques
A Survey on Image Retrieval By Different Features and TechniquesA Survey on Image Retrieval By Different Features and Techniques
A Survey on Image Retrieval By Different Features and TechniquesIRJET Journal
Ā 
Analysis of color image features extraction using texture methods
Analysis of color image features extraction using texture methodsAnalysis of color image features extraction using texture methods
Analysis of color image features extraction using texture methodsTELKOMNIKA JOURNAL
Ā 
Image Inpainting
Image InpaintingImage Inpainting
Image InpaintingIJERA Editor
Ā 

What's hot (19)

COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATIONCOLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
COLOUR IMAGE ENHANCEMENT BASED ON HISTOGRAM EQUALIZATION
Ā 
Project report_DTRL_subrat
Project report_DTRL_subratProject report_DTRL_subrat
Project report_DTRL_subrat
Ā 
Image inpainting
Image inpaintingImage inpainting
Image inpainting
Ā 
Image segmentation based on color
Image segmentation based on colorImage segmentation based on color
Image segmentation based on color
Ā 
D046022629
D046022629D046022629
D046022629
Ā 
G0813841
G0813841G0813841
G0813841
Ā 
improving differently illuminant images with fuzzy membership based saturatio...
improving differently illuminant images with fuzzy membership based saturatio...improving differently illuminant images with fuzzy membership based saturatio...
improving differently illuminant images with fuzzy membership based saturatio...
Ā 
Mathematical operations in image processing
Mathematical operations in image processingMathematical operations in image processing
Mathematical operations in image processing
Ā 
A Novel Color Image Fusion for Multi Sensor Night Vision Images
A Novel Color Image Fusion for Multi Sensor Night Vision ImagesA Novel Color Image Fusion for Multi Sensor Night Vision Images
A Novel Color Image Fusion for Multi Sensor Night Vision Images
Ā 
Modified clahe an adaptive algorithm for contrast enhancement of aerial medi...
Modified clahe an adaptive algorithm for contrast enhancement of aerial  medi...Modified clahe an adaptive algorithm for contrast enhancement of aerial  medi...
Modified clahe an adaptive algorithm for contrast enhancement of aerial medi...
Ā 
337
337337
337
Ā 
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...
CONTRAST ENHANCEMENT TECHNIQUES USING HISTOGRAM EQUALIZATION METHODS ON COLOR...
Ā 
APPLYING R-SPATIOGRAM IN OBJECT TRACKING FOR OCCLUSION HANDLING
APPLYING R-SPATIOGRAM IN OBJECT TRACKING FOR OCCLUSION HANDLINGAPPLYING R-SPATIOGRAM IN OBJECT TRACKING FOR OCCLUSION HANDLING
APPLYING R-SPATIOGRAM IN OBJECT TRACKING FOR OCCLUSION HANDLING
Ā 
Be03303560361
Be03303560361Be03303560361
Be03303560361
Ā 
Multiexposure Image Fusion
Multiexposure Image FusionMultiexposure Image Fusion
Multiexposure Image Fusion
Ā 
A Survey on Image Retrieval By Different Features and Techniques
A Survey on Image Retrieval By Different Features and TechniquesA Survey on Image Retrieval By Different Features and Techniques
A Survey on Image Retrieval By Different Features and Techniques
Ā 
Analysis of color image features extraction using texture methods
Analysis of color image features extraction using texture methodsAnalysis of color image features extraction using texture methods
Analysis of color image features extraction using texture methods
Ā 
Ijetr021211
Ijetr021211Ijetr021211
Ijetr021211
Ā 
Image Inpainting
Image InpaintingImage Inpainting
Image Inpainting
Ā 

Similar to Comparative between global threshold and adaptative threshold concepts in image processing

Image processing sw & hw
Image processing sw & hwImage processing sw & hw
Image processing sw & hwamalalhait
Ā 
Ijarcet vol-2-issue-7-2319-2322
Ijarcet vol-2-issue-7-2319-2322Ijarcet vol-2-issue-7-2319-2322
Ijarcet vol-2-issue-7-2319-2322Editor IJARCET
Ā 
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLABANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLABJim Jimenez
Ā 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image ProcessingAnkur Nanda
Ā 
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...ijsrd.com
Ā 
A review on image enhancement techniques
A review on image enhancement techniquesA review on image enhancement techniques
A review on image enhancement techniquesIJEACS
Ā 
A study and comparison of different image segmentation algorithms
A study and comparison of different image segmentation algorithmsA study and comparison of different image segmentation algorithms
A study and comparison of different image segmentation algorithmsManje Gowda
Ā 
IRJET- Low Light Image Enhancement using Convolutional Neural Network
IRJET-  	  Low Light Image Enhancement using Convolutional Neural NetworkIRJET-  	  Low Light Image Enhancement using Convolutional Neural Network
IRJET- Low Light Image Enhancement using Convolutional Neural NetworkIRJET Journal
Ā 
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...ijcisjournal
Ā 
ee8220_project_W2013_v5
ee8220_project_W2013_v5ee8220_project_W2013_v5
ee8220_project_W2013_v5Farhad Gholami
Ā 
A Comparative Study on Image Contrast Enhancement Techniques
A Comparative Study on Image Contrast Enhancement TechniquesA Comparative Study on Image Contrast Enhancement Techniques
A Comparative Study on Image Contrast Enhancement TechniquesIRJET Journal
Ā 
IJ-M&M08.ppt
IJ-M&M08.pptIJ-M&M08.ppt
IJ-M&M08.pptSenukeTest
Ā 
Image colorization
Image colorizationImage colorization
Image colorizationPankti Fadia
Ā 
IRJET- Coloring Greyscale Images using Deep Learning
IRJET- Coloring Greyscale Images using Deep LearningIRJET- Coloring Greyscale Images using Deep Learning
IRJET- Coloring Greyscale Images using Deep LearningIRJET Journal
Ā 
A Comparative Study of Different Models on Image Colorization using Deep Lear...
A Comparative Study of Different Models on Image Colorization using Deep Lear...A Comparative Study of Different Models on Image Colorization using Deep Lear...
A Comparative Study of Different Models on Image Colorization using Deep Lear...IRJET Journal
Ā 
Establishment of an Efficient Color Model from Existing Models for Better Gam...
Establishment of an Efficient Color Model from Existing Models for Better Gam...Establishment of an Efficient Color Model from Existing Models for Better Gam...
Establishment of an Efficient Color Model from Existing Models for Better Gam...CSCJournals
Ā 
Fuzzy Logic based Contrast Enhancement
Fuzzy Logic based Contrast EnhancementFuzzy Logic based Contrast Enhancement
Fuzzy Logic based Contrast EnhancementSamrudh Keshava Kumar
Ā 

Similar to Comparative between global threshold and adaptative threshold concepts in image processing (20)

Image processing sw & hw
Image processing sw & hwImage processing sw & hw
Image processing sw & hw
Ā 
Ijarcet vol-2-issue-7-2319-2322
Ijarcet vol-2-issue-7-2319-2322Ijarcet vol-2-issue-7-2319-2322
Ijarcet vol-2-issue-7-2319-2322
Ā 
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLABANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
ANALYSIS OF IMAGE ENHANCEMENT TECHNIQUES USING MATLAB
Ā 
Project 2
Project 2Project 2
Project 2
Ā 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
Ā 
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
IMAGE ENHANCEMENT IN CASE OF UNEVEN ILLUMINATION USING VARIABLE THRESHOLDING ...
Ā 
h.pdf
h.pdfh.pdf
h.pdf
Ā 
A review on image enhancement techniques
A review on image enhancement techniquesA review on image enhancement techniques
A review on image enhancement techniques
Ā 
A study and comparison of different image segmentation algorithms
A study and comparison of different image segmentation algorithmsA study and comparison of different image segmentation algorithms
A study and comparison of different image segmentation algorithms
Ā 
IRJET- Low Light Image Enhancement using Convolutional Neural Network
IRJET-  	  Low Light Image Enhancement using Convolutional Neural NetworkIRJET-  	  Low Light Image Enhancement using Convolutional Neural Network
IRJET- Low Light Image Enhancement using Convolutional Neural Network
Ā 
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...
Ā 
ee8220_project_W2013_v5
ee8220_project_W2013_v5ee8220_project_W2013_v5
ee8220_project_W2013_v5
Ā 
A Comparative Study on Image Contrast Enhancement Techniques
A Comparative Study on Image Contrast Enhancement TechniquesA Comparative Study on Image Contrast Enhancement Techniques
A Comparative Study on Image Contrast Enhancement Techniques
Ā 
IJ-M&M08.ppt
IJ-M&M08.pptIJ-M&M08.ppt
IJ-M&M08.ppt
Ā 
Image colorization
Image colorizationImage colorization
Image colorization
Ā 
IRJET- Coloring Greyscale Images using Deep Learning
IRJET- Coloring Greyscale Images using Deep LearningIRJET- Coloring Greyscale Images using Deep Learning
IRJET- Coloring Greyscale Images using Deep Learning
Ā 
Ijetcas14 372
Ijetcas14 372Ijetcas14 372
Ijetcas14 372
Ā 
A Comparative Study of Different Models on Image Colorization using Deep Lear...
A Comparative Study of Different Models on Image Colorization using Deep Lear...A Comparative Study of Different Models on Image Colorization using Deep Lear...
A Comparative Study of Different Models on Image Colorization using Deep Lear...
Ā 
Establishment of an Efficient Color Model from Existing Models for Better Gam...
Establishment of an Efficient Color Model from Existing Models for Better Gam...Establishment of an Efficient Color Model from Existing Models for Better Gam...
Establishment of an Efficient Color Model from Existing Models for Better Gam...
Ā 
Fuzzy Logic based Contrast Enhancement
Fuzzy Logic based Contrast EnhancementFuzzy Logic based Contrast Enhancement
Fuzzy Logic based Contrast Enhancement
Ā 

Recently uploaded

VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
Ā 
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...9953056974 Low Rate Call Girls In Saket, Delhi NCR
Ā 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
Ā 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
Ā 
Gurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort service
Gurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort serviceGurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort service
Gurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort servicejennyeacort
Ā 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
Ā 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and usesDevarapalliHaritha
Ā 
Model Call Girl in Narela Delhi reach out to us at šŸ”8264348440šŸ”
Model Call Girl in Narela Delhi reach out to us at šŸ”8264348440šŸ”Model Call Girl in Narela Delhi reach out to us at šŸ”8264348440šŸ”
Model Call Girl in Narela Delhi reach out to us at šŸ”8264348440šŸ”soniya singh
Ā 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSCAESB
Ā 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
Ā 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
Ā 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
Ā 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
Ā 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
Ā 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
Ā 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
Ā 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
Ā 
Study on Air-Water & Water-Water Heat Exchange in a Finned ļ»æTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned ļ»æTube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned ļ»æTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned ļ»æTube ExchangerAnamika Sarkar
Ā 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxbritheesh05
Ā 

Recently uploaded (20)

VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
Ā 
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
šŸ”9953056974šŸ”!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
Ā 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
Ā 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
Ā 
Gurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort service
Gurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort serviceGurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort service
Gurgaon āœ”ļø9711147426āœØCall In girls Gurgaon Sector 51 escort service
Ā 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Ā 
power system scada applications and uses
power system scada applications and usespower system scada applications and uses
power system scada applications and uses
Ā 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
Ā 
Model Call Girl in Narela Delhi reach out to us at šŸ”8264348440šŸ”
Model Call Girl in Narela Delhi reach out to us at šŸ”8264348440šŸ”Model Call Girl in Narela Delhi reach out to us at šŸ”8264348440šŸ”
Model Call Girl in Narela Delhi reach out to us at šŸ”8264348440šŸ”
Ā 
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentationGDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
Ā 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
Ā 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
Ā 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
Ā 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
Ā 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
Ā 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Ā 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
Ā 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
Ā 
Study on Air-Water & Water-Water Heat Exchange in a Finned ļ»æTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned ļ»æTube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned ļ»æTube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned ļ»æTube Exchanger
Ā 
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptxArtificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
Ā 

Comparative between global threshold and adaptative threshold concepts in image processing

  • 1. Comparative between global thresholding and adaptative thresholding concepts in image processing using Matlab Assia HAMZA assia.hamza@etu.usthb.dz Merwan KHENAK merwan.khenak@etu.usthb.dz University of science and technology Houari Boumediene BP 32, El Alia, Bab Ezzouar, 16111 Algiers, Algeria Department of instrumentation and control December 27, 2019 Abstract A digital image can be considered as a discrete representation of data possessing both spatial (layout) and intensity (colour) information. Pixel intensities form a gateway communication between human perception of things and digital image processing. Image thresholding is a simple form of image segmentation. It is a way to create a binary image from a grayscale or full-color image. This is typically done in order to separate "object" or foreground pixels from background pixels to aid in image processing. In this paper we aim to present a small and modest comparative between two kind of image thresholding. The local and adapatative concepts may not give the same correct results at the end of a process, and we aim to demonstrate which kind of the two threshold concept is the best for counting objects in a RGB image containing a lot of color intensities. Keywords : Colorimetry - Image processing using Matlab - Threshold - Segmentation - Image analysis 1 Introduction To understand an image, it has to be divided into differ- ent meaningful parts called objects which can be easily identiļ¬ed and depicts some information. This division process is called image segmentation and threshold- ing is one of the popular techniques for image seg- mentation. It has low computational cost when com- pared to other algorithms Image thresholding works on the principle of pixel classiļ¬cation. It divides an im- age into segments depending upon the pixel attributes. This techniques applies on each pixel and by compar- ing it to a speciļ¬c threshold value decides whether the picture belongs to an object or background. For gray images, the segmentation is carry out on the basis of image gray levels where the brighter part of an image is object and darker is background. The objects and background of gray level images can be easily iden- tiļ¬ed, but the process becomes more complicated for color or textured images. So, for color and textured images requires much more attention and processing to get segmented. The thresholding is also affected by the noise and artefacts present in image. Usually some preprocessing steps are applied to reduce the noise and artefacts effects. The principal goal of the segmentation process is to partition an image into regions that are homogeneous with respect to one or more characteristics or fea- tures. Segmentation is an important tool in many ļ¬eld of applications such as medical image processing and aerospace image processing. In this example, we will use image thresholding con- cepts to automatically calculate the number of objects present for one image using different algorithms. Thresholding is the simplest method of segmenting image. From a grayscale image, it can be used to cre- ate binary images. In our project we are gonna use two basic methods of thresholding the local thresholding and the adaptative thresholding. 2 Materials and methods In this project we only need Matlab software with im- age processing toolbox pre-installed. We aim to use thresholding methods to calculate au- tomatically the number of objects present in a RGB image. The following image in ļ¬gure 1 is the one we are going to threshold. 1
  • 2. Figure 1: The base image for the case of study This image includes plenty of objects in different shapes, and different colors. The second step is to process the base image into a gray scale image, the results is in ļ¬gure ?? And the histogram of the gray scale image is shown below in ļ¬gure 3. Figure 2: Processing result of the base image into gray scale Figure 3: The histogram of the gray scale image Now that we have the histogram of the image in gray scale, we can start our thresholding. Just notice that the histogram of our image contains only one peak, we are gonna explain this remark later. 2.1 Global thresholding : Global threshold is totally dependent on the histogram of the image. The histograms of images may be af- fected with noise, contrast, hue, saturation, shadow and more. The aim of global threshold is to select a pixel intensity value from the histogram and set all the greater inten- sities from that value to the value 1, and the smaller intensities to 0. We got then a binary image. In our project we use the local center method on his- togram to chose the value of threshold. We devise the number center repeated of intensity (11000) on the value of intensity repeated (210) we got then a threshold value equal to 0.6. We apply then a thresholding with 0.6 value on our image and we got the segmented image in ļ¬gure 4. Figure 4: The result of global threshold We notice that the global threshold with local cen- ter method made a loss of details in the image, the two yellow balls disappeared. 2.2 Adaptative thresholding : Like global thresholding, adaptive thresholding is used to separate desirable foreground image objects from the background based on the difference in pixel inten- sities of each region. There is a lot of algorithms to calculate the adaptative threshold value, the most well know is the Otsu algorithm. But in our project we use a general methode based on thresholding the image for each RGB intensity. First, we process the base image to a grey scaled image 2
  • 3. for each basic color, so we have Red gray scale his- togram shown in ļ¬gure 5 , Green gray scale histogram shown in ļ¬gure 6 and Blue gray scale histogram shown in ļ¬gure 7. Figure 5: Processing result of Red gray scale his- togram Figure 6: Processing result of the Green gray scale his- togram Figure 7: Processing result of the Blue gray scale his- togram Now we do the same steps of global threshold for each grey scale image for red, green and blue. The result are shown below : Figure 8: Global threshold of the Red gray scale Figure 9: Global threshold of the Green gray scale Figure 10: Global threshold of the Blue gray scale Now to achieve the adaptative threshold to our base image, all we need to do is to sum the Red gray scale threshold, the Green gray scale threshold and the 3
  • 4. Blue gray scale threshold image. The result of adapta- tive threshold is shown in ļ¬gure 11. Figure 11: The result of adaptative threshold We notice that in contrary of the global threshold, adaptative threshold have not lost objects in the image. 3 Results Now after we did the global and adaptative threshold- ing, we procede to the main objective of our applica- tion that is to make a program capable of detecting how many objects we have in the image. To compute how many objects we have in the image we display an algorithm that does these steps : - Measure properties of image regions using ā€™region- propsā€™ then ā€™stats.areaā€™ then ā€™stats.Eccentricityā€™ matlab commands. - Find Eccentricity of the Image. - Make a Bounding box to every object of the image and show the result of how many objects we have. The result of the global threshold is shown if ļ¬gure 12 Figure 12: The result of global threshold computing The result of computing gives as that there is 16 objects in the image which is false. The two missing objects are the two balls lost in the global threshold. The result of the adaptative threshold is shown if ļ¬g- ure 13 Figure 13: The result of adaptative threshold comput- ing The result of computing gives as that there is 18 objects in the image which is correct. 4 Conclusion The computing error in global threshold is due to the lost of information during thresholding. The global thresholding is note intersting for use when the histogram of the image we work on contains only one peak. This cause the loss of important details and informations we need in the image. The global thresholding could be more for use on histogram that contains two peaks. The adaptative approach of threshold has shown sat- isfying results, because we adapted the threshold for every RGB scale in the image so we donā€™t lose details and informations. 4
  • 5. References Gaurav Sharma 2003, Electrical engineering and applied signal processing series, Digital Color Imaging Hand- book Andreas Koschan, Mongi Abidi 2008, Digital color image processing Christine Fernandez - Maloigne 2013, Advanced Color Image Processing and Analysis Wilson, David, Laxminarayan, Swamy 2005, Handbook of Biomedical Image Analysis Volume 1: Segmenta- tion Models Uvais Qidwai and C. H. Chen 2009, DIGITAL IMAGE PROCESSING An Algorithmic Approach with MAT- LAB Chris Solomon and Toby Breckon 2011, Fundamentals of Digital Image Processing A Practical Approach with Examples in Matlab 5