IScanningProcedure.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Scanning procedure
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 
11 #ifndef _ISCANNINGPROCEDURE_H_
12 #define _ISCANNINGPROCEDURE_H_
13 
14 #include <artec/sdk/base/Errors.h>
15 #include <artec/sdk/base/IScan.h>
16 #include <artec/sdk/base/IJob.h>
17 #include <artec/sdk/base/Rect.h>
19 
20 namespace artec { namespace sdk { namespace capturing {
21  class IScanner;
22 } } }
23 
24 namespace artec { namespace sdk { namespace scanning
25 {
26 using namespace artec::sdk::base::errors;
27 
28 class IScanningProcedureObserver;
29 class IScanningProcedure;
30 
32 {
37 
38  ScanningState_ForceDword = 0x7fffffff /* force 32-bit size enum */
39 };
40 
42 {
44 
45  /// Texture will be captured automatically
48 
49  RegistrationAlgorithmType_ForceDword = 0x7fffffff /* force 32-bit size enum */
50 };
51 
53 {
54  /// Capture frames and reconstruct surfaces
56 
57  /// Convert textures from raw to color format
59 
60  /// Normals will be calculated if CaclulateNormals of RegisterFrame flags set
62 
63  /// Map Raw, Half-size or Full-size texture on the mesh
64  /// If no texture captured this action is skipped
66 
67  /// Make frame registration. When enabled, only unsuccessfully registered frames added to scan.
68  /// Otherwise all frames added to scan.
69  /// Normals will be calculated automatically for this case.
70  /// In case of texture or hybrid tracking type texture will be mapped also.
72 
73  /// Detect is captured frame is geometry key frame (skeleton frame).
74  /// If registration unsuccessful or ScanningPipeline_RegisterFrame not set this action is skipped
76 
77  /// Make only capture while scanning and execute all post-processing later.
78  /// Very suitable for scanning with bundle
80 
81  ScanningPipelene_ForceDword = 0x7fffffff /* force 32-bit size enum */
82 };
83 
84 /// Note. This setting define condition for full-size texture capturing
86 {
87  /// Don't capture textures at all
89 
90  /// Capture textures each N-th frame
92 
93  /// Capture textures only if frame detected as key frame for texturing algorithm
94  /// If registration unsuccessful or ScanningPipeline_FindGeometryKeyFrame not set this action is skipped
96 
97  /// Capture textures on each frame
99 
100  CaptureTextureMethod_ForceDword = 0x7fffffff /* force 32-bit size enum */
101 };
102 
104 {
105  /// 0 means no limit, negative values are not valid
107 
108  /// tracking type
110 
111  /// Combination of ScanningPipeline values
113 
114  /// Initial scanning state
116 
117  /// Callback interface for captured data processing
118  /// For example adding frames for rendering while scanning. Can be NULL
120 
121  /// if this flag is true, scanning procedure adds all successfully reconstructed frames to the result scan.
122  /// if flag is false, scanning procedure adds only successfully registered frames to the result scan.
123  /// flag influences the result only if "ScanningPipeline_RegisterFrame" is enabled.
125 
126  /// How to capture texture from scanner
128 
129  /// How often to capture texture.
130  /// Used for CaptureTextureMethod_EveryNFrame method
131  /// If CaptureTextureMethod_EveryNFrame selected, 0 and 1 means capture on every frame,
132  /// other values means "capture texture on each N't frame"
134 
135  /// This flag indicates that surfaces with reconstruction failures will be added to scan as "empty" ones
136  /// It might be useful for texturization algorithm afterwards and to preserve numbering between
137  /// frames of different scans (when scanning with bundle)
139 };
140 
141 extern "C"
142 {
143  /// Initializes scanning procedure descriptor with defaults settings
146 
149 }
150 
152 {
153 public:
154  ///get current scanning event handler
155  virtual ScanningState getState() = 0;
156 
157  ///set new scanning event handler
158  virtual ErrorCode setState( ScanningState state ) = 0;
159 
160  /**
161  * Set "improve by neighbor" sensitivity parameter
162  * used im mesh reconstruction
163  * can be changed while capture in progress
164  * @param sensitivity - value between 0.0f and 1.0f
165  */
166  virtual ErrorCode setSensitivity(float sensitivity) = 0;
167 
168  /**
169  * Get "improve by neighbor" sensitivity parameter
170  * used im mesh reconstruction
171  * @return sensitivity - value between 0.0f and 1.0f
172  */
173  virtual float getSensitivity() = 0;
174 
175  /**
176  * Update scanning range
177  * can be changed while capture in progress
178  */
179  virtual ErrorCode setScanningRange(float rangeNear, float rangeFar) = 0;
180 
181  /**
182  * Update scanning range
183  * @param rangeNear - near range limit
184  * @param rangeFar - far range limit
185  */
186  virtual ErrorCode getScanningRange(float* rangeNear, float* rangeFar) = 0;
187 
188  /**
189  * Update scanning region of interest
190  * can be changed while capture in progress
191  * call with rect == NULL for disable ROI
192  */
193  virtual ErrorCode setROI(artec::sdk::base::RectF* rect) = 0;
194 
195  /**
196  * Get scanning region of interest
197  * @param rect - rect to return
198  */
199  virtual ErrorCode getROI(artec::sdk::base::RectF* rect) = 0;
200 };
201 
202 } } } // namespace artec::sdk::scanning
203 
204 #endif // _ISCANNINGPROCEDURE_H_
ScanningState initialState
Initial scanning state.
RegistrationAlgorithmType registrationType
tracking type
This namespace is auto-generated from internal event code list.
Definition: Errors.h:55
Capture frames and reconstruct surfaces.
Normals will be calculated if CaclulateNormals of RegisterFrame flags set.
CaptureTextureMethod captureTexture
How to capture texture from scanner.
Texture will be captured automatically.
Convert textures from raw to color format.
int maxFrameCount
0 means no limit, negative values are not valid
#define ASCANNINGSDK_LINK_SPEC
CaptureTextureMethod
Note. This setting define condition for full-size texture capturing.
ErrorCode ASCANNINGSDK_LINK_SPEC createScanningProcedure(IScanningProcedure **job, artec::sdk::capturing::IScanner *scanner, const ScanningProcedureSettings *desc=NULL)
ErrorCode ASCANNINGSDK_LINK_SPEC initializeScanningProcedureSettings(ScanningProcedureSettings *desc)
Initializes scanning procedure descriptor with defaults settings.
int pipelineConfiguration
Combination of ScanningPipeline values.