stacking eight images into two images in an array.
조회 수: 3 (최근 30일)
이전 댓글 표시
I have six images of two kind. One group of image is HV1,HV2,HV3 and the second group is HH1,HH2,HH3. I want to put them in an array and display them as two images HV for(HV1,HV2,HV3) and HH for(HH1,HH2,HH3). I used this code to stack them, but when I try to display them as two images, all six images appear. And an error massage in Ch appear. What am I doing wrong here.?
my_cell{1} = HV1;
my_cell{2} = HV2;
my_cell{3} = HV3;
my_cell{4} = HH1;
my_cell{5} = HH2;
my_cell{6} = HH3;
I={HV1,HV2,HV3,HH1,HH2,HH3};
save('I','I');
load('DEM')
load('DEM_avg')
load('kz')
load('I')
Master = 1;
[Nr,Na,N] = size(I{1});
N_pol = length(I);
rem_dem_flag = 1;
if rem_dem_flag % remove dem phases (optional)
for pol = 1:N_pol
for n = 1:N
dem_phase = kz(:,:,n).*(DEM - DEM_avg);
I{pol}(:,:,n) = I{pol}(:,:,n).*exp(1i*dem_phase);
end
end
end
Ch = {'HV','HH'};
az_ax=[50 500];
rg_ax=[100 600];
N_pol = length(I);
for pol = 1:N_pol
figure, imagesc(az_ax,rg_ax,sum(abs(I{pol}),2)), colorbar
title(Ch{pol})
xlabel('azimuth [m]')
ylabel('range [m]')
end
댓글 수: 0
답변 (1개)
Image Analyst
2017년 11월 25일
You can display HV1 as red, HV2 as green and HV3 as blue if you do this:
HV = cat(3, HV1,HV2,HV3);
imshow(HV); % Assumes uint8 or values in the range 0-1.
For the other one with 4 planes, you'll have to figure out how to display them. If you want a 3 plane RGB image, see this paper: http://my.ece.msstate.edu/faculty/du/JSTARS-VIS.pdf
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Biomedical Imaging에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!