Change color intensity of part of image
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(1 个)
Doug Hull
2012-7-24
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 个评论
Walter Roberson
2012-7-24
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)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Satellite Mission Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!