-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
43 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,3 @@ | ||
function canny(img_gray::AbstractMatrix{T}, sigma::Number = 1.4, upperThreshold::Number = 0.90, lowerThreshold::Number = 0.10; percentile::Bool = true) where T<:NumberLike | ||
depwarn("canny(img, sigma, $upperThreshold, $lowerThreshold; percentile=$percentile) is deprecated.\n Please use canny(img, ($upperThreshold, $lowerThreshold), sigma) or canny(img, (Percentile($(100*upperThreshold)), Percentile($(100*lowerThreshold))), sigma)",:canny) | ||
if percentile | ||
canny(img_gray, (Percentile(100*upperThreshold), Percentile(100*lowerThreshold)), sigma) | ||
else | ||
canny(img_gray, (upperThreshold, lowerThreshold), sigma) | ||
end | ||
end | ||
export hausdorff_distance | ||
|
||
function imcorner(img::AbstractArray, threshold, percentile; | ||
method::Function = harris, args...) | ||
if percentile == true # NB old function didn't require Bool, this ensures conversion | ||
depwarn("imcorner(img, $threshold, true; ...) is deprecated. Please use imcorner(img, Percentile($(100*threshold)); ...) instead.", :imcorner) | ||
imcorner(img, Percentile(100*threshold); method=method, args...) | ||
else | ||
depwarn("imcorner(img, $threshold, false; ...) is deprecated. Please use imcorner(img, $threshold; ...) instead.", :imcorner) | ||
imcorner(img, threshold; method=method, args...) | ||
end | ||
end | ||
|
||
function imedge(img::AbstractArray, method::AbstractString, border::AbstractString="replicate") | ||
f = ImageFiltering.kernelfunc_lookup(method) | ||
depwarn("`imedge(img, \"$method\", args...)` is deprecated, please use `imedge(img, $f, args...)` instead.", :imedge) | ||
imedge(img, f, border) | ||
end | ||
@deprecate hausdorff_distance(A,B) modified_hausdorff(A,B) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Base.Test, Images | ||
|
||
info("From this point on there will be deprectation warnings") | ||
|
||
srand(2015) | ||
|
||
@testset "Distances" begin | ||
@testset "Hausdorff" begin | ||
A = eye(3); B = copy(A); C = copy(A) | ||
B[1,2] = 1; C[1,3] = 1 | ||
@test hausdorff_distance(A,A) == 0 | ||
@test hausdorff_distance(A,B) == hausdorff_distance(B,A) | ||
@test hausdorff_distance(A,B) < hausdorff_distance(A,C) | ||
A = rand([0,1],10,10) | ||
B = rand([0,1],10,10) | ||
@test hausdorff_distance(A,B) ≥ 0 | ||
end | ||
end | ||
|
||
nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,6 @@ include("edge.jl") | |
include("corner.jl") | ||
include("bwdist.jl") | ||
include("writemime.jl") | ||
include("deprecated.jl") | ||
|
||
end |