fix crash when sample point out of image boundaries

This commit is contained in:
Jiri Drbalek 2014-12-22 21:01:17 +00:00
parent d9f159a554
commit d71e001736

View File

@ -89,7 +89,7 @@ public:
int step_y = images[0].rows / y_points;
for(int i = 0, x = step_x / 2; i < x_points; i++, x += step_x) {
for(int j = 0, y = step_y; j < y_points; j++, y += step_y) {
for(int j = 0, y = step_y / 2; j < y_points; j++, y += step_y) {
sample_points.push_back(Point(x, y));
}
}