improve readme.md and configs util functions

This commit is contained in:
bluepulsar
2026-01-04 12:52:08 +08:00
parent 1baa0fb954
commit 807785ca7f
6 changed files with 191 additions and 38 deletions
+9 -9
View File
@@ -21,7 +21,6 @@ from .nHHD import nHHD
from . import configs
from .get_depth import Contact3D
class Sensor:
"""
Optical tactile sensor interface with deformation analysis.
@@ -200,7 +199,7 @@ class Sensor:
if self.mirror:
self.__img = cv2.flip(self.__img, 1)
return True
return self.__img.copy()
def compute_deformation(self):
"""
@@ -228,7 +227,6 @@ class Sensor:
if hasattr(flow, 'download'):
flow = flow.download()
self.__flow = flow
return True
def __compute_hhd(self):
@@ -358,12 +356,14 @@ class Sensor:
# Public API - Configuration & Calibration
# =========================================================================
def export_config(self, path="./config/exported_config.json"):
"""Return current configuration dict."""
configs.export_config(self._config, path)
if self.verbose:
print(f"Config exported to {path}")
return True
# def export_config(self, path="./config/exported_config.json"):
# """Return current configuration dict."""
# configs.export_config(self._config, path)
# if self.verbose:
# print(f"Config exported to {path}")
# return True
def stitch_cal(self):
"""