IMAQ Learn Color Pattern hangs

Running Labview 2012 SP1 and Vision Development Module 12.1.0.  IMAQ Learn Color Pattern appears to hang if you call it without defining an ROI.  See attached program - it is intended that user define an ROI then click "Define ROI" button.  If you click the button without first defining an ROI, Learn Color Pattern hangs for over a minute then returns OK.  I found a workaround for this by checking for a valid ROI before calling the VI, but it seems unusual behavior for Labview.
Attachments:
learn color pattern hangs.zip ‏74 KB

Hi Bucky,
I took a look at your program, and if I run it with highlight execution, I can see that the program is waiting on the Learn Color Pattern function as you said. However, I don't think this would be considered hanging. The front panel is still responsive, and if you add other processes to the program, they continue running while the Learn Color Pattern function is executing.
I believe the long execution time is because when no ROI is specified, the function acts on the entire image, which takes a fair amount of time. You can confirm this by selecting a ROI that is almost the size of the entire image. The program takes a similarly long time to execute. The best way to cut down on execution time would be to select a smaller ROI. I hope this helps!
David S.

Similar Messages

  • Error -1074395395 occurred at IMAQ Match Color Pattern after merge programs

    Dear all
    I  have 2 separate programs that use same source image (red01a1.jpg). The first find location of color particles (color location 01.vi) and second find location of particles after threshold  color image (particle location 01.vi).  Both of them run good.  
    But when  2 programs were merged  into one program (color sorter 01i.vi), that happened error . The error message is “Error -1074395395 occurred at IMAQ Match Color Pattern”. How can I fix it ?
    Thanks  
    Solved!
    Go to Solution.
    Attachments:
    color sorter 01i.vi ‏126 KB
    Color -particle location.zip ‏86 KB
    red01a1.zip ‏86 KB

    Hi Xuan
    Check it out the attached vi
    Sasi.
    Certified LabVIEW Associate Developer
    If you can DREAM it, You can DO it - Walt Disney
    Attachments:
    color sorter 01i.vi ‏120 KB

  • Error 1074395626 - IMAQ Learn Geometric Pattern 2

    Hi,
    I am facing this error 1074395626 - IMAQ Learn Geometric Pattern 2, in my VI. I search and did not find much information about it. 
    I also get another error 1074395628 - IMAQ Match Geometric Pattern 2, but I guess fixing the previous one could solve this?
    How can I fix the above errors?

    こんにちは。
    Match Pattern 3 を試して精度がたりないとのことですが、使用しているVI や画像を添付することはできますか。
    そして画像処理のVI は内部で複雑な処理が行われているので、いろいろなパラメータなどを設定する必要があります。
    ですので、画像処理のアルゴリズムをプログラムするときはLabVIEW ですぐさまVI を並べ始めるよりも、
    大抵 LabVIEW Vision 開発モジュールに付属しているVision Assistant というソフトから大まかなアルゴリズム(スクリプト)を作成してから、
    そのスクリプトをLabVIEW のVI に変換します。(Vision Assistant が変換してくれます)
    Vision Assistant を起動するとソリューションウィザードというサンプルがまとめられたものがありますので、
    そちらでテンプレートマッチングなどが使用されているサンプルを活用してみてください。
    そしてヘルプにテンプレートの作成方法やパラメータの設定方法などが記述されているのではないかと。

  • Error imaq color pattern

    hi, I'm trying to do a draft color pattern recognition, but labview gives me this error, I hope you can help me, let the files, thank you very much
    Error -1074395384 occurred at IMAQ Match Color Pattern
    Possible reason(s):
    IMAQ Vision: Invalid color template image.
    Attachments:
    pastillas1.png ‏55 KB
    pastillas2.jpg ‏42 KB
    Parámetros de Búsqueda Color.vi ‏78 KB

    Hello,
    the general idea is:
    Best regards,
    K
    https://decibel.ni.com/content/blogs/kl3m3n
    "Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."

  • Error-1074396120 Not an image, problem with IMAQ Learn multiple geometric patterns

    Error-1074396120 Not an image, problem with IMAQ Learn multiple geometric patterns
    Hi!
    I've tried to modify the example of  "multiple geometric patterns matching" , and just use two patterns, but when I run the VI this error appear and I doon't know how to solve it! , the error appears in the "IMAQ Learn multiple geometric patterns" block.
    Running on:
    - labview 32 bits
    - windows 7 64 bits
    - usb camera 2.0
    Any sugestion would be helpful..... !  Regards
    Attachments:
    template_12.png ‏150 KB
    template_11.png ‏123 KB
    vision_multiple_pattern_matching.vi ‏127 KB

    thanks all for your replies, the problem was on my template images, I had to give them information about the pattern matching, and I did it with NI Vision Template Editor, within Vision utilities, and I chose template with Feature Based. 
    Thank you again and Regards!

  • IMAQ Learn Pattern 2.vi -1074395247 error

    Hi,
    Development Environment:
    LabVIEW 2012 32-bit (12.0f3)
    Vision 2012
    Description:
    Can anyone please shed some light on what ROI Descriptors types are allowed for IMAQ Learn Pattern 2?. Are only certain ROI types allowed for this VI, or can you use any type? I am attempting to create a template image with a mask - The ROI Descriptors type is set to polygon - is this valid or possible?
    I get the -1074395247 error: "Invalid template descriptor".
    However, just by simply changing the ROI type to Rectangle (and the coordinates to suit), I do not get this error (although this does not correctly mask out the pixels I don't need)
    Thanks!
    Christopher Farmer
    Certified LabVIEW Architect
    Certified TestStand Developer
    http://wiredinsoftware.com.au
    Solved!
    Go to Solution.

    Hi Chris,
    I would consult this KnowledgeBase article which points out why the error is occurring: http://digital.ni.com/public.nsf/allkb/F05924D50AD6472B86256F320075CDBF
    Further there should be an example available for this particular VI and its usages with this directory: 
    LabVIEW\examples\Vision\2. Functions\Pattern Matching\Pattern Matching Example.llb 
    Thanks!
    Matt S.
    Industrial Communications Product Support Engineer
    National Instruments

  • Imaq learn pattern 2 angle

    hello,
    i need advice about how the imaq learn pattern 2 computes the angle.
    the problem i got is following: we use the imaq learn pattern 2 to get compare the angle between 5 pictures form a video. the first one is the reference pic (=0° angle). everything seems to work fine, but the angle changes with the size of the template and where it is cut out from.
    i thought that this may be a problem with the pic. a lot of information in the picture stays the same only a little is different (just take a look at the attached pictures). can anyone please tell me how the imaq learn pattern calculates the angel, if it is the tool to go for to solve the problem, or should i try to get the angle from somewhere else?
    Same picture - different size= different angle. Same picture - cut out a couple of pixels away = different ange?!?
    thanx a lot
    martin

    Dear Sir,
    I tried a match pattern 2 after the IMAQ Learn pattern 2 and could match both images (Angle 0)
    Which version of LV and Vision do you use?
    Do you also compute the angle via the Match Pattern 2.vi?
    Regards
    Ken
    Attachments:
    Match Pattern.vi ‏29 KB
    Match.jpg ‏58 KB

  • Color pattern matching is very slow

    Hi
    I tried this code creating one vi application.
    After the testing with USB webcam I have realized that the color pattern matching is very slow. How to increase the speed and to work smoothly in real time.
    Thank you

    Hello tiho,
    the color pattern matching is not as fast as 8-bit matching, but should still be fast.
    For example, I am attaching a VI for color pattern matching where you load the image, create the template and search do the matching.
    In my example I tried color pattern matching on color image of size 4288x2848 pixels and the matching is performed in ~140 ms (~7Hz). So, for a smaller image, I think the real-time processing is quite achievable (I consider real-time 20 Hz or more). The only problem is the template learning, which in my case takes around 10 seconds. But you should learn the template only once in the initialization stage.
    Best regards,
    K
    https://decibel.ni.com/content/blogs/kl3m3n
    "Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
    Attachments:
    color matching.zip ‏49 KB

  • Slowness of color pattern matching vi

    Hi,
    We're trying to implement a SLAM (simultaneous localization and mapping) algorithm in Labview based on kinect. In order to do so, the mapping robot should spot landmarks in real-time from the kinect image. We found the color pattern matching VI which does exactly what we need but the problem is that it's very slow (about 1.5 seconds for each image and total of 3 images each iteration). Is this the normal time for detecting landmarks in a kinect image? The robot can't map accurately when the iteration is so slow.
    Thanks,
    Rap Master
    Attachments:
    detect landmarks.vi ‏61 KB

    Given that the pattern matching VI is an IMAQ (Image Acquisition) VI, this question will be best served by posting in our Machine Vision forums.
    Blake C.
    Applications Engineer
    National Instruments
    www.ni.com/support

  • Problem while using color pattern matching

    Currently we are doing projects on real time object tracking where we found one doubt that irrespective of the object size whether this color pattern match works or not . My questions are as follows:
    1. Whether it is applicable for objects moving far . Because as it moves far, the size of the object decreases such that the color pattern matching is not working what will be solution since we must use color image
    2. What is the difference in using scale and  rotate invarient in color pattern matching
    3. How we can effectively decrease the ROI depending upon the object position as per below attached screen shots .
    we have removed boundary box values of X and Y coordinates at the four corner but we can't track as the object moves far away or we can't decrease the ROI as the object moves far.
    4. whether it is possible to see the value of particular pixel  in LABVIEW vision development module as we seen only the coordinate position . whether it is applicable to see particular pixel value. Guide us
    please, see the below screen shots and provide the solution how effectively decrease or increase  the ROI depending on objects position using color pattern match
    Attachments:
    problem in matching while object moves far.png ‏515 KB

    Hello,
    I have not been using the color pattern matching a lot (especially not in real-time). But since the pattern matching considers only small scale changes, you could try updating the color template every n-th iteration (depending on your setup and requirements). The major problem is the template size, since the color pattern matching tends to take quite a lot of time in learning the template. You would of course need to come up with some idea on how to change the subimage size, where the new template will be learned.
    This is the part of coarse (rough) object detection as was suggested by MoviJOHN. For example, if your object is distinctly red, you can extract the green channel from your rgb image and use threshold to roughly find the object and apply the new ROI - template.
    So:
    1. learn the template,
    2. use pattern matching with bounding rectangle (ROI) for the next couple of frames (you would need to experiment here where the detection fails -> how fast can you move the object away so that the detection fails),
    3. Before the detection fails -> rough object detection with some padded bounding rectangle (new ROI),
    4. Re-learn te template of new ROI and go back to 2.
    Again, the biggest issue is the template learning time - if you have a high resolution camera and the template is large, this won't satisfy your real-time application.
    You should set up the appropriate illumination first. The resolution is also important, since your object is moved back and forth (but the resolution will have a direct impact on the template learning time).
    Best regards,
    K
    https://decibel.ni.com/content/blogs/kl3m3n
    "Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."

  • How to use IMAQ extract color panel in a LabView file?

    I want to change a color image into a greyscale image. Therefore I want to use the function IMAQ extract color panels but I don't know how to insert it in my LabView application.
    Please, can anyone give me some advice ?!!!
    Thx, Birgit

    Birgit,
    If you want all of the color planes, you can use IMAQ ExtractColorPlanes. Allocate an 8-bit image for each of the color planes. Wire the original color image and each of the 8-bit images for the color planes on the left and bottom of the vi. The outputs on the right side will be the same images, and they will each contain the desired color plane. The input at the top of the vi controls which color planes are extracted (RGB, HSI, etc.) Grayscale will probably be the I plane in HSI.
    If you just want a grayscale image, use IMAQ ExtractSingleColorPlane instead. Wire the color image to Image Src, and wire an 8-bit image to Image Dest. Select the color plane using the top input, and it will come out on the right side.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Color pattern match in consumer producer architecture

    The way I currently have my code is as follows:
    If the number of matches in a color pattern match is greater than 0, it sends the information to the consumer loop.
    If it is not greater than 0, it doesn't send anything.
    What I was wondering is, if it finds a match the first time and it sends the information to the consumer loop, will the number of matches in the color pattern match return to 0 or will it be greater than 0 after the first match? If the number of matches in the color pattern match will be greater than 0 after the first match, and it will still be greater than 0, even though it doesn't find a match in the following scenarios, how can I make the number of matches in the color pattern match return to 0?

    Fernan1988 wrote:
    ... will the number of matches in the color pattern match return to 0 or will it be greater than 0 after the first match?...
    it's hard to say unless you can post your code....have you tried probing tool,retain wire value,highlight execution,single stepping into and out, breakpoints?

  • Color Pattern?

    In Diagnostic mode, I can see under LCD an option to change the color pattern, but I can't seem to. How do I do this?

    There is no way to change the color pattern. What you are seeing is simply a line of code from Apple. Perhaps they were testing a few different color patterns during development.

  • Color Pattern Calibration

    Does FIOS or a channel on FIOS provide a color pattern to calibrate the video on one's TV and Projector?  Thanks.

    william1 wrote:
    Does FIOS or a channel on FIOS provide a color pattern to calibrate the video on one's TV and Projector?  Thanks.
    No. You'll have to use calibration discs such as Disney WOW, DVE, Spears and Munsil, etc.

  • Image size after calibration and IMAQ Learn Calibration Template VI in Vision 2012

    Hi there
    I'm trying to setup a calibration for our fluoroscope camera. I got some pictures of a grid and try to implement a distortion model now.
    It works more or less fine. But there are still some problems and questions
    1. All my Images are 1000x1000 pixel. After correcting them with the calibration they change their size depending on the Method(937x928 at the moment).
    Thereby I lose some information, because some details at the border are cut off. Additionally I would have to increase the size of every image manually for the further processes. Does anyone know how i can implement that the corrected images are still 1000x1000 in size?
    2. At the moment I'm using the "IMAQ Learn Calibration Template VI" which I found in an older example. In vision 2012 this vi doesn't exist anymore? Why is this, and how could I implement it now, with using current vi's?
    Tried it with the "IMAQ Learn Camera Model" combined with the "IMAQ Calibration Target to Points - Circular Dots", a tresholding a
    nd "IMAQ Correction Learn Setup". But the result is much worse this way.
    Thanks for your help in advance.
    Stefan

    Thank you for your answer.
    I tried it with changing the border size(tried different values), but the results are still the same (still 937x928). Do I have to set the image size anywhere?
    What would be the best way to resize the image? Should I just copy it on a black 1000x1000 square?
    And do you have any suggestions how I can build the "IMAQ Learn Calibration Template" with 2012 vi's? I tried it with the code of my first post, but the results are totally different to this: Why this block doesn't exist anymore? Seems to be much easier for me

Maybe you are looking for

  • Optical drive no longer mounts blanks after erasing dvd-rw

    hi, hopefully someone can help with this - new macbook pro (couple months old) i've used the optical drive twice, to burn onto a couple maxell dvd+rw discs - this worked fine. today, i put one of the discs i'd previously used in, hit "erase" in disk

  • Web Service returning JCO.Table with no content

    Hello all, I've written a web service returning an object of type JCO.Table When I'm testing it in the Web Service Navigator the response contains two parameters: tabLength and row (current row number), but doesn't contain the content of the table. I

  • Removing dupes in iPhoto

    I"ve had a look through other questions about this issue, but I'm still a little unclear about this.  I've never re-imported my iphoto library and the pictures I tend to import are synced directly from my iPhone 4.  I do keep around 300 images on my

  • Formatting a GregorianCalendar object for printing

    Hello, I've got a JLabel in which I wish to put a GregorianCalendar object as a string. Now if I just print it out there it doesn't look as I wish... I basically just want the year, month and day to be there (and if possible in a format of my choice)

  • SA Releases not show sched lines with reduced qty

    Is there anyway to have the SA releases show the MRP-relevant qty instead of the scheduled qty when using confirmations?  The problem is i am using shipping notifications for vendors with long delivery times and they are requesting that i remove the