|
Re: Clarity on Smart Dashboard Camera Mechanism
Quote:
Originally Posted by sgk525
Thanks, so what will basically happen is I will start an MPEG server on my raspberry pi that is updating frames and sending to the the url you specified, the roborio's background CameraServer class will grab these frames according to the url ( http://10.x.y.z:9090/stream.mjpg), and will then send the images to the smartdashboard on the computer?
Also, what might be a faster way of uploading these frames to byte format, because even on my desktop, I am noticing significant lag.
|
No, the SmartDashboard will connect directly to the Raspberry Pi, bypassing the roboRio entirely.
OpenCV does not provide a way to avoid the decompress+recompress. If you aren't actually editing the images being sent to the dashboard, you can use the cscore library that we use on the roboRio to both send the original camera JPEG via HTTP in the lowest overhead way possible and make it available for OpenCV processing. There's a Java tutorial for this here: http://wpilib.screenstepslive.com/s/...essing-in-java. The RobotPy folks are working on a cscore wrapper that should make this possible to do in Python, but there's not an existing tutorial that I know of.
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC
2010 FRC World Champions ( 294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)
|