Change color intensity of part of image

2 vues (au cours des 30 derniers jours)
Hamish
Hamish le 24 Juil 2012
I have a ground-track of a satellite in orbit. The final image has the plot of the path described by the satellite on the surface of Earth, which is a smooth blue curved line. Now here's what I'm trying to do:
Although the path described is a smooth curve, due to the shape of the orbit, the satellite spends more time at some parts of the Earth as compared to others. In order to show where the satellite spends more time, I want to increase the intensity of color in that part of the image (which is map of the Earth). The idea I have in mind is dividing the image into grids and multiplying the color intensity value with time. However, I don't know how to materialize this in Matlab terms.
I am not pro at Matlab, as might be evident. Any help/suggestions/attempts that may trigger an idea would be greatly appreciated. Thanks in advance.

Réponses (1)

Doug Hull
Doug Hull le 24 Juil 2012
While I can not answer this entirely here, I can offer you this:
Images can be stored in MATLAB as NxMx3. You can modify each color plane independently:
im = imread('westconcordaerial.png')
figure(1)
imshow(im)
imNew = im;
scale = 1.5;
imNew(1:200,1:200,3) = im(1:200,1:200,3)*scale
figure(2)
imshow(imNew)
This is the basics. Apply as needed.
  1 commentaire
Walter Roberson
Walter Roberson le 24 Juil 2012
If "scale" is sufficiently small, representing a gradual increase, then it might be worth-while to keep around a floating-point version of the image. Otherwise when you have intensity values such that round(Value * scale) == Value, the intensity will never increase due to round off. e.g., uint8(1) * 1.4 -> 1.4 -> uint8(1), repeat and you never get anything other than 1, but what one would wish is that after 2 steps, 1*1.4*1.4 -> 1.96 -> uint8(2)

Connectez-vous pour commenter.

Catégories

En savoir plus sur Satellite Mission Analysis dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by