Commit Graph

19 Commits

Author SHA1 Message Date
Peter Johnson
7ddbf20108 Create VideoCamera base class and move camera settings functions to it.
This makes them available for both UsbCamera and HttpCamera / AxisCamera.

To avoid virtual functions in the public-facing interface, move the
implementation of the camera settings functions to the core library.
2017-01-02 23:17:00 -08:00
Peter Johnson
4c8c41fdc0 CvSink: Support grayscale images.
Also support 4-channel BGRx images and provide better error reporting
on bad images passed to PutFrame.
2016-12-23 22:25:11 -08:00
Peter Johnson
d6ef2c04a5 Start refactoring source property implementations. 2016-12-22 21:19:50 -08:00
Peter Johnson
ce69783871 UsbCamera: Scale some properties to make them constently percentages.
The "raw" version of these properties are still available, just prefixed
with "raw_".
2016-12-22 20:51:04 -08:00
Peter Johnson
80abf6bf24 Support per-stream resolution settings.
The code now automatically resizes as required.

This change also disconnects camera resolution settings from MJPEG
stream connections; setting the camera resolution can now only be done
via code.
2016-12-20 20:48:31 -08:00
Peter Johnson
8501b7c9e2 CvSourceImpl::CreateProperty(): Use lock_guard instead of unique_lock. 2016-12-18 09:13:52 -08:00
Peter Johnson
7c2f994a66 Refactor source IsConnected() and connected notification. 2016-12-18 09:05:03 -08:00
Thad House
3625f11e08 Adds C methods that take a cv::Mat* (#21)
Some implementations of OpenCV use cv::Mat as their native pointer
rather then CvMat, so we need to support both in the C interface
2016-11-30 22:00:44 -08:00
Peter Johnson
22c11fad36 Notify source property events. 2016-11-18 12:41:08 -08:00
Peter Johnson
c6b527d452 Notify source connect, disconnect, and video mode changes. 2016-11-18 12:41:08 -08:00
Peter Johnson
b245725941 Notify on source and sink create and destroy. 2016-11-18 12:41:08 -08:00
Peter Johnson
791cabbc26 Rename Type to Kind. 2016-11-18 12:41:08 -08:00
Peter Johnson
3381340eb5 Add method to get source/sink type.
Also provide convenience method to enumerate all sinks connected to a source.
2016-11-18 12:41:08 -08:00
Peter Johnson
254b88bdbe Start adding support for non-MJPEG frame types.
Not yet supported by MJPEGServer.
2016-11-18 12:40:31 -08:00
Peter Johnson
f83ff41e47 Rename from cameraserver to cscore.
This is primarily to avoid header naming conflicts with wpilib.
2016-11-05 22:11:55 -07:00
Peter Johnson
e10b399f51 CvSource: Implement NotifyError. 2016-10-28 00:47:18 -07:00
Peter Johnson
39a8195386 CvSourceImpl: Add stub for CreateProperty(callback). 2016-10-28 00:46:43 -07:00
Peter Johnson
7ca6c5ef34 Remove RemoveSourceProperty. 2016-10-24 22:29:58 -07:00
Peter Johnson
511d551546 Implement most CvSource functionality. 2016-10-24 20:27:00 -07:00