Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2004
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

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

Search the Archive

Re: importing image and getting numbers from the gray intensity

  • To: mathgroup at smc.vnet.net
  • Subject: [mg49360] Re: [mg49338] importing image and getting numbers from the gray intensity
  • From: Yasvir Tesiram <yat at omrf.ouhsc.edu>
  • Date: Fri, 16 Jul 2004 06:06:41 -0400 (EDT)
  • References: <200407151100.HAA11123@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,
It is possible. But you may have to consider the accuracy of the 
scanned image with respect to the concentration / intensity 
relationship. Nevertheless here are some quick notes on the same image 
from the web page. Also,

http://www.wolfram.com/products/applications/digitalimage/

but I've never used it, don't have it and so I can't say anymore.

(* get the image *)

g = Import["~/Desktop/SDS-PAGE.jpg"];
Show[g]

(*extract the numbers*)

d = g[[1, 1]];

(* uncomment below to get dimensions of image*)
(* Dimensions[d] *)

(* here is a display of the image *)
ListDensityPlot[d, Mesh -> False, AspectRatio -> Automatic, ImageSize 
-> 600]

(* to get a trace of the data you can get one column *)
(* I've reversed it so that the top blob in lane 1 is on the left *)
(* but really I shouldn't have *)
(*Reverse[Transpose[d][[26]]]*)

(* let's look at this data as if it were several chromatograms *)

<< Graphics`Colors`
lane1 = ListPlot[Reverse[Transpose[d][[26]]], PlotStyle -> Gold, Frame 
-> \
True, PlotJoined -> True, ImageSize -> 600, DisplayFunction -> 
Identity];
lane2 = ListPlot[Reverse[Transpose[d][[65]]], PlotStyle -> Blue, Frame 
->
         True, PlotRange -> All, PlotJoined -> True, ImageSize -> 600, \
DisplayFunction -> Identity];
lane3 = ListPlot[Reverse[Transpose[d][[110]]], PlotStyle -> Red, Frame 
->
       True, PlotRange -> All, PlotJoined ->
       True, ImageSize -> 600, DisplayFunction -> Identity];

Show[{lane1, lane2, lane3}, PlotRange ->
      All, Background -> IvoryBlack, FrameTicks -> {Automatic, 
Automatic, None,
      None}, ImageSize -> 700, DisplayFunction -> $DisplayFunction]

I hope this gives you some idea of how to get at the image data from a 
jpeg image and of course you can now integrate peaks from each lane 
etc.
Hint, to get at the lane number, select the graphic, hold down the ALT 
or CMND (Mac) key and navigate around the graphic. On the bottom left 
hand side of the frontend you will see the coordinates 
(http://forums.wolfram.com/mathgroup/archive/2003/Feb/msg00429.html)

Cheers
Yas



On Jul 15, 2004, at 6:00 AM, sean kim wrote:

> let's say you have an image of gray bands of varying intensity.
>
> such as the one seen on the website,
>
> http://encyclopedia.thefreedictionary.com/SDS-PAGE
>
>
> Is there anyway to change the picture or do something and be able to
> get numerical values for those bands?
>
> maybe define a vertical line and then go to the center of the each
> bands and measure how intense the gray is.
>
> or maybe define a rectangle and get the gray intensity in that...
>
> is there a packages or codes for doing that?  NIH image program which
> is freely avaialble can do this. But I wanted to do it in Mathematica.
>
> Thanks for any and all insights.
>
> sean


  • Prev by Date: Re: Help -- Weird integration behavior
  • Next by Date: Re: Question about Export command
  • Previous by thread: importing image and getting numbers from the gray intensity
  • Next by thread: Re: importing image and getting numbers from the gray intensity