Skip to content

Commit

Permalink
Use OpenCV 2.4, as well as switch to main fork of go-opencv
Browse files Browse the repository at this point in the history
  • Loading branch information
deadprogram committed Feb 20, 2016
1 parent d7b2a33 commit f55cd94
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/opencv_face_detect.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime"
"time"

cv "github.com/hybridgroup/go-opencv/opencv"
cv "github.com/lazywei/go-opencv/opencv"
"github.com/hybridgroup/gobot"
"github.com/hybridgroup/gobot/platforms/opencv"
)
Expand Down
2 changes: 1 addition & 1 deletion examples/opencv_window.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package main

import (
cv "github.com/hybridgroup/go-opencv/opencv"
cv "github.com/lazywei/go-opencv/opencv"
"github.com/hybridgroup/gobot"
"github.com/hybridgroup/gobot/platforms/opencv"
)
Expand Down
14 changes: 10 additions & 4 deletions platforms/opencv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,25 @@ For more info about OpenCV click [here](http://opencv.org/)

## How to Install

This package requires `opencv` to be installed on your system
This package requires OpenCV version 2.4 to be installed on your system. Please note that it is not compatible with OpenCV 3.x at this time.

### OSX

To install `opencv` on OSX using Homebrew:
To install OpenCV on OSX using Homebrew:

```
$ brew tap homebrew/science && brew install opencv
```

### Ubuntu

Follow the official [OpenCV installation guide](http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html)
To install OpenCV on Ubuntu 14.04:

```
$ sudo apt-get install libopencv-dev
```

Or, follow the official [OpenCV installation guide](http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html)

### Windows

Expand All @@ -38,7 +44,7 @@ Example using the camera.
package main

import (
cv "github.com/hybridgroup/go-opencv/opencv"
cv "github.com/lazywei/go-opencv/opencv"
"github.com/hybridgroup/gobot"
"github.com/hybridgroup/gobot/platforms/opencv"
)
Expand Down
2 changes: 1 addition & 1 deletion platforms/opencv/camera_driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"time"

cv "github.com/hybridgroup/go-opencv/opencv"
cv "github.com/lazywei/go-opencv/opencv"
"github.com/hybridgroup/gobot"
)

Expand Down
2 changes: 1 addition & 1 deletion platforms/opencv/helpers_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package opencv

import cv "github.com/hybridgroup/go-opencv/opencv"
import cv "github.com/lazywei/go-opencv/opencv"

type testCapture struct{}

Expand Down
4 changes: 2 additions & 2 deletions platforms/opencv/utils.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package opencv

import (
cv "github.com/hybridgroup/go-opencv/opencv"
cv "github.com/lazywei/go-opencv/opencv"
)

// loadHaarClassifierCascade returns open cv HaarCascade loaded
Expand All @@ -20,7 +20,7 @@ func DrawRectangles(image *cv.IplImage, rect []*cv.Rect, r int, g int, b int, th
cv.Rectangle(image,
cv.Point{value.X() + value.Width(), value.Y()},
cv.Point{value.X(), value.Y() + value.Height()},
cv.NewScalar(b, g, r), thickness, 1, 0)
cv.NewScalar(float64(b), float64(g), float64(r), 0), thickness, 1, 0)
}
return image
}
2 changes: 1 addition & 1 deletion platforms/opencv/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime"
"testing"

cv "github.com/hybridgroup/go-opencv/opencv"
cv "github.com/lazywei/go-opencv/opencv"
"github.com/hybridgroup/gobot"
)

Expand Down
2 changes: 1 addition & 1 deletion platforms/opencv/window_driver.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package opencv

import (
cv "github.com/hybridgroup/go-opencv/opencv"
cv "github.com/lazywei/go-opencv/opencv"
"github.com/hybridgroup/gobot"
)

Expand Down
2 changes: 1 addition & 1 deletion platforms/opencv/window_driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"runtime"
"testing"

cv "github.com/hybridgroup/go-opencv/opencv"
cv "github.com/lazywei/go-opencv/opencv"
"github.com/hybridgroup/gobot"
)

Expand Down

0 comments on commit f55cd94

Please sign in to comment.