What's the best way to assemble this image mosaic?
- From: "Darik " <dgambleDEL@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 10 Aug 2007 05:48:11 +0000 (UTC)
I have some large image sets. Each set is comprised by 100
images. Each image is 1280*960. Each image has a set of
coordinates, (x1,y1), (x2,y2) which specify the location of
the image. These images form a mosaic of 25 rows * 4
columns, although not a 'perfect' mosaic -- ie there is
some overlapping of each image and its neighbours.
I'd like to form a single composite image, at full
resolution. There is also some myriad annotation graphics
that would go along with this, eg arrows, circles, text,
etc.
As I see it, there's two ways to go about this:
1) Just display all the images in a single axes, along with
all of the annotation objects. Then do a screen capture
using getframe, saveas, or similar.
The problem with this method is my final image resolution
is limited by my screen resolution, which means my final
image is some 4% of the original resolution.
I've tried stuff like:
hf = figure('Units', 'pixels', 'Position', [0 0 25*960
4*1280]);
plot(hf, rand(1,10), rand(1,10))
saveas (hf, 'test.jpg')
But the resulting image is only 1200*900.
2) Preallocate the large image array and use standard
matlab indexing to fill it with the constituent images, eg:
imgSize = (max(y2)-min(y1)+1, max(x2)-min(y1)+1)
big = zeros([imgSize, 3], 'uint8')
for i = 1:numImages
big(y1(i):y2(i), x1(i):x2(i), :) = imgData(:,:,:,i);
end
imwrite(big, 'big.jpg');
But the major disadvantage of this approach is that there's
no way, as far as I know, to include any of the graphical
annotation.
Any thoughts, folks?
.
- Follow-Ups:
- Re: What's the best way to assemble this image mosaic?
- From: paul brant
- Re: What's the best way to assemble this image mosaic?
- From: Ken
- Re: What's the best way to assemble this image mosaic?
- From: Darik
- Re: What's the best way to assemble this image mosaic?
- Prev by Date: Re: Initial Seed in Random Number Simulink Block
- Next by Date: Re: fminsearch with array of parameters
- Previous by thread: sell 100% hand paint oil paintings
- Next by thread: Re: What's the best way to assemble this image mosaic?
- Index(es):
Relevant Pages
|