Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 46dd85a

Browse files
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

‎MTM/__init__.py

Lines changed: 2 additions & 2 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /