mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-11 06:22:57 +08:00
Add basic tests for _histograms.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from numpy.testing import *
|
||||
import numpy as np
|
||||
|
||||
import scikits.image.io._plugins._colormixer as cm
|
||||
from scikits.image.io._plugins._histograms import histograms
|
||||
|
||||
class TestHistogram:
|
||||
def test_basic(self):
|
||||
img = np.ones((50, 50, 3), dtype=np.uint8)
|
||||
r, g, b, v = histograms(img, 255)
|
||||
|
||||
for band in (r, g, b, v):
|
||||
yield assert_equal, band.sum(), 50*50
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_module_suite()
|
||||
Reference in New Issue
Block a user