@@ -24,7 +24,7 @@ function HOG(; orientations::Int = 9, cell_size::Int = 8, block_size::Int = 2, b
2424 HOG (orientations, cell_size, block_size, block_stride, norm_method)
2525end
2626
27- function create_descriptor (img:: AbstractArray{CT, 2} , params:: HOG ) where CT<: Images. NumberLike
27+ function create_descriptor (img:: AbstractArray{CT, 2} , params:: HOG ) where CT<: NumberLike
2828 # compute gradient
2929 gx = imfilter (img, centered ([- 1 0 1 ]))
3030 gy = imfilter (img, centered ([- 1 0 1 ]' ))
@@ -34,7 +34,7 @@ function create_descriptor(img::AbstractArray{CT, 2}, params::HOG) where CT<:Ima
3434 create_hog_descriptor (mag, phase, params)
3535end
3636
37- function create_descriptor (img:: AbstractArray{CT, 2} , params:: HOG ) where CT<: Images. Color{T, N} where T where N
37+ function create_descriptor (img:: AbstractArray{CT, 2} , params:: HOG ) where CT<: Color{T, N} where T where N
3838 # for color images, compute seperate gradient for each color channel and take one with largest norm as pixel's gradient vector
3939 rows, cols = size (img)
4040 gx = channelview (imfilter (img, centered ([- 1 0 1 ])))
@@ -56,7 +56,7 @@ function create_descriptor(img::AbstractArray{CT, 2}, params::HOG) where CT<:Ima
5656 create_hog_descriptor (max_mag, max_phase, params)
5757end
5858
59- function create_hog_descriptor (mag:: AbstractArray{T, 2} , phase:: AbstractArray{T, 2} , params:: HOG ) where T<: Images. NumberLike
59+ function create_hog_descriptor (mag:: AbstractArray{T, 2} , phase:: AbstractArray{T, 2} , params:: HOG ) where T<: NumberLike
6060 orientations = params. orientations
6161 cell_size = params. cell_size
6262 block_size = params. block_size
0 commit comments