f



How to get pixel intensity values of an image

Hi all,

I'm a beginner in matlab.
I have a grayscale image and I would like to get the intensity value of every pixels in the image.
As far as I know, imhist will only show a graph of the intensity value. Instead, I want to retrieve the value (i.e the integer value).

Thanks in advance
0
Hendy
1/4/2010 5:23:04 AM
comp.soft-sys.matlab 210171 articles. 11 followers. lunamoonmoon (258) is leader. Post Follow

9 Replies
4446 Views

Similar Articles

[PageSpeed] 4

"Hendy Sutomo" <hendy.sow@gmail.com> wrote in message <hhrtvo$2g3$1@fred.mathworks.com>...
> Hi all,
> 
> I'm a beginner in matlab.
> I have a grayscale image and I would like to get the intensity value of every pixels in the image.
> As far as I know, imhist will only show a graph of the intensity value. Instead, I want to retrieve the value (i.e the integer value).
> 
> Thanks in advance

but - the values are already there: in your matrix...

us
0
us
1/4/2010 7:54:04 AM
Which matrix u mean?
sorry, I'm a total noob here

Thanks for ur help
0
Hendy
1/4/2010 8:07:03 AM
"Hendy Sutomo" <hendy.sow@gmail.com> wrote in message <hhs7j7$9if$1@fred.mathworks.com>...
> Which matrix u mean?
> sorry, I'm a total noob here
> 
> Thanks for ur help

well, look here...

http://www.mathworks.com/access/helpdesk/help/techdoc/learn_matlab/f3-1186.html

us
0
us
1/4/2010 8:16:03 AM
Well.....

what i did is load an grayscale image, and use impixel to determine the value of pixels. But now i need the intensity value of each pixels.

I dont really get the information from the link u gave me.
Thanks for ur help


-hendy-
0
Hendy
1/4/2010 8:26:03 AM
-hendy-
If you have an image, the image is in a numerical variable that is an
array.  The elements of that array ARE your intensity values.

For example:

% Read in standard MATLAB demo image.
grayImage = imread('cameraman.tif');
imshow(grayImage, []);
title('Original Grayscale Image');
set(gcf, 'Position', get(0,'Screensize')); % Maximize figure.

Let's say you want the intensity value at row 100, column 230.  Well
then you'd just say
intensityValue = grayImage(100, 230);

It's as simple as that.
0
ImageAnalyst
1/4/2010 11:10:52 AM
Thanks alot ImageAnalyst.
Now I get the idea.

-hendy-
1
Hendy
1/4/2010 12:56:03 PM
Hi,

Im also a new user of matlab
starting from this:

imshow(grayImage, []);

can you explain what i should put instead of []
is not really clear to me and i didn’t find something usefull in the net for understanding it

thank you very much
Luca

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <df97e1ed-d029-4a4b-ae46-0b32c140497d@f5g2000yqh.googlegroups.com>...
> -hendy-
> If you have an image, the image is in a numerical variable that is an
> array.  The elements of that array ARE your intensity values.
> 
> For example:
> 
> % Read in standard MATLAB demo image.
> grayImage = imread('cameraman.tif');
> imshow(grayImage, []);
> title('Original Grayscale Image');
> set(gcf, 'Position', get(0,'Screensize')); % Maximize figure.
> 
> Let's say you want the intensity value at row 100, column 230.  Well
> then you'd just say
> intensityValue = grayImage(100, 230);
> 
> It's as simple as that.
1
12/22/2011 12:59:08 PM
ImageAnalyst <imageanalyst@mailinator.com> wrote in message <df97e1ed-d029-4a4b-ae46-0b32c140497d@f5g2000yqh.googlegroups.com>...
> -hendy-
> If you have an image, the image is in a numerical variable that is an
> array.  The elements of that array ARE your intensity values.
> 
> For example:
> 
> % Read in standard MATLAB demo image.
> grayImage = imread('cameraman.tif');
> imshow(grayImage, []);
> title('Original Grayscale Image');
> set(gcf, 'Position', get(0,'Screensize')); % Maximize figure.
> 
> Let's say you want the intensity value at row 100, column 230.  Well
> then you'd just say
> intensityValue = grayImage(100, 230);
> 
> It's as simple as that.

Hi all, 
I want to retrieve the intensity value matrix of a ROI in a gray scale image into a given matrix, say "I[]". And to get the average intensity value of that particular ROI. How can I do this?
Thanks in advance
0
3/25/2013 6:31:05 AM
Image Analyst :

How to get the intensities of each of the image pixels , then compare those intensities so that that are near to each others in their value or even are equal will be replaced by the mean of those intensities.Then , the location of the parent pixel will be obtained with the location of the leaf children pixels of that parent pixel in a text file.Please help me to do so and thank you for you help.
0
reham
2/6/2016 3:37:03 PM
Reply:

Similar Artilces:

getting the values of pixels in images and drawing lines on images
please does any one know how to get the pixel values in images. i am using matlab 6.5 and it doesn't have the impixel function. is there an alternative. Also how do you draw lines on images, i am trying to track markers on an image and when i have tracked them to be a able to draw lines on the markers. thank you Tosin tosin wrote: > please does any one know how to get the pixel values in images. i am > using matlab 6.5 and it doesn't have the impixel function. is there an > alternative. > > Also how do you draw lines on images, i am trying to track markers on &g...

Get values from one image according to pixel locations of maxima on another image
Hello all I have two tiff images (named A and B). Both have 7 layers at the same dime= nsion (4169,6289,7). First I'd like to find location of max value in A imag= e and then I need to get the values (not max values, reall values) of B ima= ge in matrix dimension (4169, 6289) according to location of max value whic= h found from A image in previous step. I just wrote next code to achieve th= is purpose. Then I wrote output tiff image. But when I display this tiff im= age, whole screen is black. Can you tell me what's wrong with this code? A_max_loc=3DMAX(A,INDEX,DIMENSION=3D3...

Get min and max values from a multiband image according to pixel locations of classification image
Hello all,=09 I have a question to solve following issue.=20 I have two images. One is a multiband image with 7bands. Another is an clas= sifiction image with 3 classes. The classes named by class1 to class3. I'd = like to obtain a single max/min values from a multiband image according to = pixel locations of each classes (class1, class2, class3) of classification = image. Could you help me for this? Thank you very much Dry in water writes: > > Hello all, > > I have a question to solve following issue. > I have two images. One is a multiband image wi...

getting pixel from image as single value
hello all, i want to extract the value of each pixel from an image (color or greyscale)as single values.I wrote a function as follows.Here i am getting the green,blue,red components using methods of ColorModel and then taking the average(sum of r,g,b divided by 3).I don't know if this is the right way to do this.Can anyone tell me if there is an alternate/better method ? thanks jim public double[] getpixels(String imgfilename)throws Exception{ BufferedImage img =ImageIO.read(new File(imgfilename)); int ht=img.getHeight() ; int wd=img.getWidth(); int[] pixels = new int[wd * ht]; PixelGra...

obtain pixel value from the image in Matlab
Hi, I would like to obtain a pixel value from any image using a GUI. i have made a few research. and this is all i get, example: load flujet; image (X); colormap (jet); I would like to read the pixel value just like the given example. Please help! Sha ...

find pixel values in one image and circle unwanted pixel values
Dear All, Can any one please Guide me on how to write a mat lab code to find an intensity values in one image, then exclude the values which I do not want and show them on the image .maybe i could circle the area which i do not want in the same image because of it's intensity values . Regards See my "BlobsDemo" image segmentation tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 It does all of that. Thanks ImageAnalyst , can you please suggest any other image than blobs to run your script. Jamal ImageAnalyst <imageanalyst@m...

obtain pixel value from image in GUI matlab
Hi, I would like to obtain a pixel value from any image using a GUI. i have made a few research. and this is all i get, example: load flujet; image (X); colormap (jet); I would like to read the pixel value just like the given example. Please help! Sha...

Pixel intensity mean value of image sequence
I have 10 images (frame-sequence). I want to make a new image A, whereas each pixel in A(x,y) is the mean-value of the pixel at (x,y) in the 10 original images. How to proceed? "Torvald Helmer" <torvald.helmer@mathworks.com> wrote in message <frb67e$qeq$1@fred.mathworks.com>... > I have 10 images (frame-sequence). I want to make a new > image A, whereas each pixel in A(x,y) is the mean-value of > the pixel at (x,y) in the 10 original images. > > How to proceed? A = (I1 + I2 + ... + I10) / 10; ...

getting pixel data from image as single value
hi i need to get value of each pixel in an image as a single value.The image may be color or greyscale .I tried as follows.I don't know if i am doing it right,and i want to know if it can be done in more compact manner.If anyone can advise/help pls do import java.awt.color.ColorSpace; import java.awt.image.*; import java.io.*; import javax.imageio.ImageIO; public class PixelDataDemo{ public static void main(String[] args){ PixelGrabber pg; BufferedImage img; try{ img=ImageIO.read(newFile("F:\\mygallery\ \myimage.png")); int ht=img.getHeight...

How to Store Pixel Intensity Values in Image Sequence
Hi, all, For each pixel in each image of a sequence of 15 images, I need to store its RGB intensity values so that if I want, I can plot any pixel's R, G and/or B's intensity values across the sequence. I've been reading about structs and cells and vectors, but I am not sure what is best to use. Hope this makes sense. Much thanks. - Rise "Rise " <rise_riyo@hms.harvard.edu> wrote in message <hukvdl$ank$1@fred.mathworks.com>... > Hi, all, > > For each pixel in each image of a sequence of 15 images, I need to store its RGB intensity va...

How to get the pixel values of one line in an image?
Hi, group, I think it is easy to get the pixel values of a horizontal or vertical line in an image, such as: img = imread('test.bmp'); h_line = img( 10:10, 1:120); % for the horizontal line My question is how to get the pixel values of a line with a direction?( Neither horizontal nor vertical, i.e. 25 degree). The start and end positions of the line are given. Thanks. Vol Hi, help linspace <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/linspace.html> help interp2 <http://www.mathworks.com/access/helpdesk/help/techdoc/ref/interp2.html> J�r�me J�r�me ...

pixel coordinates, intensity value, resize image matrix
Hi. how can I quickly change matrix A to matrix B? % A is image A = [21 38 64; 12 1 30; 11 4 9]; % imagesc(A), colormap gray % B is [n,3] coordinate matrix of color intensity B =[1 1 21; ... 1 2 38; ... 1 3 64; ... 2 1 12; ... 2 2 1; ... 2 3 30; ... 3 1 11; ... 3 2 4; ... 3 3 9]; Thanks V. cucche wrote: > Hi. > how can I quickly change matrix A to matrix B? > > % A is image > A = [21 38 64; 12 1 30; 11 4 9]; > % imagesc(A), colormap gray > > % B is [n,3] coordinate matrix of color intensity > B =[1 1 21; ... > 1 2 38; ......

Get pixel values from a binary image obtained using im2bw
Hi all, I am relatively new to the IP toolbox in MATLAB. I have a .TIFF image which I am converting to binary using the 'im2bw' function. Now I need to get the pixel values of this binary image in the form of a 2D array (exactly as they are, the images are 1320 * 1032) that I will use to do some operations in Java. Can someone point me in the right direction as to how can I do this? Thanx in advance. Mandeep Mandeep wrote: > > > Hi all, > > I am relatively new to the IP toolbox in MATLAB. > I have a .TIFF image which I am converting to binary using the > '...

3d image from pixel intensity of an image
How to create a 3d image from a set of 2d images? i have tried to use the following : I=imread('moon.tif'); [x,y]=size(I); X=1:x; Y=1:y; [xx,yy]=meshgrid(Y,X); i=im2double(I); figure;mesh(xx,yy,i); colorbar figure;imshow(i).. But when i replace the image by some other image it says: Warning: size(CData) must equal size(ZData) or size(ZData)-1 for flat shading ... Biman Chandra Dey Use cat(3,....) to put all your 2D images into a 3D volumetric image. All your 2D images must be exactly the same size. ...

Web resources about - How to get pixel intensity values of an image - comp.soft-sys.matlab

Exercise intensity - Wikipedia, the free encyclopedia
... One MET, which is equal to 3.5ml/kg per minute, is considered to be the average resting energy expenditure of a typical human being. Intensity ...

7 Minute Workout “Seven” with High Intensity Interval Training Challenge on the App Store on iTunes
Get 7 Minute Workout “Seven” with High Intensity Interval Training Challenge on the App Store. See screenshots and ratings, and read customer ...

intensity - Flickr - Photo Sharing!
Explore ucumari's photos on Flickr. ucumari has uploaded 5728 photos to Flickr.

Hot Tracks 12 - Dragonforce - Pure Intensity - YouTube
This is a public access station located in Hudsonville, MI This show has been on for many many years and is still going strong to this day. Were ...

Yo La Tengo shows a new-found intensity on Fade
Approaching their 30th anniversary, the indie three-piece sounds reinvigorated on this new album.

Cyclone Ita picking up intensity ahead of landfall
Tropical cyclone Ita is due to cross the north Queensland coast as a category 5 system at 4pm on Friday, bringing 285km/h winds and dumping more ...

Melbourne Festival: Unremitting intensity from an aloof but intriguing Laura Marling
Laura Marling has a quality that makes her frustratingly aloof, but endlessly intriguing.

PM can't promise MH370 search intensity
Tony Abbott says he can't promise the search for missing MH370 will continue with the same intensity.

High-intensity exercise
... do not look like that because of exercise. They look like that because they don't eat carbs, or anything else much. Creepy.) Does high intensity ...

Hurricane Hunter Plane Finds Joaquin Near Cat. 5 Intensity
An Air Force Hurricane Hunter plane found Joaquin near Category 5 intensity, but the storm is moving out to sea.

Resources last updated: 2/6/2016 11:33:34 PM