|
Hi Joe
im1 and im2 look like vectors (nx1 matrices...)
Anyway, assuming that you have this images:
im1 is 200x200 matrix
im2 is 300x300 matrix
You can only add 2 images if they are of the same size. So re-size the smaller one to a 300x300 matrix. This way you will avoid information loss since you can't create completely new from existing one. For this use:
im2=imresize(im2, [300, 300]);
There are several algorithms for resizing. Check the options on imresize help.
Now you should have similar images and you can add them (if you have the image processing toolbox):
NewImage=imadd(im1, im2);
Once again check the imadd help for more tips and troubleshooting.
I hope this can do the trick...
If you don't have the image processing toolbox... hum... it will be hard.
Igor
"Joe Frank" <sascod@gmail.com> wrote in message <hd81je$2b9$1@fred.mathworks.com>...
> jonny <jonnazemi@gmail.com> wrote in message <e0176e1c-3cfb-4a59-81ed-6ede6dc961d7@j19g2000vbp.googlegroups.com>...
> > On Nov 8, 9:37?pm, "Joe Frank" <sas...@gmail.com> wrote:
> > > I have two images.. im1 and im2
> > >
> > > im1 is 1200x1 matrix
> > > im2 is 1450x1 matrix
> > >
> > > I want to add im1 and im2 for further calculation. How do I do it?
> >
> > you need to interpolate one over the range of the other. I would
> > interpolate the 1450 over the 1200 range.
>
> How do I interpolate them?
|