01-18-2015 04:41 AM
This project is to match multiple templates, then i copied the method from the example "Match Multiple Geometric Pattens", but the error says:
Error -1074395989 occurred at IMAQ ReadImageAndVisionInfo
Possible reason(s):
IMAQ Vision: Unable to read data.
The problem is that the programming works if I use the labview example's templates. However,when i use the templates which generated by myself, the error appears. I have checked the format and pixels of my generated template, which looks indentical to the example's template.
Could anybody help me to figure this out? I have attached my docs below.
Thanks.
Dylan
01-18-2015 10:32 PM
01-19-2015 02:59 AM
Hello,
it seems that you did not correctly create the templates. There is no Vision info present in your case.
If you reaplace the "IMAQ Read Image and Vision Info" with "IMAQ ReadFile" you will get no error (but then, you will not be able to perform the matching). You can check if there is any Vision info present using "IMAQ Is Vision Info Present".
You need to properly "train" the templates in order to make your application work.
Also, I second udka's suggestion - you should clean your code (not for the sake of us, but for your traceability and readabiltiy later on). Try using subvi's and remember dataflow.
Best regards,
K
01-19-2015 03:43 AM - edited 01-19-2015 03:48 AM
Hi Uday
Very appreiciate for your reply. Let me appologize of my messy code firstly, this is my first time to use labview to deal with my project, I am learning how to tidy up the code now.
I generated my template by simply screen shot, and then edit it to black-and-white format and 170*170 pixel, which is same as the templates given by labview example.
Regards,
Dylan
01-19-2015 03:47 AM
Hey Klemen,
Can you explain more of "No vision info"? I am a new to labview. What kind of Vision Info are required by labview?
I am so sorry about my messy code, I am learning to tide up my code now.
Very appreciate for your reply! Thank you!
Regards,
Dylan
01-19-2015 04:29 AM
Hello,
Labview Geometric matching uses a set of features/descriptors to describe the meaningful information contained in an image. You need to extract these descriptors to permorm the matching.
Here is an example on how to create the pattern matching templates in Labview (you can alternatively use the Template Editor utility):
(see the attachment in the solution post). You can easily adapt this to learn geometric template (just modify/replace the relevant vi.'s).
Don't use screen shots to create the templates. Create a template directly from the image.
Best regards,
K
01-19-2015 08:54 AM
Thank you Klemen,
The problem is finally solved!! Very appreciate your help!
Regards,
Dylan
03-14-2015 02:42 PM
How did u solve the problem exactly and why you used aVI FILE PATH to try to track it and not a template