opencv: all examples using new GoCV based code
Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
parent
3e4f5a2d1c
commit
2929791ff7
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue