Go to Post Angry Teams will not get the field going any quicker trust me on that! - mtaman02 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 06-02-2016, 20:15
The Doctor's Avatar
The Doctor The Doctor is offline
Robotics is life
AKA: Hackson
FRC #3216 (MRT)
Team Role: Programmer
 
Join Date: Mar 2014
Rookie Year: 2013
Location: United States
Posts: 152
The Doctor is on a distinguished road
Running a custom deinterlacng program on the driver station

I'm trying to get two cameras running on our robot this year. I've started putting some code into our main program [Java]:

globals:
Code:
final int numcameras = 2; // we've got this many cameras
int[] cameras;
int curcamera;
NIVision.Image curframe;
CameraServer cserver;
init:
Code:
curframe = NIVision.imaqCreateImage(NIVision.ImageType.IMAGE_RGB, 0);
for (int i = 0; i < numcameras; i++) {
	cameras[i] = NIVision.IMAQdxOpenCamera("cam" + (i+1), NIVision.IMAQdxCameraControlMode.CameraControlModeController);
	NIVision.IMAQdxConfigureGrab(cameras[i]);
}
curcamera = 0;
cserver = CameraServer.getInstance();
periodic:
Code:
curcamera += 1; curcamera %= numcameras;
NIVision.IMAQdxGrab(cameras[curcamera], curframe, 1);
cserver.setImage(curframe);
...However, this code will rapidly switch between the cameras. What I want to do is write a program to run on the driver station, to "deinterlace" the images, by displaying every other frame in its own spot. I'm quite fluent in Processing (Java with some cool libraries), which would make deinterlacing the images easy if I had the image stream available... My question is: how do I get raw image data from the robot on the driver station? I ideally want a solution that can work through the FMS.

Is there a part of the NIVision library that can receive this stream? Or do I need another Java library? And how is it possible to access the video stream with third-party programs in the DS?
__________________
Robots + Python + pentesting == me;
Blog ~ GitHub ~ Keybase
If you have a pressing issue to discuss with me, kik me at slush.puddles since I don't check CD very often.
 


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 03:56.

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