Using Coordinates from Figure(1) to index into Figure(2) scatter
Show older comments
I have a small difficulty... As you can see below, my script loads an image into a first Figure and then display a second figure using part of this image data :

The white 'circles' you see on the right Figure represents some of the image data (in CIE Lab).
I have created a MouseClick callback in Figure1 which gives me the x,y coordinates, that I use to index into the RGB image. Now, I would like to use these RGB / Lab coordinates to display a big square of some kind into the Figure on the right, so that, when the student click anywhere inside the image, they can 'see' in the right CIE ab diagram, where the color plots.
I will need to switch the 'slider' position around in order to show the correct L* slice. So that, for example, suppose the clicked RGB data is 0,0,255 (blue) then, this translated to Lab being L* = 32, I will need to update the plot to the L = 32 slice and THEN plot the a* and b* data, which are 79 and -107.
The "cherry on the icing", so to speak, would be for the student to click on one of the white circle, in the right Figure, and have its corresponding pixel show up in the image.
Any help is appreciated. I include the full m file, in case it helps.
I'm going to continue searching how to do this on my own...
Accepted Answer
More Answers (0)
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!