I'm looking for a command in Matlab that does not display an image with the colors, but the value for the pixel.
for example: in pixel (1,1) is black and is 0. I just wanted to represent the value 0 in a figure. In addition, the image is in DICOM format.
With impixelregion only returns a figure and not a matrix.
The following code did not work:
a=imread('a1.png');
figure
I=imshow(a,[])
%b=num2str(a(500,500)) %gibt wert zurück
[Z,S]=size(a)
for i=1:Z
for j=1:S
text(i,j,num2str(a(i,j)),'FontSize',2);
end
end
I would be grateful for your help :)