From: s d on 19 Feb 2010 05:16 i want to read colours from a colour strip. there is an image which has rectangular strip. i first need to locate it and then read colours from it. i need code/functions for same.
From: ImageAnalyst on 19 Feb 2010 06:11 s d: Perhaps this simple color detection code will help you: http://www.mathworks.com/matlabcentral/fileexchange/26420-simplecolordetection Description This script is a demo that shows you how to find objects of a certain color in an image. For this example I'm using the standard onion, peppers, or canoe image that ships with the Image Processing Toolbox. You can also select one of your own color images instead if you wish. Then I separate the image into its component red, green, and blue color bands. I compute thresholds, and ultimately find a mask for the red objects. Prompts will guide you through the demo step by step. I multiply this mask by the original image to show the image with only the red objects showing and everything else blacked out. This script can be adapted to find other colors (white, green, blue, yellow, etc.) If you want to do any measurements of the red objects, I refer you to my blob measurement demo file at http://www.mathworks.com/matlabcentral/fileexchange/25157 Requires the Image Processing Toolbox. Tested with R2008b and R2010a.
From: ImageAnalyst on 19 Feb 2010 08:14 "s d" <manya_don...(a)yahoo.co.in> : Post your image somewhere, and state whether the color strip is always going to be located in the same exact position, or will it occur at different locations in the image.
|
Pages: 1 Prev: colour srtip recognition Next: [2009a] Error in divideint function. |