IMAQ Match Pattern

I just cant get my program to work. If I define the structure I'm
looking for with a ROI it works very nicely, but when I try to load an
image to look for it just crashes with the following error code:
-1074396160
IMAQ Learn Pattern
System error.
Do anyone hava a clue what that means?
thanx

A couple of things to look at-
If you are loading an image from disk and trying to use that image directly as the source for the IMAQ Match Pattern 2.vi, you will need to have the image "learned" previously, and then save it as a PNG. The PNG file type can save the extra information associated with a pattern to match.
If you are loading an image and learning it in your program, you will need to make sure that the image to learn is 8 bit, and that all other settings for the IMAQ Learn pattern are connected.

Similar Messages

  • Does " IMAQ Match Pattern 2 " support 16-bit images?

    Hi,all
          When I used " IMAQ Match Pattern 2 " to process 16-bit images, it didn't work. I tried  the " Pattern Matching example"  and have changed the IMAQ Create's "image type" to 16bits.  
    Is there any method to solve this problem?
         Many thanks!

    Hello dazee!
    "IMAQ Find Pattern 2" only supports 8bit images! You can find this in the help.
    Kind Regards, Christian

  • 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 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."

  • 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

  • How do I use the Match Pattern Function to exclude only 0.000?

    Hi,
    I'm trying to use the mattch pattern function to find the first string in a table thats is >0. My table looks like:
    1,0.000000,0.000 %2007/01/13 00:16:19 196281
    1,0.000000,0.000 %2007/01/13 00:16:22 196282
    1,0.831262,0.000 %2007/01/13 00:17:20 196375
    2,0.811154,0.000 %2007/01/13 00:17:20 196375
    If I us the paremeter "1,[~0]" It doesn't find the line 1,0.831262,0.000... which is the one that I want. I also tried :1,[0-9].+[~0] and that didn't work either. the problem is that the first digit after to 1, isn't allways going to go from 0 to 0.0 sometimes it might go from 0 to 2.??.
    Thanks for the help
    Matt

    "Matt361" <[email protected]> wrote in message news:[email protected]..
    Hi,
    &nbsp;
    I'm trying to use the mattch pattern function to find the first string in a table thats is &gt;0. My table looks like:
    1,0.000000,0.000 %2007/01/13 00:16:19 196281
    1,0.000000,0.000 %2007/01/13 00:16:22 196282
    1,0.831262,0.000 %2007/01/13 00:17:20 196375
    2,0.811154,0.000 %2007/01/13 00:17:20 196375
    If I us the paremeter "1,[~0]" It doesn't find the line 1,0.831262,0.000... which is the one that I want. I also tried :1,[0-9].+[~0] and that didn't work either. the problem is that the first digit after to 1, isn't allways going to go from 0 to 0.0 sometimes it might go from 0 to 2.??.
    &nbsp;
    Thanks for the help
    Matt
    &nbsp;
    Hi,
    1,[~0] matches a "1" a "," and then any character that is not "0".
    1,[0-9].+[~0] matches a "1" a "," and then any character that is "0-9", any number of anything!! (1 or more) and then anything that is not "0". Note that you have to escape a . to match a ".". Like this "\.".
    There is no way to check if there is anything other then a "0" in the match, from within the match pattern function. So I think you won't be able to find a pattern that does the trick.
    Why not use a whileloop to find the first item? Or use the Spreadsheet String To Array, and then compare the desired row or column with the string "0.000000"? (Or replace all ,0.000000, by a string like ",NULL,", then match the pattern?)
    In LabVIEW 8 there is a new Match Regular Expression function. Haven't tried it, but it should be much more powerfull then the Match Pattern function. But also much more complex.
    Regards,
    Wiebe.

  • Match Pattern does not function properly when searching for a null character

    I'm using Match Pattern to extract a null terminated string from a response I'm getting from a device on a serial port. The VI is attached and below is a screenshot of the block diagram.
    It works just fine with index set to 0, 1, or 2. When index is 3, I get the output shown below.
    Why is Match Pattern not finding the null character?
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    Grab Nullterm String.vi ‏15 KB

    I'm a dope, need to remove the wire from the Offset control to the Match Pattern control.
    DUH!

  • Wrong result in match pattern

    Hi, I want to extract the space (sometimes, !#" etc) from "@020 12345' using match pattern function.
    When I used [\s!#"] as a regular expression, the result "20".
    Why my expression is not worked and Can you propose more suitable expression?
    labmaster 
    *)Enclosed is the VI example in LV2009
    Solved!
    Go to Solution.
    Attachments:
    yahoo.vi ‏7 KB

    labmaster wrote:
    Hi, I want to extract the space (sometimes, !#" etc) from "@020 12345' using match pattern function.
    You should also describe what you mean by "extract". If you simply need a space, you can use a space diagram constant. No need to extract it. Do you want the resulting string without the space, for example?
    I am sure one of the regex gurus here will jump right on this one...
    LabVIEW Champion . Do more with less code and in less time .

  • LV 7.1 VI with match pattern fails in LV8

    I am seeing something weird with LabVIEW 8.  Attached
    is a VI that was developed in 7.1 and has been working for the past year and a
    half.  When I upgraded to 8.0 it started exhibiting weird behavior. 
    The very first time it is executed it works fine.  All subsequent
    executions fail.  The problem is that the match pattern VI only matches
    the search string the first time it is executed, after that the offset past
    match is always -1.  Why?
    If I start from scratch in LabVIEW 8 and recreate this VI it seems to work
    fine.
    Joshua
    Attachments:
    Read_RCG_File.zip ‏21 KB

    Thanks for looking at this for me.  Now that you have pointed out
    that the Request Deallocation was causing the problem I need to correct
    what said in my original post.  If I recreate the VI from scratch
    in LabVIEW 8 there is still a problem.  The first time I recreated
    it I neglected to add the Request Deallocation.
    Thanks again for your help.
    Joshua
    PS  This VI is simplier and duplicates the problem.
    Attachments:
    MatchPatternDeallocateBug.vi ‏9 KB

  • Lazy (not greedy) match pattern

    Hello
    I want to use match pattern to return every substring enclosed between 7E characters in a hexadecimal string.
    The string looks like this : ....7E7E ....7E7E....7E7E...
    I used the following regular expressions: 7E.*7E, 7E .+ 7E, 7E .+?7E but they return nothing or they return the maximum match possible (greedy match). (The regular expressions actually not like this because 7E is in hexadecimal representation and the other characters are not, the expressions would look like this: ~.*~, ~.+~, ~.+?~)
    Is there a way to perform non-greedy matches in LabView?
    Thank you for your help

    Hi forsaken,
    what about this little sub-vi:
    'data string' is your data value (without surrounding 0x7E), 'remaining string' is therest of the string (with 0x7E).
    Message Edited by GerdW on 06-05-2007 04:44 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    match.png ‏2 KB

  • Match Regular Expression does not match what Match Pattern does

    I have read through a lot of posts about how Match Pattern does not match what Match Regular Expression will due to not processing some characters.
    However, I found a problem with the other way. A simple Reg-Ex that works in Match Pattern but not Match Regular Expression.
    What I have here is just an example. I want to use Match Regular Expression so I can specify some sub-matches.
    The reg-ex is for: one or more non-numeric characters, a space, one or more numeric characters. At the start of the string.
    How can I get this working in Match Regular Expression? I am working in LabVIEW 2010f2 32 bit. Here is the code snippet and the results:
    Rob
    Solved!
    Go to Solution.

    Robert Cole wrote:
    I think I prefer the ~ for negation since ^ is also used for beginning of the string. But we work with what we have.
    Let me offer you a tip and perhaps defend the honor of the regex a little bit.  One of my favorite features of regexes is the ability to specify character classes (and their negation).  One of the reasons I have to think about the ~ versus ^ is that I rarely use ^ in a regex alternative. 
    Some examples:
    [0-9] = \d (digit)
    [^0-9] = \D (not a digit)
    The equivalent regex for your case is: \D+ \d+

  • Split a string using Match Pattern function

    I am trying to split a response string from a climate chamber into different parts. The string goes something like this: 0030.0\s0034.6\s0080.0\s0083.4. I am using the match pattern function to split the string using \s as the search string. But it is not splitting the string as required. If I use only \ , its working fine. Can anyone please suggest why \s is not being recognised as a part of the input string?
    Subhro.
    Solved!
    Go to Solution.

    Is the string you show in normal display mode or in \ codes display mode?
    Anyway, if you need to match a '\' character you'll have to mask it using \, so the match string would be '\\s' to match '\s'.
    Alternatively you could use spreadsheet string to array with the correct delimiter. For the data you show this would work perfectly.

  • Regular expression to select non-matching pattern

    Hi All,
    I am having question on regular expressions
    I want to select lines containing non-matching pattern.
    For example if we consider following cities:
    London
    NewYork
    Delhi
    Mountainview
    If above are the given then how to select all cities except "Delhi"
    Please suggest. Thanks.

    Hi,
    You need to explain what actually you need to get out. As all these cities are in expression [a-z, A-Z]. Some more input required.
    Kuldeep Jangra

  • Regular Expression for Match Pattern (string) Function

    I need to find a variable length string enclosed by brackets and
    within a string. Can't seem to get the regular expression right for
    the Match Pattern function. I'm able to get the job done using the
    Token function, but it's not as slick or tight as I'd like. Does
    anybody out there have the expression for this?

    Jean-Pierre Drolet wrote in message news:<[email protected]>...
    > The regular expression is "\[[~\]]*\]" which means:
    > look for a bracket "\[" (\ is the escape char)
    > followed by a string not containing a closing bracket "[~\]]*"
    > followed by a closing bracket "\]". The match string include the
    > brackets
    >
    > You can also read "Scan from String" with the following format:
    > "%[^\[]\[%[^\[\]]" and read the 2nd output. The brackets are removed
    > from the scanned string.
    Thanks, Jean_Pierre
    I did some more experimenting after posting and found that \[.*\] also
    works with the match pattern function. Thanks for your input.
    sm

Maybe you are looking for