Skip to content

Commit 1aaf358

Browse files
authored
Update doc with pandas instead of list
1 parent 9614e2b commit 1aaf358

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ __Parameters__
4040
optional rectangular search region as a tuple
4141

4242
__Returns__
43-
- _bestHits_:list of match as dictionaries `{"TemplateName":string, "BBox":(X, Y, Width, Height), "Score":float}`
43+
- Pandas DataFrame with 1 row per hit and column "TemplateName"(string), "BBox":(X, Y, Width, Height), "Score":float
4444
- if N=1, return the best match independently of the score_threshold
4545
- if N<inf, returns up to N best matches that passed the score_threshold
4646
- if N=inf, returns all matches that passed the score_threshold
@@ -52,7 +52,7 @@ The function `findMatches` performs the same detection without the Non-Maxima Su
5252
The 2nd important function is `drawBoxesOnRGB` to display the detections as rectangular bounding boxes on the initial image.
5353
To be able to visualise the detection as colored bounding boxes, the function return a RGB copy of the image if a grayscale image is provided.
5454
It is also possible to draw the detection bounding boxes on the grayscale image using drawBoxesOnGray (for instance to generate a mask of the detections).
55-
`drawBoxesOnRGB(image, listHit, boxThickness=2, boxColor=(255, 255, 00), showLabel=True, labelColor=(255, 255, 0), labelScale=0.5 )`
55+
`drawBoxesOnRGB(image, hits, boxThickness=2, boxColor=(255, 255, 00), showLabel=True, labelColor=(255, 255, 0), labelScale=0.5 )`
5656

5757
This function returns a copy of the image with predicted template locations as bounding boxes overlaid on the image
5858
The name of the template can also be displayed on top of the bounding boxes with showLabel=True.
@@ -61,8 +61,8 @@ __Parameters__
6161
- _image_ : numpy array
6262
image in which the search was performed
6363

64-
- _listHit_ :
65-
list of hit as returned by matchTemplates or findMatches
64+
- _hits_ :
65+
(pandas DataFrame) hits as returned by matchTemplates or findMatches
6666

6767
- _boxThickness_: int
6868
thickness of bounding box contour in pixels. -1 will fill the bounding box (useful for masks).

0 commit comments

Comments
 (0)