Skip to content

Commit

Permalink
remove useless code
Browse files Browse the repository at this point in the history
  • Loading branch information
oneLOH committed Apr 28, 2024
1 parent 771a710 commit de4bf1d
Show file tree
Hide file tree
Showing 55 changed files with 553 additions and 2,775 deletions.
1 change: 0 additions & 1 deletion 3rdparty/apriltag/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ if(BUILD_PYTHON_WRAPPER)
endif(BUILD_PYTHON_WRAPPER)

if (NOT Python3_NOT_FOUND AND NOT Numpy_NOT_FOUND AND PYTHONLIBS_FOUND AND BUILD_PYTHON_WRAPPER)
# TODO deal with both python2/3
execute_process(COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/python_build_flags.py OUTPUT_VARIABLE PY_OUT)
set(PY_VARS CFLAGS LDFLAGS LINKER EXT_SUFFIX)
cmake_parse_arguments(PY "" "${PY_VARS}" "" ${PY_OUT})
Expand Down
1 change: 0 additions & 1 deletion 3rdparty/apriltag/apriltag.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,6 @@ static void refine_edges(apriltag_detector_t *td, image_u8_t *im_orig,
double Cxy = Mxy / N - Ex * Ey;
double Cyy = Myy / N - Ey * Ey;

// TODO: Can replace this with same code as in fit_line.
double normal_theta = .5 * atan2f(-2 * Cxy, (Cyy - Cxx));
nx = cosf(normal_theta);
ny = sinf(normal_theta);
Expand Down
2 changes: 0 additions & 2 deletions 3rdparty/apriltag/common/getopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ int getopt_parse(getopt_t *gopt, int argc, char *argv[], int showErrors) {
}

if (goo->type == GOO_STRING_TYPE) {
// TODO: check whether next argument is an option, denoting
// missing argument
if ((i + 1) < zarray_size(toks)) {
char *val = NULL;
Expand Down Expand Up @@ -272,7 +271,6 @@ int getopt_parse(getopt_t *gopt, int argc, char *argv[], int showErrors) {
if ((i + 1) < zarray_size(toks)) {
char *val = NULL;
zarray_get(toks, i + 1, &val);
// TODO: allow negative numerical values for short-name
// options ?
if (val[0] == '-') {
okay = 0;
Expand Down
2 changes: 0 additions & 2 deletions 3rdparty/apriltag/common/homography.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,6 @@ matd_t *homography_to_model_view(const matd_t *H, double F, double G, double A,
double R12 = R20 * R01 - R00 * R21;
double R22 = R00 * R11 - R10 * R01;

// TODO XXX: Improve rotation matrix by applying polar decomposition.

return matd_create_data(4, 4,
(double[]){R00, R01, R02, TX, R10, R11, R12, TY,
R20, R21, R22, TZ, 0, 0, 0, 1});
Expand Down
9 changes: 0 additions & 9 deletions 3rdparty/apriltag/common/matd.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,6 @@ matd_t *matd_inverse(const matd_t *x) {
return NULL; // unreachable
}

// TODO Optimization: Some operations we could perform in-place,
// saving some memory allocation work. E.g., ADD, SUBTRACT. Just need
// to make sure that we don't do an in-place modification on a matrix
// that was an input argument!

// handle right-associative operators, greedily consuming them. These
// include transpose and inverse. This is called by the main recursion
// method.
static inline matd_t *matd_op_gobble_right(const char *expr, int *pos,
matd_t *acc, matd_t **garb,
int *garbpos) {
Expand Down Expand Up @@ -1091,7 +1083,6 @@ static matd_svd_t matd_svd_tall(matd_t *A, int flags) {
for (int i = 0; i < vlen; i++)
v[i] /= mag;

// TODO: optimize these multiplications
// matd_t *Q = matd_identity(A->ncols);
// for (int i = 0; i < vlen; i++)
// for (int j = 0; j < vlen; j++)
Expand Down
1 change: 0 additions & 1 deletion 3rdparty/apriltag/common/pjpeg.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ static inline uint32_t bd_get_offset(struct bit_decoder *bd) {
}

static int pjpeg_decode_buffer(struct pjpeg_decode_state *pjd) {
// XXX TODO Include sanity check that this is actually a JPG

struct bit_decoder bd;
memset(&bd, 0, sizeof(struct bit_decoder));
Expand Down
2 changes: 0 additions & 2 deletions 3rdparty/apriltag/common/time_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ int32_t timeutil_usleep(int64_t useconds) {
Sleep(useconds / 1000);
return 0;
#else
// unistd.h function, but usleep is obsoleted in POSIX.1-2008.
// TODO: Eventually, rewrite this to use nanosleep
return usleep(useconds);
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/json/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9888,7 +9888,7 @@ class binary_reader {
*/
bool get_ubjson_string(string_t &result, const bool get_char = true) {
if (get_char) {
get(); // TODO(niels): may we ignore N here?
get();
}

if (JSON_HEDLEY_UNLIKELY(
Expand Down
5 changes: 1 addition & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,15 +112,12 @@ add_library(xrsfm

src/geometry/pnp.cc
src/geometry/essential.cc
src/geometry/triangluate_svd.cc
src/geometry/triangulate_light.cc
src/geometry/track_processor.cc

src/geometry/colmap/base/triangulation.cc
src/geometry/colmap/estimators/absolute_pose.cc
src/geometry/colmap/estimators/triangulation.cc
src/geometry/colmap/estimators/polynomial.cc
src/geometry/colmap/estimators/fundamental_matrix.cc
src/geometry/colmap/estimators/utils.cc
src/geometry/colmap/util/random.cc
src/geometry/colmap/optim/random_sampler.cc
src/geometry/colmap/optim/combination_sampler.cc
Expand Down
Loading

0 comments on commit de4bf1d

Please sign in to comment.