How to link/connect pixel value with Image

2 vues (au cours des 30 derniers jours)
Chandrashekar D S
Chandrashekar D S le 10 Juin 2021
I have a pixel data for the given image, XY-coordinate 139nm/Pixel and Z direction 1nm
Each pixel data contain the height value in nm. Pixel data is in matrix with dimenion 4046*5593.
The Data is collected from different application for the that image.
Now i need to know is there any way i can link/connect the pixel data with the image.
When i click at perticuler point/pixel on the image, I need to get the height/data at that point.
Please help me how to get the data, when i click at some point on the image.(I can share the iamge and pixel data if required)
Thanks in advance
Below is the sample pixel data:
16360 16130 14385 14340 17021 16736...
16392 16335 18044 17818 16944 16572..
16655 16464 17940 17929 17146 16599..
16779 16596 17623 17920 17590 17339..
16795 16616 17124 18173 17590 17228..
16716 16564 16826 18356 18006 17174..
16682 16499 16633 18265 17978 17427..
16789 16560 16465 18244 17807 17495..
....

Réponses (1)

Max Heiken
Max Heiken le 10 Juin 2021
I am not exactly sure if I get the context.
If your image is in an axes, and if you want to click in that figure to programmatically get the value at that clicked location, you could do something like:
[clickedX, clickedY] = ginput(1);
value = interp2(image, clickedX, clickedY, 'nearest');
Of course, if you already have acquired the coordinates by other means, ginput can be skipped.
I am not sure how ginput works in the context of the appdesigner.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by