02-19-2009 01:48 PM - edited 02-19-2009 01:49 PM
So I'm mopping up a giant puddle of memory from underneath my computer and I notice that memory is just pouring out of IMAQ Learn Pattern 2 VI. Turns out, when IMAQ Learn Pattern 2 decides that a template image doesn't have enough contrast, it gets frightened and pees out memory onto the floor. Attached is a VI that lets you wash your computer desk with RAM.
Labview development team- two things, please:
1: Please fix the memory leak in IMAQ Learn Pattern 2 and if possible, post the fixed version so I don't have to pointlessly wait for the release.
2: I've read that the test for contrast is that there must be at least 2 grayscale levels in the image that are populated by at least 10 pixels each. This seems to be true. But just for giggles, could someone please confirm that this is exactly (and without exception) how the IMAQ Learn Pattern 2 vi test for contrast works so that I can reverse engineer it and use that to keep IMAQ Learn Pattern 2 VI from creating a memory vortex from which no bit can ever escape.
Thanks,
Root
Solved! Go to Solution.
02-20-2009 11:54 AM
Root,
What version of vision are you using? I ran this VI with the boolean selected for about 10 minutes with no leak. When does your leak occur, and how significant is it? While the CPU obviously jumped to 50% on my computer, I never had a leak.
I looked through the readmes of some recent fixes of Vision, and it seems that the IMAQ Learn Pattern 2 was updated with 8.6.4. I don't see anything about it being because of a memory leak, but apparently it used to "hang" with low contrast images:
"The IMAQ Learn Pattern 2 VI may hang." - from ReadMe
You can find the 8.6.4 download here.
You must have Vision 8.6.0 before you install the 8.6.4 update. Also, if you want to update your Vision Assistant, we had an 8.6.1 update for that.
Hopefully this helps!
02-20-2009 11:59 AM
I'll give it a try.
here's a link to a forum post from another poor sap who observed the same memory leak problem:
http://forums.ni.com/ni/board/message?board.id=170&message.id=148470&query.id=13278#M148470
02-20-2009 12:02 PM
02-23-2009 01:17 PM
Bingo. The memory leak issue with IMAQ Learn Pattern 2 was fixed in Vision 8.6.4.
Thanks, Chris. I regret that I have but one Kudos to give.
Gratefully,
-Root
P.S. Can anyone verify that IMAQ Learn Pattern will always produce a "not enough contrast" error message if the template image does not contain have two regions of different uniform pixel value containing at least ten pixels each, and that IMAQ Learn Pattern will never produce a "not enough contrast" error message if the template does contain two such regions? Also, what is the minimum size for a valid training template image? is there a minimum pixel area or a minimum width and height or what?
02-23-2009 01:59 PM
It seems like you are correct in the fact that any contrasting ROI of 10 pixels or less will give that error.
It also seems that if you have an image of less than 8x8 pixels, it will throw an error also. I verified this with our Product Support Engineer. At first we thought 8 pixels was necessary, but after some testing and obvious fairly, we determined it was actually 8x8.
02-24-2009 11:23 AM
Thanks again for your help! I am always delightfully astounded at the expeditiousness with which even the most preposterous requests for assistance are accomodated on the LabVIEW support forums. I'm keen to post a question about the meaning of life; I'm almost certain that someone on here would beat their head against a copy of Jean-Paul Sartre's Being and Nothingness untill they arrived a plausible answer (I vaguely suspect it has something to do with deep fried twinkies and rum, by the way.)
I can't help but wonder though- is there a formal channel through which I may send a request to NI to ask for the inclusion of specific additional information into the LabVIEW help documentation which would preclude the need for a forum search for future LabVIEW users? There have a number intances where I've run into curious omissions in the help docs that I think NI would be more than happy to include if only the right person were made aware of them.
Thanks,
-Root
02-24-2009 11:40 AM
Root Canal wrote:Thanks again for your help! I am always delightfully astounded at the expeditiousness with which even the most preposterous requests for assistance are accomodated on the LabVIEW support forums. I'm keen to post a question about the meaning of life; I'm almost certain that someone on here would beat their head against a copy of Jean-Paul Sartre's Being and Nothingness untill they arrived a plausible answer (I vaguely suspect it has something to do with deep fried twinkies and rum, by the way.)
I can't help but wonder though- is there a formal channel through which I may send a request to NI to ask for the inclusion of specific additional information into the LabVIEW help documentation which would preclude the need for a forum search for future LabVIEW users? There have a number intances where I've run into curious omissions in the help docs that I think NI would be more than happy to include if only the right person were made aware of them.
Thanks,
-Root
Re: Docs
Well the NI AE's prowling these forums should be able to file a "Documentation CAR" to fix the docs.
Re:Meaning of life
My mother spent the first 30 or so years of her life investigating that question and finally settled on "The meaning of our life is to find the purpose for us being here." So then she starting with that question. I think she was mildly annoyed when I told her "I know that one! We were put here to serve the "Divine Wire-worker" and to be happy doing* so. Just take a look at the last chapter of ..." ![]()
Ben
* which to my understanding does not rule out twinkies, hoho's or rum.
02-24-2009 11:46 AM
Root Canal wrote:Thanks again for your help! I am always delightfully astounded at the expeditiousness with which even the most preposterous requests for assistance are accomodated on the LabVIEW support forums. I'm keen to post a question about the meaning of life; I'm almost certain that someone on here would beat their head against a copy of Jean-Paul Sartre's Being and Nothingness untill they arrived a plausible answer (I vaguely suspect it has something to do with deep fried twinkies and rum, by the way.)
I can't help but wonder though- is there a formal channel through which I may send a request to NI to ask for the inclusion of specific additional information into the LabVIEW help documentation which would preclude the need for a forum search for future LabVIEW users? There have a number intances where I've run into curious omissions in the help docs that I think NI would be more than happy to include if only the right person were made aware of them.
Thanks,
-Root
Product Suggestion Center is a possble venue for such things.
Rolf Kalbermatter