def test_iplimage_to_None(self):
   dst = convert_data(self.src_ipl, None)
   self.assertEqual(type(dst), cv.iplimage)
Example #2
0
 def set_value(self, value):
   if DEBUG:
     print "%s %s %s set_value" % (self.__class__.__name__, self.get_element_title(), self.title)
   self.value = convert_data(value, self.data_types)
   self.valid = True
   self.blocked = False
 def test_cvmat_to_array(self):
   dst = convert_data(self.src_mat, [numpy.ndarray])
   self.assertEqual(type(dst), numpy.ndarray)
 def test_cvmat_to_iplimage_or_cvmat(self):
   dst = convert_data(self.src_mat, [cv.iplimage, cv.cvmat])
   self.assertEqual(type(dst), cv.cvmat)
 def test_cvmat_to_None(self):
   dst = convert_data(self.src_mat, None)
   self.assertEqual(type(dst), cv.cvmat)
 def test_cvmat_to_list(self):
   dst = convert_data(self.src_mat, [list])
   self.assertEqual(type(dst), list)
 def test_array_to_cvmat(self):
   dst = convert_data(self.src_array, [cv.cvmat])
   self.assertEqual(type(dst), cv.cvmat)
 def test_array_to_cvmat_or_iplimage(self):
   dst = convert_data(self.src_array, [cv.cvmat, cv.iplimage])
   self.assertEqual(type(dst), cv.cvmat)
 def test_array_to_None(self):
   dst = convert_data(self.src_array, None)
   self.assertEqual(type(dst), numpy.ndarray)
 def test_array_to_list(self):
   dst = convert_data(self.src_array, [list])
   self.assertEqual(type(dst), list)
 def test_list_to_iplimage(self):
   dst = convert_data(self.src_list, [cv.iplimage])
   self.assertEqual(type(dst), cv.iplimage)
 def test_list_to_None(self):
   dst = convert_data(self.src_list, None)
   self.assertEqual(type(dst), list)
 def test_iplimage_to_cvmat(self):
   dst = convert_data(self.src_ipl, [cv.cvmat])
   self.assertEqual(type(dst), cv.cvmat)
 def test_iplimage_to_array(self):
   dst = convert_data(self.src_ipl, [numpy.ndarray])
   self.assertEqual(type(dst), numpy.ndarray)
 def test_iplimage_to_list(self):
   dst = convert_data(self.src_ipl, [list])
   self.assertEqual(type(dst), list)