Nishar Federer Posted November 28, 2017 Report Share Posted November 28, 2017 hi, My intention is to compare the template image with the run time image . I used normal pattern matching technique but i m not getting the proper output . The output is keeps on varying , sometimes i used to get "0"as number of matches and "1 " as number of matches found even with the proper template and same run time image as well as it is getting same output with the wrong template as well . I even changed the Match score but there is no response . can any one suggest me way to resolve the issue. I have attached the vi. The template and real image i cannot able to upload because of the error smart Crind POC.vi Quote Link to comment
caleyjag Posted November 28, 2017 Report Share Posted November 28, 2017 Can you save as LabVIEW 2016 so I can look at it? Quote Link to comment
Nishar Federer Posted November 29, 2017 Author Report Share Posted November 29, 2017 ya sure caleyjag.. I have attached the VI with the older version. Regards, Nishar smart Crind POC.vi Quote Link to comment
caleyjag Posted November 29, 2017 Report Share Posted November 29, 2017 Ok. Hard to run without your template images. If you can provide some images (maybe PM me privately) I can help with that. I would need both the template and raw images (which I can see you are recording each run.) For now, everything looks okay but it looks like you are running with a image match score of 985/1000. This is typically very high and with camera noise you may well get fails with that high of a setting. Not sure about the output with the wrong template though. I would need to see an example of that. Couple of other notes (my personal preferences, does not relate to your main problem) 1. I recommend linking the error cluster between all the VIs. This is very useful for trying to figure out where things go wrong. The Vision VIs are usually pretty good at flagging useful errors this way. 2. There is a color plane extraction VI in the Vision Utilities>Color Utilities pallette so you don't need the one generated from Vision Assistant. Quote Link to comment
Nishar Federer Posted November 29, 2017 Author Report Share Posted November 29, 2017 ya thanks for your response. I will agree for your suggestion and will try to add the codes which you suggested. I have added the files for your reference both raw image and the template to be compared. Regards, Nishar template.zip Quote Link to comment
caleyjag Posted December 1, 2017 Report Share Posted December 1, 2017 Try this. Seems to work for me now. Notes: 1. You will need to enable the camera capture code. 2. I added terms to define the types of image you were loading (RGB). This mitigated an error in the extract HSV value plane VI. (Note: I was able to find this because I wired the error cluster all the way through - good habit to get into.) 3. You didn't have the Parameter constant wired in each of your match template cases. I added that in although it should be working fine off the default value (800/1000). smart Crind POC_caleyjag.vi Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.