Thread Subject: Basic Image Processing

Subject: Basic Image Processing

From: Joe Frank

Date: 9 Nov, 2009 02:29:02

Message: 1 of 6

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

Subject: Basic Image Processing

From: Nasser M. Abbasi

Date: 9 Nov, 2009 02:54:51

Message: 2 of 6


"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.

Subject: Basic Image Processing

From: Joe Frank

Date: 9 Nov, 2009 03:17:02

Message: 3 of 6

"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.

Thanks

Subject: Basic Image Processing

From: Nasser M. Abbasi

Date: 9 Nov, 2009 03:32:11

Message: 4 of 6


"Joe Frank" <sascod@gmail.com> wrote in message
news:hd81je$2b7$1@fred.mathworks.com...

>
> I dont have Image Processing Toolbox. In what other ways I can add them?
>

Joe;

This toolbox comes with the student version. if you are student it should be
there unless you have an old version of matlab. type 'ver' to find out.

if you'r not student, you can buy this toolbox from Mathworks and add it to
your installation.

if you do lots of image processing, it is very useful.

--Nasser

Subject: Basic Image Processing

From: Sanjeet kumar

Date: 9 Nov, 2009 05:07:03

Message: 5 of 6


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

Subject: Basic Image Processing

From: Jan Simon

Date: 9 Nov, 2009 09:18:02

Message: 6 of 6

Dear Joe!

> 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.

Good luck, Jan

Tags for this Thread

Everyone's Tags:

ll

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
ll Sanjeet kumar 9 Nov, 2009 00:09:03
rssFeed for this Thread
 

MATLAB Central Terms of Use

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.

Contact us at files@mathworks.com