Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Removing vision info from a copied image

Highlighted
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
(1,761 Views)
Highlighted

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
(1,754 Views)
Highlighted
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
(1,749 Views)
Highlighted
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

PXI Software R&D
National Instruments
PXI
Machine Vision
0 Kudos
Message 4 of 6
(1,721 Views)
Highlighted
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

PXI Software R&D
National Instruments
PXI
Machine Vision
0 Kudos
Message 5 of 6
(1,664 Views)
Highlighted

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
(183 Views)