mirror of
https://github.com/gen2brain/cam2ip.git
synced 2025-12-16 12:28:35 +00:00
Add support for OpenCV 3
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
// +build !cv3
|
||||
|
||||
// Package camera.
|
||||
package camera
|
||||
|
||||
@@ -8,49 +10,6 @@ import (
|
||||
"github.com/lazywei/go-opencv/opencv"
|
||||
)
|
||||
|
||||
// Property identifiers.
|
||||
const (
|
||||
PropPosMsec = iota
|
||||
PropPosFrames
|
||||
PropPosAviRatio
|
||||
PropFrameWidth
|
||||
PropFrameHeight
|
||||
PropFps
|
||||
PropFourcc
|
||||
PropFrameCount
|
||||
PropFormat
|
||||
PropMode
|
||||
PropBrightness
|
||||
PropContrast
|
||||
PropSaturation
|
||||
PropHue
|
||||
PropGain
|
||||
PropExposure
|
||||
PropConvertRgb
|
||||
PropWhiteBalanceU
|
||||
PropRectification
|
||||
PropMonocrome
|
||||
PropSharpness
|
||||
PropAutoExposure
|
||||
PropGamma
|
||||
PropTemperature
|
||||
PropTrigger
|
||||
PropTriggerDelay
|
||||
PropWhiteBalanceV
|
||||
PropZoom
|
||||
PropFocus
|
||||
PropGuid
|
||||
PropIsoSpeed
|
||||
PropMaxDc1394
|
||||
PropBacklight
|
||||
PropPan
|
||||
PropTilt
|
||||
PropRoll
|
||||
PropIris
|
||||
PropSettings
|
||||
PropBuffersize
|
||||
)
|
||||
|
||||
// Camera represents camera.
|
||||
type Camera struct {
|
||||
camera *opencv.Capture
|
||||
@@ -86,8 +45,8 @@ func (c *Camera) GetProperty(id int) float64 {
|
||||
}
|
||||
|
||||
// SetProperty sets a camera property.
|
||||
func (c *Camera) SetProperty(id int, value float64) int {
|
||||
return c.camera.SetProperty(id, value)
|
||||
func (c *Camera) SetProperty(id int, value float64) {
|
||||
c.camera.SetProperty(id, value)
|
||||
}
|
||||
|
||||
// Close closes camera.
|
||||
|
||||
Reference in New Issue
Block a user