FlowEngine 7.517
Photogrammetry Software Development Kit
Loading...
Searching...
No Matches
FlowEngine.h
Go to the documentation of this file.
1/*
2 *
3 * C@@o ____ _____ __ _
4 * oC8@@@@@@@o |___ \| __ \ / _| |
5 * o@@@@@@@@@@@@O __) | | | | |_| | _____ __
6 * O@O 8@@@@@@@@@O |__ <| | | | _| |/ _ \ \ /\ / /
7 * o@@@@@@@O OOOOOCo ___) | |__| | | | | (_) \ V V /
8 * C@@@@@@@@@@@@Oo |____/|_____/|_| |_|\___/ \_/\_/
9 * o8@@@@@@@@@@@@@@@@8OOCCCC
10 * oO@@@@@@@@@@@@@@@@@@@o 3Dflow s.r.l. - www.3dflow.net
11 * oO8@@@@@@@@@@@@o Copyright 2022
12 * oO88@@@@@@@@8OCo All Rights Reserved
13 * O@@@@@@@@@@@@@@@@@@@@@@@@@8OCCoooooooCCo
14 * @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@O
15 * @@@Oo oO8@@@@@@@@@@@@@@@@8
16 *
17 */
18
19#ifndef FLOWENGINE_H
20#define FLOWENGINE_H
21
22#pragma once
23
24#include "CommonDef.h"
27#include "CameraInterface.h"
28#include "SettingsInterface.h"
32#include "StereoMeshInterface.h"
38#include "OrthophotoInterface.h"
39#include "LicenseManager.h"
40#include "ImageIO.h"
41#include "Equirectangular.h"
42#include "MarkerPrinter.h"
47#include "Utilities.h"
48
49namespace FlowEngine
50{
53 {
54 char name[ 512 ];
59 };
60
63 {
64 public:
65
67 FLE_DLL virtual ~FlowEngineInterface() = default;
68
69 public:
70
87 FLE_DLL virtual Result computeStructureAndMotion( const SettingsInterface &settings,
88 ProgressBarInterface &progressBar,
89 LogListenerInterface &logListener,
90 Buffer< CameraInterface * > inOutCameras,
91 SparsePointCloudInterface &outPointCloud ) = 0;
92
112 ProgressBarInterface &progressBar,
113 LogListenerInterface &logListener,
114 Buffer< CameraInterface * > inOutCameras,
117 SparsePointCloudInterface &outPointCloud ) = 0;
118
136
155 FLE_DLL virtual Result performBundleAdjustment( const SettingsInterface &inSettings,
156 ProgressBarInterface &inProgressBar,
157 LogListenerInterface &inLogListener,
160 Buffer< CameraInterface * > inOutCameras,
161 SparsePointCloudInterface &inOutPointCloud,
162 Buffer< unsigned char > inOutCamerasStatus ) = 0;
163
181 FLE_DLL virtual Result computeDensePointCloud( const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, const BoundingBoxInterface &boundingBox, Buffer< CameraInterface * > cameras, const SparsePointCloudInterface &pointCloud, StereoPointCloudInterface &outPointCloud ) = 0;
182
202 FLE_DLL virtual Result computeDensePointCloudFromInputMesh( const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, const BoundingBoxInterface &boundingBox, Buffer< CameraInterface * > cameras, const SparsePointCloudInterface &pointCloud, const StereoMeshInterface &stereoMesh, StereoPointCloudInterface &outPointCloud ) = 0;
203
221 FLE_DLL virtual Result computeMesh( const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, const BoundingBoxInterface &boundingBox, Buffer< CameraInterface * > cameras, const StereoPointCloudInterface &inStereoPointCloud, StereoMeshInterface &outStereoMesh ) = 0;
222
240 FLE_DLL virtual Result adaptMeshWithControlPoints( const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< ControlPointConstraintInterface * > inStartingConstraints, Buffer< ControlPointConstraintInterface * > inDestinationConstraints, const StereoMeshInterface &inDestinationMesh, StereoMeshInterface &inoutStartingMesh ) = 0;
241
250 FLE_DLL virtual Result adaptMeshWithOpticalFlow( const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, const StereoMeshInterface &inPivotMesh, const StereoMeshInterface &inDestinationMesh, StereoMeshInterface &inoutStartingMesh ) = 0;
251
258 FLE_DLL virtual Result morphMesh( const SettingsInterface &settings,
259 ProgressBarInterface &progressBar,
260 LogListenerInterface &logListener,
261 const StereoMeshInterface &dataMesh,
262 StereoMeshInterface &inoutTemplateMesh ) = 0;
263
282 FLE_DLL virtual Result computeTexturedMesh( const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, const StereoMeshInterface &mesh, StereoTexturedMeshInterface &outStereoTexturedMesh ) = 0;
283
305 FLE_DLL virtual Result computeTexturedMesh( const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, const StereoMeshInterface &mesh, ConstBuffer< TexCoords > uvCoords, StereoTexturedMeshInterface &outStereoTexturedMesh ) = 0;
306
321 FLE_DLL virtual Result computeOrthophoto( const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, const StereoMeshInterface &mesh, ConstBuffer< double > transform, OrthophotoInterface &outOrthophoto ) = 0;
322
336 FLE_DLL virtual Result computeOrthophotoFromPoints( const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, const StereoPointCloudInterface &pointCloud, ConstBuffer< double > transform, OrthophotoInterface &outOrthophoto ) = 0;
337
363 FLE_DLL virtual Result detectMarkers( const SettingsInterface &settings,
364 ProgressBarInterface &progressBar,
365 LogListenerInterface &logListener,
367 ConstStringBuffer tagFamily,
368 double subsampling,
369 double blur,
370 int *minimumPoints,
371 double *maximumReprojectionError,
372 double *minimumAngle,
374
394 FLE_DLL virtual Result recomputeVisibility( const SettingsInterface &settings,
395 ProgressBarInterface &progressBar,
396 LogListenerInterface &logListener,
398 bool updateProperties,
399 Index seedPoints,
400 bool keepOnlySeedPoints,
401 StereoPointCloudInterface &inOutPoints ) = 0;
402
420 FLE_DLL virtual Result recomputeVisibility( const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, bool updateProperties, StereoMeshInterface &inOutMesh ) = 0;
421
462 ProgressBarInterface &progressBar,
463 LogListenerInterface &logListener,
464 const StereoMeshInterface &mesh,
465 ConstStringBuffer outputDirectory,
466 ConstStringBuffer format,
467 ConstStringBuffer textureFormat,
468 int numberOfTiles,
469 int targetMaxVerticesPerTile,
470 int numberOfLevels,
471 double decimationFactor,
472 double textureDecimationFactor,
473 bool useLocalCoordinates ) = 0;
474
475 public:
476
482 FLE_DLL virtual Result abort() = 0;
483
489 FLE_DLL virtual Result pause() = 0;
490
495 FLE_DLL virtual Result resume() = 0;
496
504 FLE_DLL virtual Result getVersion( StringBuffer outVersion ) const = 0;
505
508 FLE_DLL virtual void getVersion( Version &outVersion ) const = 0;
509
512 FLE_DLL virtual Size getVersionLength() const = 0;
513
521 FLE_DLL virtual Result isLatestVersion() const = 0;
522
524 FLE_DLL virtual bool isFreeVersion() const = 0;
525
526 public:
527
529 FLE_DLL virtual int getCudaDeviceCount() const = 0;
530
537 FLE_DLL virtual Result getCudaDeviceInfo( int device, CudaDeviceInfo &outInfo ) const = 0;
538
539 public:
540
544 FLE_DLL virtual void setMaxNumberOfCores( Size numberOfCores ) = 0;
545
551 FLE_DLL virtual void setMemoryLimit( Size memoryLimit ) = 0;
552
553 public:
554
558 FLE_DLL virtual void setLogTimestamp( bool logTimeStamp ) = 0;
559 };
560
564
568
572
573 namespace Detail
574 {
575 template< >
576 struct Destroyer< FlowEngineInterface >
577 {
578 static void destroy( FlowEngineInterface *flowEngine )
579 {
580 DestroyFlowEngineObject( flowEngine );
581 }
582 };
583 }
584
586 using UniqueFlowEnginePtr = Detail::UniquePtr< FlowEngineInterface >;
587}
588
589#endif
#define FLOWENGINE_FACTORY
Definition: CommonDef.h:32
An oriented bounding box.
Definition: BoundingBoxInterface.h:35
FlowEngine main computation interface.
Definition: FlowEngine.h:63
virtual FLE_DLL Result abort()=0
virtual FLE_DLL Result recomputeVisibility(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, bool updateProperties, Index seedPoints, bool keepOnlySeedPoints, StereoPointCloudInterface &inOutPoints)=0
virtual FLE_DLL void getVersion(Version &outVersion) const =0
virtual FLE_DLL Result computeAndExportLodTexturedMesh(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, const StereoMeshInterface &mesh, ConstStringBuffer outputDirectory, ConstStringBuffer format, ConstStringBuffer textureFormat, int numberOfTiles, int targetMaxVerticesPerTile, int numberOfLevels, double decimationFactor, double textureDecimationFactor, bool useLocalCoordinates)=0
virtual FLE_DLL Result computeOrthophotoFromPoints(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, const StereoPointCloudInterface &pointCloud, ConstBuffer< double > transform, OrthophotoInterface &outOrthophoto)=0
virtual FLE_DLL ~FlowEngineInterface()=default
Default virtual destructor.
virtual FLE_DLL Result morphMesh(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, const StereoMeshInterface &dataMesh, StereoMeshInterface &inoutTemplateMesh)=0
virtual FLE_DLL void setLogTimestamp(bool logTimeStamp)=0
virtual FLE_DLL bool isFreeVersion() const =0
virtual FLE_DLL Result computeSparsePointCloudFromKnownPPM(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, SparsePointCloudInterface &outPointCloud)=0
virtual FLE_DLL Result computeDensePointCloudFromInputMesh(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, const BoundingBoxInterface &boundingBox, Buffer< CameraInterface * > cameras, const SparsePointCloudInterface &pointCloud, const StereoMeshInterface &stereoMesh, StereoPointCloudInterface &outPointCloud)=0
virtual FLE_DLL void setMemoryLimit(Size memoryLimit)=0
virtual FLE_DLL int getCudaDeviceCount() const =0
virtual FLE_DLL Result computeTexturedMesh(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, const StereoMeshInterface &mesh, StereoTexturedMeshInterface &outStereoTexturedMesh)=0
virtual FLE_DLL Result recomputeVisibility(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, bool updateProperties, StereoMeshInterface &inOutMesh)=0
virtual FLE_DLL Result computeStructureAndMotion(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > inOutCameras, SparsePointCloudInterface &outPointCloud)=0
virtual FLE_DLL Result computeStructureAndMotionConstrained(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > inOutCameras, ConstBuffer< ControlPointConstraintInterface * > inPointConstraints, ConstBuffer< CameraConstraintInterface * > inCameraConstraints, SparsePointCloudInterface &outPointCloud)=0
virtual FLE_DLL Result pause()=0
virtual FLE_DLL void setMaxNumberOfCores(Size numberOfCores)=0
virtual FLE_DLL Result detectMarkers(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, ConstStringBuffer tagFamily, double subsampling, double blur, int *minimumPoints, double *maximumReprojectionError, double *minimumAngle, Buffer< ControlPointConstraintInterface * > inOutPoints)=0
virtual FLE_DLL Result adaptMeshWithOpticalFlow(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, const StereoMeshInterface &inPivotMesh, const StereoMeshInterface &inDestinationMesh, StereoMeshInterface &inoutStartingMesh)=0
virtual FLE_DLL Result isLatestVersion() const =0
virtual FLE_DLL Result resume()=0
virtual FLE_DLL Result computeMesh(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, const BoundingBoxInterface &boundingBox, Buffer< CameraInterface * > cameras, const StereoPointCloudInterface &inStereoPointCloud, StereoMeshInterface &outStereoMesh)=0
virtual FLE_DLL Result getVersion(StringBuffer outVersion) const =0
virtual FLE_DLL Result computeOrthophoto(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, const StereoMeshInterface &mesh, ConstBuffer< double > transform, OrthophotoInterface &outOrthophoto)=0
virtual FLE_DLL Result computeDensePointCloud(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, const BoundingBoxInterface &boundingBox, Buffer< CameraInterface * > cameras, const SparsePointCloudInterface &pointCloud, StereoPointCloudInterface &outPointCloud)=0
virtual FLE_DLL Result adaptMeshWithControlPoints(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< ControlPointConstraintInterface * > inStartingConstraints, Buffer< ControlPointConstraintInterface * > inDestinationConstraints, const StereoMeshInterface &inDestinationMesh, StereoMeshInterface &inoutStartingMesh)=0
virtual FLE_DLL Result performBundleAdjustment(const SettingsInterface &inSettings, ProgressBarInterface &inProgressBar, LogListenerInterface &inLogListener, ConstBuffer< ControlPointConstraintInterface * > inPointConstraints, ConstBuffer< CameraConstraintInterface * > inCameraConstraints, Buffer< CameraInterface * > inOutCameras, SparsePointCloudInterface &inOutPointCloud, Buffer< unsigned char > inOutCamerasStatus)=0
virtual FLE_DLL Size getVersionLength() const =0
virtual FLE_DLL Result getCudaDeviceInfo(int device, CudaDeviceInfo &outInfo) const =0
virtual FLE_DLL Result computeTexturedMesh(const SettingsInterface &settings, ProgressBarInterface &progressBar, LogListenerInterface &logListener, Buffer< CameraInterface * > cameras, const StereoMeshInterface &mesh, ConstBuffer< TexCoords > uvCoords, StereoTexturedMeshInterface &outStereoTexturedMesh)=0
Pure virtual Log Listener interface.
Definition: LogListenerInterface.h:41
Hold an Orthophoto object.
Definition: OrthophotoInterface.h:32
Pure virtual Progress Bar interface.
Definition: ProgressBarInterface.h:32
Stores the processing settings.
Definition: SettingsInterface.h:32
Stores a PointCloud object.
Definition: SparsePointCloudInterface.h:36
Stores a simple stereo mesh object for the FlowEngine interface.
Definition: StereoMeshInterface.h:38
Stores a simple Dense Point Cloud object for the FlowEngine interface.
Definition: StereoPointCloudInterface.h:38
Stores a simple textured mesh object for the FlowEngine interface.
Definition: StereoTexturedMeshInterface.h:36
Definition: BoundingBoxInterface.cpp:26
std::ptrdiff_t Index
Index type.
Definition: CommonDef.h:100
FLE_DLL void DestroyFlowEngine(FlowEngineInterface *flowEngine)
Definition: FlowEngine.cpp:31
FLE_DLL FlowEngineInterface * CreateFlowEngine()
Definition: FlowEngine.cpp:21
Detail::UniquePtr< FlowEngineInterface > UniqueFlowEnginePtr
Automatically manages the lifetime of a FlowEngine object.
Definition: FlowEngine.h:586
FLE_DLL void DestroyFlowEngineObject(FlowEngineInterface *flowEngine)
Definition: FlowEngine.cpp:26
std::size_t Size
Size type.
Definition: CommonDef.h:103
Result
Enumerates possible results generated by FlowEngine.
Definition: CommonDef.h:45
Specialization for a Buffer of characters.
Definition: CommonDef.h:255
Holds a (mutable) non_owning pointer and a size Used to marshal memory buffers as arguments in a safe...
Definition: CommonDef.h:118
Specialization for a const buffer characters.
Definition: CommonDef.h:296
Holds a (non mutable) non_owning pointer and a count Used to marshal memory buffers as arguments in a...
Definition: CommonDef.h:191
Basic information about a CUDA-enabled device.
Definition: FlowEngine.h:53
char name[512]
Definition: FlowEngine.h:54
bool capabilitiesAreSupported
Definition: FlowEngine.h:58
int physicalMemoryMB
Definition: FlowEngine.h:57
int capabilitiesMinor
Definition: FlowEngine.h:55
int capabilitiesMajor
Definition: FlowEngine.h:56
Represents a version in the major.minor categories format.
Definition: CommonDef.h:347