Change color intensity of part of image
조회 수: 2 (최근 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 and Orbital Mechanics에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!