2024-03-11 15:36:09 +01:00
|
|
|
#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>
|
2024-03-12 19:53:16 +01:00
|
|
|
#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>
|
2024-03-11 15:36:09 +01:00
|
|
|
#endif // __cplusplus
|
|
|
|
|
2024-03-13 17:02:11 +01:00
|
|
|
#include "./base.hpp"
|
|
|
|
#include "frame.h"
|
2024-03-11 15:36:09 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdint.h>
|
2024-03-13 18:26:37 +01:00
|
|
|
#include <error.h>
|
2024-03-11 15:36:09 +01:00
|
|
|
#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
|
|
|
|
|
2024-03-13 17:02:11 +01:00
|
|
|
#ifdef __cplusplus
|
2024-03-11 15:36:09 +01:00
|
|
|
|
2024-03-13 17:02:11 +01:00
|
|
|
class StreamedView : openMVG::sfm::View {
|
|
|
|
|
|
|
|
private:
|
2024-03-11 15:36:09 +01:00
|
|
|
|
2024-03-13 17:02:11 +01:00
|
|
|
const Frame *mFrame;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
StreamedView(const Frame *);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
2024-03-12 19:53:16 +01:00
|
|
|
|
|
|
|
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 *);
|
|
|
|
|
2024-03-11 15:36:09 +01:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
2024-03-13 17:02:11 +01:00
|
|
|
namespace Archimedes
|
2024-03-11 15:36:09 +01:00
|
|
|
{
|
2024-03-13 17:02:11 +01:00
|
|
|
std::vector<u_char> get_image_data_as_vector(const Frame *frame);
|
2024-03-12 19:53:16 +01:00
|
|
|
ImageResult *get_image_data(const Frame *);
|
|
|
|
int images_to_sfm(const Frame **, size_t);
|
2024-03-11 15:36:09 +01:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2024-03-12 19:53:16 +01:00
|
|
|
_FFI_PLUGIN
|
|
|
|
ImageResult *archimedes_get_image_data(const Frame *);
|
|
|
|
_FFI_PLUGIN
|
|
|
|
int archimedes_images_to_sfm(const Frame **, size_t);
|