Thread Subject: fruit features extraction

Subject: fruit features extraction

From: Fatma

Date: 24 Nov, 2009 08:13:01

Message: 1 of 6

Hi, I'm working on a project to classify fruit based on its category. Is anyone can tell me how to extract fruit features such as colors, shape, size or weight using matlab?

Subject: fruit features extraction

From: Clare

Date: 24 Nov, 2009 08:33:23

Message: 2 of 6

Assume you have an RGB image, you will find Red, Green and Blue values are stored in separate matrices, i.e. Image(:,:,1), Image(:,:,2), and Image(:,:,3). You can extract color by looking at these color spaces.

Shape extraction is basically an image segmentation problem. You might want to first take advantage of color information and separate the fruits by colors. Then you might want to threshold your image (graythresh, im2bw), or use edge detection algorithms (edge). Finally you might need to label each components (bwlabel, regionprops).

Size is easy. Once you find the shape, just count how many pixels are inside the shape.

type help on rgb2gray, im2bw, graythresh, edge, bwlabel, regionprops...

As to weight ... I am not sure if it's relevant.

"Fatma " <fit@itc.udm.edu.my> wrote in message <heg4id$cgq$1@fred.mathworks.com>...
> Hi, I'm working on a project to classify fruit based on its category. Is anyone can tell me how to extract fruit features such as colors, shape, size or weight using matlab?

Subject: fruit features extraction

From: ImageAnalyst

Date: 24 Nov, 2009 11:27:32

Message: 3 of 6

On Nov 24, 3:13 am, "Fatma " <f...@itc.udm.edu.my> wrote:
> Hi, I'm working on a project to classify fruit based on its category. Is anyone can tell me how to extract fruit features such as colors, shape, size or weight using matlab?

-----------------------------------------------------------------------------------------
Someone asked about this last April (http://groups.google.com/group/
comp.soft-sys.matlab/browse_frm/thread/f281f673b7a2c1c2/
ff3c1b3d80debbe9?hl=en&lnk=gst&q=fruit#ff3c1b3d80debbe9)

Basically you have to segment your image based on color, edges, shape,
or whatever you can do separate each fruit out individually. Then
create your feature vector of measurements (size, shape, color,
roundness, etc.) and compare it to feature vectors of "known" fruits.

I can't say much more unless you post your images somewhere.

Subject: fruit features extraction

From: Fatma

Date: 9 Dec, 2009 01:28:03

Message: 4 of 6

"Clare " <flyingclare@gmail.com> wrote in message <heg5oj$p03$1@fred.mathworks.com>...
> Assume you have an RGB image, you will find Red, Green and Blue values are stored in separate matrices, i.e. Image(:,:,1), Image(:,:,2), and Image(:,:,3). You can extract color by looking at these color spaces.
>
> Shape extraction is basically an image segmentation problem. You might want to first take advantage of color information and separate the fruits by colors. Then you might want to threshold your image (graythresh, im2bw), or use edge detection algorithms (edge). Finally you might need to label each components (bwlabel, regionprops).
>
> Size is easy. Once you find the shape, just count how many pixels are inside the shape.
>
> type help on rgb2gray, im2bw, graythresh, edge, bwlabel, regionprops...
>
> As to weight ... I am not sure if it's relevant.
>
> "Fatma " <fit@itc.udm.edu.my> wrote in message <heg4id$cgq$1@fred.mathworks.com>...
> > Hi, I'm working on a project to classify fruit based on its category. Is anyone can tell me how to extract fruit features such as colors, shape, size or weight using matlab?

Subject: fruit features extraction

From: Fatma

Date: 9 Dec, 2009 01:29:02

Message: 5 of 6


Thanks a lot Claire. That will be very helpful for a beginner like me



"Clare " <flyingclare@gmail.com> wrote in message <heg5oj$p03$1@fred.mathworks.com>...
> Assume you have an RGB image, you will find Red, Green and Blue values are stored in separate matrices, i.e. Image(:,:,1), Image(:,:,2), and Image(:,:,3). You can extract color by looking at these color spaces.
>
> Shape extraction is basically an image segmentation problem. You might want to first take advantage of color information and separate the fruits by colors. Then you might want to threshold your image (graythresh, im2bw), or use edge detection algorithms (edge). Finally you might need to label each components (bwlabel, regionprops).
>
> Size is easy. Once you find the shape, just count how many pixels are inside the shape.
>
> type help on rgb2gray, im2bw, graythresh, edge, bwlabel, regionprops...
>
> As to weight ... I am not sure if it's relevant.
>
> "Fatma " <fit@itc.udm.edu.my> wrote in message <heg4id$cgq$1@fred.mathworks.com>...
> > Hi, I'm working on a project to classify fruit based on its category. Is anyone can tell me how to extract fruit features such as colors, shape, size or weight using matlab?

Subject: fruit features extraction

From: Fatma

Date: 9 Dec, 2009 01:31:18

Message: 6 of 6


Thanks, since I am zero, it will be quite a while for me to catch all those thing

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <3352d54b-f7b8-4056-a303-a4fe5d9adb68@k9g2000vbl.googlegroups.com>...
> On Nov 24, 3:13?am, "Fatma " <f...@itc.udm.edu.my> wrote:
> > Hi, I'm working on a project to classify fruit based on its category. Is anyone can tell me how to extract fruit features such as colors, shape, size or weight using matlab?
>
> -----------------------------------------------------------------------------------------
> Someone asked about this last April (http://groups.google.com/group/
> comp.soft-sys.matlab/browse_frm/thread/f281f673b7a2c1c2/
> ff3c1b3d80debbe9?hl=en&lnk=gst&q=fruit#ff3c1b3d80debbe9)
>
> Basically you have to segment your image based on color, edges, shape,
> or whatever you can do separate each fruit out individually. Then
> create your feature vector of measurements (size, shape, color,
> roundness, etc.) and compare it to feature vectors of "known" fruits.
>
> I can't say much more unless you post your images somewhere.

Tags for this Thread

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.

rssFeed for this Thread

Contact us at files@mathworks.com