Use of edge detection in pattern matching algorithm?

Hello all,
                I work for a group at Texas A&M University researching two-phase flow in reactors.  We have been using IMAQ Vision and had a question regarding the use of edge detection in the pattern matching algorithm.  I had seen the webcast entitled “Algorithms that Learn: The Sum and Substance of Pattern Matching and OCR” (http://zone.ni.com/wv/app/doc/p/id/wv-705) and in the webcast it was mentioned that the pattern matching algorithm uses edge detection to, (as best I can tell), reduce the candidate list further and to perform subpixel location calculations.  However, I was wondering if this edge detection process is still performed if we do not use the subpixel location calculation (i.e. if we uncheck the “Subpixel Accuracy” check box)?  Also, if edge detection is performed in the pattern matching algorithm is it consistent with the method described in Chapter 13 of the Vison Concepts Manual (“Geometric Matching”)?  Finally, if edge detection is performed in a manner consistent with Chapter 13 of the manual, how does the geometric matching correlation number affect the correlation calculation that was performed in the previous steps?  Are they simply multiplied together?
Many thanks!
  -Aaron

Jeff,
We are using Imaq Vision Builder 4, with the included pattern matching that can be accessed via the menus (i.e. we haven't created a custom VI or anything.)  We are using the software to locate bubbles during boiling experiments and want a deeper understanding of what is going on "behind the scenes" of the algorithm, as we may have to explain how it works later.  We have been able to determine most of what we need from the webcast I had previously mentioned, except for the use of edge detection in the pattern matching algorithm.
At the scales involved in our experiments, subpixel accuracy is really not needed and therefore we do not use it.  If edge detection is used in the pattern matching algorithm only to determine location with subpixel accuracy, then we do not really need to know how it works because we do not use that calculation.  Inversely, of course, if edge detection is used during pattern matching even without enabling subpixel accuracy, then we would like to have a fairly good understanding of the process.
I've read most of the section on geometric matching in the Vision Concepts Manual and wondered if the process described there for edge detection (or feature matching) was also used in the basic pattern matching algorithm?
To summarize, if edge detection is not used in the basic pattern matching algorithm without subpixel accuracy, then that is all I need to know.  If edge detection is used for pattern matching even without using the subpixel accuracy calculation, then we would like to learn more about how exactly it is used in the pattern matching algorithm.
We would really appreciate any help you could give us... we've been digging around on the NI website for a couple of weeks now trying to fit together all the pieces of the pattern matching puzzle.
Many thanks!
    Aaron

Similar Messages

  • I want to write onto port 3 based(using a buffer) on a pattern match trigger from port 2. How can I code this?

    I have to check for a pattern match from port 2 and based on this trigger I have to write onto port 3(buffered) as fast as possible. So there needs to be a buffered O/P from port 3. How to code such that the pattern match trigger from port 2 triggers the trigger config.vi for port 3?

    Bheem,
    Unfortunately, you can not share the start trigger with another operation when using the pattern match operation as a trigger. The only way to share a start trigger is if you are triggering on the rising or falling edge of a digital signal. This is a limitation of using the pattern match operation as a start trigger.
    Regards,
    Todd D.
    NI Applications Engineer

  • How can I define a non-rectangular (eg. circular) ROI for pattern matching using IMAQ?

    I would like to create regions of interest that are not rectangular using IMAQ Vision Builder. Including polygons, circles, etc. I am using version 5.0.
    Thank you.

    Hello,
    The current pattern matching algorithm requires a rectangular ROI. See the IMAQ Vision Concepts manual for detailed info on how the algorithm works.
    Regards,
    Yusuf C.
    Applications Engineering
    National Instruments

  • Large size variations with IMAQ Pattern matching?

    Does the pattern matching functions work for only +-5% size variations? Which means that the pattern matching is made for static situations only? (With static I mean a static camera watching e.g. a moving assemblyline)
    I have a scenario where the camera is moving in 6DOF, giving my fiducials very much slant and very large size variations.
    Is it then not possible to use the pattern matching of IMAQ?
    The "IMAQ Vision Concepts Manual" says:
    "Because pattern matching is the first step in many machine vision
    applications, it should work reliably under various conditions.
    In automated machine vision applications, the visual appearance of
    materials or components under inspection can change due to factors such
    as ori
    entation of the part, scale changes, and lighting changes. The pattern
    matching tool maintains its ability to locate the reference patterns despite
    these changes."
    -But with my experience, this is not correct in my scenario. Actually, the pattern matching tool was not able to find a match in any of my tested images. My size variations were large in these images (probably 50-200%).
    Thanks!

    Unfortunately the pattern matching algorithm NI currently uses is not a geometric (scaleable) pattern matching algorithm. The current algorithm works despite orientation, and some lighting changes, but not scale changes.

  • I want to pattern matching with 10bit image file

    I have a 10bit camera, maker:UNIQ, type:UC-610
    I used vision builder, and acquire 10 bit image then
    try pattern matching analysis but don't run it.
    how can I do it ?

    The pattern matching algorithms don't work on anything other than 8 bit images. You will need to convert your images to 8 bit before using pattern matching.
    A word of warning: The default settings for pattern matching in Vision Builder 6.1 are quite different from the settings for VB 6.0. You can get very different results in the two versions. These settings can't be changed in VB, but can be changed in LabVIEW.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • Pattern matching program

    Hello,
    I am creating a program that does pattern matching on a video. I want the program to be able to open a template to be used for the pattern matching template and to allow the user to select a template from an image in Labview and then use this template as the pattern matching template. I have code that does all of this. The part that allows a user to select a template in Labview is a sample program that comes with Labview. I just do not know how to incorporate it. Thanks.
    Solved!
    Go to Solution.

    Hi frog,
    Here in attached vi, Ckeck it out your problem solved or not. If not, post the video file also. will help you..
    Not to mention: Your vi is so big. You have to really optimize your vi.
    Sasi.
    Certified LabVIEW Associate Developer
    If you can DREAM it, You can DO it - Walt Disney
    Attachments:
    Pattern Tracking 2.vi ‏135 KB

  • New language feature: lazy local pattern matching

    <p>In the upcoming release of the Open Quark Framework, CAL gets a new language       feature: lazy local pattern matching.</p> <p>The new local pattern match syntax allows one to bind one or more variables to       the fields of a data constructor or a record in a single declaration inside a       let block.</p> <p>      For example:</p> <p>      // data constructor patterns:<br />      public foo1 = let Prelude.Cons a b = ["foo"]; in a;<br />      public foo2 = let Prelude.Cons {head=a, tail=b} = ["foo"]; in a;<br />      <br />      // list cons patterns:<br />      public foo3 = let a:b = [3]; in a;<br />      <br />      // tuple patterns:<br />      public foo4 = let (a, b, c) = (b, c, 1 :: Prelude.Int); in abc;<br />      <br />      // record patterns:<br />      public foo5 = let = {a = "foo"}; in a; // non-polymorphic record pattern<br />      public foo6 = let {_ | a} = {a = "foo", b = "bar"}; in a; // polymorhpic record       pattern<br />      <br />      Whereas a case expression such as (case expr of a:b -> ...) forces the       evaluation of expr to weak-head normal form (WHNF), a similar pattern match       declaration (let a:b = expr; in ...) does not force the evaluation of expr       until one of a or b is evaluated. In this sense, we can regard this as a form       of lazy pattern matching.<br /> </p> <p>Thus,</p> <p>      let a:b = []; in 3.0;</p> <p>is okay and would not cause a pattern match failure, but the case expression</p> <p>      case [] of a:b -> 3.0;</p> <p>would cause a pattern match failure.</p> <p>This laziness is useful in situations where unpacking via a case expression may       result in an infinite loop. For example, the original definition of List.unzip3       looks like this:</p> <p>// Original implementation of List.unzip3<br />      unzip3 :: [(a, b, c)] -> ([a], <b>, [c]);<br />      public unzip3 !list =<br />          case list of<br />          [] -> ([], [], []);<br />          x : xs -><br />              let<br />                  ys =       unzip3 xs;<br />              in<br />                  case x       of<br />                  (x1,       x2, x3) -><br />                      //do       not do a "case" on the ys, since this makes unzip3 strictly evaluate the list!<br />                      (x1       : field1 ys, x2 : field2 ys, x3 : field3 ys);<br />              ;<br />          ;<br /> </p> <p>The use of the accessor functions field1, field2 and field3 here is necessary,       as the alternate implementation shown below would result in "unzip3 xs" to be       evaluated to WHNF during the evaluation of "unzip3 (x:xs)". Thus if the input       list is infinite, the function would never terminate. </p> <p>// Alternate (defective) implementation of List.unzip3<br />      unzip3 :: [(a, b, c)] -> ([a], <b>, [c]);<br />      public unzip3 !list =<br />          case list of<br />          [] -> ([], [], []);<br />          x : xs -><br />              let<br />                  ys =       unzip3 xs;<br />              in<br />                  case x       of<br />                  (x1,       x2, x3) -><br />                      case       ys of // the use of "case" here is inappropriate, as it causes "unzip3 xs" to       be evaluated to WHNF<br />                      (y1,       y2, y3) -> (x1 : y1, x2 : y2, x3 : y3);<br />                  ;<br />              ;<br />          ;<br /> </p> <p>With the new syntax, the original implementation can be expressed more nicely       without changing its semantics:</p> <p>// New implementation of List.unzip3, revised to use the local pattern match       syntax<br />      unzip3 :: [(a, b, c)] -> ([a], <b>, [c]);<br />      public unzip3 !list =<br />          case list of<br />          [] -> ([], [], []);<br />          x : xs -><br />              let<br />                  (y1,       y2, y3) = unzip3 xs; // using a tuple pattern to perform a lazy local pattern       match<br />              in<br />                  case x       of<br />                  (x1,       x2, x3) -><br />                      (x1       : y1, x2 : y2, x3 : y3);<br />              ;<br />          ;<br /> </p> <p style="text-decoration: underline">It is important to note that in places where       a case expression can be used (without having an unwanted change in the       laziness of the expression being unpacked), it should be used instead of this       local pattern match syntax.</p> <p>Things to note about the new syntax:</p> <p>      - local type declarations on the pattern-bound variables are allowed, and these       type declarations can have associated CALDoc comments. On the other hand, the       actual local pattern match declaration itself cannot have a type declaration       nor a CALDoc comment.</p> <p>      - this syntax cannot be used for top-level definitions, only local definitions       in let blocks</p> <p>      - one cannot use patterns with multiple data constructors, e.g.</p> <p>      let (Left|Right) = ...;</p> <p>      is not allowed</p> <p>      - one cannot specify a variable for the base record pattern, e.g.</p> <p>      let {r | a, b} = ...;</p> <p>      is not allowed, but this is okay:</p> <p>      let {_ | a, b} = ...;</p> <p>      - patterns without no variables are disallowed, e.g.</p> <p>      let _ = ...;<br />      let [] = ...;<br />      let () = ...;<br />      let : = ...;<br />      let {_|#1} = ...;      <br /> </p>

    If you use just / it misinterprets it and it ruins
    your " " tags for a string. I don't think so. '/' is not a special character for Java regex, nor for Java String.
    The reason i used
    literal is to try to force it to directly match,
    originally i thought that was the reason it wasn't
    working.That will be no problem because it enforces '.' to be treated as a dot, not as a regex 'any character'.
    Message was edited by:
    hiwa

  • Automating Edge Detection?

    I have a question about the IMAQ edge detection VI. I am designing a VI that will be counting edges in an image many times in succession. My question is that since the area in question will not change as the image changes, is it possible to just measure along the same line every time? Can I select a start and end pixel location for the edge detection? At this point I have to click and drag a line and it is very tedious for the amount of images that will be measured.
    Thanks,
    Mack

    Hi Mack24, 
    Which tool are you using for edge detection? The shipping example "Edge Detection.vi" allows you to specify a ROI of a line to detect edges against. 
    The example can be found under Toolkits and Modules->Vision->Caliper->Edge Detection.vi
    -N
    National Instruments
    Applications Engineer

  • How do I find out how IMAQ pattern match works inside?

    I need detailed info on the internal workings of the IMAQ pattern match vis (L7.1).
    I don't need source code as such (although that would be cool). I just
    need a desription of the algortihm. The manual is not detailed enough.
    I need to be able to explain my program rigourously for a scientific
    paper so I have to find this out. Any help much appreciated..

    Hello
    If you want more information about the pattern matching algorithms, look at the IMAQ Vision Concepts Manual which can be found at the link below.
    http://digital.ni.com/manuals.nsf/websearch/49110D7DB7FD282E86256EE70014816F
    If you look at Chapter 12 this discusses the way in which the pattern matching is performed. This is probably the most detailed information we will be able to give out to you. Let me know if this isn't what you need and I'll see what I can find.
    Regards
    Hannah
    NIUK & Ireland

  • Who knows how to output some text once labview detects something I want using pattern matching(V​ision assistant)​?

    who knows how to output some text once labview detects something I want using pattern matching(Vision assistant)?
    The text is something like"Yes, this is a coin"
    Thanks!

    I attached a SubVI which I used to place an overlay next to a Pattern, found by a Pattern Match before:
    As you can see, you simply pass the image reference and the Array of Matches to the VI along with the String you want to have as an overlay next to the Match.
    I also modified your VI a bit, but didn't test it. I created an Array of clusters, each elment containing the template path along with the respective text.
    Please note that this is just a hint!
    Christian
    Attachments:
    suggestion.vi ‏146 KB
    Overlay_Txt.vi ‏24 KB

  • I am using Pattern matching using vision assistant . its able to detect the temple which created while configuration

    Hi all , 
             i am using vision assistant to do patten matching . its able to find the pattern with created template in vision assistant .
            if i load some other pattern is not detecting .. 
             i have attached my vi file 
    Attachments:
    PM_light.vi ‏266 KB

    Hi all , 
             i am using vision assistant to do patten matching . its able to find the pattern with created template in vision assistant .
            if i load some other pattern is not detecting .. 
             i have attached my vi file 
    Attachments:
    PM_light.vi ‏266 KB

  • Is there a way to turn the pattern matching example in Labview to instead of loading a rectangle around what you want the template to be you can use an image display , I've be trying and can get no where with it

    What I want to do is , have two images on image displays and the pass them through the same setup as the pattern matching example to get the number of matches , I have attached what I have done and also given the pattern matching example program as well.
    Hope to get answers back soon,
                                     Thanks Alan
    Attachments:
    screenshot.docx ‏48 KB
    Pattern Matching Example.vi ‏100 KB

    Hi there!
    The example used can be adapted for comparing two images, however the algorithm and coding for finding the differences is more specific to your actual problem. In terms of the loading and displaying of the images, this can be done in the same way.
    Once you have some sort of algorithm, then you can automate the learning and matching by simply wiring them in order. (in the example, these are put in case structures as they are waiting on response from the front panel)
    I hope that this helps,
    Liam A.
    National Instruments
    Applications Engineer

  • Edge detection using IMAQ Find Edge/IMAQ Edge Tool 3

    Hi,
    I have several images with useless background around a rectangular ROI (coordinates unknown!). So I tried using the two VIs mentioned above in order to detect these edges so that I can remove them. Regretfully, this does not work as planned.
    IMAQ Find Edge usually finds an edge, but not where it should be. The edge detection is earlier than I want it to be.
    IMAQ Edge Tool 3 sometimes does not find an edge at all, sometimes it finds the edge perfectly. Here I use the 'get best edge' option, which delivers the best results with all the images I tested it with.
    All the other options are also not changed while running the VI with the images I have.
    Does anyone have intimate knowledge of these VIs' algorithms, how they work, how they can be manipulated, ... ?

    Hi,
    Can you upload an example image?
    That would clarify what you're trying to do?
    Most of the time a change of mindset solves the problem.
    Kind regards,
    - Bjorn -
    Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's
    LabVIEW 5.1 - LabVIEW 2012

  • How to use Colour pattern matching with a webcam

    Hi,
    I have a web cam which I am able to use successfully in labview (i.e.. Get images)
    I have looked at the colour pattern matching examples and tried to modify them, so that I can detect a red spot, that can be seen through the webcam, but have been unsuccessful. 
    In essence I'm trying to do real time colour pattern matching
    Can anyone steer me in the right direction? Or help me out?
    Thanks 
    Solved!
    Go to Solution.

    Hi kr121,
    I'm trying to work on color myself right now.
    What have you tried so far?  What type of web camera are you using?  I'm using a Microsoft Life Camera with LV 2011 on Windows 7.
    I started here:  http://zone.ni.com/devzone/cda/epd/p/id/5030
    If you are not using an NI camera I was able to get this to work using the cmd prompt and extracting the files manually to at least run the NI-IMAQ for USB: Snap and Save Image with USB Camera and NI-IMAQ for USB: Grab and Save Image with USB Camera examples.
    The command prompt command is:
     ni_imaq_usb_installer_86.exe /x
    Don't know if this is 100% correct but it at least allowed me to capture images and avi's.
    Regards,
    -SS

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

Maybe you are looking for

  • Ipod just won't work or connect or play HELP

    ok so apperently alot of people are having this problem and its getting really annoying because i spend more time trying to fix my iPod then actully listening to it and it seems like they are alot more trouble then they are worth but here is my probl

  • Function Based Indexes Errors

    Hi I am trying to create function based indexes based on the examples in the b10826 Spatial Users guide -- The Create index statement is failing because it says it cannot read the metadata create index EMITTER_LOB_WIDX ON EMITTER (OWNER1.WT_GEOMETRY_

  • Applied archived log

    Hi, on 11g R2 dataguard, on Primary I have : SQL> select MAX(SEQUENCE#), THREAD# from gv$log where status='CURRENT' group by THREAD# order by THREAD# asc;   2    3 MAX(SEQUENCE#)    THREAD#         700602          1         259893          2        

  • MRP Results

    Hi All, I've managed to come out with the MPR results using Crystal Report 2010 using crosstab. My question is, How can i get the date and workweek as shown in B1 MRP results? Refer to screenshot below. The columns is basically MSN2.PeriodID But if i

  • 10.6.5 and network connection slowdown, flakiness

    Ever since the 10.6.5 update (applied via Software Update), I've been plagued with a very severe slowdown in my internet connection. Typically, when connecting to most websites, in the Firefox status bar, I get a lot of "Looking up..." "Waiting for..