mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-05-12 17:18:30 +02:00
chg: [style] !minor reformat
This commit is contained in:
parent
b6c8cc3d35
commit
d7ea51eed7
2 changed files with 7 additions and 4 deletions
|
@ -230,7 +230,10 @@ def LFSR(m: int) -> Iterator[int]:
|
|||
|
||||
|
||||
def shi_tomashi(
|
||||
image_path: str, max_corners: int = 100, quality: float = 0.01, min_distance: float = 10.0
|
||||
image_path: str,
|
||||
max_corners: int = 100,
|
||||
quality: float = 0.01,
|
||||
min_distance: float = 10.0,
|
||||
) -> Iterator[int]:
|
||||
"""Shi-Tomachi corner generator of the given points
|
||||
https://docs.opencv.org/4.x/d4/d8c/tutorial_py_shi_tomasi.html
|
||||
|
@ -238,7 +241,8 @@ def shi_tomashi(
|
|||
image = cv2.imread(image_path)
|
||||
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
||||
corners: np.signedinteger[Any] = cv2.goodFeaturesToTrack(
|
||||
gray, max_corners, quality, min_distance)
|
||||
gray, max_corners, quality, min_distance
|
||||
)
|
||||
corners = np.int0(corners)
|
||||
i = 0
|
||||
while True:
|
||||
|
|
|
@ -177,8 +177,7 @@ class TestGenerators(unittest.TestCase):
|
|||
int(test_file.shape[0]), int(test_file.shape[1])
|
||||
)
|
||||
self.assertIsNone(
|
||||
np.testing.assert_allclose(
|
||||
corners, test_file_reshaped, verbose=True, rtol=1e-0, atol=0)
|
||||
np.testing.assert_allclose(corners, test_file_reshaped, rtol=1e-0, atol=0)
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
|
Loading…
Add table
Reference in a new issue