Code covered by the BSD License  

Highlights from
Red and Green Pixel Separation

2.33333

2.3 | 3 ratings Rate this file 15 Downloads (last 30 days) File Size: 1.69 KB File ID: #28712

Red and Green Pixel Separation

by GAGAN

 

14 Sep 2010 (Updated 22 Apr 2011)

The following code can be used to separate red and green pixels from a colored image.

| Watch this File

File Information
Description

The following code can be used to separate red and green pixels from an image. It is based on color distance transform. Some Threshold has to be provided so that its color distance is within some range to determine whether the given pixel is red or green.

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (5)
24 Apr 2011 Petter  
25 Sep 2010 Harsha Vardhan  
14 Sep 2010 GAGAN

I have removed wasteful calculations as well.

14 Sep 2010 GAGAN

I have used this one for robotic purposes for identifying red or green signal ligts. One can easily detect the blue color as well using the algorithm.

14 Sep 2010 Sean de

There are a number of things wrong with this submission:
-It displays and imtool and two figures of the output arguments without the ability to turn them off.
-Uses double FOR loops for a two-line logical index expression
-Only does red and green; why not blue? why not the ability to select what colors we want?
-Takes a filename as input not a matrix and does no error checking
-Does two calculations that are never used (M-LINT!!!)

Updates
14 Sep 2010

I have removed two redundant calculations.

16 Mar 2011

Applied new Tags.

22 Apr 2011

Added new Tags.

Contact us