- if(x - int(var_square_size/2) >= 0 &&
- x + int(var_square_size/2) < width &&
- y - int(var_square_size/2) >= 0 &&
- y + int(var_square_size/2) < height) {
-
- int s =
- + local_sum_pixel_map[ - var_square_size/2 + width * ( - var_square_size / 2)]
- + local_sum_pixel_map[ + var_square_size/2 + width * ( + var_square_size / 2)]
- - local_sum_pixel_map[ - var_square_size/2 + width * ( + var_square_size / 2)]
- - local_sum_pixel_map[ + var_square_size/2 + width * ( - var_square_size / 2)];
-
- int s_sq =
- + local_sum_sq_pixel_map[ - var_square_size/2 + width * ( - var_square_size / 2)]
- + local_sum_sq_pixel_map[ + var_square_size/2 + width * ( + var_square_size / 2)]
- - local_sum_sq_pixel_map[ - var_square_size/2 + width * ( + var_square_size / 2)]
- - local_sum_sq_pixel_map[ + var_square_size/2 + width * ( - var_square_size / 2)];
+ if(x - int(var_square_size / 2) >= 0 &&
+ x + int(var_square_size / 2) < width &&
+ y - int(var_square_size / 2) >= 0 &&
+ y + int(var_square_size / 2) < height) {
+
+ unsigned int s =
+ + *(local_sum_pixel_map - var_square_size / 2 + width * ( - var_square_size / 2))
+ + *(local_sum_pixel_map + var_square_size / 2 + width * ( + var_square_size / 2))
+ - *(local_sum_pixel_map - var_square_size / 2 + width * ( + var_square_size / 2))
+ - *(local_sum_pixel_map + var_square_size / 2 + width * ( - var_square_size / 2));
+
+ unsigned int s_sq =
+ + *(local_sum_sq_pixel_map - var_square_size / 2 + width * ( - var_square_size / 2))
+ + *(local_sum_sq_pixel_map + var_square_size / 2 + width * ( + var_square_size / 2))
+ - *(local_sum_sq_pixel_map - var_square_size / 2 + width * ( + var_square_size / 2))
+ - *(local_sum_sq_pixel_map + var_square_size / 2 + width * ( - var_square_size / 2));