@@ -128,32 +128,38 @@ vector<vector<Point> > getCropOfToDoLines(vector<vector<Point> > checkboxes, Mat
128
128
129
129
130
130
// Draw rectangle
131
- rectangle (
132
- mbgra,
133
- Rect (a,
134
- b,
135
- c,
136
- d), Scalar (200 , 200 , 0 , 255 ), 2 );
131
+ // rectangle(
132
+ // mbgra,
133
+ // Rect(a,
134
+ // b,
135
+ // c,
136
+ // d), Scalar(200, 200, 0, 255), 2);
137
137
138
138
139
139
// Draw cross-hairs
140
140
int width = mbgra.size [0 ];
141
141
int height = mbgra.size [1 ];
142
- line (mbgra, Point (width * 0.5 , height * 0.4 ),
143
- Point (width * 0.5 , height * 0.6 ), Scalar (0 , 0 , 0 , 255 ), 2 );
144
- line (mbgra, Point (width * 0.4 , height * 0.5 ),
145
- Point (width * 0.6 , height * 0.5 ), Scalar (0 , 0 , 0 , 255 ), 2 );
142
+ line (mbgra
143
+ , Point (rect.x , 0 )
144
+ , Point (rect.x , height )
145
+ , Scalar (200 , 200 , 0 , 255 )
146
+ , 2 );
147
+ line (mbgra
148
+ , Point (rect.x + rect.width , 0 )
149
+ , Point (rect.x + rect.width , height)
150
+ , Scalar (200 , 0 , 0 , 255 )
151
+ , 2 );
146
152
147
153
148
154
// cvLine(mbgra, pt1, pt2, Scalar(0, 200,200, 255), 2)
149
- Mat imgroi = mbgra (Rect (a, b, c, d));
155
+ // Mat imgroi = mbgra(Rect(a, b, c, d));
150
156
151
157
// CString cs;
152
158
// cs.Format("/sdcard/Todos/temp%d", i);
153
159
// LOGI(cs);
154
160
155
161
// imwrite(cs, imgroi);
156
- imwrite (" /sdcard/Todos/afilename.png" , imgroi);
162
+ // imwrite("/sdcard/Todos/afilename.png", imgroi);
157
163
158
164
159
165
}
0 commit comments