mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
Merge pull request #22346 from fengyuentau:mat1d_part1
Changes separated from Mat 1D support in core #18594 (#22346)
This commit is contained in:
@@ -1565,13 +1565,24 @@ void cv::minMaxLoc( InputArray _img, double* minVal, double* maxVal,
|
||||
{
|
||||
CV_INSTRUMENT_REGION();
|
||||
|
||||
CV_Assert(_img.dims() <= 2);
|
||||
int dims = _img.dims();
|
||||
CV_CheckLE(dims, 2, "");
|
||||
|
||||
minMaxIdx(_img, minVal, maxVal, (int*)minLoc, (int*)maxLoc, mask);
|
||||
if( minLoc )
|
||||
std::swap(minLoc->x, minLoc->y);
|
||||
{
|
||||
if (dims == 2)
|
||||
std::swap(minLoc->x, minLoc->y);
|
||||
else
|
||||
minLoc->y = 0;
|
||||
}
|
||||
if( maxLoc )
|
||||
std::swap(maxLoc->x, maxLoc->y);
|
||||
{
|
||||
if (dims == 2)
|
||||
std::swap(maxLoc->x, maxLoc->y);
|
||||
else
|
||||
maxLoc->y = 0;
|
||||
}
|
||||
}
|
||||
|
||||
enum class ReduceMode
|
||||
|
||||
Reference in New Issue
Block a user