From cd13b30fdef45314e21e4d0e5cef6739915e53f7 Mon Sep 17 00:00:00 2001 From: Tsukasa Sugiura Date: Sat, 12 Sep 2015 01:42:25 +0900 Subject: [PATCH] Fix LineAA in case of 4 channel Fix bug when enter 4 channel image to LineAA function. --- modules/imgproc/src/drawing.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/imgproc/src/drawing.cpp b/modules/imgproc/src/drawing.cpp index c2db764820..5c4c7e792a 100644 --- a/modules/imgproc/src/drawing.cpp +++ b/modules/imgproc/src/drawing.cpp @@ -610,12 +610,12 @@ LineAA( Mat& img, Point pt1, Point pt2, const void* color ) ICV_PUT_POINT(); ICV_PUT_POINT(); - tptr += step; + tptr += 4; a = (ep_corr * FilterTable[dist] >> 8) & 0xff; ICV_PUT_POINT(); ICV_PUT_POINT(); - tptr += step; + tptr += 4; a = (ep_corr * FilterTable[63 - dist] >> 8) & 0xff; ICV_PUT_POINT(); ICV_PUT_POINT();