Browse Source

!7752 [Data]Fix crop param when x = 0 or y = 0

Merge pull request !7752 from xulei/lite_test0905
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
12251ac612
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc

+ 1
- 1
mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc View File

@@ -441,7 +441,7 @@ static void CropInternal(const LiteMat &src, LiteMat &dst, int x, int y, int w,
}

bool Crop(const LiteMat &src, LiteMat &dst, int x, int y, int w, int h) {
if (x <= 0 || y <= 0 || w <= 0 || h <= 0) {
if (x < 0 || y < 0 || w <= 0 || h <= 0) {
return false;
}
if (y + h > src.height_ || x + w > src.width_) {


Loading…
Cancel
Save