Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
subtracting 2 images

Subject: subtracting 2 images

From: Issopui

Date: 15 May, 2013 13:28:09

Message: 1 of 3

Hello there,

I'm a newbie with computer vision toolbox. I would like to subtract 2 images in simulink is there any blockset in computer vision system which can help do that such thing like "img1-img2" my two image are in grayscale. To really elaborate my work I have 3 original images which I have converted to grayscale and then I have to subtract (img1-img2) and then (img2-img3) the two subtraction will give me two images which will be tresholded (binary) and with the logical AND gate I will have the final image as img2

Many thanks

Subject: subtracting 2 images

From: witek@mathworks.com

Date: 20 May, 2013 19:00:34

Message: 2 of 3

Hi Issopui,

In MATLAB, you'd just use imsubtract.
In Simulink, use the "Add/Subtract" block in core Simulink library and set it to saturate the output to the input type.
That's equivalent to what imsubtract does.

Witek

Issopui <manka_419@yahoo.com> wrote:
> Hello there,
>
> I'm a newbie with computer vision toolbox. I would like to subtract 2 images in simulink is there any blockset in computer vision system which can help do that such thing like "img1-img2" my two image are in grayscale. To really elaborate my work I have 3 original images which I have converted to grayscale and then I have to subtract (img1-img2) and then (img2-img3) the two subtraction will give me two images which will be tresholded (binary) and with the logical AND gate I will have the final image as img2
>
> Many thanks

Subject: subtracting 2 images

From: Issopui

Date: 21 May, 2013 16:03:09

Message: 3 of 3

Many thanks Witek it works perfectly feel like offering u a cup of tea or coffee

Once more Many thanks

witek@mathworks.com wrote in message
<kndrsi$mas$1@newscl01ah.mathworks.com>...
> Hi Issopui,
>
> In MATLAB, you'd just use imsubtract.
> In Simulink, use the "Add/Subtract" block in core Simulink library and set it to saturate the output to the input type.
> That's equivalent to what imsubtract does.
>
> Witek

Tags for this Thread

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.

Contact us