Repository navigation
Conversation
|
|
||
|
|
||
| def threshold_mean(image): | ||
| """Return threshold value based on the of grayscale values. |
|
@sciunto Thanks for the contribution! What about gallery examples though? Would be nice to have one at least for the |
Current coverage is 90.53%@@ master #2124 diff @@
==========================================
Files 297 297
Lines 21166 21214 +48
Methods 0 0
Messages 0 0
Branches 1934 1936 +2
==========================================
+ Hits 19157 19205 +48
Misses 1663 1663
Partials 346 346
|
|
@soupault Fixed. I really hope that the mean threshold will be printed in gold letters in the next announcement! :) For the gallery, it's a good point. My opinion is that it's fairly useless to accumulate examples more or less identical to this one with few changes. Also, this will make the gallery page longer and therefore, it will more difficult to find something in there in the future. Instead, I think that a more comprehensive page on thresholding will be more useful for users. This is part of the objectives for #2110, but maybe I will do that in an extra PR, because we already have several PRs on thresholding and it's difficult to handle everything in parallel. |
| argrighth = np.where(hist>0)[0][-1] | ||
| # Find peak, lowest and highest gray levels. | ||
| arg_peak_hight = np.argmax(hist) | ||
| peak_height = hist[argpeak_height] |
There was a problem hiding this comment.
arg_peak_hight + argpeak_height == arg_peak_height 😆
|
@sciunto Ah, now I see what are you up to... |
|
|
||
|
|
||
| def test_triangle_flip(): | ||
| # Depending on the skewness, the agorithm flips the histogram. |
|
@soupault Thanks for your comments! Do you agree to replace the check and the warning in |
|
@sciunto let's keep |
|
Rebasing this is aweful. I'll open another PR. |
Description
This PR adds two new algorithms:
Checklist
[It's fine to submit PRs which are a work in progress! But before they are merged, all PRs should provide:]