From 6f0b6cb9d40fe0a49170b3b63169f95e783a874c Mon Sep 17 00:00:00 2001 From: TPP-G6 Date: Thu, 29 Jan 2026 21:24:12 +0800 Subject: [PATCH] fix hhd cuda bug --- example1_basic_pipeline.py | 2 +- patch_generation/patch_generation_3_org.py | 6 +++--- src/orisys/sensor.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/example1_basic_pipeline.py b/example1_basic_pipeline.py index e15440d..a345a82 100644 --- a/example1_basic_pipeline.py +++ b/example1_basic_pipeline.py @@ -61,7 +61,7 @@ def main(): grid_spacing=10, arrow_scale=1.0 ) - cv2.imshow("形变场 Deformation", arrows) + cv2.imshow("Deformation", arrows) # 步骤 3.2: 在图像上触碰点和区域 image_with_foe = orisys.util.draw_contact(img, contour, centroid) diff --git a/patch_generation/patch_generation_3_org.py b/patch_generation/patch_generation_3_org.py index 9308bf9..ec54869 100755 --- a/patch_generation/patch_generation_3_org.py +++ b/patch_generation/patch_generation_3_org.py @@ -115,9 +115,9 @@ def generate_color_pattern(h, w, d, r): def main(): # Parameters for the pattern. # For example, using 100x100 pixels image with patches of 3x3 pixels. - height = 2000 - width = 2000 - patch_size = 3 + height = 1000 + width = 1000 + patch_size = 20 # Set r to a value that gives sufficient difference. # Note: r is the threshold for squared difference per channel, and the condition is # |c - c_neighbor| >= sqrt(r). Very high r may make it impossible to satisfy. diff --git a/src/orisys/sensor.py b/src/orisys/sensor.py index 998c6d9..f0a0fb1 100644 --- a/src/orisys/sensor.py +++ b/src/orisys/sensor.py @@ -228,7 +228,7 @@ class Sensor: # Initialize HHD solver if self.__hhd is None: - self.__hhd = nHHD(cuda=self.cuda, Qgrid=flow.shape[:2], spacings=(18, 18)) + self.__hhd = nHHD(cuda=self.cuda, grid=flow.shape[:2], spacings=(18, 18)) # Force computation if self.cuda and self.CUPY_AVAILABLE: