@@ -206,9 +206,9 @@ def drawBoxesOnRGB(image, listHit, boxThickness=2, boxColor=(255, 255, 00), show
206
206
207
207
208
208
def drawBoxesOnGray (image , listHit , boxThickness = 2 , boxColor = 255 , showLabel = False , labelColor = 255 , labelScale = 0.5 ):
209
- '''
209
+ '''
210
210
Same as drawBoxesOnRGB but with Graylevel.
211
- If a RGB image is provided, the output image will be a grayscale image
211
+ If a RGB image is provided, the output image will be a grayscale image
212
212
Parameters
213
213
----------
214
214
- image : image in which the search was performed
@@ -227,7 +227,7 @@ def drawBoxesOnGray(image, listHit, boxThickness=2, boxColor=255, showLabel=Fals
227
227
outImage: Single channel grayscale image
228
228
original image with predicted template locations depicted as bounding boxes
229
229
'''
230
- # Convert RGB to grayscale
230
+ # Convert RGB to grayscale
231
231
if image .ndim == 3 : outImage = cv2 .cvtColor (image , cv2 .COLOR_RGB2GRAY ) # convert to RGB to be able to show detections as color box on grayscale image
232
232
else : outImage = image .copy ()
233
233
@@ -237,8 +237,8 @@ def drawBoxesOnGray(image, listHit, boxThickness=2, boxColor=255, showLabel=Fals
237
237
if showLabel : cv2 .putText (outImage , text = hit ['TemplateName' ], org = (x , y ), fontFace = cv2 .FONT_HERSHEY_SIMPLEX , fontScale = labelScale , color = labelColor , lineType = cv2 .LINE_AA )
238
238
239
239
return outImage
240
-
241
-
240
+
241
+
242
242
if __name__ == '__main__' :
243
243
244
244
from skimage .data import coins
0 commit comments