]> rtime.felk.cvut.cz Git - opencv.git/commitdiff
numpy test fromarray(allowND) check
authorjamesb <jamesb@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Thu, 25 Mar 2010 23:43:42 +0000 (23:43 +0000)
committerjamesb <jamesb@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Thu, 25 Mar 2010 23:43:42 +0000 (23:43 +0000)
git-svn-id: https://code.ros.org/svn/opencv/trunk@2914 73c94f0f-984f-4a5f-82bc-2d8db8d8ee08

opencv/tests/python/test.py

index f2e61d46a3519b73756255245c5f1d24923d1426..6f2806e2b69ccedd74b3b4662267fd74c1f995bf 100644 (file)
@@ -753,7 +753,8 @@ class AreaTests(OpenCVTests):
                 a1 = numpy.array([1] * reduce(operator.__mul__, numpydims)).reshape(*numpydims)
                 return cv.fromarray(a1)
             def row_col_chan(m):
-                (col, row) = cv.GetSize(m)
+                col = m.cols
+                row = m.rows
                 chan = cv.CV_MAT_CN(cv.GetElemType(m))
                 return (row, col, chan)
 
@@ -804,7 +805,7 @@ class AreaTests(OpenCVTests):
             # multi-dimensional NumPy array
             na = numpy.ones([7,9,2,1,8])
             cm = cv.fromarray(na, True)
-            print cv.GetDims(cm)
+            self.assertEqual(cv.GetDims(cm), (7,9,2,1,8))
 
             # Using an array object for a CvArr parameter
             ones = numpy.ones((640, 480))