Skip to content

Commit

Permalink
chore: remove imcomplement from reconstruction module
Browse files Browse the repository at this point in the history
  • Loading branch information
cpaniaguam committed Nov 7, 2024
1 parent c1f1f7f commit e15c72e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
8 changes: 0 additions & 8 deletions src/reconstruction.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
function imcomplement(img::Matrix{T}) where {T<:Union{Unsigned,Int}}
return 255 .- img
end

function imcomplement(img::Matrix{Gray{Float64}})
return 1 .- img
end

function reconstruct(img, se, type, invert::Bool=true)
if type == "dilation"
morphed = IceFloeTracker.MorphSE.dilate(img, se)
Expand Down
7 changes: 0 additions & 7 deletions test/test-reconstruction-workflows.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@ function run_tests(test_cases, func, se)
end

@testset "reconstruct" begin
@testset "imcomplement" begin
@test imcomplement(coins) == 255 .- coins

coins_gray = Gray.(coins ./ 255)
@test imcomplement(coins_gray) == 1 .- coins_gray
end

@testset "open_by_reconstruction" begin
test_cases = [(coins, 7552396), (coins_gray, 29617.239215686277)]
run_tests(test_cases, (img, se) -> _reconstruct(img, se, "erosion"), se_disk1)
Expand Down

0 comments on commit e15c72e

Please sign in to comment.