Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Efficient masked copy of subImage onto Image (masked ImageToImage)

 

I am trying to overlay many small irregularly shaped images onto a larger image.

ImageToImage would be great except that the copy needs to be masked.

I would like to avoid using full sized images and masks (many copies, slow).

Is there a better way than pulling out a section, doing a masked copy, and returning it?

Any suggestions?

Thanks in advance,

Brian


IMAQ 8.5, C#

0 Kudos
Message 1 of 9
(4,619 Views)
Can you post a few more details about how you get your smaller images?  Do you use IMAQ Extract?



Randall Pursley
0 Kudos
Message 2 of 9
(4,618 Views)
Yes. Currently I am working on small masked regions of the original image, but would like to "Extract" first.
0 Kudos
Message 3 of 9
(4,615 Views)
There is a function called IMAQ Extract.  Are you using that function to extract your area of interest from your original image?  If not, how are you defining your area(s) of interest so that you can mask the rest of the image to leave only that part?  Are you using an ROI?
Randall Pursley
0 Kudos
Message 4 of 9
(4,610 Views)

My original image has many small regions that I wish to process independently. First, I locate the items, then use regions to create a mask. Processing continues using the small mask on a full sized image. A new (smaller ROI) mask is generated and the results are merged back into the original image via the new mask. This is repeated for each of the small items found.

The concern is that all of the processing is performed on full sized images. It works, but I would hope to gain some speed by working on images closer to the size of the area being processed (~1% of the original image).

ImageToImage would work to assemble the results, but bounding rectangles for the small images overlap. Early copies get partially overwritten by the later items.


Thanks for your interest.

Brian


 

0 Kudos
Message 5 of 9
(4,599 Views)
OK I think I understand.  Is the attached similar to what you want to do?


Run the vi one time to read in the image, then set the ROI and run it again.


Randall Pursley
Download All
0 Kudos
Message 6 of 9
(4,595 Views)

Is there any way to convert that to a script?  I do not have LabView. 

(Working in C#)

Thanks again,

Brian

0 Kudos
Message 7 of 9
(4,593 Views)
Sorry, didn't realize that.  I do not know how to do that.  Maybe someone else here can do it.

Once again, sorry.  I will attach an image of the block diagram in case it might help.


Randall Pursley
0 Kudos
Message 8 of 9
(4,584 Views)


Someone around here has got LabView. I will check it out on their machine or download the evaluation version.

Until then, the long way will work.

Thanks for the leads,

Brian
0 Kudos
Message 9 of 9
(4,470 Views)