libdart_openmvg/src/image.h

95 lines
2.4 KiB
C
Raw Normal View History

#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>
2024-03-13 18:26:37 +01:00
#include <error.h>
#include <png.h>
2024-03-12 02:09:11 +01:00
#if defined(__cplusplus)
extern "C" {
auto png_sig_cm = png_sig_cmp;
}
2024-03-13 18:26:37 +01:00
2024-03-12 02:09:11 +01:00
#endif // __cplusplus
2024-03-13 18:26:37 +01:00
#define error_t int
#ifdef __cplusplus
class StreamedView : openMVG::sfm::View {
private:
const Frame *mFrame;
public:
StreamedView(const Frame *);
};
#endif
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);