Skip to content

Use skimage gaussian filter to avoid integer rounding artifacts - #2983

Merged
emmanuelle merged 3 commits into
scikit-image:masterfrom
stefanv:canny_filter_dtype
Sep 16, 2018
Merged

emmanuelle merged 3 commits into
scikit-image:masterfrom
stefanv:canny_filter_dtype

Conversation

@stefanv

@stefanv stefanv commented Mar 13, 2018

Copy link
Copy Markdown
Member

scipy.ndimage.gaussian_filter tries to preserve dtypes, which leads to
the output of operations on integer input being less accurate than it
should be.

@jni jni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@jni

jni commented Mar 30, 2018

Copy link
Copy Markdown
Member

@scikit-image/core can anyone else review this?

@emmanuelle

Copy link
Copy Markdown
Member

I'm fine with the change and ready to merge; except that Travis is failing on something unrelated with the PR (opening an image over http). I'll first try to restart Travis.

@jni

jni commented Apr 17, 2018

Copy link
Copy Markdown
Member

Hmmm the 3.4 Travis failure might be related, since it's a canny error, albeit in the viewer. @stefanv could you investigate before we merge?

@stefanv

stefanv commented Apr 18, 2018

Copy link
Copy Markdown
Member Author

@jni well spotted

@stefanv

stefanv commented Apr 18, 2018

Copy link
Copy Markdown
Member Author

Fixed, but I had to adjust the test; I presume this is because the canny edge detector is now calculated on a more accurate floating point image, but I have no explicitly checked by hand.

@jni

jni commented Apr 20, 2018

Copy link
Copy Markdown
Member

Looks good. @emmanuelle? =)

Travis failures appear unrelated. (One is the new warning from SciPy 1.1)

@soupault soupault added this to the 0.14 milestone Apr 27, 2018
@soupault
soupault requested a review from emmanuelle April 27, 2018 18:44
@soupault soupault added ⏩ type: Enhancement Improve existing features status: mrg+1 labels Apr 27, 2018
@stefanv
stefanv force-pushed the canny_filter_dtype branch from b8ed130 to a95bfc8 Compare May 23, 2018 06:12
@codecov-io

codecov-io commented May 23, 2018 •

Copy link
Copy Markdown

Codecov Report

Merging #2983 into master will increase coverage by 0.03%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2983      +/-   ##
==========================================
+ Coverage   85.91%   85.95%   +0.03%     
==========================================
  Files         336      338       +2     
  Lines       27316    27399      +83     
==========================================
+ Hits        23469    23551      +82     
- Misses       3847     3848       +1
Impacted Files Coverage Δ
skimage/viewer/tests/test_plugins.py 100% <100%> (ø) ⬆️
skimage/feature/_canny.py 100% <100%> (ø) ⬆️
skimage/filters/__init__.py 100% <0%> (ø) ⬆️
skimage/measure/tests/test_regionprops.py 100% <0%> (ø) ⬆️
skimage/filters/_unsharp_mask.py 100% <0%> (ø)
skimage/filters/tests/test_unsharp_mask.py 97.67% <0%> (ø)
skimage/measure/_regionprops.py 97.82% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update be42f61...7908c7e. Read the comment docs.

stefanv added 3 commits May 28, 2018 15:29
scipy.ndimage.gaussian_filter tries to preserve dtypes, which leads to
the output of operations on integer input being less accurate than it
should be.
@stefanv
stefanv force-pushed the canny_filter_dtype branch from a95bfc8 to 7908c7e Compare May 28, 2018 22:33
@stefanv

stefanv commented May 28, 2018

Copy link
Copy Markdown
Member Author

Added documentation to notify users of change.

@soupault soupault modified the milestones: 0.14, 0.14.1 May 29, 2018
@soupault soupault self-assigned this Jul 29, 2018
@soupault soupault modified the milestones: 0.14.1, 0.15 Aug 20, 2018
@emmanuelle

Copy link
Copy Markdown
Member

Looks good, merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⏩ type: Enhancement Improve existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants