@@ -42,7 +42,7 @@ julia> hough_transform_standard(img)
42421-element Array{Tuple{Float64,Float64},1}:
4343 (3.0, 1.5707963267948966)
4444```
45- """
45+ """
4646function hough_transform_standard (
4747 img_edges:: AbstractMatrix{Bool} ;
4848 stepsize= 1 ,
@@ -115,17 +115,17 @@ end
115115```
116116circle_centers, circle_radius = hough_circle_gradient(img_edges, img_phase, radii; scale=1, min_dist=minimum(radii), vote_threshold)
117117```
118- Returns two vectors, corresponding to circle centers and radius.
119-
120- The circles are generated using a hough transform variant in which a non-zero point only votes for circle
118+ Returns two vectors, corresponding to circle centers and radius.
119+
120+ The circles are generated using a hough transform variant in which a non-zero point only votes for circle
121121centers perpendicular to the local gradient. In case of concentric circles, only the largest circle is detected.
122-
123- Parameters:
124- - `img_edges` = edges of the image
125- - `img_phase` = phase of the gradient image
122+
123+ Parameters:
124+ - `img_edges` = edges of the image
125+ - `img_phase` = phase of the gradient image
126126- `radii` = circle radius range
127- - `scale` = relative accumulator resolution factor
128- - `min_dist` = minimum distance between detected circle centers
127+ - `scale` = relative accumulator resolution factor
128+ - `min_dist` = minimum distance between detected circle centers
129129- `vote_threshold` = accumulator threshold for circle detection
130130
131131[`canny`](@ref) and [`phase`](@ref) can be used for obtaining img_edges and img_phase respectively.
@@ -151,7 +151,7 @@ julia> img_demo = Float64.(img_edges); for c in centers img_demo[c] = 2; end
151151
152152julia> imshow(img_demo)
153153```
154- """
154+ """
155155function hough_circle_gradient (
156156 img_edges:: AbstractArray{Bool,2} ,
157157 img_phase:: AbstractArray{<:Number,2} ,
@@ -218,7 +218,7 @@ function hough_circle_gradient(
218218 radius_accumulator= Vector {Int} (undef, Int (floor (dist (f,l)/ scale)+ 1 ))
219219
220220 for center in centers
221- center= (center- 1 * one (center))* scale
221+ center= (center- 1 * _oneunit (center))* scale
222222 fill! (radius_accumulator, 0 )
223223
224224 too_close= false
0 commit comments