MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Reading Color Values from Images Using Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg36074] Reading Color Values from Images Using Mathematica
  • From: AES <siegman at stanford.edu>
  • Date: Thu, 15 Aug 2002 02:36:27 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

I originally wrote

> > I want to extract numerical values for the separate R, G and B channel 
> > intensities, on a pixel by pixel basis, for specific (limited) regions 
> > in color photos (JPEG, TIFF, whatever), on a Mac, preferably while I'm 
> > viewing the region I'm examining.
> > 
> > Any readily available software to do this?  Can Mathematica do it?

and Selwyn Hollis <slhollis at earthlink.net> wrote:

> In Mathematica, choose Color Selector... from the Input menu. That 
> brings up the Mac Color Picker. Move your pointer anywhere on the screen 
> and option-click. That will select the color. Now click Okay, and the 
> RGBColor recipe will be pasted into the Mathematica front end.
> 
> A similar thing works in GraphicConverter as well. 

Wow -- interesting -- it does work!

I originally thought I'd have to get a JPEG image, say, into Mathematica 
using Import[], then Show[] it, to do this; and that does work, although 
Mathematica gets unhappy at importing JPEGs of any size, and is very slow at 
Show[]ing them.

But Mathematica (on a Mac) will actually do this with an image displayed on 
screen using other graphics programs as well.  A bit tedious -- you have 
to jump back and forth between Mathematica and the image, and re-open Color 
Selector from the menu for each sample.  But, you can select and read 
off the color in any of multiple formats besides RGB.

Sure would be nice if you could automate this in some fashion -- but I 
guess that's what the Mathematica Digital Image Processing package does.

Damned if I can find any mention of this in the Mathematica Book or the online 
documentation.

Thanks, Selwyn!


  • Prev by Date: Trying to solve a sum
  • Next by Date: Re: ALL roots of non-polynomial equation
  • Previous by thread: Re: Trying to solve a sum
  • Next by thread: Re: Reading Color Values from Images Using Mathematica