Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Removing vision info from a copied image

Hi

Let me tell you what I am trying to accomplish. I have an image with learned pattern for pattern matching. Now I want to make a copy of this image and remove the vision info from the copy, but not from the original image.

However, after removing the vision info from the copied image, the pattern information is removed from the original image as well. It seems like the pattern information is not actually copied during IMAQ Copy, so the removal of the data from the copied image removes it also from the original one.

I am attaching a demo VI to illustrate the situation. Is this an expected behavior?

Vladimir

View my profile on LinkedIn
Message 1 of 6
(3,786 Views)

Hi, Vladimir,

Nice things... Looks like small bug (or at least unexpected behaviour). I guess, the problem that after IMAQ Learn Pattern you have "Template Image" as output. Pattern information stored separately from the image and assotiated with an image through reference. IMAQ Copy copied the image and reference, but not make a copy of the pattern information. It looks that after IMAQ Copy you have two images which "linked" with same pattern. As result after removing wision info from the copy you have removed pattern assotiated with first image as well.

If you will learn pattern twice, then it works as expected:


with overlay it working without any problem.

But such behaviour with learn pattern can produce hard unexpected problem in the application. Try to submit a support request...

best regards,
Andrey.

Message 2 of 6
(3,779 Views)
Hi Andrey

Thanks for your deeper analysis of the problem Smiley Happy. Yes I thought of the same possible cause as you. I'll wait if someone from NI responds to this thread, if not, I'll submit a support request.

Vladimir



View my profile on LinkedIn
0 Kudos
Message 3 of 6
(3,774 Views)
Hi all,

I am looking into this and trying to narrow down what is causing this. I will post back with my test VI and any work-around I come up with.
--Michelle

National Instruments
0 Kudos
Message 4 of 6
(3,746 Views)
Hi all, again,

This was reported to R&D (#118409 CAR ID) for further investigation. You can find a possible workaround in the VI I've linked below in case 2 or 3. Thanks for the feedback!
--Michelle

National Instruments
0 Kudos
Message 5 of 6
(3,689 Views)

Magnificent! Still not fixed in Vision 2019!

It's a serious issue, don't you think?

 

Also as of now learning another template on an image copy (doesn't matter with old or current VIs) will also remove template info from original image.

0 Kudos
Message 6 of 6
(2,208 Views)