From 18fae4d81ef57551eeef2932dba9189803947dcd Mon Sep 17 00:00:00 2001 From: jiangzhiwen Date: Wed, 16 Sep 2020 09:55:51 +0800 Subject: [PATCH] fix Affine for 3 channel --- .../minddata/dataset/kernels/image/lite_cv/image_process.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } } }