![]() |
FlowSDK
3.701
Structure from motion and Multiview stereo Interfaces
|
Samantha dll interface. More...
#include <SamanthaInterface.h>
Inherits FlowSaM::SamanthaVInterface.
Public Member Functions | |
virtual void | setPointCloud (PointCloudInterface *pointCloud) |
Set the sparse point cloud. The object will be filled in the compute function (mandatory to add at least 3 cameras before compute) | |
virtual void | addCamera (CameraInterface *camera) |
Add a camera object for the reconstruction (mandatory to add at least 3 cameras before compute) | |
virtual void | setSettingValue (const char *nCategory, const char *nSettingName, const char *nValue) |
Set a setting value Valid nSettingName for nCategory "Samantha" e.g. samantha->setSettingValue( "Samantha", "AdjustTangentialDistortion", "true" ); MaxKeypointsPerImage: The max number of keypoints that are to be extracted for each image. AdjustInternalParametersOnFinalBa: When set to true the internal camera parameters are re-adjusted during the final bundle adjustment. ANNNumberOfNeighbors: Number of neighbors images to be considered for each camera during the fast-matching phase ANNNumberOfFeatures: Number of keypoints to be considered for each image during the fast-matching phase LocalBa: If set to true activates the local bundle adjustment strategy. The geometric reconstruction will go faster with no noticeable differences. LocalBaOnAutocalibration: If set to true activates the local bundle adjustment strategy during the autocalibration phase. The geometric reconstruction will go faster, but results might be unstable. FinalBa: Select whether to use of not the final bundle adjustment routine. FinalMaxReprojectionError: Maximum reprojection error. This threshold is used to discard points with high reprojection error after Samantha has been completed. The parameter is expressed in pixels. FinalMinimumTrackLength: Number of minimum track length for each point. Points with lower track length are discarded after Samantha has been completed. ForceSequentialPipeline: Use a sequential reconstruction if set to true; use a hierarchical reconstruction when set to false. KeypointNumberOfLevels: Defines how many levels are extracted in the LoG pyramid during the keypoint extraction. An high value is advised when dealing with far and short distance photos appearing in the same dataset. A Low value will results in a faster extraction phase. KeypointNumberOfLevelsPerOctave: Defines how many levels are extracted for a single octave in the LoG pyramid during the keypoint extraction. MinBAIterations: Minimum number of iteration of the Bundle Adjustment routine. MaxBAIterations: Maximum number of iteration of the Bundle Adjustment routine. MaxOuterLoopBAIterations: Maximum number of outer loop iteration of the Bundle Adjustment routine. MaxResolution: Controls the maximum image dimension (set a threshold to the max of width or height). MinimumTrackLength: Number of minimum track length for each point. Points with lower track length are discarded during the reconstruction. NBucketsPerWidth: Keypoint matching follows a bucketing strategy. This parameter specifies the number of buckets per image width. NCamerasToFixIntrinsics: Number of cameras needed before fixing the internal parameters of a cluster of cameras. An high value will likely produce more accurate calibration results, but it will require more time. NumberOfMatchViews: This parameters influences the number of neighbor cameras to be matched for each camera. For each camera the number of matching views is computed as ( NumberOfMatchViews + #views / NumberOfMatchViewsN ). NumberOfMatchViewsN: This parameters influences the number of neighbor cameras to be matched for each camera. For each camera the number of matching views is computed as ( NumberOfMatchViews + #views / NumberOfMatchViewsN ). PointRecovery: If set to true activates a bad tracks/point recovery strategy during reconstruction. The geometric reconstruction phase will be slower but generally more robust. PInlier: This value, along with SigmaNoise, controls the inliers threshold during the matching phase. It represents the probability of a match of being an inlier. A high value will produce less matches. ReprojectionThreshold: Maximum reprojection error. This threshold is used to discard points with high reprojection error during the reconstruction. The parameter is expressed in pixels. ReprojectionThresholdBeforeRatio: Before minimization, a value of ReprojectionThresholdBeforeRatio * ReprojectionThreshold is considered to discard early outliers. SigmaNoise: This value, along with PInlier, controls the inliers threshold during the matching phase. It represents an estimation of the variance. A high value will produce more matches. StructSequence: When images are known to be in a specific order, you can set this value to: 1=linear ordering, 2=circular ordering, 3=approximate grid. Set the value to 0 (default) if the image ordering is unknown. MinInliersRatio: Inliers/Outliers ratio used to discard matches during the matching phase. UseSymmetricMatches: Specifies which algorithm is used to match keypoints. Symmetric, as opposed to one-way, means that a match from image I to image J must be also verified from image J to image I. MatchingBreakup: Make use of an approximate keypoint matching phase, by using keypoints clusterization. 0=no approximation, 1=slight approximation, 2=high approximation MaximumTracksPerCameraOnBA: Maximum number of track to be considered during the Bundle adjustment phase. MaximumTracksPerCameraOnBAAC: Maximum number of track to be considered during the Bundle adjustment phase with varying internal parameters. GlobalReconstruction: When set to true, Samantha will use the global reconstruction engine instead of the incremental one. IncrementalAfterGlobalReconstruction: When set to true, Samantha will try to add cameras with the incremental engine after the global pipeline. MaxAngleErrorFilterGlobalReconstruction: Maximum acceptable local view pair rotation error during the global reconstruction process. MatchingPreemptiveNeighborFeatures: Maximum number of keypoints used during the preemptive phase of the keypoints matching. Rematching: Perform matching and bundle adjustment again after a first reconstruction has been obtained. Valid nSettingName for nCategory "Cuda" e.g. samantha->setSettingValue( "Cuda", "DeviceList", "0" ); DeviceList: list of the devices to be used. If set to "0", the first Cuda device will be used. If set to "0 1" the first and the second Cuda device will be used togheter. If the list is empty, computation will run on CPU. . | |
virtual void | setLogListener (FlowCore::LogListener *logListener) |
Set a log listener to record the samantha log (optional) | |
virtual void | setProgressBar (FlowCore::ProgressBar *progressBar) |
Set the progress bar (optional) | |
virtual unsigned int | getCameraCount () const |
Get the number of camera that has been added. | |
virtual bool | abort () |
Send an abort signal to stop the computation. Returns false if no process was currently running. | |
virtual int | compute () |
Start samantha reconstruction. The method will fill the reconstructed camera objects and the point cloud. A camera is correctly reconstructed if mVisiblePointsCount > 0 Return codes: 1 Samantha computation successfull 0 Samantha computation failed (check log) -1 Point cloud object not set -2 Not enough cameras (at least 3 needed) -4 Failed to create temporary directory -5 Not enough valid cameras (check paths and supported image formats) | |
virtual bool | triangulatePoint (unsigned int numberOfTracks, const unsigned int *imageIndexes, const double *imageCoords, double out3DPosition[3]) |
Triangulate a 3D point from a set of 2d camera coords. Triangulate a 3D point from a set of 2d camera coords. Cameras must be loaded with full intrinsics and extrinsics parameters. Parameters: numberOfTracks: number of camera coordinates. Must be at least 2. imageIndex: array containing the index of each camera (length numberOfTracks). imagePositions: array containing the 2D coordinates for of each camera (length numberOfTracks * 2). out3DPosition: output array containing the 3D coordinate of the point. | |
Samantha dll interface.