MCPcopy Create free account
hub / github.com/TheAlgorithms/Python / __init__

Method __init__

computer_vision/harris_corner.py:11–21  ·  view source on GitHub ↗

k : is an empirically determined constant in [0.04,0.06] window_size : neighbourhoods considered

(self, k: float, window_size: int)

Source from the content-addressed store, hash-verified

9
10class HarrisCorner:
11 def __init__(self, k: float, window_size: int):
12 """
13 k : is an empirically determined constant in [0.04,0.06]
14 window_size : neighbourhoods considered
15 """
16
17 if k in (0.04, 0.06):
18 self.k = k
19 self.window_size = window_size
20 else:
21 raise ValueError("invalid k value")
22
23 def __str__(self) -> str:
24 return str(self.k)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected