mirror of
https://github.com/gen2brain/cam2ip.git
synced 2026-01-08 15:48:30 +00:00
Fix cv3 build
This commit is contained in:
@@ -33,7 +33,7 @@ func New(index int) (camera *Camera, err error) {
|
|||||||
|
|
||||||
// Read reads next frame from camera and returns image.
|
// Read reads next frame from camera and returns image.
|
||||||
func (c *Camera) Read() (img image.Image, err error) {
|
func (c *Camera) Read() (img image.Image, err error) {
|
||||||
ok := c.camera.Read(*c.frame)
|
ok := c.camera.Read(c.frame)
|
||||||
if !ok {
|
if !ok {
|
||||||
err = fmt.Errorf("camera: can not grab frame")
|
err = fmt.Errorf("camera: can not grab frame")
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ func New(filename string) (video *Video, err error) {
|
|||||||
|
|
||||||
// Read reads next frame from video and returns image.
|
// Read reads next frame from video and returns image.
|
||||||
func (v *Video) Read() (img image.Image, err error) {
|
func (v *Video) Read() (img image.Image, err error) {
|
||||||
ok := v.video.Read(*v.frame)
|
ok := v.video.Read(v.frame)
|
||||||
if !ok {
|
if !ok {
|
||||||
err = fmt.Errorf("video: can not grab frame")
|
err = fmt.Errorf("video: can not grab frame")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user