SlideShare uma empresa Scribd logo
1 de 4
Baixar para ler offline
Amit Kumar Mandal et al Int. Journal of Engineering Research and Application
ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.511-514

RESEARCH ARTICLE

www.ijera.com

OPEN ACCESS

Image Segmentation Using Local Thresholding And Ycbcr Color
Space
Amit Kumar Mandal*, Dilip Kumar Baruah**
*(Dept of Computer Science, Moridhal College, Moridhal, Dhemaji – 787057)
** (Dept of Computer Science, Moridhal College, Moridhal, Dhemaji – 787057)

ABSTRACT
In this experiment a system has been developed that uses threshold values to segment an image. An image is
treated as a one dimensional array of pixel values. In this work, the segmentation is performed in YCbCr color
space. In this experiment, the segmented image will have 2 different colors, which are black and white, and for
this reason the segmentation is done using local thresholding value for Cb component of YCbCr. A mask is used
to determine the neighbors of each pixel in the image. The mask also determines an operation to be applied to
the neighborhood of every pixel in the image. Now the mask and the operations are used to determine the local
threshold for every pixel in the image. For each pixel location the threshold will be different. This value is
compared with the color value of the pixel. If the value of the pixel in this location is greater than or equal to the
specified threshold for the pixel then it is labeled as 1. Otherwise if it is smaller, then it is labeled as 0.In this
way we get an image with two color values.
Keyword: Image, segmentation, local thresholding, YCbCr.

I.

INTRODUCTION

Different computer and image processing
systems require an image segmentation-preprocessing algorithm as a first procedure.
Segmentation refers to the process of partitioning
a digital
image into
multiple segments (sets of pixels). The goal of
segmentation is to simplify and/or change the
representation of an image into something that is
more meaningful and easier to analyze. Image
segmentation is typically used to locate objects and
boundaries (lines, curves, etc.) in images. More
precisely, image segmentation is the process of
assigning a label to every pixel in an image such that
pixels with the same label share certain visual
characteristics.
The result of image segmentation is a set of
segments that collectively cover the entire image, or
a set of contours extracted from the image. Each of
the pixels in a region is similar with respect to some
characteristic or computed property, such
as color, intensity, or texture. The regions which are
adjacent are significantly different with respect to the
same characteristic(s).
Thresholding is one of the simplest and
most commonly used techniques for image
segmentation. It is useful in discriminating
foreground from the background. Thresholding
techniques can be categorized into two classes:
global
thresholding
and
local
(adaptive)
thresholding. In the global thresholding, a single
threshold value is used in the whole image. In the
local thresholding, a threshold value is assigned to
each pixel to determine whether it belongs to the
www.ijera.com

foreground or the background pixel using local
information around the pixel.
Since the global thresholding is simple and easy to
implement, it has been a popular technique in many
years. It works well when the intensity distribution
of objects and background pixels are sufficiently
distinct. But in our real life we have images whose
intensity distributions are not distinct. But local
thresholding works well in this case since the
threshold value at any point depends on the
properties of neighborhood of that point.
When a color model is associated with a
precise description of how the components are to be
interpreted (viewing conditions, etc.), the resulting
set of colors is called color space. There are various
color spaces such as CIE, YUV, YCbCr, HSV etc.
YCbCr is one of the popular color spaces in
computing. It represents colors in terms of one
luminance component (Y), and two chrominance
components (Cb and Cr). YCbCr is used widely in
video and image compression schemes such as
MPEG and JPEG.
1.1

Local thresholding:
In this method a threshold is computed at
every point (x,y) in the image based on one or more
specified properties computed in a neighborhood of
(x,y).Although this may seem like a laborious
process, modern algorithms and hardware allow for
fast neighborhood processing, especially for
common functions such as logical and arithmetic
operations.
Local thresholding can be done using
standard deviation and mean of the pixels in a
511 | P a g e
Amit Kumar Mandal et al Int. Journal of Engineering Research and Application
ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.511-514
neighborhood of every point in an image. These two
quantities are useful for determining the local
thresholds because they are descriptors of local
contrast and average intensity. Let бxy and mxy
denote the standard deviation and mean value of the
set of pixels contained in a neighborhood, Sxy,
centered at coordinates (x,y) in an image. The
following are common forms of variable, local
thresholds :
Txy=a бxy + b mxy
where a and b are non negative constants,
and
Txy=a бxy + b mG
where mG is the global image mean.
The Segmented image is computed as
g(x,y)= 1 if f(x,y) >T xy
0 if f(x,y) <=T xy
Where f(x,y) is the input image. This
equation is evaluated for all pixel locations in the
image, and a different threshold is computed at each
location (x,y) using the pixels in the neighborhood
Sxy.
1.2

YCbCr
YCbCr is a color space used as part of the
color image pipeline in video and digital
photography systems. YCbCr is not an absolute
color space. It is a way of encoding RGB
information. The actual color displayed depends on
the actual RGB primaries used to display the signal.
It represents color in terms of one
luminance component (Y) and two chrominance
components (Cb and Cr), where Cb is the
chrominance-blue component and Cr is the
chrominance –red component.
The YCbCr image can be converted to/from
RGB image. To convert from RGB to YCbCr, one
variant of this color space (according to ITU-R
BT.709):
Y = 0.2126 *red+0.7152*green+0.0722*blue
Cb = 0.5389*(blue-Y)
Cr = 0.6350*(red-Y)

1.

2.

3.
4.

www.ijera.com

Human eye has different sensitivity to colour
and brightness. Thus there is the need to
transform RGB to YCbCr.
In contrast to RGB, the YCbCr color space is
lumma-independent,
resulting
in
better
performance.
YCbCr is broadly utilized in video compression
standards such as MPEG and JPEG.
Y can be stored with high resolution or
transmitted at high bandwidth, and two
chrominance components (CB and CR) that can
be
bandwidth-reduced,
sub
sampled,
compressed or otherwise treated separately for
improved system efficiency.

II.

ALGORITHM

2.1

Introduction:
In this section we discuss about the
algorithm that has been used for image
segmentation. We have used the variable
thresholding approach based on local image
properties as the base which is also known as the
local thresholding method to implement the system.
Color value of the pixels has been used as the
property to implement the algorithm.
2.2

Algorithm analysis:
The algorithm considers the image pixels as
a one-dimensional array. The algorithm then
computes the RGB value of each pixel in the image.
The RGB values are then converted to YCbCr color
space. These were done by using the following
transformation:
Y = 0.2126 *red + 0.7152*green +0.0722*blue
Cb = 0.5389*(blue-Y)
Cr = 0.6350*(red-Y)
The value of Cb is used for further
calculations. For the computation a 3x3 mask has
been selected. It should be kept small. If a large
mask is selected, the result will be poorer as it is
more influenced by the illumination gradient. This
mask slides all over the image and place the centre
of the mask on the pixel for which we need to
calculate the threshold. The algorithm then computes
the mean and standard deviation of the pixels in the
neighborhood of the specified pixel.
The general form for calculating the Mean
and Standard Deviation value are as shown below:
Mean:
1
𝑀−1
𝑁−1
𝑚=
𝑥=0
𝑦=0 𝑓(𝑥, 𝑦)
𝑀𝑁
Standard Deviation:
𝜎=

1
𝑀𝑁

𝑀−1
𝑥=0

𝑁−1
𝑦=0

𝑓 𝑥, 𝑦 − 𝑚

2

Where M = Number of rows of the image
N = Number of columns of the
image.
Fig1: RGB colors cube in the YCbCr space
1.2.1

Reasons for using YCbCr:

www.ijera.com

The calculation of Standard Deviation and
Mean is taken into account varying number of pixels.
This is because for some of the pixels in the extreme
boundary of the image, some portion of the mask
512 | P a g e
Amit Kumar Mandal et al Int. Journal of Engineering Research and Application
ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.511-514

www.ijera.com

will go outside the image region. So we need to take
only those regions of the mask which are inside the
image. The calculated standard deviation and mean
are then used to calculate the threshold value for that
pixel. The following expression is used for
calculating the threshold:
T= a*бxy+b*mxy ,
where a and b are non negative constants.
The Cb value of the pixel is then compared
with the threshold value. If the Cb value is greater
than the threshold the pixel is labeled as 1
.Otherwise if the Cb value is less than or equal to the
threshold than the pixel is labeled as 0.

Fig 3: Input images with objects indistinct from
background

Fig2: Block diagram of the algorithm

III.

EXPERIMENTAL RESULTS

The algorithm has been implemented using
the Java 2.0 programming language in a machine
having Intel® Pentium Dual-Core Processor and
having the processor speed of 2.6 GHz and 0.99 GB
of RAM. The machine operates using Ubuntu 11.04
operating system.
The system was tested with different
images. We used two sets of images -- the image
which has different objects in the image which were
not distinct from the background and the images
with sufficiently distinct objects from the
background.
For our experiment we used only the JPG
images. Fig: 3 shows the input image in which the
objects are not sufficiently distinct from the
background. Fig: 4 shows the output images for
respective Fig: 3 images. Fig: 5 shows the input
image in which the objects are sufficiently distinct
from the background of the images. Fig: 6 shows the
output images for respective Fig: 5 images.
From our experiments on different images,
we observed that the system works well on both the
cases -- when the objects in the image were indistinct
and distinct from the background. We experimented
on blurred images. But the performances were not as
good as these results.

Fig 4: Output for images with objects indistinct from
background

Fig 5: Input images with objects distinct from
background

www.ijera.com

513 | P a g e
Amit Kumar Mandal et al Int. Journal of Engineering Research and Application
ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.511-514

[7]

www.ijera.com

based on Thresholding,
International
Journal of Advanced Computer Research,
Vol. 3, No. 1, 2013, 97 – 101.
P. Thakare, A Study of Image Segmentation
and
Edge
Detection
Techniques,
International Journal on Computer Science
and Engineering, Vol. 3, No. 2, 2011, 899 –
904.

Books:
[1]
Rafael C. Gonzalez, Richard E. Woods,
Digital Image Processing (Pearson (2008

Fig 6: Output for images with objects distinct from
background

IV.

CONCLUSION AND FUTURE
WORKS:

In this paper a method for image
segmentation has been discussed which is based on
local threshoding and YCbCr color space.
Experimental results show that our method can
produce good results for the process of color image
segmentation. There is a scope for research on
blurred images (motion and still) using local
thresholding and YCbCr.

REFERENCES
Journal Paper:
[1]
S. S. Al-amri, N.V. Kalyankar and S.D.
Khamitkar, Image Segmentation by Using
Threshod
Techniques,
Journal
of
Computing, Vol. 2, Issue 5, 2010, 83 – 86.
[2]
P. Bhosale and A. Gokhale, Segmentation
of Color Images Based on Different
Segmentation Techniques, International
Journal of Electronics and Computer
Science Engineerin, Vol. 2, No. 2, 640 –
644.
[3]
J. A. M. Saif , A. A. Md. Al-Kubati, A. S.
Hazaa, and Md. Al-Moraish, Image
Segmentation Using Edge Detection and
Thresholding, The 13th International Arab
Conference on Information Technology,
2012, 473 – 476.
[4]
V. Power, A. Jahagirdar and S. Sirsikar,
Skin Detection in YCbCr Color Space,
International
Journal
of
Computer
Applications, 2011, 1 – 4.
[5]
D. Cahi and K. N. Ngan, Face
SegmentationUsing Skin-Color Map in
Videophone
Applications,
IEEE
Transaction on Circuit and Systems for
Video Technology, Vol. 9, 1999, 551-564.
[6]
G. E. Suji, Dr. Y. V. S. Lakshmi, and Dr.
G. W. Jiji, MRI Brain Image Segmentation
www.ijera.com

514 | P a g e

Mais conteúdo relacionado

Mais procurados

Noise tolerant color image segmentation using support vector machine
Noise tolerant color image segmentation using support vector machineNoise tolerant color image segmentation using support vector machine
Noise tolerant color image segmentation using support vector machineeSAT Publishing House
 
Comparative study on image segmentation techniques
Comparative study on image segmentation techniquesComparative study on image segmentation techniques
Comparative study on image segmentation techniquesgmidhubala
 
Image processing
Image processingImage processing
Image processingabuamo
 
Comparison of image segmentation
Comparison of image segmentationComparison of image segmentation
Comparison of image segmentationHaitham Ahmed
 
Image segmentation ajal
Image segmentation ajalImage segmentation ajal
Image segmentation ajalAJAL A J
 
Image parts and segmentation
Image parts and segmentation Image parts and segmentation
Image parts and segmentation Rappy Saha
 
Image segmentation
Image segmentationImage segmentation
Image segmentationkhyati gupta
 
Image pre processing - local processing
Image pre processing - local processingImage pre processing - local processing
Image pre processing - local processingAshish Kumar
 
Image segmentation
Image segmentationImage segmentation
Image segmentationMukul Jindal
 
Image segmentation
Image segmentationImage segmentation
Image segmentationDeepak Kumar
 
A version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentationA version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentationHabibur Rahman
 
IMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESIMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESVicky Kumar
 
Multimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital librariesMultimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital librariesMazin Alwaaly
 
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGESIMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGEScseij
 

Mais procurados (20)

Noise tolerant color image segmentation using support vector machine
Noise tolerant color image segmentation using support vector machineNoise tolerant color image segmentation using support vector machine
Noise tolerant color image segmentation using support vector machine
 
Comparative study on image segmentation techniques
Comparative study on image segmentation techniquesComparative study on image segmentation techniques
Comparative study on image segmentation techniques
 
Image processing
Image processingImage processing
Image processing
 
Comparison of image segmentation
Comparison of image segmentationComparison of image segmentation
Comparison of image segmentation
 
Image segmentation ajal
Image segmentation ajalImage segmentation ajal
Image segmentation ajal
 
Image Segmentation
 Image Segmentation Image Segmentation
Image Segmentation
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
 
Image parts and segmentation
Image parts and segmentation Image parts and segmentation
Image parts and segmentation
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Image pre processing - local processing
Image pre processing - local processingImage pre processing - local processing
Image pre processing - local processing
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
A version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentationA version of watershed algorithm for color image segmentation
A version of watershed algorithm for color image segmentation
 
Im seg04
Im seg04Im seg04
Im seg04
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
IMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUESIMAGE SEGMENTATION TECHNIQUES
IMAGE SEGMENTATION TECHNIQUES
 
Multimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital librariesMultimedia content based retrieval in digital libraries
Multimedia content based retrieval in digital libraries
 
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGESIMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
IMAGE SEGMENTATION BY USING THRESHOLDING TECHNIQUES FOR MEDICAL IMAGES
 
Image segmentation using wvlt trnsfrmtn and fuzzy logic. ppt
Image segmentation using wvlt trnsfrmtn and fuzzy logic. pptImage segmentation using wvlt trnsfrmtn and fuzzy logic. ppt
Image segmentation using wvlt trnsfrmtn and fuzzy logic. ppt
 

Destaque (20)

Bv36438443
Bv36438443Bv36438443
Bv36438443
 
Ce36484489
Ce36484489Ce36484489
Ce36484489
 
Co36544546
Co36544546Co36544546
Co36544546
 
Cm36532538
Cm36532538Cm36532538
Cm36532538
 
Dt36717722
Dt36717722Dt36717722
Dt36717722
 
Do36689702
Do36689702Do36689702
Do36689702
 
Dl36675677
Dl36675677Dl36675677
Dl36675677
 
Eb36777782
Eb36777782Eb36777782
Eb36777782
 
I365358
I365358I365358
I365358
 
Db36619623
Db36619623Db36619623
Db36619623
 
Bl36378381
Bl36378381Bl36378381
Bl36378381
 
Bp36398403
Bp36398403Bp36398403
Bp36398403
 
Bw36444448
Bw36444448Bw36444448
Bw36444448
 
By36454458
By36454458By36454458
By36454458
 
Bk36372377
Bk36372377Bk36372377
Bk36372377
 
Bn36386389
Bn36386389Bn36386389
Bn36386389
 
Cf36490495
Cf36490495Cf36490495
Cf36490495
 
Ck36515520
Ck36515520Ck36515520
Ck36515520
 
Ci36507510
Ci36507510Ci36507510
Ci36507510
 
Cp36547553
Cp36547553Cp36547553
Cp36547553
 

Semelhante a Image segmentation using local thresholding and YCbCr color space

AUTOMATIC DOMINANT REGION SEGMENTATION FOR NATURAL IMAGES
AUTOMATIC DOMINANT REGION SEGMENTATION FOR NATURAL IMAGES AUTOMATIC DOMINANT REGION SEGMENTATION FOR NATURAL IMAGES
AUTOMATIC DOMINANT REGION SEGMENTATION FOR NATURAL IMAGES cscpconf
 
Automatic dominant region segmentation for natural images
Automatic dominant region segmentation for natural imagesAutomatic dominant region segmentation for natural images
Automatic dominant region segmentation for natural imagescsandit
 
A Robust Method for Image Watermarking Using Block Differencing LSB Substitution
A Robust Method for Image Watermarking Using Block Differencing LSB SubstitutionA Robust Method for Image Watermarking Using Block Differencing LSB Substitution
A Robust Method for Image Watermarking Using Block Differencing LSB SubstitutionIJERA Editor
 
Developing 3D Viewing Model from 2D Stereo Pair with its Occlusion Ratio
Developing 3D Viewing Model from 2D Stereo Pair with its Occlusion RatioDeveloping 3D Viewing Model from 2D Stereo Pair with its Occlusion Ratio
Developing 3D Viewing Model from 2D Stereo Pair with its Occlusion RatioCSCJournals
 
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...VLSICS Design
 
A binarization technique for extraction of devanagari text from camera based ...
A binarization technique for extraction of devanagari text from camera based ...A binarization technique for extraction of devanagari text from camera based ...
A binarization technique for extraction of devanagari text from camera based ...sipij
 
Information search using text and image query
Information search using text and image queryInformation search using text and image query
Information search using text and image queryeSAT Journals
 
Information search using text and image query
Information search using text and image queryInformation search using text and image query
Information search using text and image queryeSAT Publishing House
 
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...VLSICS Design
 
Performance Analysis of Compression Techniques Using SVD, BTC, DCT and GP
Performance Analysis of Compression Techniques Using SVD, BTC, DCT and GPPerformance Analysis of Compression Techniques Using SVD, BTC, DCT and GP
Performance Analysis of Compression Techniques Using SVD, BTC, DCT and GPIOSR Journals
 
Visual Cryptography using Image Thresholding
Visual Cryptography using Image ThresholdingVisual Cryptography using Image Thresholding
Visual Cryptography using Image ThresholdingIRJET Journal
 
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUESA STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUEScscpconf
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit NotesAAKANKSHA JAIN
 
Improved block based segmentation for jpeg
Improved block based segmentation for jpegImproved block based segmentation for jpeg
Improved block based segmentation for jpegeSAT Publishing House
 

Semelhante a Image segmentation using local thresholding and YCbCr color space (20)

IJET-V2I6P17
IJET-V2I6P17IJET-V2I6P17
IJET-V2I6P17
 
J017426467
J017426467J017426467
J017426467
 
AUTOMATIC DOMINANT REGION SEGMENTATION FOR NATURAL IMAGES
AUTOMATIC DOMINANT REGION SEGMENTATION FOR NATURAL IMAGES AUTOMATIC DOMINANT REGION SEGMENTATION FOR NATURAL IMAGES
AUTOMATIC DOMINANT REGION SEGMENTATION FOR NATURAL IMAGES
 
Automatic dominant region segmentation for natural images
Automatic dominant region segmentation for natural imagesAutomatic dominant region segmentation for natural images
Automatic dominant region segmentation for natural images
 
regions
regionsregions
regions
 
A Robust Method for Image Watermarking Using Block Differencing LSB Substitution
A Robust Method for Image Watermarking Using Block Differencing LSB SubstitutionA Robust Method for Image Watermarking Using Block Differencing LSB Substitution
A Robust Method for Image Watermarking Using Block Differencing LSB Substitution
 
Developing 3D Viewing Model from 2D Stereo Pair with its Occlusion Ratio
Developing 3D Viewing Model from 2D Stereo Pair with its Occlusion RatioDeveloping 3D Viewing Model from 2D Stereo Pair with its Occlusion Ratio
Developing 3D Viewing Model from 2D Stereo Pair with its Occlusion Ratio
 
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
Pipelined Architecture of 2D-DCT, Quantization and ZigZag Process for JPEG Im...
 
A binarization technique for extraction of devanagari text from camera based ...
A binarization technique for extraction of devanagari text from camera based ...A binarization technique for extraction of devanagari text from camera based ...
A binarization technique for extraction of devanagari text from camera based ...
 
Information search using text and image query
Information search using text and image queryInformation search using text and image query
Information search using text and image query
 
Information search using text and image query
Information search using text and image queryInformation search using text and image query
Information search using text and image query
 
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
PIPELINED ARCHITECTURE OF 2D-DCT, QUANTIZATION AND ZIGZAG PROCESS FOR JPEG IM...
 
Performance Analysis of Compression Techniques Using SVD, BTC, DCT and GP
Performance Analysis of Compression Techniques Using SVD, BTC, DCT and GPPerformance Analysis of Compression Techniques Using SVD, BTC, DCT and GP
Performance Analysis of Compression Techniques Using SVD, BTC, DCT and GP
 
B017120611
B017120611B017120611
B017120611
 
h.pdf
h.pdfh.pdf
h.pdf
 
Visual Cryptography using Image Thresholding
Visual Cryptography using Image ThresholdingVisual Cryptography using Image Thresholding
Visual Cryptography using Image Thresholding
 
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUESA STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
A STUDY AND ANALYSIS OF DIFFERENT EDGE DETECTION TECHNIQUES
 
I07015261
I07015261I07015261
I07015261
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
Improved block based segmentation for jpeg
Improved block based segmentation for jpegImproved block based segmentation for jpeg
Improved block based segmentation for jpeg
 

Último

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Último (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Image segmentation using local thresholding and YCbCr color space

  • 1. Amit Kumar Mandal et al Int. Journal of Engineering Research and Application ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.511-514 RESEARCH ARTICLE www.ijera.com OPEN ACCESS Image Segmentation Using Local Thresholding And Ycbcr Color Space Amit Kumar Mandal*, Dilip Kumar Baruah** *(Dept of Computer Science, Moridhal College, Moridhal, Dhemaji – 787057) ** (Dept of Computer Science, Moridhal College, Moridhal, Dhemaji – 787057) ABSTRACT In this experiment a system has been developed that uses threshold values to segment an image. An image is treated as a one dimensional array of pixel values. In this work, the segmentation is performed in YCbCr color space. In this experiment, the segmented image will have 2 different colors, which are black and white, and for this reason the segmentation is done using local thresholding value for Cb component of YCbCr. A mask is used to determine the neighbors of each pixel in the image. The mask also determines an operation to be applied to the neighborhood of every pixel in the image. Now the mask and the operations are used to determine the local threshold for every pixel in the image. For each pixel location the threshold will be different. This value is compared with the color value of the pixel. If the value of the pixel in this location is greater than or equal to the specified threshold for the pixel then it is labeled as 1. Otherwise if it is smaller, then it is labeled as 0.In this way we get an image with two color values. Keyword: Image, segmentation, local thresholding, YCbCr. I. INTRODUCTION Different computer and image processing systems require an image segmentation-preprocessing algorithm as a first procedure. Segmentation refers to the process of partitioning a digital image into multiple segments (sets of pixels). The goal of segmentation is to simplify and/or change the representation of an image into something that is more meaningful and easier to analyze. Image segmentation is typically used to locate objects and boundaries (lines, curves, etc.) in images. More precisely, image segmentation is the process of assigning a label to every pixel in an image such that pixels with the same label share certain visual characteristics. The result of image segmentation is a set of segments that collectively cover the entire image, or a set of contours extracted from the image. Each of the pixels in a region is similar with respect to some characteristic or computed property, such as color, intensity, or texture. The regions which are adjacent are significantly different with respect to the same characteristic(s). Thresholding is one of the simplest and most commonly used techniques for image segmentation. It is useful in discriminating foreground from the background. Thresholding techniques can be categorized into two classes: global thresholding and local (adaptive) thresholding. In the global thresholding, a single threshold value is used in the whole image. In the local thresholding, a threshold value is assigned to each pixel to determine whether it belongs to the www.ijera.com foreground or the background pixel using local information around the pixel. Since the global thresholding is simple and easy to implement, it has been a popular technique in many years. It works well when the intensity distribution of objects and background pixels are sufficiently distinct. But in our real life we have images whose intensity distributions are not distinct. But local thresholding works well in this case since the threshold value at any point depends on the properties of neighborhood of that point. When a color model is associated with a precise description of how the components are to be interpreted (viewing conditions, etc.), the resulting set of colors is called color space. There are various color spaces such as CIE, YUV, YCbCr, HSV etc. YCbCr is one of the popular color spaces in computing. It represents colors in terms of one luminance component (Y), and two chrominance components (Cb and Cr). YCbCr is used widely in video and image compression schemes such as MPEG and JPEG. 1.1 Local thresholding: In this method a threshold is computed at every point (x,y) in the image based on one or more specified properties computed in a neighborhood of (x,y).Although this may seem like a laborious process, modern algorithms and hardware allow for fast neighborhood processing, especially for common functions such as logical and arithmetic operations. Local thresholding can be done using standard deviation and mean of the pixels in a 511 | P a g e
  • 2. Amit Kumar Mandal et al Int. Journal of Engineering Research and Application ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.511-514 neighborhood of every point in an image. These two quantities are useful for determining the local thresholds because they are descriptors of local contrast and average intensity. Let бxy and mxy denote the standard deviation and mean value of the set of pixels contained in a neighborhood, Sxy, centered at coordinates (x,y) in an image. The following are common forms of variable, local thresholds : Txy=a бxy + b mxy where a and b are non negative constants, and Txy=a бxy + b mG where mG is the global image mean. The Segmented image is computed as g(x,y)= 1 if f(x,y) >T xy 0 if f(x,y) <=T xy Where f(x,y) is the input image. This equation is evaluated for all pixel locations in the image, and a different threshold is computed at each location (x,y) using the pixels in the neighborhood Sxy. 1.2 YCbCr YCbCr is a color space used as part of the color image pipeline in video and digital photography systems. YCbCr is not an absolute color space. It is a way of encoding RGB information. The actual color displayed depends on the actual RGB primaries used to display the signal. It represents color in terms of one luminance component (Y) and two chrominance components (Cb and Cr), where Cb is the chrominance-blue component and Cr is the chrominance –red component. The YCbCr image can be converted to/from RGB image. To convert from RGB to YCbCr, one variant of this color space (according to ITU-R BT.709): Y = 0.2126 *red+0.7152*green+0.0722*blue Cb = 0.5389*(blue-Y) Cr = 0.6350*(red-Y) 1. 2. 3. 4. www.ijera.com Human eye has different sensitivity to colour and brightness. Thus there is the need to transform RGB to YCbCr. In contrast to RGB, the YCbCr color space is lumma-independent, resulting in better performance. YCbCr is broadly utilized in video compression standards such as MPEG and JPEG. Y can be stored with high resolution or transmitted at high bandwidth, and two chrominance components (CB and CR) that can be bandwidth-reduced, sub sampled, compressed or otherwise treated separately for improved system efficiency. II. ALGORITHM 2.1 Introduction: In this section we discuss about the algorithm that has been used for image segmentation. We have used the variable thresholding approach based on local image properties as the base which is also known as the local thresholding method to implement the system. Color value of the pixels has been used as the property to implement the algorithm. 2.2 Algorithm analysis: The algorithm considers the image pixels as a one-dimensional array. The algorithm then computes the RGB value of each pixel in the image. The RGB values are then converted to YCbCr color space. These were done by using the following transformation: Y = 0.2126 *red + 0.7152*green +0.0722*blue Cb = 0.5389*(blue-Y) Cr = 0.6350*(red-Y) The value of Cb is used for further calculations. For the computation a 3x3 mask has been selected. It should be kept small. If a large mask is selected, the result will be poorer as it is more influenced by the illumination gradient. This mask slides all over the image and place the centre of the mask on the pixel for which we need to calculate the threshold. The algorithm then computes the mean and standard deviation of the pixels in the neighborhood of the specified pixel. The general form for calculating the Mean and Standard Deviation value are as shown below: Mean: 1 𝑀−1 𝑁−1 𝑚= 𝑥=0 𝑦=0 𝑓(𝑥, 𝑦) 𝑀𝑁 Standard Deviation: 𝜎= 1 𝑀𝑁 𝑀−1 𝑥=0 𝑁−1 𝑦=0 𝑓 𝑥, 𝑦 − 𝑚 2 Where M = Number of rows of the image N = Number of columns of the image. Fig1: RGB colors cube in the YCbCr space 1.2.1 Reasons for using YCbCr: www.ijera.com The calculation of Standard Deviation and Mean is taken into account varying number of pixels. This is because for some of the pixels in the extreme boundary of the image, some portion of the mask 512 | P a g e
  • 3. Amit Kumar Mandal et al Int. Journal of Engineering Research and Application ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.511-514 www.ijera.com will go outside the image region. So we need to take only those regions of the mask which are inside the image. The calculated standard deviation and mean are then used to calculate the threshold value for that pixel. The following expression is used for calculating the threshold: T= a*бxy+b*mxy , where a and b are non negative constants. The Cb value of the pixel is then compared with the threshold value. If the Cb value is greater than the threshold the pixel is labeled as 1 .Otherwise if the Cb value is less than or equal to the threshold than the pixel is labeled as 0. Fig 3: Input images with objects indistinct from background Fig2: Block diagram of the algorithm III. EXPERIMENTAL RESULTS The algorithm has been implemented using the Java 2.0 programming language in a machine having Intel® Pentium Dual-Core Processor and having the processor speed of 2.6 GHz and 0.99 GB of RAM. The machine operates using Ubuntu 11.04 operating system. The system was tested with different images. We used two sets of images -- the image which has different objects in the image which were not distinct from the background and the images with sufficiently distinct objects from the background. For our experiment we used only the JPG images. Fig: 3 shows the input image in which the objects are not sufficiently distinct from the background. Fig: 4 shows the output images for respective Fig: 3 images. Fig: 5 shows the input image in which the objects are sufficiently distinct from the background of the images. Fig: 6 shows the output images for respective Fig: 5 images. From our experiments on different images, we observed that the system works well on both the cases -- when the objects in the image were indistinct and distinct from the background. We experimented on blurred images. But the performances were not as good as these results. Fig 4: Output for images with objects indistinct from background Fig 5: Input images with objects distinct from background www.ijera.com 513 | P a g e
  • 4. Amit Kumar Mandal et al Int. Journal of Engineering Research and Application ISSN : 2248-9622, Vol. 3, Issue 6, Nov-Dec 2013, pp.511-514 [7] www.ijera.com based on Thresholding, International Journal of Advanced Computer Research, Vol. 3, No. 1, 2013, 97 – 101. P. Thakare, A Study of Image Segmentation and Edge Detection Techniques, International Journal on Computer Science and Engineering, Vol. 3, No. 2, 2011, 899 – 904. Books: [1] Rafael C. Gonzalez, Richard E. Woods, Digital Image Processing (Pearson (2008 Fig 6: Output for images with objects distinct from background IV. CONCLUSION AND FUTURE WORKS: In this paper a method for image segmentation has been discussed which is based on local threshoding and YCbCr color space. Experimental results show that our method can produce good results for the process of color image segmentation. There is a scope for research on blurred images (motion and still) using local thresholding and YCbCr. REFERENCES Journal Paper: [1] S. S. Al-amri, N.V. Kalyankar and S.D. Khamitkar, Image Segmentation by Using Threshod Techniques, Journal of Computing, Vol. 2, Issue 5, 2010, 83 – 86. [2] P. Bhosale and A. Gokhale, Segmentation of Color Images Based on Different Segmentation Techniques, International Journal of Electronics and Computer Science Engineerin, Vol. 2, No. 2, 640 – 644. [3] J. A. M. Saif , A. A. Md. Al-Kubati, A. S. Hazaa, and Md. Al-Moraish, Image Segmentation Using Edge Detection and Thresholding, The 13th International Arab Conference on Information Technology, 2012, 473 – 476. [4] V. Power, A. Jahagirdar and S. Sirsikar, Skin Detection in YCbCr Color Space, International Journal of Computer Applications, 2011, 1 – 4. [5] D. Cahi and K. N. Ngan, Face SegmentationUsing Skin-Color Map in Videophone Applications, IEEE Transaction on Circuit and Systems for Video Technology, Vol. 9, 1999, 551-564. [6] G. E. Suji, Dr. Y. V. S. Lakshmi, and Dr. G. W. Jiji, MRI Brain Image Segmentation www.ijera.com 514 | P a g e