Hi, I am from team 3006, and our software section has been trying to work on taking an image from the AXIS camera and recognize a black and white template image, and finding the location of all matches above a score, for example of 800.
First thing we tried was to work in NI Vision Assistant with static images. We realized that in NI Vision, the best script was one that ran a color-plane extraction: Value plane, the doing a Color Threshold, and then using the shape matching option from the Binary Image section. We then created several more static images with the template and added some “noise”, ran these through the script, and found that it successfully recognized all sizes of the template.
Logically, from here we used the tool to create the VI, from there I ftp’ed our template image onto the robot and fixed the file path for the template. From here we ran the robot and used probes, shocked to find that the template image was only black. However, after a day or so, I saw that in the code, the automatically-created VI grabs the template on the first call, and uses whatever it gets as the template forever. I instead removed the case structure and had it continuously take in the template, and voila, the image was now there.
That was the least of our problems, from there we began to analyze the image from the camera, the color plane extraction worked perfectly, however the threshold turned the image black no matter what values I gave it. Thus, I removed the Threshold form the code, went back to Vision Assistant, removed the Color Threshold there, ran the recognition tests again, and found that it worked. Thus, the final code which we tested, read the template continuously, and only used a Value-plane extraction.
From here, all the inputs to the Shape matching VI seemed to all be correct when probed, the template was there, as was the black and white image, yet no matter what sort of shape matching, template matching VI we switched in, none of them recognized the template.
Anyone have any ideas how to proceed from here, sorry for the long explanation, but I find it helps people to understand a problem if they have some background.