View Single Post
  #27   Spotlight this post!  
Unread 30-01-2015, 13:19
brk brk is offline
Registered User
FRC #0180
 
Join Date: Feb 2013
Location: Florida
Posts: 11
brk is an unknown quantity at this point
Re: OpenCV for RoboRio - Release

Quote:
Originally Posted by mikhail View Post
I wonder the same but in C++. What would be the best way to do something similar to imshow() but on the driver station's dashboard?

So I'm trying to do the same in C++.
I'd like to capture/process the stream on the roborio, but then send the processed image back to the driver station.

As far as I can tell, you need to get a JPEG image and send that back. The capture gives me a cv::Mat object back, I manipulate it, but then how to I send that cv::Mat data back to the driver station? Is it already in JPEG format? or do I need to convert it. And where do I access a JPEG stream within the cv::Mat ? I know, I know, this is a CV question, but this is the first time working with CV.


edit - found my answer...
Just need to convert the Mat to an array using cv::imencode() and send that back to the DS.

Last edited by brk : 30-01-2015 at 15:10. Reason: found answer