Thread Subject: How to extract yellow color under different iluminations

Subject: How to extract yellow color under different iluminations

From: Prasanna

Date: 19 Oct, 2009 10:51:02

Message: 1 of 10

Hi,

How can I extract the yellow color regions from a .Jpg file under different illumination conditions? Please help me with this. Send me the codes or the method.

Regards
Prasanna

Subject: How to extract yellow color under different iluminations

From: John D'Errico

Date: 19 Oct, 2009 11:34:02

Message: 2 of 10

"Prasanna " <pmgunawardana@gmail.com> wrote in message <hbhgam$3ok$1@fred.mathworks.com>...
> Hi,
>
> How can I extract the yellow color regions from a .Jpg file under different illumination conditions? Please help me with this. Send me the codes or the method.
>

The "yellow" color region alone of color space is
non-simple to describe, that will depend on the
color space you might work in. A blob is the best
description.

Now, you want to change some nominal illuminant,
then to recover from the original scene or from a
print, which pixels fall into that nondescript blob?
This is a non-simple problem, made worse because
of your less than complete description of the
problem. Which illuminant must be changed? That
of the original scene? That of the environment in
which we will view a print, or the monitor? Or
maybe change the monitor white-point? Any of
these can be difficult problems to solve, depending
on how well you wish to do the job.

For example, if it is a question of print viewing, then
we need an accurate characterization of the printer.
We will need to know the device gamut for how this
device prints yellows. Which pixels were out of gamut,
and exactly what strategy is used to move those
colors to the device gamut. (There is more than one
such strategy to be found.) Alternatively, you need
a mapping that will predict where each color in
the original color space ends up after it is printed.
Finally, we will need to have a good specification of
the region of a color space where the color yellow
lives.

Sp yeah, right, we'll get right on it. Stop work on
all else and send you code for this immediately.
If you really expect an answer, then it will at most
be in the form of some ideas on what to do. Even
for that, you MUST give an adequate description
of the problem you are trying to solve.

John

Subject: How to extract yellow color under different iluminations

From: ImageAnalyst

Date: 19 Oct, 2009 13:47:09

Message: 3 of 10

LIke John said, not so easy, and there is no general answer. I
suggest you follow his advice and give a description of what you
want. Part of that would be posting several images somewhere (on a
free image hosting website such as flickr.com). It's easier to give
advice on color segmentation when you have the images to look at.
P.S. Perhaps you'd like to play around with the really nice 3D gamut
visualization plugin for ImageJ here:
http://rsb.info.nih.gov/ij/plugins/color-inspector.html
Maybe you'll see your yellow cluster well isolated.

Perhaps you'd like to review one MATLAB implementation for color
segmentation. Maybe it will work for you - maybe not.
http://www.mathworks.com/products/demos/image/color_seg_k/ipexhistology.html

Subject: How to extract yellow color under different iluminations

From: Prasanna

Date: 20 Oct, 2009 08:33:02

Message: 4 of 10

Thank u very much for your immediate reply.I am going to identify the traffic sign (.jpg) image. And it is rectangular shape sign image, no border. back ground of the sign is yellow.middle of the sign contain the "left bend" sign with black color. I have taken the several pictures of that under different light conditions. I want extract the yellow color area and do some further analysis. Unfortunately I don't have the pictures right now. I will send them bit later. Until that if you get a rough idea please share it with me.

Regards
Prasanna.

"John D'Errico" <woodchips@rochester.rr.com> wrote in message <hbhira$906$1@fred.mathworks.com>...
> "Prasanna " <pmgunawardana@gmail.com> wrote in message <hbhgam$3ok$1@fred.mathworks.com>...
> > Hi,
> >
> > How can I extract the yellow color regions from a .Jpg file under different illumination conditions? Please help me with this. Send me the codes or the method.
> >
>
> The "yellow" color region alone of color space is
> non-simple to describe, that will depend on the
> color space you might work in. A blob is the best
> description.
>
> Now, you want to change some nominal illuminant,
> then to recover from the original scene or from a
> print, which pixels fall into that nondescript blob?
> This is a non-simple problem, made worse because
> of your less than complete description of the
> problem. Which illuminant must be changed? That
> of the original scene? That of the environment in
> which we will view a print, or the monitor? Or
> maybe change the monitor white-point? Any of
> these can be difficult problems to solve, depending
> on how well you wish to do the job.
>
> For example, if it is a question of print viewing, then
> we need an accurate characterization of the printer.
> We will need to know the device gamut for how this
> device prints yellows. Which pixels were out of gamut,
> and exactly what strategy is used to move those
> colors to the device gamut. (There is more than one
> such strategy to be found.) Alternatively, you need
> a mapping that will predict where each color in
> the original color space ends up after it is printed.
> Finally, we will need to have a good specification of
> the region of a color space where the color yellow
> lives.
>
> Sp yeah, right, we'll get right on it. Stop work on
> all else and send you code for this immediately.
> If you really expect an answer, then it will at most
> be in the form of some ideas on what to do. Even
> for that, you MUST give an adequate description
> of the problem you are trying to solve.
>
> John

Subject: How to extract yellow color under different iluminations

From: ImageAnalyst

Date: 20 Oct, 2009 12:53:37

Message: 5 of 10

On Oct 20, 4:33 am, "Prasanna " <pmgunaward...@gmail.com> wrote:
> Thank u very much for your immediate reply.I am going to identify the traffic sign (.jpg) image. And it is rectangular shape sign image, no border. back ground of the sign is yellow.middle of the sign contain the "left bend" sign with black color. I have taken the several pictures of that under different light conditions. I want extract the yellow color area and do some further analysis. Unfortunately I don't have the pictures right now. I will send them bit later. Until that if you get a rough idea please share it with me.
>
> Regards
> Prasanna.
--------------------------------------------------------------------------------------------------------------
My colleague used to joke that he was amazed that they would pay us
big salaries when all we do is thresholding. In some sense it's
true. In virtually all image processing situations you go through a
bunch of operations to identify the things you DO want and DON'T want
in your scene, but one of the final steps in this potentially long
process is thresholding. Most image processing applications look
something like this:

(bunch of operations to get an image that can be thresholded)
threshold the image
do connected components labeling (if you have multiple regions that
need to be separately measured) - can use the MATLAB function
bwconncomp()
measure the objects - can use the MATLAB function regionprops()

In you case the first step might be to do some sort of color
classification. If you're lucky this may be as easy as simply calling
rgb2hsv(). If all the pixels that you consider to be "yellow" fall
into a certain range of gray levels in the hue image, you're home
free. Just threshold, throw out spurious yellow objects that aren't
signs (e.g. maybe they're not large enough) and measure what's left.

Here's a tutorial I wrote that uses thresholding. You may find it
helpful if you're new to image processing:
http://www.mathworks.com/matlabcentral/fileexchange/25157

Subject: How to extract yellow color under different iluminations

From: Prasanna

Date: 21 Oct, 2009 11:36:19

Message: 6 of 10

Thank you. Now I have a rough idea. I'll do some experiments with this try to figure this out.


ImageAnalyst <imageanalyst@mailinator.com> wrote in message <76b3be5d-f7d7-466f-b7d6-3d3894a62aa0@33g2000vbe.googlegroups.com>...
> On Oct 20, 4:33?am, "Prasanna " <pmgunaward...@gmail.com> wrote:
> > Thank u very much for your immediate reply.I am going to identify the traffic sign (.jpg) image. And it is rectangular shape sign image, no border. back ground of the sign is yellow.middle of the sign contain the "left bend" sign with black color. I have taken the several pictures of that under different light conditions. I want extract the yellow color area and do some further analysis. Unfortunately I don't have the pictures right now. I will send them bit later. Until that if you get a rough idea please share it with me.
> >
> > Regards
> > Prasanna.
> --------------------------------------------------------------------------------------------------------------
> My colleague used to joke that he was amazed that they would pay us
> big salaries when all we do is thresholding. In some sense it's
> true. In virtually all image processing situations you go through a
> bunch of operations to identify the things you DO want and DON'T want
> in your scene, but one of the final steps in this potentially long
> process is thresholding. Most image processing applications look
> something like this:
>
> (bunch of operations to get an image that can be thresholded)
> threshold the image
> do connected components labeling (if you have multiple regions that
> need to be separately measured) - can use the MATLAB function
> bwconncomp()
> measure the objects - can use the MATLAB function regionprops()
>
> In you case the first step might be to do some sort of color
> classification. If you're lucky this may be as easy as simply calling
> rgb2hsv(). If all the pixels that you consider to be "yellow" fall
> into a certain range of gray levels in the hue image, you're home
> free. Just threshold, throw out spurious yellow objects that aren't
> signs (e.g. maybe they're not large enough) and measure what's left.
>
> Here's a tutorial I wrote that uses thresholding. You may find it
> helpful if you're new to image processing:
> http://www.mathworks.com/matlabcentral/fileexchange/25157

Subject: How to extract yellow color under different iluminations

From: Prasanna

Date: 29 Oct, 2009 06:33:24

Message: 7 of 10

Hi,

Its me again after some researches.
I have two traffic signs. They are "left bend" and "right bend" (rectangular shape). I have extracted the sign from the RGB image(640*480). After doing several image techniques now I am having the binary image of the sign. It only contain one of above mentioned signs(Left bend or right bend). I want to identify this binary sign image using template matching, whether it is "Left bend" or "right bend".

Image size is 640*480. small binary sign is inside that image.Back ground is totally black.yellow area in the sign display as white and the arrow is displayed as black.

Also I like to know how to create templates using one of the above mentioned binary image.Please help me. I am struggle with a research project.

I have no idea how to attach a image to this mail. Else I can send you the images also.Please inform me that also.

Thanks & best regards,
Prasanna

Subject: How to extract yellow color under different iluminations

From: ImageAnalyst

Date: 29 Oct, 2009 10:20:39

Message: 8 of 10

Prasanna:
Ask regionprops to give you the bounding box and center of mass. If
the center of mass is on the left half of the bounding box, it's a
right bending arrow. This is because most of the arrow is the
stragiht vertical part and if the arrow points right, then the
straight vertical part is on the left, and only a little part of the
arrow is in the right half.. If the center of mass is on the right
half of the bounding box, it's a left bending arrow.
Good luck,
ImageAnalyst

Subject: How to extract yellow color under different iluminations

From: Prasanna

Date: 30 Oct, 2009 07:03:27

Message: 9 of 10

Thank u image analist I'll try with this.

Subject: How to extract yellow color under different iluminations

From: Prasanna

Date: 2 Nov, 2009 18:11:04

Message: 10 of 10

Hi image analyst,

That method is does not going to work. Because that image is not biased to left or right. Below part of the arrow is one side and other part is other side of the image. mass is equal in both side.

I have uploaded several this kind of images to the below location. But there are more images with me.

http://groups.google.com/group/apptronics/files........../images.zip

Can you give me a code to separate the rectangular sign from the image(without black back ground). But this method should able to apply any binary image that we input. Please reply. Then I can try with template matching.

Thank you
Prasanna.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
doit4me John D'Errico 19 Oct, 2009 07:03:15
rssFeed for this Thread

Contact us at files@mathworks.com