|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Camera Calibration in Java Visible in Dashboard View
Hey Folks,
We are interested in making camera calibration possible via the dashboard. We have some code that allows us to receive values from the Analog Sliders on the dashboard. We then used those values to change "camera" settings. Unfortunately, we see no evidence of the dashboard camera image changing (like when we do a 180 degree rotation or a brightness adjust). Is it possible to make adjustments via Java to the camera that show up on dashboard? If so, where do we go to learn more? Can we do this without modifying the LabView dashboard? We've looked through the 2011 WPI Lib Reference doc. We went through the NI Vision Tutorial doc. We've also looked through all the FRC Java docs. Any thoughts would be appeciated. |
|
#2
|
|||
|
|||
|
Re: Camera Calibration in Java Visible in Dashboard View
Have you tried something like this?
Code:
import ...AxisCamera;
import ...DriverStation;
public class CameraControl{
AxisCamera ac = AxisCamera.getInstance();
DriverStation ds = DriverStation.getInstance();
public CameraControl(){
updateCameraControl();
}
public void updateCameraControl(){
//convert to 0..100 int
int brightness = (int)(ds.getAnalogIn(1) * 100.0/5.0);
ac.writeBrightness(brightness);
}
}
|
|
#3
|
||||
|
||||
|
Re: Camera Calibration in Java Visible in Dashboard View
We did those things, but not using the updateCameraControl method. Instead, we just placed the update code in teleop Periodic and expected the looping to allow the adjustment to take place. We'll give your code a try.
Thanks. |
|
#4
|
|||
|
|||
|
Re: Camera Calibration in Java Visible in Dashboard View
Quote:
).Can you get the input from AnalogIn directly? You can see the value is actually changing? Can you set the brightness et al. from the Axis camera app? Do any of the wpilibj camera functions work for you? I know you tried a 180 and brightness already, any others? |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|