mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
Merge branch 4.x
This commit is contained in:
@@ -187,6 +187,10 @@ class Arguments(NewOpenCVTests):
|
||||
#res6 = cv.utils.dumpInputArray([a, b])
|
||||
#self.assertEqual(res6, "InputArrayOfArrays: empty()=false kind=0x00050000 flags=0x01050000 total(-1)=2 dims(-1)=1 size(-1)=2x1 type(0)=CV_32FC1 dims(0)=4 size(0)=[2 3 4 5]")
|
||||
|
||||
def test_20968(self):
|
||||
pixel = np.uint8([[[40, 50, 200]]])
|
||||
_ = cv.cvtColor(pixel, cv.COLOR_RGB2BGR) # should not raise exception
|
||||
|
||||
def test_parse_to_bool_convertible(self):
|
||||
try_to_convert = partial(self._try_to_convert, cv.utils.dumpBool)
|
||||
for convertible_true in (True, 1, 64, np.bool(1), np.int8(123), np.int16(11), np.int32(2),
|
||||
@@ -590,6 +594,18 @@ class Arguments(NewOpenCVTests):
|
||||
self.assertEqual(ints.dtype, np.int32, "Vector of integers has wrong elements type")
|
||||
self.assertEqual(ints.shape, expected_shape, "Vector of integers has wrong shape.")
|
||||
|
||||
def test_result_rotated_rect_issue_20930(self):
|
||||
rr = cv.utils.testRotatedRect(10, 20, 100, 200, 45)
|
||||
self.assertTrue(isinstance(rr, tuple), msg=type(rr))
|
||||
self.assertEqual(len(rr), 3)
|
||||
|
||||
rrv = cv.utils.testRotatedRectVector(10, 20, 100, 200, 45)
|
||||
self.assertTrue(isinstance(rrv, tuple), msg=type(rrv))
|
||||
self.assertEqual(len(rrv), 10)
|
||||
|
||||
rr = rrv[0]
|
||||
self.assertTrue(isinstance(rr, tuple), msg=type(rrv))
|
||||
self.assertEqual(len(rr), 3)
|
||||
|
||||
class CanUsePurePythonModuleFunction(NewOpenCVTests):
|
||||
def test_can_get_ocv_version(self):
|
||||
|
||||
@@ -25,7 +25,7 @@ class NewOpenCVTests(unittest.TestCase):
|
||||
repoPath = None
|
||||
extraTestDataPath = None
|
||||
# github repository url
|
||||
repoUrl = 'https://raw.github.com/opencv/opencv/master'
|
||||
repoUrl = 'https://raw.github.com/opencv/opencv/5.x'
|
||||
|
||||
def find_file(self, filename, searchPaths=[], required=True):
|
||||
searchPaths = searchPaths if searchPaths else [self.repoPath, self.extraTestDataPath]
|
||||
|
||||
Reference in New Issue
Block a user