MATLAB: Can u hhelp me by giving the syntax for making an intensity matrix from the given image…

image processingImage Processing Toolboxintensity matrix..

Image=imread('D:\semester 3\matlab work\images\hand.jpeg');
imshow(image);
disp(image);
after executing it the command window shows its intensity values….i want to make the matrix from these intensity values… how can i do it????can u help me for the same???
i want to use these intensity values in my code…dats y……

Best Answer

You read the intensity values into an array named "Image" with a capital-I. And after that you used "image" with a lower-case-I. image with a lower-case-I happens to be the name of the MATLAB routine to create a graphics image. It happens to be valid to call image() with no parameters, in which case it displays a default image and returns the handle-graphics handle of the image object.
You then apply imshow() to the handle of the image object; imshow is probably going to automatically erase your current figure contents, causing the default image object to be deleted, and then creating a new image object that displays based upon the chance numeric value the handle had.
You then disp(image) which is going to create a new default image object and output the handle graphics handle of the image object.
What you need to do is go back and use consistent variable names in your code, preferably avoiding using "image" or "Image" as the variable name.
Related Question