Permalink
Browse files

remove GPL code for SIFT Hess, and all old SIFT impls

Progress with #120
  • Loading branch information...
jlblancoc committed Nov 9, 2018
1 parent a627728 commit fdcfa89eb4ab4e4b3963dc0827ae21679ae4a7f0
@@ -66,9 +66,7 @@ find_package(codecov)

# -------------------------


set(ALLOW_GPL OFF CACHE BOOL "Allows MRPT to link to GPL code. This effectively makes some MRPT binaries GPL licensed. Use this at your own risk.")
option(MRPT_ALLOW_LGPLV3 "Allows MRPT to use LGPLV3 code" "OFF")
option(MRPT_ALLOW_LGPLV3 "Allows MRPT to use LGPLV3 code (mrpt-vision-lgpl)" "OFF")

# The root directory for all MRPT libraries/modules:
set(MRPT_LIBS_ROOT "${CMAKE_SOURCE_DIR}/libs" CACHE INTERNAL "") # This emulates global vars
@@ -263,7 +261,6 @@ include(cmakemodules/script_swissrange.cmake REQUIRED) # Support for SWISSRANGE
include(cmakemodules/script_SIMD.cmake REQUIRED) # SSE2/SSE3/... optimization options
include(cmakemodules/script_gtest.cmake REQUIRED) # Unit testing lib
include(cmakemodules/script_national_instruments.cmake REQUIRED) # NI C library
include(cmakemodules/script_sift_hess.cmake REQUIRED) # SIFT Hess implementation
include(cmakemodules/script_xsens.cmake REQUIRED) # XSens Motion trackers / IMU drivers
include(cmakemodules/script_flycapture2.cmake REQUIRED) # Check for PointGreyResearch (PGR) FlyCapture2 library
include(cmakemodules/script_triclops.cmake REQUIRED) # Check for PointGreyResearch (PGR) Triclops library
@@ -558,13 +558,6 @@ void MainWindow::on_descriptor_choose(int choice)
param5_edit_desc->setVisible(false);
param1_boolean_desc->setVisible(false);
param2_boolean_desc->setVisible(false);

#if !MRPT_HAS_SIFT_HESS
QMessageBox::information(
this, "SIFT error",
"MRPT has been compiled without SIFT Hess support");
return;
#endif
}
else if (choice == 1) //!< SURF descriptors
{
@@ -760,12 +753,6 @@ void MainWindow::on_detector_choose(int choice)
// for SIFT Features
else if (choice == 2)
{
#if !MRPT_HAS_SIFT_HESS
QMessageBox::information(
this, "SIFT error",
"MRPT has been compiled without SIFT Hess support");
return;
#endif
param1->setText("Threshold: ");
param2->setText("Edge Threshold: ");
param1_edit->setText("0.04");
@@ -1522,15 +1509,6 @@ void MainWindow::fillDescriptorInfo()
************************************************************************************************/
void MainWindow::on_detector_button_clicked()
{
if (detector_selected == 2)
{
#if !MRPT_HAS_SIFT_HESS
QMessageBox::information(
this, "SIFT error",
"MRPT has been compiled without SIFT Hess support");
return;
#endif
}
evaluate_detector_clicked = true;

// read inputs from user
@@ -1710,12 +1688,6 @@ void MainWindow::on_descriptor_button_clicked()

if (descriptor_selected == 0)
{
#if !MRPT_HAS_SIFT_HESS
QMessageBox::information(
this, "SIFT error",
"MRPT has been compiled without SIFT Hess support");
return;
#endif
desc_to_compute = TDescriptorType(1); //!< SIFT descriptors
}
else if (descriptor_selected == 1)

This file was deleted.

Oops, something went wrong.
@@ -591,6 +591,7 @@ to select covariance estimation method.
- \ref mrpt_topography_grp
- New function mrpt::topography::geocentricToENU_WGS84()
- \ref mrpt_vision_grp
- Removed the old GPL-licensed Hess SIFT implementation.
- mrpt::vision::CDifOdo has been refactored and now does faster
image pyramid computation (By Mariano Jaimez)
- mrpt::maps::CLandmarksMap changes:
@@ -10,15 +10,6 @@ list(APPEND vision_EXTRA_SRCS_NAME "observations" "observations")
list(APPEND vision_EXTRA_SRCS "${MRPT_SOURCE_DIR}/libs/vision/src/pnp/*.cpp" "${MRPT_SOURCE_DIR}/libs/vision/include/mrpt/vision/pnp_algos.h")
list(APPEND vision_EXTRA_SRCS_NAME "pnp" "pnp")

if(CMAKE_MRPT_HAS_SIFT_HESS)
list(APPEND vision_EXTRA_SRCS
"${MRPT_SOURCE_DIR}/libs/vision/src/sift-hess/imgfeatures.c"
"${MRPT_SOURCE_DIR}/libs/vision/src/sift-hess/sift.c"
"${MRPT_SOURCE_DIR}/libs/vision/src/sift-hess/utils.c"
"${MRPT_SOURCE_DIR}/libs/vision/include/mrpt/sift-hess/*.h")
list(APPEND vision_EXTRA_SRCS_NAME "sift-hess" "sift-hess" "sift-hess" "sift-hess")
endif()

if(CMAKE_MRPT_HAS_OPENCV)
include_directories(${CVD_INCLUDE_DIRS})

@@ -40,18 +31,6 @@ if(CMAKE_MRPT_HAS_OPENCV)
endif()

if(BUILD_mrpt-vision)
if(CMAKE_MRPT_HAS_SIFT_HESS)
if (MRPT_ENABLE_PRECOMPILED_HDRS AND MSVC)
# Ignore precompiled headers in sift-hess sources:
set_source_files_properties(${sift-hess_FILES} PROPERTIES COMPILE_FLAGS "/Y- /wd4244")
endif ()

# Avoid some annoying warnings:
if (CMAKE_COMPILER_IS_GNUCXX)
set_source_files_properties(${sift-hess_FILES} PROPERTIES COMPILE_FLAGS "-Wno-unused-function")
endif ()
endif()

# Ignore precompiled headers in faster sources:
if (MRPT_ENABLE_PRECOMPILED_HDRS AND MSVC)
set_source_files_properties(${faster_FILES} PROPERTIES COMPILE_FLAGS "/Y-")
@@ -81,11 +81,11 @@ class CFeatureExtraction
public:
enum TSIFTImplementation
{
LoweBinary = 0,
CSBinary,
VedaldiBinary,
Hess,
OpenCV
LoweBinary = 0 /* obsolete */,
CSBinary /* obsolete */,
VedaldiBinary /* obsolete */,
Hess /* obsolete */,
OpenCV /* DEFAULT */
};

/** The set of parameters for all the detectors & descriptor algorithms */
@@ -183,11 +183,7 @@ class CFeatureExtraction
struct TSIFTOptions
{
TSIFTOptions() = default;
TSIFTImplementation implementation; //!< Default: Hess (OpenCV
//! should be preferred, but its
//! nonfree module is not always
//! available by default in all
//! systems)
TSIFTImplementation implementation{OpenCV}; //!< Default: OpenCV
double threshold{0.04}; //!< default= 0.04
double edgeThreshold{10}; //!< default= 10
} SIFTOptions;
@@ -511,19 +507,6 @@ class CFeatureExtraction
void internal_computeLATCHDescriptors(
const mrpt::img::CImage& in_img, CFeatureList& in_features) const;

#if 0 // Delete? see comments in .cpp
/** Select good features using the openCV implementation of the KLT method.
* \param img (input) The image from where to select extract the images.
* \param feats (output) A complete list of features (containing a patch for each one of them if options.patchsize > 0).
* \param nDesiredFeatures (op. input) Number of features to be extracted. Default: all possible.
*/
void selectGoodFeaturesKLT(
const mrpt::img::CImage &inImg,
CFeatureList &feats,
unsigned int init_ID = 0,
unsigned int nDesiredFeatures = 0) const;
#endif

/** Extract features from the image based on the KLT method.
* \param img The image from where to extract the images.
* \param feats The list of extracted features.
@@ -643,57 +626,6 @@ class CFeatureExtraction
unsigned int init_ID, unsigned int nDesiredFeatures,
const TImageROI& ROI = TImageROI()) const;

// ------------------------------------------------------------------------------------
// my_scale_space_extrema
// ------------------------------------------------------------------------------------
/** Computes extrema in the scale space.
* \param dog_pyr Pyramid of images.
* \param octvs Number of considered octaves.
* \param intvls Number of intervales in octaves.
*/
void* my_scale_space_extrema(
CFeatureList& featList, void* dog_pyr, int octvs, int intvls,
double contr_thr, int curv_thr, void* storage) const;

/** Adjust scale if the image was initially doubled.
* \param features The sequence of features.
*/
void my_adjust_for_img_dbl(void* features) const;

/** Gets the number of times that a point in the image is higher or lower
* than the surroundings in the image-scale space
* \param dog_pyr Pyramid of images.
* \param octvs Number of considered octaves.
* \param intvls Number of intervales in octaves.
* \param row The row of the feature in the original image.
* \param col The column of the feature in the original image.
* \param nMin [out]: Times that the feature is lower than the surroundings.
* \param nMax [out]: Times that the feature is higher than the
* surroundings.
*/
void getTimesExtrema(
void* dog_pyr, int octvs, int intvls, float row, float col,
unsigned int& nMin, unsigned int& nMax) const;

/** Computes the Laplacian value of the feature in the corresponing image in
* the pyramid.
* \param dog_pyr Pyramid of images.
* \param octvs Number of considered octaves.
* \param intvls Number of intervales in octaves.
* \param row The row of the feature in the original image.
* \param col The column of the feature in the original image.
*/
double getLaplacianValue(
void* dog_pyr, int octvs, int intvls, float row, float col) const;

/** Append a sequence of openCV features into an MRPT feature list.
* \param features The sequence of features.
* \param list [in-out] The list of MRPT features.
* \param init_ID [in] The initial ID for the new features.
*/
void insertCvSeqInCFeatureList(
void* features, CFeatureList& list, unsigned int init_ID = 0) const;

/** Converts a sequence of openCV features into an MRPT feature list.
* \param features The sequence of features.
* \param list [in-out] The list of MRPT features.
Oops, something went wrong.

0 comments on commit fdcfa89

Please sign in to comment.