From 3e58a4228bff78e2c51136312337fc4b47efa587 Mon Sep 17 00:00:00 2001 From: jaseg Date: Wed, 2 Jun 2021 12:13:52 +0200 Subject: Fix small logical error in tests --- svg-flatten/src/nopencv_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svg-flatten/src/nopencv_test.cpp b/svg-flatten/src/nopencv_test.cpp index 5eedfe1..eae17e2 100644 --- a/svg-flatten/src/nopencv_test.cpp +++ b/svg-flatten/src/nopencv_test.cpp @@ -245,7 +245,7 @@ static void test_polygon_area(const char *fn) { } double pos_sum = 0.0; - double neg_sum = black_px_count; + double neg_sum = ref_img.size(); gerbolyze::nopencv::find_blobs(ref_img, [&pos_sum, &neg_sum](Polygon_i& poly, ContourPolarity pol) { double area = polygon_area(poly); //cerr << endl << fn << ": " << area << " " << pos_sum << " / " << neg_sum << " -- " << white_px_count << " / " << black_px_count << " GOT: " << poly.size() << " w/ " << pol << endl; -- cgit