|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
will this work for adding camera code to python?
Code:
class camera {
%TypeHeaderCode
#include <WPILib/Vision/AxisCamera.h>
%End
public:
AxisCamera cam = AxisCamera.GetInstance();
}
Last edited by Robototes2412 : 13-01-2011 at 00:06. Reason: wrong line |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
||||
|
||||
|
Re: will this work for adding camera code to python?
do you have to mod the dashboard for this to work?
|
|
#4
|
|||
|
|||
|
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 |
|
#5
|
||||
|
||||
|
Re: will this work for adding camera code to python?
can you attatch a precompiled version?
|
|
#6
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|