Skip to content

Commit

Permalink
Merge pull request #22 from JuliaImages/teh/fix_imgradients
Browse files Browse the repository at this point in the history
Ensure real values are used in interpolation
  • Loading branch information
timholy authored Sep 25, 2021
2 parents 66a15b3 + 5f4750e commit 2bd3251
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/UnitTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ on:
branches:
- master
pull_request:
schedule:
- cron: '20 00 1 * *'

jobs:
test:
Expand All @@ -30,7 +28,7 @@ jobs:
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ImageEdgeDetection"
uuid = "2b14c160-480b-11ea-1b58-656063328ff7"
authors = ["Dr. Zygmunt L. Szpak"]
version = "0.1.3"
version = "0.1.4"

[deps]
ColorVectorSpace = "c3611d14-8923-5661-9e6a-0046d554d3a4"
Expand Down
4 changes: 2 additions & 2 deletions src/algorithms/nonmaxima_suppression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ function suppress_non_maxima!(out::AbstractArray, mag::AbstractArray, g₁::Abst
m₂ = zero(eltype(mag))
@inbounds for i in CartesianIndices(mag)
r, c = i.I
d₁ = g₁[i]
d₂ = g₂[i]
d₁ = gray(g₁[i])
d₂ = gray(g₂[i])
mc = mag[i]
if mc < threshold || mc == 0 || isnan(mc)
out[r,c] = zero(eltype(mag))
Expand Down
4 changes: 2 additions & 2 deletions src/algorithms/subpixel_nonmaxima_suppression.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ function suppress_subpixel_non_maxima!(out₁::AbstractArray, out₂::AbstractAr
m₂ = zero(eltype(mag))
@inbounds for i in CartesianIndices(mag)
r, c = i.I
d₁ = g₁[i]
d₂ = g₂[i]
d₁ = gray(g₁[i])
d₂ = gray(g₂[i])
mc = mag[i]
if mc < threshold || mc == 0 || isnan(mc)
out₁[r,c] = zero(eltype(mag))
Expand Down

2 comments on commit 2bd3251

@timholy
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/45515

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.4 -m "<description of version>" 2bd325192918ad99f539b4d6ffd2ec6d16768878
git push origin v0.1.4

Please sign in to comment.