mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
Merge pull request #12310 from cv3d:chunks/enum_interface
* Cleanup macros and enable expansion of `__VA_ARGS__` for Visual Studio * Macros for enum-arguments backwards compatibility * Convert struct Param to enum struct * Enabled ParamType.type for enum types * Enabled `cv.read` and `cv.write` for enum types * Rename unnamed enum to AAKAZE.DescriptorType * Rename unnamed enum to AccessFlag * Rename unnamed enum to AgastFeatureDetector.DetectorType * Convert struct DrawMatchesFlags to enum struct * Rename unnamed enum to FastFeatureDetector.DetectorType * Rename unnamed enum to Formatter.FormatType * Rename unnamed enum to HOGDescriptor.HistogramNormType * Rename unnamed enum to DescriptorMatcher.MatcherType * Rename unnamed enum to KAZE.DiffusivityType * Rename unnamed enum to ORB.ScoreType * Rename unnamed enum to UMatData.MemoryFlag * Rename unnamed enum to _InputArray.KindFlag * Rename unnamed enum to _OutputArray.DepthMask * Convert normType enums to static const NormTypes * Avoid conflicts with ElemType * Rename unnamed enum to DescriptorStorageFormat
This commit is contained in:
committed by
Alexander Alekhin
parent
84ae8097b1
commit
ef5579dc86
@@ -946,7 +946,7 @@ void Core_ArrayOpTest::run( int /* start_from */)
|
||||
}
|
||||
|
||||
|
||||
template <class ElemType>
|
||||
template <class T>
|
||||
int calcDiffElemCountImpl(const vector<Mat>& mv, const Mat& m)
|
||||
{
|
||||
int diffElemCount = 0;
|
||||
@@ -955,12 +955,12 @@ int calcDiffElemCountImpl(const vector<Mat>& mv, const Mat& m)
|
||||
{
|
||||
for(int x = 0; x < m.cols; x++)
|
||||
{
|
||||
const ElemType* mElem = &m.at<ElemType>(y,x*mChannels);
|
||||
const T* mElem = &m.at<T>(y, x*mChannels);
|
||||
size_t loc = 0;
|
||||
for(size_t i = 0; i < mv.size(); i++)
|
||||
{
|
||||
const size_t mvChannel = mv[i].channels();
|
||||
const ElemType* mvElem = &mv[i].at<ElemType>(y,x*(int)mvChannel);
|
||||
const T* mvElem = &mv[i].at<T>(y, x*(int)mvChannel);
|
||||
for(size_t li = 0; li < mvChannel; li++)
|
||||
if(mElem[loc + li] != mvElem[li])
|
||||
diffElemCount++;
|
||||
|
||||
Reference in New Issue
Block a user