@@ -552,7 +552,7 @@ def transform_image(
552552 transform += as_float32_array ([[0 , 0 , t_x ], [0 , 0 , t_y ]])
553553
554554 return cast (
555- NDArrayReal ,
555+ " NDArrayReal" ,
556556 cv2 .warpAffine (
557557 image ,
558558 transform ,
@@ -650,14 +650,14 @@ def detect_contours(
650650 iterations = settings .convolution_iterations ,
651651 )
652652
653- image_k = cast (NDArrayReal , image_k )
653+ image_k = cast (" NDArrayReal" , image_k )
654654
655655 # Detecting contours.
656656 contours , _hierarchy = cv2 .findContours (
657657 image_k , cv2 .RETR_TREE , cv2 .CHAIN_APPROX_NONE
658658 )
659659
660- contours = cast (Tuple [NDArrayInt ], contours )
660+ contours = cast (" Tuple[NDArrayInt]" , contours )
661661
662662 if additional_data :
663663 return contours , image_k
@@ -827,7 +827,7 @@ def approximate_contour(
827827 contour , center * cv2 .arcLength (contour , True ), True
828828 )
829829
830- approximation = cast (NDArrayInt , approximation )
830+ approximation = cast (" NDArrayInt" , approximation )
831831
832832 if len (approximation ) > points :
833833 low = (low + high ) / 2
@@ -1155,7 +1155,7 @@ def sample_colour_checker(
11551155 colour_checker = colour_checker_candidate
11561156 quadrilateral = candidate_quadrilateral
11571157
1158- colour_checker = cast (NDArrayFloat , colour_checker )
1158+ colour_checker = cast (" NDArrayFloat" , colour_checker )
11591159
11601160 return DataDetectionColourChecker (
11611161 sampled_colours , masks , colour_checker , quadrilateral
0 commit comments