Fix a colormap between two values
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Thomas Barbier
il 26 Giu 2019
Commentato: Adam Danz
il 26 Giu 2019
Dear all,
I am trying to simulatine the imaging of an object from a camera and a depth sensor. I'd then like to plot the simulated image thanks to the scatter tool, specifying depth as colormap. I make a new image at each time step. The camera motion is towards the object (and the object rotates), hence the overall depth diminishes. However, at each time step the colobar is mapped from depth of that time step:
At t = 0:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226444/image.png)
At t = end:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/226445/image.png)
A video is available: https://youtu.be/ZlcGmUe4qoE
I would like to "fix" the colorbar between two handpicked values [depthMin depthMax], so that the first image is generally blue and the last image is generally yellow (that the colorbar doesn't "slide"). And if possible I'd like to use Matlab embedded colormaps.
Do you know a trick to do that ?
Thanks for your help.
Regards
0 Commenti
Risposta accettata
Adam Danz
il 26 Giu 2019
"I would like to "fix" the colorbar between two handpicked values [depthMin depthMax], so that the first image is generally blue and the last image is generally yellow "
caxis([depthMin, depthMax])
2 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Blue in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!