Go to Post everyone in FIRST has to do the cha cha slide at least once per season to get it out of their system. Now I can go back to doing it in the privacy of my own car (if you see a red Jeep in CT swerving back and forth don't worry, it's just me doing the slide...)! - KathieK [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 26-01-2017, 22:28
grady404 grady404 is offline
Registered User
FRC #4019
 
Join Date: Jan 2017
Location: Los Angeles
Posts: 1
grady404 is an unknown quantity at this point
Question How to initialize ColorImage object

So for whatever reason I can't figure out for the life of me how to initialize a ColorImage object. I have the following code inside of my robot class:

Code:
static USBCamera camera = new USBCamera("cam0");
static HSLImage snapshot = // what do I put here?

public void teleopInit() {
    camera.openCamera();
    camera.setExposureAuto();
    camera.startCapture();
}

public void teleopPeriodic() {
    camera.getImage(snapshot.image);
    CameraServer.getInstance().setImage(snapshot.image);
}
Problem is I just can't figure out what line of code I'm supposed to put to initialize the HSLImage object (or RGBImage, or any other type of ColorImage). I've tried the constructor, new HSLImage(), which takes a String for the file path. First of all, there shouldn't be a file path since it's receiving data from the camera directly, and second of all when I do pass in a string I receive an NIVisionException. What do I do? Any help would be greatly appreciated.
Reply With Quote
 


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 09:45.

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