fix for bug 3172
This commit is contained in:
parent
bbe48eaac6
commit
ed2cdb71e5
@ -2463,7 +2463,7 @@ struct BatchDistInvoker : public ParallelLoopBody
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cv::batchDistance( InputArray _src1, InputArray _src2,
|
void cv::batchDistance( InputArray _src1, InputArray _src2,
|
||||||
OutputArray _dist, int dtype, OutputArray _nidx,
|
InputOutputArray _dist, int dtype, InputOutputArray _nidx,
|
||||||
int normType, int K, InputArray _mask,
|
int normType, int K, InputArray _mask,
|
||||||
int update, bool crosscheck )
|
int update, bool crosscheck )
|
||||||
{
|
{
|
||||||
@ -2479,8 +2479,6 @@ void cv::batchDistance( InputArray _src1, InputArray _src2,
|
|||||||
}
|
}
|
||||||
CV_Assert( (type == CV_8U && dtype == CV_32S) || dtype == CV_32F);
|
CV_Assert( (type == CV_8U && dtype == CV_32S) || dtype == CV_32F);
|
||||||
|
|
||||||
K = std::min(K, src2.rows);
|
|
||||||
|
|
||||||
_dist.create(src1.rows, (K > 0 ? K : src2.rows), dtype);
|
_dist.create(src1.rows, (K > 0 ? K : src2.rows), dtype);
|
||||||
Mat dist = _dist.getMat(), nidx;
|
Mat dist = _dist.getMat(), nidx;
|
||||||
if( _nidx.needed() )
|
if( _nidx.needed() )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user