Artec 3D Scanning SDK  2.0
IFrameProcessor.h
Go to the documentation of this file.
1 /********************************************************************
2 *
3 * Project Artec 3D Scanning SDK
4 *
5 * Purpose: Process raw data from scanner
6 *
7 * Copyright: Artec Group
8 *
9 ********************************************************************/
10 #ifndef _IFRAMEPROCESSOR_H_
11 #define _IFRAMEPROCESSOR_H_
12 
13 #include <artec/sdk/base/Errors.h>
14 #include <artec/sdk/base/IRef.h>
15 #include <artec/sdk/base/Rect.h>
19 
20 namespace artec { namespace sdk { namespace capturing
21 {
22 using namespace artec::sdk::base::errors;
23 
24 class IFrame;
25 /** Raw frames processor (frames from scanner).
26 * It provides several methods to handle scanner's parameters.
27 */
29 {
30 public:
31  /**
32  * Method reconstructs a surface from the frame data, but it doesn't texturize
33  * the output even if texture is captured. Texture mapping should be
34  * explicitly performed through the IFrameMesh::mapTexture() method.
35  * @param mesh points to mesh to be reconstructed
36  * @param frame - source frame entity
37  */
38  virtual ErrorCode reconstructMesh(artec::sdk::base::IFrameMesh** mesh, const IFrame* frame) = 0;
39 
40  /**
41  * Method both reconstructs a surface from the frame data and applies texture to
42  * the output. The latter is performed only if texture is captured.
43  * \warning This is a slow method. Use reconstructMesh() instead.
44  * @param mesh points to mesh to be reconstructed
45  * @param frame - source frame entity
46  */
47  virtual ErrorCode reconstructAndTexturizeMesh(artec::sdk::base::IFrameMesh** mesh, const IFrame* frame) = 0;
48 
49  /**
50  * Set the "improve by neighbor" sensitivity parameter used in mesh reconstruction.
51  * It can be changed while capture is in progress.
52  * @param sensitivity - value in the range of 0.0f to 1.0f
53  */
54  virtual ErrorCode setSensitivity(float sensitivity) = 0;
55 
56  /**
57  * Get the "improve by neighbor" sensitivity parameter used in mesh reconstruction.
58  * @return sensitivity - value in the range of 0.0f to 1.0f
59  */
60  virtual float getSensitivity() const = 0;
61 
62  /**
63  * Adjust scanning range.
64  * It can be changed during capture.
65  * @param rangeNear - near range limit
66  * @param rangeFar - far range limit
67  */
68  virtual ErrorCode setScanningRange(float rangeNear, float rangeFar) = 0;
69 
70  /**
71  * Get scanning range.
72  * @param rangeNear - near range limit
73  * @param rangeFar - far range limit
74  */
75  virtual ErrorCode getScanningRange(float* rangeNear, float* rangeFar) const = 0;
76 
77  /**
78  * Adjust region of scanning interest.
79  * It can be changed during capture.
80  * @param rect - new region of interest. If it is NULL, then ROI is disabled.
81  */
82  virtual ErrorCode setROI(artec::sdk::base::RectF* rect) = 0;
83 
84  /**
85  * Get region of scanning interest.
86  * @param rect - rect to return.
87  */
88  virtual ErrorCode getROI(artec::sdk::base::RectF* rect) const = 0;
89 };
90 
91 } } } // namespace artec::sdk::capturing
92 
93 #endif // _IFRAMEPROCESSOR_H_
Indexed triangle mesh with optional texture.
Definition: IFrameMesh.h:42
Structure that defines rectangle, i.e. two-dimensional range.
Definition: Rect.h:26
Interface for captured frame (image + depth).
Definition: IFrame.h:25
Raw frames processor (frames from scanner).
Interface that implements reference counting and life-time management.
Definition: IRef.h:22