Skip to content

Commit

Permalink
imgproc: elaborate on HoughLines test to fetch a few individual results
Browse files Browse the repository at this point in the history
Signed-off-by: deadprogram <[email protected]>
  • Loading branch information
deadprogram committed Dec 4, 2017
1 parent 8b1f2ae commit 7f12cb9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions imgproc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,22 @@ func TestHoughLines(t *testing.T) {
if dest.Cols() != 1 {
t.Errorf("Invalid HoughLines test cols: %v", dest.Cols())
}

if dest.GetFloatAt(0, 0) != 0 && dest.GetFloatAt(0, 1) != 0 {
t.Errorf("Invalid HoughLines first test element: %v, %v", dest.GetFloatAt(0, 0), dest.GetFloatAt(0, 1))
}

if dest.GetFloatAt(1, 0) != 0.99483764 && dest.GetFloatAt(1, 1) != 0 {
t.Errorf("Invalid HoughLines second test element: %v, %v", dest.GetFloatAt(1, 0), dest.GetFloatAt(1, 1))
}

if dest.GetFloatAt(10409, 0) != -118.246056 && dest.GetFloatAt(10409, 1) != 2 {
t.Errorf("Invalid HoughLines penultimate test element: %v, %v", dest.GetFloatAt(10409, 0), dest.GetFloatAt(10409, 1))
}

if dest.GetFloatAt(10410, 0) != -118.246056 && dest.GetFloatAt(10410, 1) != 2 {
t.Errorf("Invalid HoughLines last test element: %v, %v", dest.GetFloatAt(10410, 0), dest.GetFloatAt(10410, 1))
}
}

func TestHoughLinesP(t *testing.T) {
Expand Down

0 comments on commit 7f12cb9

Please sign in to comment.