Re: importing image and getting numbers from the gray intensity
- To: mathgroup at smc.vnet.net
- Subject: [mg49405] Re: importing image and getting numbers from the gray intensity
- From: sean_incali at yahoo.com (sean kim)
- Date: Sat, 17 Jul 2004 06:40:10 -0400 (EDT)
- References: <200407151100.HAA11123@smc.vnet.net> <cd8agm$ohr$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
hi Yas Thanks for the reply. I was kinda puzzled in an amazed way... you use.. 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]; and Length[d] reveals that imported and pixleated image is a list of 289 items... How did you know that part 26, 65, 110 belong to the lanes? I'm truly baffled. Thanks for any thoughts in advance sean Yasvir Tesiram <yat at omrf.ouhsc.edu> wrote in message news:<cd8agm$ohr$1 at smc.vnet.net>... > 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
- References:
- importing image and getting numbers from the gray intensity
- From: sean_incali@yahoo.com (sean kim)
- importing image and getting numbers from the gray intensity