필터 지우기
필터 지우기

Combining specific regions of multiple images in a stripe pattern.

조회 수: 4 (최근 30일)
Will Dampier
Will Dampier 2011년 5월 26일
[EDIT: 20110526 15:43 CDT - reformat - WDR]
I'm trying to combine images into a "stripe" pattern. Below are two example images. However, in normal use I'll need to expand this two ~6-12 images.
I can guarantee that the images are the same size, the text lines up, etc. What I am looking to do is merge the colored boxes so that each image is represented as a "stripe".
I tried something where I made stripes of the entire image and compositing them:
nimg = zeros(size(img1));
stripes = floor(linspace(1, size(img1,2), 500));
for i = 1:length(stripes)-1
inds = stripes(i):stripes(i+1);
if mod(i,2) == 0
nimg(:,inds,:) = img1(:,inds,:);
else
nimg(:,inds,:) = img2(:,inds,:);
end
end
But this doesn't work very well since the boxes don't line-up.
I assume I need to do some image-processing to extract the colored regions and then only slice those regions up. However, I don't have much experience with the image-processing toolbox. If anyone can point me to a set of functions for extracting the positions of the boxes I would greatly appreciate it.
Thanks,
-Will
  댓글 수: 1
Will Dampier
Will Dampier 2011년 5월 26일
Also, I don't know a priori which colors will be present in each image however I do know that the desired color is the only thing that differs between the images.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by