Go to Post A good robot with great strategy beats a great robot with good strategy. - Brian Maher [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 02-03-2012, 16:37
heya101 heya101 is offline
Registered User
FRC #3699
 
Join Date: Mar 2011
Location: Minnesota
Posts: 11
heya101 is an unknown quantity at this point
Vision Question

So I'm able to get the vision processing code to work fine when its connected to the laptop, only, when its in the intensity tabs. The color tab isn't able to recognize the rectangle for me. I'm wondering how I would change the code so that when the vision processing is running on the robot, it automatically uses the intensity tab to find the distance.

Also I've noticed that when the hoop is angled away from the camera the distance starts to become off by about 1-3 ft. I tried correcting this by having the distance.vi use the top-bottom to calculate the distance, but then my distances were off by 5-8 ft.

If anyone could help me with these problems I would greatly appreciate it.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-03-2012, 08:10
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: Vision Question

Color mode will not work without calibrating it to your robot's source color. You can do that by clicking on the color in the image. To change the color or change it to intensity mode, be sure to right click on the control you want to change and select the menu item Data Operations>>Make Current Value the Default. The next run/build will use this as the initial value.

When you changed the distance code to use the height, did you change the constants for the tape length and the image size? The rect is 24" wide and 18" high, and the camera is 320 wide, but 240 high.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 03-03-2012, 11:09
heya101 heya101 is offline
Registered User
FRC #3699
 
Join Date: Mar 2011
Location: Minnesota
Posts: 11
heya101 is an unknown quantity at this point
Re: Vision Question

I've clicked on the color with out white LED attached to the camera, but the rectangle still doesnt get recognized in color mode, which is why I've been using intensity.

Also with the distance error, I changed the measurement to 1.5ft, and used the y image resolution instead of the default x, yet I still keep getting measurements that are 5 or more feet off.
Reply With Quote
  #4   Spotlight this post!  
Unread 03-03-2012, 11:45
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: Vision Question

Ahh. White lighting doesn't have a very distinct color, so yes, intensity is the right solution. If you post the modified distance code or a picture of it, I'm sure someone will be able to help find the issue.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 03-03-2012, 13:42
heya101 heya101 is offline
Registered User
FRC #3699
 
Join Date: Mar 2011
Location: Minnesota
Posts: 11
heya101 is an unknown quantity at this point
Re: Vision Question

Heres the code for the distance:

Reply With Quote
  #6   Spotlight this post!  
Unread 03-03-2012, 13:51
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: Vision Question

The code you attached is dividing 1.5 by the width (left - right). Change that to use the height of the bounding box.

Greg McKaskle
Reply With Quote
  #7   Spotlight this post!  
Unread 03-03-2012, 14:04
heya101 heya101 is offline
Registered User
FRC #3699
 
Join Date: Mar 2011
Location: Minnesota
Posts: 11
heya101 is an unknown quantity at this point
Re: Vision Question

So if I change left and right to top and bottom it should be fine?
Reply With Quote
  #8   Spotlight this post!  
Unread 03-03-2012, 14:11
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: Vision Question

That is how I'd do it.

Greg Mckaskle
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 22:13.

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