1 | initial version |
i bet the culprit is the overloaded == operator, like Mat c = (a==b);
maybe overloading the comparison like this works:
bool compareMats( const Mat & a, const Mat & b ) {
return sum(a-b)[0]==0;
}
std::set<Mat, compareMats> nonDuplicatedPairs;
2 | No.2 Revision |
(found out, that it's 'less', not 'equal')
i bet the culprit is the overloaded == < operator, like Mat c = (a==b);(a<b);< p="">
maybe overloading the comparison like this works:
bool compareMats( const Mat & a, const Mat & b ) {
return sum(a-b)[0]==0;
sum(a-b)[0] < 0; // less
}
std::set<Mat, compareMats> nonDuplicatedPairs;
3 | No.3 Revision |
(found out, that it's 'less', not 'equal') i bet the culprit is the overloaded < operator, like Mat c = (a<b);< p="">
maybe overloading the comparison like this works:
struct compareMats
{
bool compareMats( const operator()(const Mat & a, const Mat & b ) b) const
{
return sum(a-b)[0] < sum(b-a)[0] > 0; // less
}
};
std::set<Mat, compareMats> nonDuplicatedPairs;