![]() |
Invalid Template image
I'm getting an error when loading my vision tracking script on my driver station, it says IMAQ: invalid color template image Any ideas?
EDIT: I followed this tutorial: https://docs.google.com/viewer?a=v&q...6Jr3M4FLLswFYQ and made a template, but still won't work. |
Re: Invalid Template image
I'm not sure that tutorial is really the best to follow compared to the 2013 white paper, but if you choose to use templates, you need to make sure the template is placed on the controller and that the code shown on page 11 of the tutorial points to the path of the template on the controller. It is possible to add the templates to the deployment script or to ftp them.
Greg McKaskle |
Re: Invalid Template image
Yes, my code points to the template.
What do you mean placed on the controller? And do I have to FTP them? EDIT: nevermind, I think I know what you mean, going to try ftp. |
Re: Invalid Template image
OK, I FTP'ed into the crio, placed the template there, and told the code to locate the template at the crio. But still get 'invalid color template image'
|
Re: Invalid Template image
I quit
|
Re: Invalid Template image
Hopefully just for dinner.
Sorry I couldn't help, but I had to run errands with my kids. Is the error coming from the Match Color Pattern or from the block that loads the image? It should tell you in the complete error message, and you can open the code and probe the error I/O to verify if you need to. Backing up a few steps, Color Pattern Matching is pretty intensive and is likely to take quite awhile to complete on the cRIO. The monochrome pattern matching will also work if you do the threshold with your color and then match for a hollow rectangle. Both color and monochrome pattern matching require pattern templates to be on the controller, which is one of the reasons the white paper didn't use them. The other approach, the one outlined in the white paper does a threshold using color or intensity to produce blobs. It then requests a number of measurements on those blobs and checks to see how rectangular, how hollow, what ratio the sides have, and other simple stuff like that. I'm not going to discourage you from exploring on your own, but there is a reason why Color Pattern Matching wasn't used in the example in the white paper. Greg McKaskle |
Re: Invalid Template image
Thanks for your insight! Not to go up on another limb but attached is the rectangular image processing SAMPLE code that labview gives you. Is everything setup correctly? Do I need to put the udp send and receive code somewhere? What about the dashboard? Does it need udp send and receive too? I want to do the processing on the lappy, not on the crio. I think the term is called "offboard image processing." Sorry If I'm asking a lot, but I just don't have a clue where everything goes even after reading some whitepapers. After reading other posts it seems everyone is successful in tracking. I just can't seem to get it. Thanks G3G
https://www.dropbox.com/sh/sc81tdp0lz69y58/ISN3YTL3AA |
Re: Invalid Template image
If you are going to do it on the dashboard laptop, I'd recommend using SmartDashboard variables.
First, create a dashboard project, then locate the loop the requests the camera and displays it. Combine that with the sample code, and send the target results back to the robot using SmartDashboard. Greg McKaskle |
Re: Invalid Template image
Alright, I'll try when I get back in the lab, ty
|
Re: Invalid Template image
Instead of smartdashboard variables can I use network tables for labview? or why not UDP? UDP seems easier?
|
Re: Invalid Template image
SmartDashboard variables are Network Tables variables, with a specific name prefix.
You can use UDP if you want. It's easy, it's simple, and it's just what you need for this kind of communication. The only reason to choose SmartDashboard is that it's already in the code and already running, but for many teams that's a very good reason. |
| All times are GMT -5. The time now is 10:52. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi