Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 746d1668c6 |
@@ -572,6 +572,7 @@ class LineShapeMatcher:
|
|||||||
subpixel: bool = True,
|
subpixel: bool = True,
|
||||||
verify_ncc: bool = True,
|
verify_ncc: bool = True,
|
||||||
verify_threshold: float = 0.4,
|
verify_threshold: float = 0.4,
|
||||||
|
ncc_skip_above: float = 0.85,
|
||||||
coarse_angle_factor: int = 2,
|
coarse_angle_factor: int = 2,
|
||||||
scale_penalty: float = 0.0,
|
scale_penalty: float = 0.0,
|
||||||
) -> list[Match]:
|
) -> list[Match]:
|
||||||
@@ -805,7 +806,11 @@ class LineShapeMatcher:
|
|||||||
search_radius=self.angle_step_deg / 2.0,
|
search_radius=self.angle_step_deg / 2.0,
|
||||||
original_score=score,
|
original_score=score,
|
||||||
)
|
)
|
||||||
if verify_ncc:
|
# NCC verify lazy (Halcon-style): skip se shape-score gia molto
|
||||||
|
# alto (probabilita falso positivo trascurabile). NCC e l'op
|
||||||
|
# piu costosa per match (warp + corr), quindi vale la pena
|
||||||
|
# saltarlo quando il gradiente shape e gia conclusivo.
|
||||||
|
if verify_ncc and float(score_f) < ncc_skip_above:
|
||||||
ncc = self._verify_ncc(gray0, cx_f, cy_f, ang_f, var.scale)
|
ncc = self._verify_ncc(gray0, cx_f, cy_f, ang_f, var.scale)
|
||||||
if ncc < verify_threshold:
|
if ncc < verify_threshold:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user