@@ -60,22 +60,20 @@ protected void convertImage() {
60
60
final List <Rect > rectangles = report .getRectangles ();
61
61
Mat input = report .getImage ();
62
62
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
+ }
70
68
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
+ }
75
73
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 );
79
77
}
80
78
final Mat convertInput = tmp ;
81
79
final int numRegions = rectangles .size ();
0 commit comments