opencv: all examples using new GoCV based code

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2017-10-05 18:01:34 +02:00
parent 3e4f5a2d1c
commit 2929791ff7
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ func main() {
if face != nil {
opencv.DrawRectangles(i, []img.Rectangle{face}, 0, 255, 0, 5)
centerX := float64(img.Size()).X * 0.5
turn := -(float64(face.Min.X - centerX) / centerX
turn := -(float64(face.Min.X - centerX)) / centerX
fmt.Println("turning:", turn)
if turn < 0 {
drone.Clockwise(math.Abs(turn * 0.4))