Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • labrobotica/algorithms/vision_utils
1 result
Show changes
Commits on Source (1)
Showing
with 543 additions and 1 deletion
......@@ -19,3 +19,13 @@ ELSE (vision_utils_FOUND)
ENDIF (vision_utils_FIND_REQUIRED)
ENDIF (vision_utils_FOUND)
# FIXME : make tf_utils optional
if(NOT tf_utils_FOUND)
FIND_PACKAGE(tf_utils REQUIRED)
list(APPEND vision_utils_INCLUDE_DIR ${tf_utils_INCLUDE_DIRS})
list(APPEND vision_utils_LIBRARY ${tf_utils_LIBRARIES})
list(APPEND vision_utils_INCLUDE_DIRS ${tf_utils_INCLUDE_DIRS})
list(APPEND vision_utils_LIBRARIES ${tf_utils_LIBRARIES})
endif()
......@@ -15,6 +15,10 @@ IF((CMAKE_BUILD_TYPE MATCHES DEBUG) OR (CMAKE_BUILD_TYPE MATCHES debug) OR (CMAK
ADD_DEFINITIONS(-D_VU_DEBUG)
ENDIF()
# FIXME : set as build parameter !!
FIND_PACKAGE(tf_utils REQUIRED)
# library source files
SET(sources
vision_utils.cpp
......@@ -24,6 +28,8 @@ SET(sources
detectors/detector_base.cpp
detectors/orb/detector_orb.cpp
detectors/orb/detector_orb_load_yaml.cpp
detectors/lfnet/detector_lfnet.cpp
detectors/lfnet/detector_lfnet_load_yaml.cpp
detectors/fast/detector_fast.cpp
detectors/fast/detector_fast_load_yaml.cpp
detectors/sift/detector_sift.cpp
......@@ -51,6 +57,8 @@ SET(sources
descriptors/descriptor_base.cpp
descriptors/orb/descriptor_orb.cpp
descriptors/orb/descriptor_orb_load_yaml.cpp
descriptors/lfnet/descriptor_lfnet.cpp
descriptors/lfnet/descriptor_lfnet_load_yaml.cpp
descriptors/sift/descriptor_sift.cpp
descriptors/sift/descriptor_sift_load_yaml.cpp
descriptors/surf/descriptor_surf.cpp
......@@ -118,7 +126,9 @@ SET(headers_det
detectors/detector_base.h)
SET(headers_det_orb
detectors/orb/detector_orb.h)
SET(headers_det_fast
SET(headers_det_lfnet
detectors/lfnet/detector_lfnet.h)
SET(headers_det_fast
detectors/fast/detector_fast.h)
SET(headers_det_sift
detectors/sift/detector_sift.h)
......@@ -147,6 +157,8 @@ SET(headers_des
descriptors/descriptor_base.h)
SET(headers_des_orb
descriptors/orb/descriptor_orb.h)
SET(headers_des_lfnet
descriptors/lfnet/descriptor_lfnet.h)
SET(headers_des_sift
descriptors/sift/descriptor_sift.h)
SET(headers_des_surf
......@@ -233,6 +245,11 @@ IF(YAMLCPP_FOUND)
INCLUDE_DIRECTORIES(${YAMLCPP_INCLUDE_DIR})
ENDIF(YAMLCPP_FOUND)
# FIXME : set as optional :
#IF(tf_utils_FOUND)
INCLUDE_DIRECTORIES(${tf_utils_INCLUDE_DIRS})
#ENDIF(tf_utils_FOUND)
SET(_VU_ROOT_DIR ${CMAKE_SOURCE_DIR})
# Define the directory where will be the configured config.h
......@@ -259,6 +276,9 @@ ADD_LIBRARY(${PROJECT_NAME} SHARED ${sources})
#TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS} ${Boost_LIBRARIES})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${OpenCV_LIBS})
# FIXME : set as optional
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${tf_utils_LIBRARIES})
IF (YAMLCPP_FOUND)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${YAMLCPP_LIBRARY})
ENDIF (YAMLCPP_FOUND)
......@@ -274,6 +294,7 @@ INSTALL(FILES ${headers_sen} DESTINATION include/${PROJECT_NAME}/sensors)
INSTALL(FILES ${headers_sen_usb} DESTINATION include/${PROJECT_NAME}/sensors/usb_cam)
INSTALL(FILES ${headers_det} DESTINATION include/${PROJECT_NAME}/detectors)
INSTALL(FILES ${headers_det_orb} DESTINATION include/${PROJECT_NAME}/detectors/orb)
INSTALL(FILES ${headers_det_lfnet} DESTINATION include/${PROJECT_NAME}/detectors/lfnet)
INSTALL(FILES ${headers_det_fast} DESTINATION include/${PROJECT_NAME}/detectors/fast)
INSTALL(FILES ${headers_det_sift} DESTINATION include/${PROJECT_NAME}/detectors/sift)
INSTALL(FILES ${headers_det_surf} DESTINATION include/${PROJECT_NAME}/detectors/surf)
......@@ -288,6 +309,7 @@ INSTALL(FILES ${headers_det_akaze} DESTINATION include/${PROJECT_NAME}/detectors
INSTALL(FILES ${headers_det_agast} DESTINATION include/${PROJECT_NAME}/detectors/agast)
INSTALL(FILES ${headers_des} DESTINATION include/${PROJECT_NAME}/descriptors)
INSTALL(FILES ${headers_des_orb} DESTINATION include/${PROJECT_NAME}/descriptors/orb)
INSTALL(FILES ${headers_des_lfnet} DESTINATION include/${PROJECT_NAME}/descriptors/lfnet)
INSTALL(FILES ${headers_des_sift} DESTINATION include/${PROJECT_NAME}/descriptors/sift)
INSTALL(FILES ${headers_des_surf} DESTINATION include/${PROJECT_NAME}/descriptors/surf)
INSTALL(FILES ${headers_des_brisk} DESTINATION include/${PROJECT_NAME}/descriptors/brisk)
......
......@@ -2,6 +2,7 @@
#define _DESCRIPTORS_H_
#include "descriptors/orb/descriptor_orb.h"
#include "descriptors/lfnet/descriptor_lfnet.h"
#include "descriptors/sift/descriptor_sift.h"
#include "descriptors/surf/descriptor_surf.h"
#include "descriptors/brisk/descriptor_brisk.h"
......
#include "descriptor_lfnet.h"
namespace vision_utils {
DescriptorLFNET::DescriptorLFNET(void)
{}
DescriptorLFNET::~DescriptorLFNET(void)
{}
} /* namespace vision_utils */
// Register in the DescriptorsFactory
namespace vision_utils
{
VU_REGISTER_DESCRIPTOR("LFNET", DescriptorLFNET);
} /* namespace vision_utils */
#ifndef _DESCRIPTOR_LFNET_H_
#define _DESCRIPTOR_LFNET_H_
#include "../descriptor_base.h"
#include "../descriptor_factory.h"
#include "../../detectors/lfnet/detector_lfnet.h"
namespace vision_utils {
// Create all pointers
VU_PTR_TYPEDEFS(DescriptorLFNET);
VU_STRUCT_PTR_TYPEDEFS(DescriptorParamsLFNET);
/** \brief Class parameters
*
*/
struct DescriptorParamsLFNET: public DescriptorParamsBase
{
std::string network_config_path;
int nfeatures;
std::string environment; // env for which the net was trained (outdoor, indoor..)
DescriptorParamsLFNET() : DescriptorParamsBase("LFNET"){};
DescriptorParamsLFNET(cv::Ptr<LFNETFeature2D> _det_des) :
DescriptorParamsBase("LFNET"),
det_des_(_det_des) {};
~DescriptorParamsLFNET(){}
void set_det_des(cv::Ptr<LFNETFeature2D> _det_des) {det_des_ = _det_des;}
cv::Ptr<LFNETFeature2D> get_det_des(){
if (det_des_.empty()){
std::cout << "/!\\ det_des_ is nullptr /!\\\n"; };
return det_des_;
};
private:
cv::Ptr<LFNETFeature2D> det_des_;
};
/** \brief Descriptor class
*
*/
class DescriptorLFNET : public DescriptorBase {
public:
DescriptorLFNET();
virtual ~DescriptorLFNET(void);
// Factory method
static DescriptorBasePtr create(const std::string& _unique_name, const ParamsBasePtr _params);
void set_descriptor(cv::Ptr<LFNETFeature2D> _det_des){descriptor_ = _det_des;};
private:
void defineDescriptor(const ParamsBasePtr _params);
};
/*
* brief Define Descriptor
*/
inline void DescriptorLFNET::defineDescriptor(const ParamsBasePtr _params)
{
DescriptorParamsLFNETPtr params_ptr = std::static_pointer_cast<DescriptorParamsLFNET>(_params);
descriptor_ = params_ptr->get_det_des();
}
/*
* brief Create object in factory
*/
inline DescriptorBasePtr DescriptorLFNET::create(const std::string& _unique_name, const ParamsBasePtr _params)
{
DescriptorLFNETPtr det_ptr = std::make_shared<DescriptorLFNET>();
det_ptr->setName(_unique_name);
det_ptr->defineDescriptor(_params);
return det_ptr;
}
} /* namespace vision_utils */
#endif /* _DESCRIPTOR_LFNET_H_ */
#include "descriptor_lfnet.h"
#ifdef USING_YAML
// yaml-cpp library
#include <yaml-cpp/yaml.h>
namespace vision_utils
{
namespace
{
static ParamsBasePtr createParamsLFNETDescriptor(const std::string & _filename_dot_yaml)
{
DescriptorParamsLFNETPtr params_ptr = std::make_shared<DescriptorParamsLFNET>();
using std::string;
using YAML::Node;
Node yaml_params = YAML::LoadFile(_filename_dot_yaml);
if (!yaml_params.IsNull())
{
Node d_yaml = yaml_params["descriptor"];
if(d_yaml["type"].as<string>() == "LFNET")
{
params_ptr->network_config_path = d_yaml["network config path"].as<std::string>();
Node net_params = YAML::LoadFile(params_ptr->network_config_path);
params_ptr->nfeatures = net_params["nfeatures"].as<unsigned int>();
params_ptr->environment = net_params["environment"].as<std::string>();
}else
{
std::cerr << "Bad configuration file. Wrong type " << d_yaml["type"].as<string>() << std::endl;
return nullptr;
}
}
return params_ptr;
}
// Register in the SensorFactory
const bool VU_UNUSED registered_desLFNET_params = ParamsFactory::get().registerCreator("LFNET DES", createParamsLFNETDescriptor);
} /* namespace [unnamed] */
} /* namespace vision_utils */
#endif /* IF USING_YAML */
......@@ -3,6 +3,7 @@
// Detector headers
#include "detectors/orb/detector_orb.h"
#include "detectors/lfnet/detector_lfnet.h"
#include "detectors/fast/detector_fast.h"
#include "detectors/sift/detector_sift.h"
#include "detectors/surf/detector_surf.h"
......
#include "detector_lfnet.h"
namespace vision_utils {
LFNETFeature2D::LFNETFeature2D(const std::string & _filename_dot_yaml, int _nfeatures, std::string _environment) :
network( tf_utils::TfNet(_filename_dot_yaml)),
network_yaml_config(_filename_dot_yaml),
nfeatures(_nfeatures),
environment(_environment) {}
cv::Ptr<LFNETFeature2D> LFNETFeature2D::create(const std::string & _filename_dot_yaml, int _nfeatures, std::string _environment)
{
return cv::makePtr<LFNETFeature2D>(_filename_dot_yaml, _nfeatures, _environment);
}
cv::String LFNETFeature2D::getDefaultName() const
{
return "LFNET";
};
std::vector<cv::KeyPoint> mat_to_keypoints(const cv::Mat& mat) {
std::vector<cv::KeyPoint> c_keypoints;
for ( int i = 0; i < mat.rows; i++) {
cv::Vec<float, 7> v = mat.at< cv::Vec<float, 7> >(i,0);
cv::KeyPoint kp(v[0], v[1], v[2], v[3], v[4], (int)v[5], (int)v[6]);
c_keypoints.push_back(kp);
};
return c_keypoints;
};
void LFNETFeature2D::detectAndCompute( cv::InputArray image, cv::InputArray mask, std::vector<cv::KeyPoint>& keypoints,
cv::OutputArray descriptors, bool useProvidedKeypoints)
{
if (useProvidedKeypoints) // descriptor case
{
// FIXME : mabe it's not the best way to test if it is the same image :
if (image.getMat().data != last_image_.data)
{
std::cout << "error in LFNETFeature2D::detectAndCompute (image != last_image_)\nif using the LFNET descriptor, please also use the LFNET detector before\n";
return;
};
// retrieve cached descriptors :
descriptors.assign(last_descriptors_);
return;
}
else // detector case
{
// TODO : I ignore mask and useProvidedKeypoints, mabe we should not..
tf_utils::Array input_arr (image.getMat());
std::vector<tf_utils::Array> net_outputs = network.Run(input_arr);
if (net_outputs.size()==0) {
std::cout << "LFNETFeature2D::detectAndCompute could not compute image descriptors\n";
return;
};
net_outputs.at(0).squeezeShape(); // --> "kpts"
net_outputs.at(1).squeezeShape(); // --> "feats"
keypoints = mat_to_keypoints(net_outputs.at(0).toMat());
cv::Mat out_descriptors = descriptors.getMat();
out_descriptors = net_outputs.at(1).toMat();
// store cache :
last_image_ = image.getMat();
last_descriptors_ = net_outputs.at(1).toMat(); //out_descriptors;
return;
};
}
DetectorLFNET::DetectorLFNET(void)
{}
DetectorLFNET::~DetectorLFNET(void)
{}
KeyPointVector DetectorLFNET::detect(const cv::Mat& _image, cv::InputArray& _mask)
{
KeyPointVector kpts;
clock_t tStart = clock();
detector_->detect(_image, kpts, _mask);
comp_time_ = (double)(clock() - tStart) / CLOCKS_PER_SEC;
return kpts;
}
KeyPointVector DetectorLFNET::detect(const cv::Mat& _image, cv::Rect _roi)
{
KeyPointVector kpts;
if (!_image.empty())
{
cv::Mat _image_roi = adaptRoi(getPatternRadius(), _image, _roi);
try
{
kpts = detect(_image_roi);
for (int ii = 0; ii < kpts.size(); ++ii)
{
kpts[ii].pt.x = kpts[ii].pt.x + _roi.x;
kpts[ii].pt.y = kpts[ii].pt.y + _roi.y;
}
}
catch( cv::Exception& e )
{
std::cerr << "exception caught: " << e.what() << std::endl;
}
}
return kpts;
}
} /* namespace vision_utils */
// Register in the DetectorsFactory
namespace vision_utils
{
VU_REGISTER_DETECTOR("LFNET", DetectorLFNET);
} /* namespace vision_utils */
#ifndef _DETECTOR_LFNET_H_
#define _DETECTOR_LFNET_H_
#include "tf_utils/tf_net.hpp"
#include "../detector_base.h"
#include "../detector_factory.h"
namespace vision_utils {
// Create all pointers
VU_PTR_TYPEDEFS(DetectorLFNET);
VU_STRUCT_PTR_TYPEDEFS(DetectorParamsLFNET);
class LFNETFeature2D : public cv::Feature2D
{
private:
// ##### the config file should be like that : #####
//
// model:
// path: "./lfnet_release_outdoor_500kp.pb"
// input name: "lfnet_input"
// output names:
// - "MSDeepDet/add_5" # --> "kpts" <dtype: 'float32'> (?, 2)
// - "SimpleDesc/l2_normalize" # --> "feats" <dtype: 'float32'> (?, 256)
//
// nfeatures: 500 # -> number of keypoints produced by the network
//
// ##### with as output : first the kp locations and second the descriptors #####
tf_utils::TfNet network;
std::string network_yaml_config;
int nfeatures = 500;
std::string environment; // env for which the net was trained (outdoor, indoor..)
// Cache :
cv::Mat last_image_;
cv::Mat last_descriptors_;
float scaleFactor = 1;
int nlevels = 1;
int edgeThreshold = 0;
int firstLevel = 0;
int WTA_K = 2;
int scoreType = 0;
int patchSize = 1;
int fastThreshold = 20; // ?
public:
LFNETFeature2D(){};
LFNETFeature2D(const std::string & _filename_dot_yaml, int _nfeatures, std::string _environment);
static cv::Ptr<LFNETFeature2D> create(const std::string & _filename_dot_yaml, int _nfeatures, std::string _environment);
virtual cv::String getDefaultName() const override;
void detectAndCompute( cv::InputArray image, cv::InputArray mask, std::vector<cv::KeyPoint>& keypoints,
cv::OutputArray descriptors, bool useProvidedKeypoints=false ) override;
};
/** \brief Class parameters
*
*/
struct DetectorParamsLFNET: public DetectorParamsBase
{
std::string network_config_path;
int nfeatures;
std::string environment; // env for which the net was trained (outdoor, indoor..)
DetectorParamsLFNET() : DetectorParamsBase("LFNET"){}
~DetectorParamsLFNET(){}
};
/** \brief DETECTOR class
*
*/
class DetectorLFNET : public DetectorBase {
public:
DetectorLFNET();
virtual ~DetectorLFNET(void);
KeyPointVector detect(const cv::Mat& _image, cv::InputArray& _mask=cv::noArray() );
KeyPointVector detect(const cv::Mat& _image, cv::Rect _roi);
// Factory method
static DetectorBasePtr create(const std::string& _unique_name, const ParamsBasePtr _params);
cv::Ptr<LFNETFeature2D> get_LFNET_feature_detector ()
{
return detector_.dynamicCast<LFNETFeature2D>();
//return std::static_pointer_cast<LFNETFeature2D>(detector_);
};
private:
FeatureDetectorPtr detector_;
void defineDetector(const ParamsBasePtr _params);
};
/*
* brief Define detector
*/
inline void DetectorLFNET::defineDetector(const ParamsBasePtr _params)
{
DetectorParamsLFNETPtr params_ptr = std::static_pointer_cast<DetectorParamsLFNET>(_params);
detector_ = LFNETFeature2D::create(
params_ptr->network_config_path,
params_ptr->nfeatures,
params_ptr->environment
);
}
/*
* brief Create object in factory
*/
inline DetectorBasePtr DetectorLFNET::create(const std::string& _unique_name, const ParamsBasePtr _params)
{
DetectorLFNETPtr det_ptr = std::make_shared<DetectorLFNET>();
det_ptr->setName(_unique_name);
det_ptr->defineDetector(_params);
return det_ptr;
}
} /* namespace vision_utils */
#endif /* _DETECTOR_LFNET_H_ */
#include "detector_lfnet.h"
#ifdef USING_YAML
// yaml-cpp library
#include <yaml-cpp/yaml.h>
namespace vision_utils
{
namespace
{
static ParamsBasePtr createParamsLFNETDetector(const std::string & _filename_dot_yaml)
{
DetectorParamsLFNETPtr params_ptr = std::make_shared<DetectorParamsLFNET>();
using std::string;
using YAML::Node;
Node yaml_params = YAML::LoadFile(_filename_dot_yaml);
if (!yaml_params.IsNull())
{
Node d_yaml = yaml_params["detector"];
if(d_yaml["type"].as<string>() == "LFNET")
{
params_ptr->network_config_path = d_yaml["network config path"].as<std::string>();
Node net_params = YAML::LoadFile(params_ptr->network_config_path);
params_ptr->nfeatures = net_params["nfeatures"].as<unsigned int>();
params_ptr->environment = net_params["environment"].as<std::string>();
}else
{
std::cerr << "Bad configuration file. Wrong type " << d_yaml["type"].as<string>() << std::endl;
return nullptr;
}
}
return params_ptr;
}
// Register in the SensorFactory
const bool VU_UNUSED registered_detLFNET_params = ParamsFactory::get().registerCreator("LFNET DET", createParamsLFNETDetector);
} /* namespace [unnamed] */
} /* namespace vision_utils */
#endif /* IF USING_YAML */
sensor:
type: "USB_CAM"
detector:
type: "LFNET"
network config path: "/home/pguetschel/wolf/vision_utils/src/test/data/lfnet_release_indoor_500kp.yaml"
descriptor:
type: "LFNET"
network config path: "/home/pguetschel/wolf/vision_utils/src/test/data/lfnet_release_indoor_500kp.yaml"
File added
model:
path: "./lfnet_release_indoor_500kp.pb"
input name: "lfnet_input"
output names:
- "MSDeepDet/add_5" # --> "kpts" <dtype: 'float32'> (?, 2)
- "SimpleDesc/l2_normalize" # --> "feats" <dtype: 'float32'> (?, 256)
nfeatures: 500
environment: "indoor"
......@@ -249,6 +249,33 @@ TEST(Descriptors, ORB)
ASSERT_EQ(descriptors.rows,keypoints.size());
}
TEST(Descriptors, LFNET)
{
image = cv::imread(filename, CV_LOAD_IMAGE_GRAYSCALE);
ASSERT_TRUE(image.data)<< "failed to load image " << filename << std::endl;
//vision_utils::DetectorParamsLFNETPtr params = std::make_shared<vision_utils::DetectorParamsLFNET>();
std::string det_name = "LFNET";
std::string yaml_file_params = vu_root + "/src/test/data/LFNET.yaml";
det_name = vision_utils::readYamlType(yaml_file_params, "detector");
vision_utils::DetectorBasePtr det_b_ptr = vision_utils::setupDetector(det_name, det_name + " detector", yaml_file_params);
vision_utils::DetectorLFNETPtr det_ptr = std::static_pointer_cast<vision_utils::DetectorLFNET>(det_b_ptr);
std::vector<cv::KeyPoint> keypoints = det_ptr->detect(image);
ASSERT_EQ(keypoints.size(), 500);
vision_utils::DescriptorParamsLFNETPtr des_params = std::make_shared<vision_utils::DescriptorParamsLFNET>(det_ptr->get_LFNET_feature_detector());
std::string des_name = "LFNET";
vision_utils::DescriptorBasePtr des_b_ptr = vision_utils::setupDescriptor(des_name, des_name + " detector", des_params);
#ifdef USING_YAML
des_name = vision_utils::readYamlType(yaml_file_params, "descriptor");
des_b_ptr = vision_utils::setupDescriptor(des_name, des_name + " descriptor", yaml_file_params);
#endif
vision_utils::DescriptorLFNETPtr des_ptr = std::static_pointer_cast<vision_utils::DescriptorLFNET>(des_b_ptr);
des_ptr->set_descriptor(det_ptr->get_LFNET_feature_detector());
ASSERT_TRUE(des_ptr!=NULL);
cv::Mat descriptors = des_ptr->getDescriptor( image, keypoints);
ASSERT_EQ(descriptors.rows,keypoints.size());
}
TEST(Descriptors, SIFT)
{
image = cv::imread(filename, CV_LOAD_IMAGE_GRAYSCALE);
......
......@@ -12,6 +12,7 @@ cv::Mat image;
std::string vu_root = _VU_ROOT_DIR;
std::string filename = vu_root + "/src/test/data/img_1.png";
std::string filename2 = vu_root + "/src/test/data/img_3.png";
std::string filename4 = vu_root + "/src/test/data/img_4.png";
std::map<int, cv::Point2f> TestDetectorROI(const cv::Mat& _image, vision_utils::DetectorBasePtr _det_ptr, const std::string& _det_name, const PointVector& _points_to_check)
{
......@@ -589,6 +590,29 @@ TEST(Detectors, ORB)
ASSERT_EQ(keypoints.size(), 17);
}
TEST(Detectors, LFNET)
{
image = cv::imread(filename4, CV_LOAD_IMAGE_GRAYSCALE);
ASSERT_TRUE(image.data)<< "failed to load image " << filename << std::endl;
std::string det_name = "LFNET";
#ifdef USING_YAML
std::cout<< "using yaml" << std::endl;
std::string lfnet_yaml_file_params = vu_root + "/src/test/data/LFNET.yaml";
std::cout<< "params : " << lfnet_yaml_file_params << std::endl;
det_name = vision_utils::readYamlType(lfnet_yaml_file_params, "detector");
vision_utils::DetectorBasePtr det_b_ptr = vision_utils::setupDetector(det_name, det_name + " detector", lfnet_yaml_file_params);
#else
std::cout<< "not using yaml" << std::endl;
vision_utils::DetectorParamsLFNETPtr params = std::make_shared<vision_utils::DetectorParamsLFNET>();
vision_utils::DetectorBasePtr det_b_ptr = vision_utils::setupDetector(det_name, det_name + " detector", params);
#endif
vision_utils::DetectorLFNETPtr det_ptr = std::static_pointer_cast<vision_utils::DetectorLFNET>(det_b_ptr);
std::vector<cv::KeyPoint> keypoints = det_ptr->detect(image);
ASSERT_EQ(keypoints.size(), 500);
}
TEST(Detectors, ORBRoiBounds)
{
PointVector points_to_check({
......