Path: news.mathworks.com!newsfeed-00.mathworks.com!newscon02.news.prodigy.net!prodigy.net!news.glorb.com!news.ks.uiuc.edu!not-for-mail
From: Allen <ajhalldeleteme@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Area of specific pixel color?
Date: Thu, 20 Mar 2008 23:51:21 -0500
Organization: Usenet @ UIUC - http://www.killfile.org/usenet/
Lines: 25
Sender: ahall@outside.world
Message-ID: <frvesa$ol9$1@news.ks.uiuc.edu>
NNTP-Posting-Host: ahall-m.mrl.uiuc.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: news.ks.uiuc.edu 1206075082 25257 130.126.101.23 (21 Mar 2008 04:51:22 GMT)
X-Complaints-To: news+abuse@ks.uiuc.edu
NNTP-Posting-Date: Fri, 21 Mar 2008 04:51:22 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213)
Xref: news.mathworks.com comp.soft-sys.matlab:458420


Hi guys,

Quick Q version:
	How does one determine the fractional pixel area of a color.  i.e., if 
I highlight grains one color, how can I determine the area of the 
colored portion in pixels?

Longer Q version:
	I'm doing something complex (finding the surface area of a tilted 
segment of an image)... but I think it can be done very simply.
	I have a method to highlight only the area of interest, and now I want 
to determine the area which is highlighted.  I'm assuming this will be 
in pixels x pixels of the image, but can convert this easily to 
real-space (as well as use the cosine of the tilt to give me the real area).
	So, is there a good way to get image information about areas 
highlighted with specific colors etc.?  If I painted one section of the 
image all red, for instance, could I determine the pixel x pixel area?

Thanks a ton for your help and thoughts, everyone!!  :)
-Allen

ps- this is an attempt to measure the surface-area of facets in a grown 
crystal.  The data is taken from an AFM, and I can highlight them based 
on the surface-gradient information.  The resulting images in plan-view 
will be flat (forshortened areas etc.)