From: Raphael J on
Hi all.

I would like to create one image out of two images. But the images have different dimensions, as following:
rows columns colors
first images(gray): 319 255 3
second images(jet): 350 348
As you see the problem is obviously the color. The size of the images is not a problem due to "imresize":
I=imread('gray_image.tif');
J=imread('jet_image.tif');

[rows_I cols_I colors_I]=size(I);
[rows_J cols_J colors_J]=size(J);

%changing the size of I, so both images have the same number of rows
factor = rows_J/rows_I;
cols_I2 = floor(factor*cols_I);

I2 = imresize(I,[rows_J cols_I2]);

Does anyone know how to change the dimension of the image without losing the color? Finally i would like to add the image arrays like images_conneceted = [J I2]

Thanks for your help!
Raphael
From: ImageAnalyst on
Raphael
You can use the ind2rgb() function to convert your gray image into a
color image. Then you can stitch the images together.

By the way, you might want to check out how this File Exchange
submission stitches and blends two images together:

http://www.mathworks.com/matlabcentral/fileexchange/25797-stitch
-ImageAnalyst

From: Raphael J on
Ok, but I want the images to keep the different color, when sticked together.
Is there any way to realize this?
From: ImageAnalyst on
On Jun 28, 11:23 am, "Raphael J" <raphael.jen...(a)rwth-aachen.de>
wrote:
> Ok, but I want the images to keep the different color, when sticked together.
> Is there any way to realize this?
-------------------------------------------------------------------------------------------------
Raphael J:
And why do you think the color will change? It shouldn't. Look at
the screenshot for that stitch program.
-ImageAnalyst
From: Raphael J on
ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <e16ee8f5-edd3-48b9-b704-2bc9d9ccbf13(a)i31g2000yqm.googlegroups.com>...
> On Jun 28, 11:23 am, "Raphael J" <raphael.jen...(a)rwth-aachen.de>
> wrote:
> > Ok, but I want the images to keep the different color, when sticked together.
> > Is there any way to realize this?
> -------------------------------------------------------------------------------------------------
> Raphael J:
> And why do you think the color will change? It shouldn't. Look at
> the screenshot for that stitch program.
> -ImageAnalyst

Thanks for the help ImageAnalyst, but
it does change the color, look at the m-file. The stitch program converts all images to color.
Maybe any other suggestion?