Bug fix for Sauvola and Niblack thresholding #2441

Merged
merged 2 commits into from Jan 19, 2017

Projects

None yet

4 participants

@jni
Contributor
jni commented Jan 10, 2017

Description

My bad! As part of n-D-fying #2266, I introduced two bugs:

  • the padding of the integral image was sufficient only for a (3, 3) window size (ie what I was using in my informal tests). This resulted in incorrect values along image borders. It is now updated to work on arbitrary window sizes.
  • the denominator for computing means was valid only for 2D images. It is now updated to be valid for images of any dimension.

Checklist

jni added some commits Jan 10, 2017
@jni jni Fix integral image padding for thresholding
The padding was only adequate for a window size of 3.
94569e5
@jni jni Fix window size computation
The value of `w * w` was only appropriate for 2D images.
6658db6
@jni jni added the bug label Jan 10, 2017
@jni jni added this to the 0.13 milestone Jan 10, 2017
@codecov-io

Current coverage is 90.69% (diff: 100%)

Merging #2441 into master will increase coverage by <.01%

@@             master      #2441   diff @@
==========================================
  Files           304        304          
  Lines         21419      21440    +21   
  Methods           0          0          
  Messages          0          0          
  Branches       1838       1838          
==========================================
+ Hits          19425      19446    +21   
  Misses         1654       1654          
  Partials        340        340          

Powered by Codecov. Last update 99b81e8...6658db6

@sciunto sciunto requested a review from emmanuelle Jan 10, 2017
@jni
Contributor
jni commented Jan 11, 2017

@stefanv @JDWarner would you like a quick-and-easy review? ;) I think this is fairly straightforward if you are familiar with nD logic. =)

@stefanv stefanv merged commit 39b79a6 into scikit-image:master Jan 19, 2017

4 checks passed

codecov/patch 100% of diff hit (target 90.69%)
Details
codecov/project 90.69% (+<.01%) compared to 99b81e8
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@jni jni deleted the jni:fix-sauvola branch Jan 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment