Go to Post FIRST has taught me to mind my semicolons. - ComradeNikolai [more]
Home
Go Back   Chief Delphi > Technical > Programming > Python
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 13-01-2011, 00:05
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
will this work for adding camera code to python?

Code:
class camera {
%TypeHeaderCode
#include <WPILib/Vision/AxisCamera.h>
%End

public: 
AxisCamera cam = AxisCamera.GetInstance();
}
as camera.sip? All i need for my team's robot this year is the Robot's POV, so this should do it, right?

Last edited by Robototes2412 : 13-01-2011 at 00:06. Reason: wrong line
Reply With Quote
  #2   Spotlight this post!  
Unread 13-01-2011, 01:37
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,748
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: will this work for adding camera code to python?

If you are interested in streaming the camera to the dashboard, you may want to consider connecting it directly to the switch on the robot. By bypassing the cRIO, the dashboard can directly communicate to the camera, and no code on the cRIO is involved.

Greg McKaskle
Reply With Quote
  #3   Spotlight this post!  
Unread 13-01-2011, 11:47
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: will this work for adding camera code to python?

do you have to mod the dashboard for this to work?
Reply With Quote
  #4   Spotlight this post!  
Unread 13-01-2011, 12:05
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,748
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: will this work for adding camera code to python?

Yes. You would modify the dashboard to directly request jpg or even better an mjpg stream from the camera.

When I get back into town, I'm going to put up another dashboard example written in LV which will do this, will parse headers to extract the jpgs from the mjpg stream, decode them into an image, and display them. I didn't get to this before I had to leave town.

Greg McKaskle
Reply With Quote
  #5   Spotlight this post!  
Unread 13-01-2011, 19:32
Robototes2412's Avatar
Robototes2412 Robototes2412 is offline
1 * 4 != 14
FRC #2412 (Robototes)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2007
Location: Bellevue
Posts: 312
Robototes2412 is on a distinguished road
Re: will this work for adding camera code to python?

can you attatch a precompiled version?
Reply With Quote
  #6   Spotlight this post!  
Unread 13-01-2011, 20:06
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,748
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: will this work for adding camera code to python?

I'd be happy to help you understand the approach. I'm out of the country and don't have the code with me.

As for posting a library, I'd prefer to show and teach you the LV code. It is really just an http request a little string parsing, and then you call NIVision to decode into an image. Then you can decide how you want to build your dashboard, or you can use the LV one.

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 06:26.

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