Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I take an extracted image and place it back into the original image?

Solved!
Go to solution

Hey,

 

First of all, not sure if this is the right message board, but I cant find a message board for NI Vision questions.

 

Heres what I'm doing.  To save time in the inspection process I have extracted a subimage from my original inspected image.  I used this subimage to threshold at a really low threshold, which is where I get my time savings, but now I need to put that sub-image back into the original image at the same location (just to put into a viewer and make the customers happy).  How do I do it?

 

Thanks

0 Kudos
Message 1 of 3
(3,448 Views)
Solution
Accepted by topic author piersonTwist

Hey,

 

You can use IMAQ ImageToImage:

 

 

Andrey.

Message Edited by Andrey Dmitriev on 01-26-2009 03:58 PM
Message 2 of 3
(3,445 Views)

Thanks Andrey,

 

I actually tried to use that originally and it didnt work, but that was because I had copied the original image incorrectly.  So by knowing that ImageToImage was definately the way to go, it made it clear that earlier code was implemented wrong.  Basically I made the mistake of copying by doing the following:

 tempImage = DestinationImage

 

instead of:

copy(destinationImage, tempImage). 

 

Since my viewer was tied to my DestinationImage, it was screwing everything up.

 

Thanks!

0 Kudos
Message 3 of 3
(3,432 Views)