-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Depth values ordering is broken #12569
Copy link
Copy link
Closed
Labels
Description
System information (version)
- OpenCV => 4.0.0-pre
- Operating System / Platform => All
- Compiler => All
Detailed description
After introducing CV_16F, assertions like CV_Assert(CV_16F < CV_32F) fails miserably...
Steps to reproduce
vector<???> order { CV_8U, CV_8S, CV_16U, CV_16S, CV_16F, CV_32S, CV_32F, CV_64F };
for (int i = 0; i < order.size(); ++i)
{
for (int j = 0; j < order.size(); ++j)
{
ASSERT_EQ(order[i] < order[j], i < j);
ASSERT_EQ(order[i] <= order[j], i <= j);
ASSERT_EQ(order[i] > order[j], i > j);
ASSERT_EQ(order[i] >= order[j], i >= j);
}
}At least among IEEE floats, in which CV_16F < CV_32F now returns false 😕
Reactions are currently unavailable