@@ -60,22 +60,20 @@ protected void convertImage() {
6060 final List <Rect > rectangles = report .getRectangles ();
6161 Mat input = report .getImage ();
6262
63- // If rectangles were found, draw them on the image before displaying it
64- if (!rectangles .isEmpty ()) {
65- if (input .channels () == 3 ) {
66- input .copyTo (tmp );
67- } else {
68- cvtColor (input , tmp , CV_GRAY2BGR );
69- }
63+ if (input .channels () == 3 ) {
64+ input .copyTo (tmp );
65+ } else {
66+ cvtColor (input , tmp , CV_GRAY2BGR );
67+ }
7068
71- // If we don't want to see the background image, set it to black
72- if (!this .showInputImage ) {
73- bitwise_xor (tmp , tmp , tmp );
74- }
69+ // If we don't want to see the background image, set it to black
70+ if (!this .showInputImage ) {
71+ bitwise_xor (tmp , tmp , tmp );
72+ }
7573
76- for ( Rect r : rectangles ) {
77- rectangle ( tmp , r , Scalar . WHITE , 3 , LINE_8 , 0 );
78- }
74+ // If rectangles were found, draw them on the image before displaying it
75+ for ( Rect r : rectangles ) {
76+ rectangle ( tmp , r , Scalar . WHITE , 3 , LINE_8 , 0 );
7977 }
8078 final Mat convertInput = tmp ;
8179 final int numRegions = rectangles .size ();
0 commit comments