Obtaining pixel value from image in GUI
Ältere Kommentare anzeigen
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
Antworten (3)
Arthur
am 18 Okt. 2012
0 Stimmen
You could use imtool for that if you have the image processing toolbox.
manoj saini
am 18 Okt. 2012
0 Stimmen
plz type X(capital X) on command window...........all pixel value will be on front you
Image Analyst
am 18 Okt. 2012
Bearbeitet: Image Analyst
am 18 Okt. 2012
You can call impixelinfo(), if you have the Image Processing Toolbox. This will put up a label in your figure that gives you the x,y (column, row) coordinates and the intensity value(s) of the image. Alternatively you can use ginput(1) to get a coordinate and use
grayPixelValue = imageArray(row, column);
to get the gray level in a gray scale image, or
rgbPixelValue = imageArray(row, column, :);
rgbPixelValue = impixel(imageArray, row, column); % Alternative way.
to get the red, green, and blue intensity values in an RGB image.
5 Kommentare
sha
am 19 Okt. 2012
Image Analyst
am 19 Okt. 2012
The colormap command does not give you the intensity of the image.
sha
am 24 Okt. 2012
Image Analyst
am 24 Okt. 2012
I don't know what that means. What do you consider to be the difference between "image" and "picture". To me, they're basically synonyms. Increasing the contrast on a picture or an image is the same thing.
sha
am 24 Okt. 2012
Kategorien
Mehr zu Blue finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
