mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-05-12 17:18:30 +02:00
chg: [mypy] fixed mypy issue
This commit is contained in:
parent
27083934d0
commit
0460acd7f3
1 changed files with 5 additions and 4 deletions
|
@ -29,7 +29,7 @@ import itertools
|
|||
import cv2
|
||||
import numpy as np
|
||||
import math
|
||||
from typing import Dict, Iterator, List
|
||||
from typing import Dict, Iterator, List, Any, Union
|
||||
|
||||
|
||||
def identity() -> Iterator[int]:
|
||||
|
@ -230,14 +230,15 @@ def LFSR(m: int) -> Iterator[int]:
|
|||
|
||||
|
||||
def shi_tomashi(
|
||||
image: str, corners: int = 100, quality: float = 0.01, min_distance: float = 10.0
|
||||
image_path: str, 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
|
||||
"""
|
||||
image = cv2.imread(image)
|
||||
image = cv2.imread(image_path)
|
||||
gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
|
||||
corners = cv2.goodFeaturesToTrack(gray, corners, quality, min_distance)
|
||||
corners: Union[int, List[Any]] = cv2.goodFeaturesToTrack(
|
||||
gray, corners, quality, min_distance)
|
||||
corners = np.int0(corners)
|
||||
i = 0
|
||||
while True:
|
||||
|
|
Loading…
Add table
Reference in a new issue