Repository navigation
ENH: implement mean and triangle thresholding - #2126
Merged
Merged
Conversation
| return bin_centers[(threshold + upper_bound) // 2] | ||
|
|
||
|
|
||
| def threshold_mean(image): |
Member
Author
There was a problem hiding this comment.
@ahojnnes As said in the main discussion, I'll refactor the examples later.
8 tasks done
Member
|
LGTM. |
| # Check that most of the pixels are identical | ||
| # See numpy #7685 for a future np.testing API | ||
| unequal_pos = np.where(t_img.ravel() != t_inv_inv_img.ravel()) | ||
| assert(len(unequal_pos[0]) / len(t_img.ravel()) < 1e-2) |
Member
There was a problem hiding this comment.
What is the reasoning behind this value?
Also, len(t_img.ravel()) == t_img.size.
Member
Author
There was a problem hiding this comment.
the value just sounds reasonable...
Current coverage is 90.52%@@ master #2126 diff @@
==========================================
Files 297 297
Lines 21230 21277 +47
Methods 0 0
Messages 0 0
Branches 1949 1951 +2
==========================================
+ Hits 19215 19262 +47
Misses 1665 1665
Partials 350 350
|
| Parameters | ||
| ---------- | ||
| image : (N, M) ndarray | ||
| Grayscale input image. |
Member
There was a problem hiding this comment.
Need to change the signature -> (N, M[, ..., P]) and description.
Member
Author
|
@soupault Fixed ;) |
Member
|
@sciunto please, squash the commits, and we're done. |
Member
Author
|
squashed :) |
Member
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Replaces #2124 (was too difficult to rebase)