backported API for storing OpenCV data structures to text string and reading them back (r8481, r8516, r8518, r8522)

This commit is contained in:
Andrey Kamaev
2012-05-31 10:25:29 +00:00
parent 4e4b96e3d9
commit 9ad470ba5c
6 changed files with 249 additions and 100 deletions

View File

@@ -22,4 +22,21 @@ TEST(Core_Drawing, _914)
int pixelsDrawn = rows*cols - countNonZero(img);
ASSERT_EQ( (3*rows + cols)*3 - 3*9, pixelsDrawn);
}
TEST(Core_OutputArraySreate, _1997)
{
struct local {
static void create(OutputArray arr, Size submatSize, int type)
{
int sizes[] = {submatSize.width, submatSize.height};
arr.create(sizeof(sizes)/sizeof(sizes[0]), sizes, type);
}
};
Mat mat(Size(512, 512), CV_8U);
Size submatSize = Size(256, 256);
ASSERT_NO_THROW(local::create( mat(Rect(Point(), submatSize)), submatSize, mat.type() ));
}