Skip to content

Commit 9007b77

Browse files
committed
use ImageCore.NumberLike
1 parent 1829cd6 commit 9007b77

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/Images.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ using StaticArrays
66

77
using Reexport
88
@reexport using ImageCore
9+
using ImageCore: NumberLike
910
@reexport using ImageBase
1011

1112
@reexport using FileIO: load, save

src/corner.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ function kr(x::Real, y::Real, xx::Real, xy::Real, yy::Real)
227227
kr(xp, yp, xxp, xyp, yyp)
228228
end
229229

230-
kr(x::RealLike, y::RealLike, xx::RealLike, xy::RealLike, yy::RealLike) =
230+
kr(x::NumberLike, y::NumberLike, xx::NumberLike, xy::NumberLike, yy::NumberLike) =
231231
kr(gray(x), gray(y), gray(xx), gray(xy), gray(yy))
232232

233233
function kr(x::AbstractRGB, y::AbstractRGB, xx::AbstractRGB, xy::AbstractRGB, yy::AbstractRGB)

src/deprecations.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ edges, counts = imhist(r,256);
216216
# References
217217
[1] E. Herrholz, "Parsimonious Histograms," Ph.D. dissertation, Inst. of Math. and Comp. Sci., University of Greifswald, Greifswald, Germany, 2011.
218218
"""
219-
function imhist(img::AbstractArray, nbins::Integer, minval::RealLike, maxval::RealLike)
219+
function imhist(img::AbstractArray, nbins::Integer, minval::NumberLike, maxval::NumberLike)
220220
Base.depwarn("`imhist` will be removed in a future release, please use `build_histogram` instead.", :imhist)
221221
edges = StatsBase.histrange([Float64(minval), Float64(maxval)], nbins, :left)
222222
imhist(img, edges)
@@ -355,7 +355,7 @@ imshow(imgeq)
355355
See also: [histmatch](@ref),[clahe](@ref), [imhist](@ref) and [adjust_gamma](@ref).
356356
357357
"""
358-
function histeq(img::AbstractArray, nbins::Integer, minval::RealLike, maxval::RealLike)
358+
function histeq(img::AbstractArray, nbins::Integer, minval::NumberLike, maxval::NumberLike)
359359
Base.depwarn("`histeq` will be removed in a future release, please use `adjust_histogram(img, Equalization())` instead.", :histeq)
360360
bins, histogram = imhist(img, nbins, minval, maxval)
361361
cdf = cumsum(histogram[2:end-1])
@@ -375,7 +375,7 @@ function histeq(img::AbstractArray, nbins::Integer)
375375
histeq(img, nbins, zero(T), oneunit(T))
376376
end
377377

378-
function histeq(img::ImageMeta, nbins::Integer, minval::RealLike, maxval::RealLike)
378+
function histeq(img::ImageMeta, nbins::Integer, minval::NumberLike, maxval::NumberLike)
379379
Base.depwarn("`histeq` will be removed in a future release, please use `adjust_histogram(img, Equalization())` instead.", :histeq)
380380
newimg = histeq(arraydata(img), nbins, minval, maxval)
381381
shareproperties(img, newimg)

0 commit comments

Comments
 (0)