update multiproecssing for max. speed to 130fps

This commit is contained in:
bluepulsar
2026-02-10 21:17:37 +08:00
parent b78b636531
commit af8aee402e
4 changed files with 48 additions and 28 deletions
+3 -2
View File
@@ -209,7 +209,7 @@ class Sensor:
diff = cv2.absdiff(self.img, self.initial_img)
return diff.mean() > threshold
def compute_deformation(self):
def compute_deformation(self, decompose=True):
"""
Compute optical flow and decompose into force components.
@@ -220,7 +220,8 @@ class Sensor:
raise Exception("Warning: Get image first")
self.__compute_flow()
self.__compute_hhd()
if decompose:
self.__compute_hhd()
return True