fix pattern test

This commit is contained in:
Henry Schimke
2023-04-24 17:49:04 -05:00
parent d08f67feed
commit 483539a194
5 changed files with 18 additions and 10 deletions

View File

@@ -715,7 +715,10 @@ pub fn SampleQR(image: &BitMatrix, fp: &FinderPatternSet) -> Result<QRCodeDetect
let y1 = apM[y + 1];
rois.push(SamplerControl {
p0: point_i(x0 - u32::from(x == 0) * 6, y0 - u32::from(y == 0) * 6),
p1: point_i(x1 + u32::from(x == N - 1) * 7, y1 + u32::from(y == N - 1) * 7),
p1: point_i(
x1 + u32::from(x == N - 1) * 7,
y1 + u32::from(y == N - 1) * 7,
),
transform: PerspectiveTransform::quadrilateralToQuadrilateral(
Quadrilateral::rectangle_from_xy(
x0 as f32, x1 as f32, y0 as f32, y1 as f32, None,