Why is there difference between the data cursor value and array value

Hi,
I want to know why is there a difference between the cursor value obtained of an image and array value of a channel of an image.
Pls guide me.
Thanks

7 comentarios

arrayvaluech.png
Changing the x & y giving the same result
But why is it like this?
Can you please attach entire script so i could analyze it?
I = imread('2.jpg');
C = rgb2hsv(I);
C2 = C(:,:,2);
figure('Name','Channel 2');
imshow(C2)
Here it is.
This result looks like exactly on your picture
BUt your picture is gray so actual (RGB) color of it is (0.7724 0.7724 0.7724)
arrayvaluech.png
Thanks Darova for your reply,
Actually I wanted to know why is the x and y values differently represented in the picture as its opposite to the x,y values in the command line.
In pic x,y = 1120,840
While on command line x,y = 840,1120
This is what i wanted to know.
Because position of your cursor is XY data but data of the image is (row,column)
X is column (changes in horizontal direction)
Y is row (changes in vertical direction)
You should read the following documenation:
In particular, the first paragarph under the heading Intrinsic Coordinates refers to your question.

Iniciar sesión para comentar.

Respuestas (0)

Preguntada:

el 15 de Oct. de 2019

Comentada:

el 18 de Oct. de 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by