"Joe Frank" <sascod@gmail.com> wrote in message
news:hd7upe$aep$1@fred.mathworks.com...
> Hello,
>
> I have two images im1 and im2
>
> im1 is 1200x1 matrix
> im2 is 1450x1 matrix
>
> I need to add im1 and im2 for further calculation. How do I do it?
>
> Thanks,
> Joe
"Nasser M. Abbasi" <nma@12000.org> wrote in message <1wLJm.2056$cd7.1349@newsfe04.iad>...
>
> "Joe Frank" <sascod@gmail.com> wrote in message
> news:hd7upe$aep$1@fred.mathworks.com...
> > Hello,
> >
> > I have two images im1 and im2
> >
> > im1 is 1200x1 matrix
> > im2 is 1450x1 matrix
> >
> > I need to add im1 and im2 for further calculation. How do I do it?
> >
> > Thanks,
> > Joe
>
>
> if you have Image Processing Toolbox, then do
>
> help imadd
>
> IMADD Add two images or add constant to image.
>
> --Nasser
> ps. strange image sizes you have there.
>
I dont have Image Processing Toolbox. In what other ways I can add them?
ps. I just gave an example. Its not the actual image size.
if you don't have IP tool box then u can simply add the two images by matrix addition.
make two for loop
one for top to bottp pixels and one for left two right pixel
i.e, (x,y)
then you can add each pixel intensities
like im3(x,y)=im1(x,y)+im2(x,y)
hence you will get a new matrix which will be addition of the first two images
> I have two images im1 and im2
>
> im1 is 1200x1 matrix
> im2 is 1450x1 matrix
>
> I need to add im1 and im2 for further calculation. How do I do it?
This depends on how you define "add".
1. If you want to rescale the images at first, use INTERP1 for one of the images such that both images have the same size afterwards. For more usual 2D images, try INTERP2.
2. If you want to crop one of the images instead, do this.
3. If "add" means something like "add", simply add the arrays.
If image addition meanse an averaging, divide the result by 2.
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.