|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Accessing camera output
We want to access the camera output in order to draw lines on the video.
Is there any way to do this so that the drawings appear on the driver station as the video is shown in realtime? Notes: -Using Java. -The shapes do not cover the whole picture, only a small portion. The rest of the video should still be playing in realtime. |
|
#2
|
|||
|
|||
|
Re: Accessing camera output
Any ideas?
|
|
#3
|
||||
|
||||
|
Re: Accessing camera output
Your best bet is to just edit your dashboard and just add a line to the display. Are you using the Smart Dashboard (gray in color) or the Labview Dashboard (Blackish in color)?
|
|
#4
|
||||
|
||||
|
Re: Accessing camera output
If you are using Java I'll assume you are suing the SmartDashboard, then you can make a extension which extends the WPICameraExtension, and then you can overide the process image method- using rawImage.drawPolygon(I think there a more methods you can use tlike drawLine or drawRectangle) and then return the new rawImage.
This way you will have whatever shape you pick on the camera Image and the video running behind it ![]() |
|
#5
|
|||
|
|||
|
Re: Accessing camera output
I am using the SmartDashboard.
|
|
#6
|
|||
|
|||
|
Re: Accessing camera output
Quote:
|
|
#7
|
||||
|
||||
|
Re: Accessing camera output
You need to install http://firstforge.wpi.edu/sf/frs/do/.../frs.installer
And then import everything under C:\Program Files\SmartDashboard and C:\Program Files\SmartDashboard\extensions and C:\Program Files\SmartDashboard\extensions\lib into your Java Class Library (a type of project you can start in Netbeans) You will want to have your extension class extend WPICameraExtension. You will also want to override the method processImage, as sretter has said. Last edited by Johnbot : 13-01-2013 at 22:58. Reason: Fixed misinformation |
|
#8
|
|||
|
|||
|
Re: Accessing camera output
Quote:
|
|
#9
|
||||
|
||||
|
Re: Accessing camera output
Did you tell NetBeans to include the SmartDashboard jars as libraries?
Right-click your project, click Properties, click Libraries, and hit "Add JAR/Folder" and the choose SmartDashboard.jar, and then repeat for WPICameraExtension.jar, WPIJavaCV.jar, javacpp.jar, javac-windows-x(VERSION).jar, and javac.jar. |
|
#10
|
|||
|
|||
|
Re: Accessing camera output
Quote:
|
|
#11
|
||||
|
||||
|
Re: Accessing camera output
Oops, the mistake is on my part. I told you to extend the widget for accessing the computer's camera instead of the Axis Camera.
You should be extending WPICameraExtension, not WPILaptopCameraExtension, my apologies. Last edited by Johnbot : 14-01-2013 at 16:19. |
|
#12
|
|||
|
|||
|
Re: Accessing camera output
Quote:
import edu.wpi.first.smartdashboard.camera.*; this error occurs only during compile time, mean while, when I am editing the code, I don't get the this error. God, I have been spoiled with Visual Studio and C#. |
|
#13
|
|||
|
|||
|
Re: Accessing camera output
Solved the problem, thanks to everyone who corresponded
![]() |
|
#14
|
|||||
|
|||||
|
Re: Accessing camera output
What was the solution to the problem?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|