Laser stripe position detected in a Frame. More...
#include <Profile.hpp>
Public Types | |
| typedef float | value_type |
| The data type of the elements in the Profile. | |
| typedef value_type * | iterator |
| Iterator for the Profile class. | |
| typedef const value_type * | const_iterator |
| Const iterator for the Profile class. | |
Public Member Functions | |
| Profile (value_type *start, int length) | |
| Creates a Profile from a user allocated array of floats. | |
| Profile (sal3d_profile profile) | |
| Constructor from a C sal3d_profile. Creates a C++ Profile object that holds it. | |
| Profile (const Profile &profile) | |
| Copy constructor. | |
| ~Profile () | |
| Destructor. | |
| sal3d_profile | c_profile () const |
| Returns the C pointer to a profile. | |
| const_iterator | begin () const |
| Gets a const iterator to the beginning of the values. | |
| iterator | begin () |
| Gets an iterator to the beginning of the values. | |
| const_iterator | end () const |
| Gets a const iterator past the last value. | |
| iterator | end () |
| Gets an iterator past the last value. | |
| int | length () const |
| Gets the profile's length. | |
| Profile & | operator= (const Profile &rhs) |
| Copy assignment operator. | |
| const value_type & | operator[] (int index) const |
Gets a const reference to the element at position index. | |
| value_type & | operator[] (int index) |
Gets a reference to the element at position index. | |
Laser stripe position detected in a Frame.
This class requires linking with acquire.lib (import library for acquire.dll).
As explained in the Acquisition Overview, we use the position of the laser stripe detected in Frame objects to build 3D models of scanned parts. The Profile class is used as the container for the peak positions of the laser detected in those Frames.
Profiles are also the constituent parts of a RangeMap. They can be obtained through the getNewProfile() method, which returns every time that it is called the next empty Profile in the RangeMap, up to the maximum number that was set in the constructor. They can also exist standalone, created from an array of floats. However, it is not possible to append Profiles to a Frame, so if a Frame created this way is to be added to a RangeMap, the only method is by copying the data.
SAL3D comes with a module to extract the laser stripe positions from Frames, called PeakFinderH, although one can also use other vendor provided functions to fill in a Profile. This is possible because a profile can be thought of as an array of floating point numbers, in which each value represents the position of the peak of the laser in a row or a column of a frame, depending on the orientation of the camera/laser set.
In the Profile section of the acquisition overview there is a graphic representation of a profile, which may help to clarify its meaning.
| sal3d::Profile::Profile | ( | value_type * | start, |
| int | length | ||
| ) | [inline] |
| sal3d::Profile::Profile | ( | sal3d_profile | profile | ) | [inline, explicit] |
Constructor from a C sal3d_profile. Creates a C++ Profile object that holds it.
profile. That means that you should not call sal3d_profile_release() on this profile, otherwise it would be called twice.| [in] | profile | The C sal3d_profile used to create this object. |
| sal3d::Profile::Profile | ( | const Profile & | profile | ) | [inline] |
Copy constructor.
| [in] | profile | The profile to copy from. |
| sal3d::Profile::~Profile | ( | ) | [inline] |
Destructor.
| const_iterator sal3d::Profile::begin | ( | ) | const [inline] |
Gets a const iterator to the beginning of the values.
Referenced by begin(), and operator[]().
| iterator sal3d::Profile::begin | ( | ) | [inline] |
Gets an iterator to the beginning of the values.
References begin().
| sal3d_profile sal3d::Profile::c_profile | ( | ) | const [inline] |
Returns the C pointer to a profile.
Referenced by sal3d::Merger::average(), sal3d::Metric::calibrate(), sal3d::COP::COP(), sal3d::COP::fillRow(), sal3d::PeakFinder::operator()(), and sal3d::PeakFinderH::operator()().
| const_iterator sal3d::Profile::end | ( | ) | const [inline] |
| iterator sal3d::Profile::end | ( | ) | [inline] |
Gets an iterator past the last value.
References end().
| int sal3d::Profile::length | ( | ) | const [inline] |
Gets the profile's length.
Referenced by sal3d::Metric::calibrate(), end(), and operator[]().
Copy assignment operator.
| [in] | rhs | The profile to copy to this object. |
| const value_type& sal3d::Profile::operator[] | ( | int | index | ) | const [inline] |
| value_type& sal3d::Profile::operator[] | ( | int | index | ) | [inline] |
Gets a reference to the element at position index.
| [in] | index | The index of the value to get. The allowed range is [0..length()-1]. |
index.| std::out_of_range | If index is not within the allowed range. |
by
1.7.6.1