Invalid color template image?

Hey, this is my first year in FIRST and I’ve been assigned the job of learning and programming the camera/vision assistant in LabVIEW. I have made a VI that finds a template image in an image, such as the camera, but there seems to be a problem with it. If I pass an image that I retrieved using IMAQ ReadFile, the program works fine and will return matches. But once I use it with the axis camera, the VI gives me an error:

Error -1074395384 occurred at IMAQ Match Color Pattern

Possible reason(s):

IMAQ Vision: (Hex 0xBFF60708) Invalid color template image.

I’ve zipped an outline of the project. If anyone could give me some advice, it’d be greatly appreciated! This has been frustrating me and the other programmers in the team for the whole week!

Find Target Using (535 KB)

Find Target Using (535 KB)

I didn’t have time to look at your project, but it sounds like you’ve built vision stuff that at runtime will be fed a file. The LV compiler takes care of downloading the code, but doesn’t know enough to take care of files. You should ftp the template file to your cRIO file system, then update the path in your code to point to the new location.

The two color vision examples were just uploaded to the NI and WPI sites yesterday, and you may want to look at those to see how well they work.

Greg McKaskle

Ok, that makes sense. How do you send the cRIO the file through FTP? I’m ignorant as to the different protocols of the internet :frowning:

This isn’t the most robust, but if you open a File Explorer window such as My Documents, and type ftp://10.x.y.2 where x.y is your team number, that should get you a file window pointing to the cRIO. you can then create folders and drill in and out similar to Windows.

I mention this isn’t robust because it works fine most times, but sometimes Windows “remembers” what things look like and doesn’t really show you what is on the cRIO – very annoying, and I don’t know of a good way to synch it up.

For that reason, people may tell you to get a real ftp client. Google for a free ftp client and you will find lots. You then connect to the 10.x.y.2 number and use their UI to do what you want.

Greg McKaskle