diff --git a/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc b/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc index fd15e13059..5ca125af13 100644 --- a/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc +++ b/mindspore/ccsrc/minddata/dataset/kernels/image/lite_cv/image_process.cc @@ -613,16 +613,16 @@ void ImplementAffine(LiteMat &src, LiteMat &out_img, double M[6], std::vector= 0 && src_y >= 0 && src_x < src.width_ && src_y < src.height_) { Pixel_Type src_pixel = static_cast(src.data_ptr_)[src_y * src.width_ + src_x]; - static_cast(out_img.data_ptr_)[y * src.width_ + x] = src_pixel; + static_cast(out_img.data_ptr_)[y * out_img.width_ + x] = src_pixel; } else { - static_cast(out_img.data_ptr_)[y * src.width_ + x] = borderValue; + static_cast(out_img.data_ptr_)[y * out_img.width_ + x] = borderValue; } } }