Skip to content

Commit 46dd85a

Browse files
authored
Fix drawBoxesOnRGB with RGB images
fix #22
1 parent a0de0e5 commit 46dd85a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: MTM/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def drawBoxesOnRGB(image:NDArray, listHit:Sequence[Hit], boxThickness:int=2, box
324324
original image with predicted template locations depicted as bounding boxes
325325
"""
326326
# Convert Grayscale to RGB to be able to see the color bboxes
327-
outImage = cv2.cvtColor(image, cv2.COLOR_GRAY2RGB) if image.ndim == 2 else image.copy
327+
outImage = cv2.cvtColor(image, cv2.COLOR_GRAY2RGB) if image.ndim == 2 else image.copy()
328328

329329
for label, bbox, _ in listHit:
330330

@@ -388,4 +388,4 @@ def drawBoxesOnGray(image:NDArray, listHit:Sequence[Hit], boxThickness=2, boxCol
388388
color=labelColor,
389389
lineType=cv2.LINE_AA)
390390

391-
return outImage
391+
return outImage

0 commit comments

Comments
 (0)