Skip to content

Commit 6a016ac

Browse files
committed
nijt quality ratio
1 parent 4de52d8 commit 6a016ac

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

openptv_python/find_candidate.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import math
22
from typing import List
33

4+
from numba import float64, njit
5+
46
from .calibration import Calibration
57
from .constants import MAXCAND
68
from .epi import Candidate, Coord2d
@@ -146,8 +148,8 @@ def find_candidate(
146148
# """ Return the ratio of the smaller to the larger of the two numbers."""
147149
# return a / b if a < b else b / a
148150

149-
150-
def quality_ratio(a, b):
151+
@njit(float64(float64, float64))
152+
def quality_ratio(a: float, b: float) -> float:
151153
"""Return the ratio of the smaller to the larger of the two numbers."""
152154
if a == 0 and b == 0:
153155
return 0

0 commit comments

Comments
 (0)