Go to Post what is integration if not a compromise? - Kris Verdeyen [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 26-01-2013, 11:50
JM033's Avatar
JM033 JM033 is offline
Registered User
AKA: J
FRC #0240 (Tempest)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2009
Location: Michigan
Posts: 46
JM033 is an unknown quantity at this point
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.

Last edited by JM033 : 26-01-2013 at 11:55.
Reply With Quote
  #2   Spotlight this post!  
Unread 26-01-2013, 12:23
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #3   Spotlight this post!  
Unread 26-01-2013, 13:03
JM033's Avatar
JM033 JM033 is offline
Registered User
AKA: J
FRC #0240 (Tempest)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2009
Location: Michigan
Posts: 46
JM033 is an unknown quantity at this point
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.

Last edited by JM033 : 26-01-2013 at 14:20.
Reply With Quote
  #4   Spotlight this post!  
Unread 26-01-2013, 14:20
JM033's Avatar
JM033 JM033 is offline
Registered User
AKA: J
FRC #0240 (Tempest)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2009
Location: Michigan
Posts: 46
JM033 is an unknown quantity at this point
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'
Reply With Quote
  #5   Spotlight this post!  
Unread 26-01-2013, 17:51
JM033's Avatar
JM033 JM033 is offline
Registered User
AKA: J
FRC #0240 (Tempest)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2009
Location: Michigan
Posts: 46
JM033 is an unknown quantity at this point
Re: Invalid Template image

I quit
Reply With Quote
  #6   Spotlight this post!  
Unread 26-01-2013, 18:28
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #7   Spotlight this post!  
Unread 27-01-2013, 23:38
JM033's Avatar
JM033 JM033 is offline
Registered User
AKA: J
FRC #0240 (Tempest)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2009
Location: Michigan
Posts: 46
JM033 is an unknown quantity at this point
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
Reply With Quote
  #8   Spotlight this post!  
Unread 28-01-2013, 05:58
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,752
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
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
Reply With Quote
  #9   Spotlight this post!  
Unread 28-01-2013, 11:10
JM033's Avatar
JM033 JM033 is offline
Registered User
AKA: J
FRC #0240 (Tempest)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2009
Location: Michigan
Posts: 46
JM033 is an unknown quantity at this point
Re: Invalid Template image

Alright, I'll try when I get back in the lab, ty
Reply With Quote
  #10   Spotlight this post!  
Unread 28-01-2013, 11:37
JM033's Avatar
JM033 JM033 is offline
Registered User
AKA: J
FRC #0240 (Tempest)
Team Role: Leadership
 
Join Date: Jan 2013
Rookie Year: 2009
Location: Michigan
Posts: 46
JM033 is an unknown quantity at this point
Re: Invalid Template image

Instead of smartdashboard variables can I use network tables for labview? or why not UDP? UDP seems easier?

Last edited by JM033 : 28-01-2013 at 13:10.
Reply With Quote
  #11   Spotlight this post!  
Unread 28-01-2013, 13:41
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
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.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:50.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi