How do I get a colormap from JPEG file?
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Julián Francisco
il 24 Ott 2011
Commentato: Walter Roberson
il 7 Giu 2016
Hi. I have a jpg image file of the surface of Neptune. My intention is to build a texture mapping ( see Matlab's help about this topic ). I have used the command imread with the file but jpg files have not a colormap (in general, the command imread produces an MxNx3 matriz and a colormap is a Mx3 matrix). I would like to know how I could do it.
Like a image is more valuable than 1000 words (sometimes), my purpose is doing something like that (see example) but for Neptune.
2 Commenti
Image Analyst
il 24 Ott 2011
The jpg image is a true color image. What do you mean by a topographic image? You mean like a geological survey topographic map with contour lines on it and you want that somehow transferred to the surface of a spherical object? What proportion of the sphere should this 2D rectangle cover? A tiny spot? A whole hemisphere? Something in between? Or do you want some kind of 2.5D terrain image with mountains and things sticking above the surface of the sphere?
Risposta accettata
Walter Roberson
il 24 Ott 2011
You can use the two-output form of rgb2ind() to extract a colormap from a true-color image.
I am not certain how you plan to map colormap indices to altitudes, though.
Più risposte (2)
user4552
il 7 Giu 2016
how can you convert 2D image to 3D image, knowing that the first image is color image but 2D?
1 Commento
Walter Roberson
il 7 Giu 2016
permute(YourRGBIMage, [1 2 4 3])
Vedere anche
Categorie
Scopri di più su Blue in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!