Skip to content

Commit 709c75d

Browse files
authored
Merge pull request #280 from heliosdrm/patch-1
Update template_matching.jl in docs
2 parents 3b3d88a + 7d77f49 commit 709c75d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/demos/search/template_matching.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Gray.(threshold)
5353

5454
# Now we see small blobs at the locations which match our template and we can label the connected regions by `label_components`. This will enumerate are connected regions and `component_centroids` can be used to get the centroid of each region. `component_centroids` also return the centroid for the background region, which is at the first position and we will omit it.
5555

56-
centroids = component_centroids(label_components(threshold))[2:end]
56+
centroids = component_centroids(label_components(threshold))[begin+1:end]
5757

5858
# To check if it worked correctly we can overlay the centroids with the original image using the `Plots` package. As the images are stored using the first index for rows we have to reverse the order of the coordinates to match the order of the plotting library.
5959
plot(Gray.(img), size=(512,512))

0 commit comments

Comments
 (0)