Skip to content

Commit

Permalink
fix may out of range bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
aiseetakaizhouli committed Dec 20, 2019
1 parent 453ca3b commit d80ecca
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion FaceDetector/seeta/ImageProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const seeta::Image seeta::crop_resize( const Image &img, const Rect &_rect, cons
float lf_x_s = lfx_scl * n_x_d + crop_x;
nx[n_x_d] = int( lf_x_s );
if( nx[n_x_d] == src_width - 1 )
ny[n_x_d] -= 1;
nx[n_x_d] -= 1;
wx[n_x_d] = lf_x_s - nx[n_x_d];
}

Expand Down
2 changes: 1 addition & 1 deletion FaceLandmarker/seeta/ImageProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const seeta::Image seeta::crop_resize( const Image &img, const Rect &_rect, cons
float lf_x_s = lfx_scl * n_x_d + crop_x;
nx[n_x_d] = int( lf_x_s );
if( nx[n_x_d] == src_width - 1 )
ny[n_x_d] -= 1;
nx[n_x_d] -= 1;
wx[n_x_d] = lf_x_s - nx[n_x_d];
}

Expand Down
2 changes: 1 addition & 1 deletion FaceRecognizer/seeta/ImageProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const seeta::Image seeta::crop_resize( const Image &img, const Rect &_rect, cons
float lf_x_s = lfx_scl * n_x_d + crop_x;
nx[n_x_d] = int( lf_x_s );
if( nx[n_x_d] == src_width - 1 )
ny[n_x_d] -= 1;
nx[n_x_d] -= 1;
wx[n_x_d] = lf_x_s - nx[n_x_d];
}

Expand Down
2 changes: 1 addition & 1 deletion QualityAssessor/seeta/ImageProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const seeta::Image seeta::crop_resize( const Image &img, const Rect &_rect, cons
float lf_x_s = lfx_scl * n_x_d + crop_x;
nx[n_x_d] = int( lf_x_s );
if( nx[n_x_d] == src_width - 1 )
ny[n_x_d] -= 1;
nx[n_x_d] -= 1;
wx[n_x_d] = lf_x_s - nx[n_x_d];
}

Expand Down

0 comments on commit d80ecca

Please sign in to comment.