libdart_openmvg/src/image.h

80 lines
2.2 KiB
C++

#ifdef __cplusplus
#include <openMVG/image/image_io.hpp>
#include <openMVG/image/image_concat.hpp>
#include <openMVG/vector_graphics/svgDrawer.hpp>
#include <openMVG/features/feature.hpp>
#include <forward_list>
#include <openMVG/sfm/sfm.hpp>
#include <openMVG/features/mser/mser.hpp>
#include <openMVG/cameras/Camera_Common.hpp>
#include <openMVG/cameras/Cameras_Common_command_line_helper.hpp>
#include <openMVG/sfm/pipelines/sfm_features_provider.hpp>
#include <openMVG/sfm/pipelines/sfm_matches_provider.hpp>
#include <openMVG/sfm/sfm_data.hpp>
#include <openMVG/sfm/sfm_data_io.hpp>
#include <openMVG/sfm/sfm_report.hpp>
#include <openMVG/sfm/sfm_view.hpp>
#include <openMVG/system/timer.hpp>
#include <openMVG/types.hpp>
// SfM Engines
#include <openMVG/sfm/pipelines/global/GlobalSfM_rotation_averaging.hpp>
#include <openMVG/sfm/pipelines/global/GlobalSfM_translation_averaging.hpp>
#include <openMVG/sfm/pipelines/global/sfm_global_engine_relative_motions.hpp>
#include <openMVG/sfm/pipelines/sequential/sequential_SfM.hpp>
#include <openMVG/sfm/pipelines/sequential/sequential_SfM2.hpp>
#include <openMVG/sfm/pipelines/sequential/SfmSceneInitializerMaxPair.hpp>
#include <openMVG/sfm/pipelines/sequential/SfmSceneInitializerStellar.hpp>
#include <openMVG/sfm/pipelines/stellar/sfm_stellar_engine.hpp>
#endif // __cplusplus
#include "./base.hpp"
#include "frame.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <error.h>
#include <png.h>
#if defined(__cplusplus)
extern "C" {
auto png_sig_cm = png_sig_cmp;
}
#endif // __cplusplus
#define error_t int
typedef struct _ImageResult
{
u_char *data;
size_t data_len;
error_t error;
} ImageResult;
_FFI_PLUGIN
ImageResult *image_result_new(const u_char *, const size_t data_len);
_FFI_PLUGIN
ImageResult *image_result_new_error(const error_t);
_FFI_PLUGIN
int image_result_free(ImageResult *);
#ifdef __cplusplus
namespace Archimedes
{
std::vector<u_char> get_image_data_as_vector(const Frame *frame);
ImageResult *get_image_data(const Frame *);
int images_to_sfm(const Frame **, size_t);
}
#endif
_FFI_PLUGIN
ImageResult *archimedes_get_image_data(const Frame *);
_FFI_PLUGIN
int archimedes_images_to_sfm(const Frame **, size_t);