more tests
This commit is contained in:
parent
24ff40e9be
commit
a82fa01781
8
TODO
8
TODO
@ -1,11 +1,13 @@
|
||||
|
||||
- python:
|
||||
|
||||
- try
|
||||
- draw_circle() etc. should copy() the image before writing, and
|
||||
return the copy
|
||||
|
||||
python test_arithmetic.py -v TestArithmetic.test_histfind
|
||||
accidental segvs are too easy otherwise :(
|
||||
|
||||
segv
|
||||
draw.c should declare arg as VIPS_ARGUMENT_REQUIRED_INPUT_OUTPUT
|
||||
maybe?
|
||||
|
||||
- could import like this:
|
||||
|
||||
|
@ -262,7 +262,7 @@ vips_hough_circle_class_init( VipsHoughClass *class )
|
||||
static void
|
||||
vips_hough_circle_init( VipsHoughCircle *hough_circle )
|
||||
{
|
||||
hough_circle->scale = 3;
|
||||
hough_circle->scale = 1;
|
||||
hough_circle->min_radius = 10;
|
||||
hough_circle->max_radius = 20;
|
||||
}
|
||||
|
@ -342,5 +342,21 @@ class TestArithmetic(unittest.TestCase):
|
||||
self.assertAlmostEqualObjects(hist.getpoint(0,0), [0])
|
||||
self.assertAlmostEqualObjects(hist.getpoint(1,0), [50000])
|
||||
|
||||
def test_histfind_ndim(self):
|
||||
im = Vips.Image.black(100, 100) + [1, 2, 3]
|
||||
|
||||
for fmt in noncomplex_formats:
|
||||
hist = im.cast(fmt).hist_find_ndim()
|
||||
|
||||
self.assertAlmostEqualObjects(hist.getpoint(0,0)[0], 10000)
|
||||
self.assertAlmostEqualObjects(hist.getpoint(5,5)[5], 0)
|
||||
|
||||
hist = im.cast(fmt).hist_find_ndim(bins = 1)
|
||||
|
||||
self.assertAlmostEqualObjects(hist.getpoint(0,0)[0], 10000)
|
||||
self.assertEqual(hist.width, 1)
|
||||
self.assertEqual(hist.height, 1)
|
||||
self.assertEqual(hist.bands, 1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
Loading…
Reference in New Issue
Block a user