hello,
i'd like to know how to extract the data of selected pixels from whole text image? i just want to select some pixels and get only those points values as a text image and analyze it, and second point of view is to get full text image of whole image with bolded coordinates and values of the pixels from selected region. has anyone any idea how to reach that?\ thanks again in advance Jarek |
Hello Jerek,
Your 1st request is very easy. Just use the rectangular selection tool to select the region of interest (ROI), crop the image, and save as text. Your second request is harder, and probably easier to do with a text editing program like emacs that can handle the huge text files, once given the coordinates of the ROI. I'm curious: what can you do with a bolded text image that you cannot do with the image data in ImageJ? -- Harry jarek <[hidden email]> wrote: hello, i'd like to know how to extract the data of selected pixels from whole text image? i just want to select some pixels and get only those points values as a text image and analyze it, and second point of view is to get full text image of whole image with bolded coordinates and values of the pixels from selected region. has anyone any idea how to reach that?\ thanks again in advance Jarek -- Harry Parker Systems Engineer Dialog Imaging Systems, Inc. --------------------------------- New Yahoo! Messenger with Voice. Call regular phones from your PC and save big. |
Hi there,
I have a related issue so I'm posting in this thread. I am trying to extract all points within a region, but only end up with the ROI's information rather than that of the enclosed pixels. First I load an image, ![]() then select image>adjust>threshold>select ![]() I get a nicely bounded series of enclosed regions encircling brighter areas of the image:<nabble_img src="Screen_Shot_2012-11-19_at_3.46.47_PM.png" border="0"/ But I have not figured out how to extract the intensity/x/y data of the pixels enclosed in this bounding region; when i choose analyze>measure, i get this instead. ![]() ![]() What am I doing wrong? Is there another strategy for extracting this information? |
the bounded region (post above had an error):
![]() |
In reply to this post by jdsjds
Hi Joshua,
Analyze>Measure gives you the selected area (or thresholded area, if 'Limit to Threshold is selected) as whole. Analyze>Analyze Particles gives you the mean intensity of each particle (contiguous area). If you want to have *all* individual pixel intensities of the selected area, you probably need a macro, roughly like this: getSelectionBounds(x0, y0, width, height); for (y=y0; y<y0+height; y++) { for (x=x0; x<x0+width; x++) { if (selectionContains(x, y)) print(x,y,getPixelValue(x, y)); //use getPixel(x,y) for 8- or 16-bit } } // converts RGB at (x,y) to intensity function getPixelValue(x, y) { v = getPixel(x, y); red = (v>>16)&0xff; // extract red byte (bits 23-17) green = (v>>8)&0xff; // extract green byte (bits 15-8) blue = v&0xff; // extract blue byte (bits 7-0) return 0.299*red+0.587*green+0.114*blue; //or whatever weight factors } Michael ________________________________________________________________ On Nov 19, 2012, at 21:46, jdsjds wrote: > Hi there, > > I have a related issue so I'm posting in this thread. > > I am trying to extract all points within a region, but only end up with the > ROI's information rather than that of the enclosed pixels. > > First I load an image, > <http://imagej.1557.n6.nabble.com/file/n5000883/Screen_Shot_2012-11-19_at_3.56.55_PM.png> > > then select image>adjust>threshold>select > <http://imagej.1557.n6.nabble.com/file/n5000883/Screen_Shot_2012-11-19_at_3.47.38_PM.png> > > I get a nicely bounded series of enclosed regions encircling brighter areas > of the image:<nabble_img > src="Screen_Shot_2012-11-19_at_3.46.47_PM.png" > border="0"/ > > But I have not figured out how to extract the intensity/x/y data of the > pixels enclosed in this bounding region; when i choose analyze>measure, i > get this instead. > <http://imagej.1557.n6.nabble.com/file/n5000883/Screen_Shot_2012-11-19_at_3.51.55_PM.png> > <http://imagej.1557.n6.nabble.com/file/n5000883/Screen_Shot_2012-11-19_at_3.56.24_PM.png> > > > What am I doing wrong? Is there another strategy for extracting this > information? -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |