Merge pull request #3151 from PhilLab:orbNoKeypoints
This commit is contained in:
commit
2211cfe783
@ -49,6 +49,7 @@ template<typename _Tp> inline void copyVectorToUMat(const std::vector<_Tp>& v, O
|
|||||||
{
|
{
|
||||||
if(v.empty())
|
if(v.empty())
|
||||||
um.release();
|
um.release();
|
||||||
|
else
|
||||||
Mat(1, (int)(v.size()*sizeof(v[0])), CV_8U, (void*)&v[0]).copyTo(um);
|
Mat(1, (int)(v.size()*sizeof(v[0])), CV_8U, (void*)&v[0]).copyTo(um);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -805,6 +806,10 @@ static void computeKeyPoints(const Mat& imagePyramid,
|
|||||||
std::vector<Vec3i> ukeypoints_buf;
|
std::vector<Vec3i> ukeypoints_buf;
|
||||||
|
|
||||||
nkeypoints = (int)allKeypoints.size();
|
nkeypoints = (int)allKeypoints.size();
|
||||||
|
if(nkeypoints == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
Mat responses;
|
Mat responses;
|
||||||
UMat ukeypoints, uresponses(1, nkeypoints, CV_32F);
|
UMat ukeypoints, uresponses(1, nkeypoints, CV_32F);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user