Merge branch '2.4'
This commit is contained in:
@@ -458,7 +458,7 @@ struct SphericalPortraitProjector : ProjectorBase
|
||||
|
||||
// Projects image onto unit sphere with origin at (0, 0, 0).
|
||||
// Poles are located NOT at (0, -1, 0) and (0, 1, 0) points, BUT at (1, 0, 0) and (-1, 0, 0) points.
|
||||
class SphericalPortraitWarper : public RotationWarperBase<SphericalPortraitProjector>
|
||||
class CV_EXPORTS SphericalPortraitWarper : public RotationWarperBase<SphericalPortraitProjector>
|
||||
{
|
||||
public:
|
||||
SphericalPortraitWarper(float scale) { projector_.scale = scale; }
|
||||
@@ -474,7 +474,7 @@ struct CylindricalPortraitProjector : ProjectorBase
|
||||
};
|
||||
|
||||
|
||||
class CylindricalPortraitWarper : public RotationWarperBase<CylindricalPortraitProjector>
|
||||
class CV_EXPORTS CylindricalPortraitWarper : public RotationWarperBase<CylindricalPortraitProjector>
|
||||
{
|
||||
public:
|
||||
CylindricalPortraitWarper(float scale) { projector_.scale = scale; }
|
||||
@@ -493,7 +493,7 @@ struct PlanePortraitProjector : ProjectorBase
|
||||
};
|
||||
|
||||
|
||||
class PlanePortraitWarper : public RotationWarperBase<PlanePortraitProjector>
|
||||
class CV_EXPORTS PlanePortraitWarper : public RotationWarperBase<PlanePortraitProjector>
|
||||
{
|
||||
public:
|
||||
PlanePortraitWarper(float scale) { projector_.scale = scale; }
|
||||
|
@@ -347,8 +347,15 @@ SurfFeaturesFinder::SurfFeaturesFinder(double hess_thresh, int num_octaves, int
|
||||
void SurfFeaturesFinder::find(const Mat &image, ImageFeatures &features)
|
||||
{
|
||||
Mat gray_image;
|
||||
CV_Assert(image.type() == CV_8UC3);
|
||||
cvtColor(image, gray_image, CV_BGR2GRAY);
|
||||
CV_Assert((image.type() == CV_8UC3) || (image.type() == CV_8UC1));
|
||||
if(image.type() == CV_8UC3)
|
||||
{
|
||||
cvtColor(image, gray_image, CV_BGR2GRAY);
|
||||
}
|
||||
else
|
||||
{
|
||||
gray_image = image;
|
||||
}
|
||||
if (surf.empty())
|
||||
{
|
||||
detector_->detect(gray_image, features.keypoints);
|
||||
|
Reference in New Issue
Block a user