Borrar filtros
Borrar filtros

Combining specific regions of multiple images in a stripe pattern.

4 visualizaciones (últimos 30 días)
[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 comentario
Will Dampier
Will Dampier el 26 de Mayo de 2011
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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by