mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-10 03:30:46 +08:00
Pep8 fixes.
This commit is contained in:
@@ -26,6 +26,7 @@ import matplotlib.pyplot as plt
|
||||
|
||||
import numpy as np
|
||||
|
||||
|
||||
def plot_img_and_hist(img, axes, bins=256):
|
||||
"""Plot an image along with its histogram and cumulative histogram.
|
||||
|
||||
@@ -88,4 +89,3 @@ ax_cdf.set_ylabel('Fraction of total intensity')
|
||||
# prevent overlap of y-axis labels
|
||||
plt.subplots_adjust(wspace=0.4)
|
||||
plt.show()
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@ def adapthist(image, nx=8, ny=8, clip_limit=0.01, nbins=256, out_range='full'):
|
||||
-------
|
||||
out - np.ndarray :
|
||||
equalized image - may be a different shape than the original
|
||||
|
||||
|
||||
Notes
|
||||
-----
|
||||
* The underlying algorithm relies on an image whose rows and columns are even multiples of
|
||||
|
||||
@@ -96,7 +96,7 @@ def test_adapthist_float():
|
||||
adapted = exposure.adapthist(img, nx=10, ny=9, clip_limit=0.01,
|
||||
nbins=128, out_range='original')
|
||||
assert_almost_equal = np.testing.assert_almost_equal
|
||||
assert_almost_equal(adapted.min() , img.min())
|
||||
assert_almost_equal(adapted.min(), img.min())
|
||||
assert_almost_equal(adapted.min(), img.min())
|
||||
assert img.shape == adapted.shape
|
||||
assert peak_snr(img, adapted) > 136
|
||||
|
||||
Reference in New Issue
Block a user