mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Added new data types to cv::Mat & UMat (#23865)
* started working on adding 32u, 64u, 64s, bool and 16bf types to OpenCV * core & imgproc tests seem to pass * fixed a few compile errors and test failures on macOS x86 * hopefully fixed some compile problems and test failures * fixed some more warnings and test failures * trying to fix small deviations in perf_core & perf_imgproc by revering randf_64f to exact version used before * trying to fix behavior of the new OpenCV with old plugins; there is (quite strong) assumption that video capture would give us frames with depth == CV_8U (0) or CV_16U (2). If depth is > 7 then it means that the plugin is built with the old OpenCV. It needs to be recompiled, of course and then this hack can be removed. * try to repair the case when target arch does not have FP64 SIMD * 1. fixed bug in itoa() found by alalek 2. restored ==, !=, > and < univ. intrinsics on ARM32/ARM64.
This commit is contained in:
@@ -465,6 +465,15 @@ void Regression::verify(cv::FileNode node, cv::InputArray array, double eps, ERR
|
||||
{
|
||||
int expected_kind = (int)node["kind"];
|
||||
int expected_type = (int)node["type"];
|
||||
int array_type = array.type();
|
||||
if (array_type != expected_type) {
|
||||
// temporary hack; we optimistically assume that type in the computed and expected array should be the same.
|
||||
// if they are different, it must be because of the change in type representation between OpenCV 5.x and OpenCV 2.x,3.x,4.x.
|
||||
// need to add "type5" or something like that and use it in the newer files. Then type will always mean 'earlier than 5.x type'.
|
||||
int depth = expected_type & 7;
|
||||
int channels = ((expected_type >> 3) & 127) + 1;
|
||||
expected_type = CV_MAKETYPE(depth, channels);
|
||||
}
|
||||
ASSERT_EQ(expected_kind, array.kind()) << " Argument \"" << node.name() << "\" has unexpected kind";
|
||||
ASSERT_EQ(expected_type, array.type()) << " Argument \"" << node.name() << "\" has unexpected type";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user