Pattern Matching or Golden Template

Hello all,
   I posted a question earlier on what advice can be given for hardware that could be used to acquire a fingerprint. I got a very helpful answer. Now I'm still working on this fingerprint recognition project and have been looking around into the logic to be used on matching images. I came across both the "pattern matching" and "golden template" available features on NI Vision assistant and was hoping someone could point me on the right direction so that I could obtain more insight information on how either one of these features perform their matches.
Thank you,
OC
Solved!
Go to Solution.

Hi OC,
Included with NI Vision is the 400+ page Vision Concepts Manual.  This explains in detail all of the functions available in NI Vision, including Pattern Matching and Golden Template Comparison.
This document can be found in <Program Files>\National Instruments\Vision\Documentation\Concepts_Manual.pdf
Chris Bolin
LabVIEW Partner Program, CLA

Similar Messages

  • How can I read a template and differentiate if it is a pattern matching template or a geometric matching template?

    Hey all,
    I would like to know how can I read a template´s information to know if it is a pattern macthing or a geometric matching template? 
    In my code, users provide templates and the algorithm must match them using pattern matching or geometric matching depending on the template.
    At the moment I am doing it by including a P or a G in the name of the file, but I would like to avoid this and read the information from the file.
    Any ideas?
    Thanks in advance,
    Esteban
    Solved!
    Go to Solution.

    Hey Esteban,
    you can use the VI "IMAQ Is Vision Info Present 2 VI" to reice the information:
    IMAQ Is Vision Info Present 2 VI - NI Vision 2011 for LabVIEW Help - National Instruments
    http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_is_vision_info_present_2/
    Take a look at the attached VI
    Stephan
    Attachments:
    Determine Pattern type.zip ‏13 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

  • Problem with Pattern Matching

    Hello,  I am using Vision Development Module 8.5 with VB6.   I need immediate help on coming up with a solution for an auto warranty return for incomplete "Fog Lamp" indicator symbol.  I use a match score minumum of 900, but the match score returns a 932.  I don't see how a score > 900 is returned for so much missing from this symbol.  I use this test in a high production line and am very concerned.  I attached a Vision Assistant 8.5 script and actual image from auto warranty return.  The *.png template used for comparison is also in zip file.
    Thanks
    Attachments:
    PatternMatchScrpt-FogLamp.scr ‏2 KB
    Images.zip ‏137 KB

    Golden Template does exist in 8.5, and that was my first idea too, however, after trying it, it might not be the best algorithm for it.
    Golden Template compare the contour of objects, and they don't produce very good result in the specific image because the symbols are relatively small and not contrasted enough once we look at the luminance plane (i.e. we can't perform a great contour extraction).
    What I tried and works decently is the looking at the identification score of the classification algorithm.
    The only drawback of this method is that the object needs to be whole (i.e you might need to do a little morphology to close the objects). But the identification score will be quite different on the partial fog lamp.
    Another tactic, which is similar to the previous one is to (mis)use the OCR algorithm to train the object and use the character verification function (i.e. define a perfect fog lamp image (character) as the reference character when you train the OCR engine.
    The algorithm will them return a verification score which will tell you how far or close the pattern under inspection is from the reference one defined in the OCR file. OCR is based on classification.
    After trying that on your image, the verification score is different enough and you could use that for making a decision, but the difference is not as marked as with using the identification score of the classification algorithm.
    Both algorithms are based on thresholding the image. One advantage of using the OCR is that you can tweak the min character spacing parameter to adjust the segmentation so that the symbol is considered one full object (as opposed to having to perform morphology to do it if you use the classification algorithm).
    As I mentioned, classification seems to give you a better differentiation between the scores.
    Both methods allow you to define a Classification file or Character Set File that allow you to test multiple symbols.
    I am attaching a couple inspections and files I used to do this quick test.
    Hope this helps.
    Best regards,
    Christophe
    Attachments:
    Fog Lamp Inspection.zip ‏156 KB

  • "Invalid golden template" error using Vision

    Hello,
    I'm trying to compare two images (to locate a hole that's present in one of them) using the IMAQ Compare Golden Template vi, and I'm getting the following error:  "Error - 1074395770 occurred at IMAQ Compare Golden Template", "Invalid golden template."  I've included a copy of my vi and a screen snapshot of the error.
    Can you help me with this?  I am relatively new to Labview, so there may be a simple solution to this.
    Thanks,
    Doug D.
    Attachments:
    files.zip ‏61 KB

    cb,
    Thanks for the tip about the "Golden Template Inspection Example.vi"; that was helpful.
    Yes, I'm still getting the same error.  It looks like the problem is with my template file.  Basically I just converted a .jpg file (attached) to .png.  But it seems that the "IMAQ Match Pattern 2" and "IMAQ Compare Golden Template" VIs both require a template image with pattern matching info in it, and I can't create one that works using the "IMAQ Setup Learn Pattern 2" and "IMAQ Setup Learn Pattern 2" VIs.
    Does anyone have information or an example on how to create a template file for the "Golden Template Inspection Example VI?
    Doug
    Attachments:
    No_hole.jpg ‏394 KB

  • How to compare two images through golden Template analysis?

    hi,
       How to compare two images through golden Template analysis?
    Regards
    Dibya 

    Hi Dibya,
    you can skip the pattern matching part if it's not interesting to you. Only look at the "GoldenTemplate"-part.
    I can't (and will not) look at the example in more detail, but generally such examples are given with block diagram...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How do I set multiple pattern matching Vi's and make overlappin​g pattern matches to count as one?

    Hello! I'm a student and I'm currently making a project using pattern matching.
    My patterns are from chick foot/feet.
    I'm  created multiple pattern matching VI's to detect all the feet because I find it difficult/impossible to match all the feet with a single pattern/template.
    However, when using multiple pattern matching VI's some pattern matches detect the same foot, hence overlapping.
    So how can I make the overlaping pattern matches to be counted as one?
    Thank you in advance

    Thank you for replying Sir Zwired1.
    I'm still a newbie in using LabVIEW so pardon me if I can't understand fully
    The objective of my project is to detect all the feet through pattern matching and count the pattern matches made.
    "Keep a 2D array of counts, initialized to zero and the same size as your array of possible locations, and increment the value every time you get a match. If multiple pattern matching attempts result in a match a given location in your count array might be "3" but all you care about is if the number is greater than zero."
    I'm sorry, but how do you do this? BTW, I'm using vision assistant.

  • 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

  • Pattern Matching and Vision Builder 6.0

    Hi,
    When I select a ROI from an image to generate a pattern matching, Builder
    saves it as a PNG file.
    If I open this pattern in other application (Paint Shop Pro 7) to modified
    it and save as a PNG file, after I can't open this file as a pattern into
    Builder, because it is considered as a not valid PNG file.
    I have tested this case in LabView 6.i and this problem doesn't appear.
    Any solution? Thanks.

    When the template is first saved in Vision Builder, pattern matching information is stored in the header of the PNG file. This information lets LabVIEW and Vision Builder know how the template was learned. Paint Shop Pro does not keep this information in the file whenever it is saved so Vision Builder will not recognize it as a valid pattern matching template.
    Jack Arnold
    Application Engineer
    National Instruments

  • Is it pattern matching the best way to check presence and orientatio​n of components on a pcb board?

    Hi, like i ask on the title i need some hint about this. I need to program a simple AOI machine that must inspect a pcb board and find if all the components are correctly placed and oriented. I though to use the pattern matching with a good template of the object to inspect. Can it work?
    All kinds of tips that may come to your mind please tell me, because this is the first time i try a task like this. I already have some experience in image manipulation but not in AOI machines.
    Francesco.

    Hi Francesco,
    you can find some useful information here, here and here.
    I hope this will help!
    Bye,
    Licia

  • USB SNAP + colour pattern matching ( IMAQ)

    I am new to LAbView and currently  I am working on colour pattern matching with USB snap. My problem is this program keep prompt me on the IMAQ Learn Colour Pattern. I need someone to help me solve that problem.
    Another question is 'Are colour pattern matching require us to save and load file before learn a template?'
    I am using LabView 7.1 and I would appreciate anyone who help me. Thanks
    Message Edited by Chee Hou on 09-16-2009 03:46 AM
    Attachments:
    Untitled.vi ‏189 KB

    Hello Chee Hou,
    Have you tried to run the example to do color pattern matching?
    From the example, you do need to have a template picture ready when you are using the colour pattern matching.
    You need to Learn Colour Pattern and then load the pattern to do color pattern matching.
    Hope this helps.
    James
    - Meadow -
    LabVIEW 7.0 - 2011, Vision, RT, FPGA
    TestStand 3.0 - 4.5

  • 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

  • Saving Pattern matching information to an array

    I am using imaqLearnPattern function to create a template image. According the IMAQ documentation, the pattern matching information is "appended" to the image. But when I try to call the imaqImageToArray function on this template image, it does not give me any pattern matching information. Is there any way, that I can save the template data into an array? I do not want to use the imaqWriteVisionFile function because I want the data in an array format and not saved in a file.
    Thanks.

    Normally you cannot save this information without this function. This information saved in *.png file. This format have a possibilities for saving "user data", and this fact used by IMAQ Vision. Theoretically you can extract this information from *.png into array (format of png is a well known format), but what can you do with this information afterwards? You cannot load this information separately without IMAQ Read Image and Vision Info.vi, because (pretty sure) this function allocated memory for Vision Info before loading, but you not able to do this. You can make this only if you know internal representation of IMAQ image in memory. How organized common parameters, such as width, height, pixel pointer, resolution, linewidth - not very complicated (IMAQ Image -
    a cluster of string and pointer to appropriate structure), but where placed vision info - not very easy.
    Better, fastest and easyest way - to use IMAQ Write Image and Vision Info.vi.
    with best regards

  • Pattern matching for LCD function test

    Hello,
    I am writing a VI that is taking a single picture from a camera and then compares it with a template extracted before that.
    The camera is looking at LCD display and and the purpose of the matching is to find whether there is a dead pixel or sth wrong at the display. The problem is that the comparison doesn't work as expected.
    I will illustrate this with just one examples with picture attached:
    - At step 1. the template is created. (you can see RUN 2 at the top left corner at the display) 
    - At step 2. pattern matching is performed with the same mode of the LCD but a little bit tilted(score - 972 achieved)
    - At step 3. the mode is changed (you can see RUN 3 at the top left corner at the display, everything else is the same) - but however a bigger score of 974 is achieved
    Any explanation of this and some suggestions that can improve my program !?
    Thanks a lot
    Iliya G. 
    Attachments:
    1step.JPG ‏43 KB
    2step.JPG ‏42 KB
    3step.JPG ‏38 KB

    Hi David,
    I went through this OCR examples that you mentioned but in fact I find them very annoying because in many cases the output string depends on how you draw your ROI. Please, find an example below and could you please tell me if i am doing sth wrong, but in fact i don't think so.
    When I try to read the characters separetely, everythings goes ok - it finds r,u,n and 1.
    But when I make the ROI bigger in order to contain all the characters, the output is the one at the picture. Any ideas?
    Thanks,
    Iliya 
    Attachments:
    1.JPG ‏21 KB

  • 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

Maybe you are looking for

  • N85 internet call

    Hi I have a Nokia N85 which i am trying to get internet calls working on. I have downloaded and installed the VoIP settings V3 app. I can make outgoing internet calls but the phone won't receive internet calls. Any suggestions as to why this might be

  • Unix shell script to do a cold backup

    i want to do a coldback using a unix shell script. the db capacity is around 12 Tb wen the backup is done i need to zip it too.at this moment i dont want to copy to the disk. kindly help me regarding this thanks in advance NK

  • Cannot install ACR 8.4 on photoshop CC mac version - Error Code: U44M2P7

    hello, when i try to update photoshop CC's ACR 8.3 to 8.4 externally using installer titled "adobe-camera-raw_8-4_cc.dmg" i get an error message (please see below) error log file says: Photoshop Camera Raw 8.4(CC) Installation failed. Error Code: U44

  • Where is the landscape/protrait button on the print menu?

    I want to change the orientation of a photo from landscape to portrait by cropping the two ends of the landscape view, in effect zooming in on the people and leaving out the scene.  I get the photo as I like it in iPhoto using the edit feature.  When

  • Reports in Material Ledger

    Hi, Is there a report in Material Ledger showing: - consumption of all raw materials in actual price in selected month - value of production of Finished Goods in actual prices in selected month Is there a way to see the value of production of Finishe