From 513e9d166fecf0e76c28e83f406121adb83af6a3 Mon Sep 17 00:00:00 2001 From: jerryzeng Date: Mon, 18 Aug 2025 10:19:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3subpix=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E4=B8=AD0.5=E5=83=8F=E7=B4=A0=E5=B7=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- camCalib/lineDetection_steger.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/camCalib/lineDetection_steger.cpp b/camCalib/lineDetection_steger.cpp index 9e0f50e..3d97022 100644 --- a/camCalib/lineDetection_steger.cpp +++ b/camCalib/lineDetection_steger.cpp @@ -435,6 +435,8 @@ void computePointSubpix( ); if ((subpix.x >= 0) && (subpix.y >= 0)) { + subpix.x += 0.5; //图像中的像素位置表示的是像素是左下角,而此处像素坐标是指向像素中间位置,所以有0.5像素差 + subpix.x -= 0.5; //此处图像的Y坐标系方向与通常坐标系的方向相反 posSubpix.push_back(subpix); doSubPix = -1; }