lti::boundingBox< T > Class Template Reference
Generate an image containing a region of another one specified through a contour-instance, or compute the "best" rectLocation that contains the specified region.
More...
#include <ltiBoundingBox.h>
List of all members.
Classes |
class | parameters |
| the parameters for the class boundingBox More...
|
Public Member Functions |
| boundingBox () |
| boundingBox (const boundingBox &other) |
virtual | ~boundingBox () |
virtual const char * | getTypeName () const |
bool | apply (matrix< T > &srcdest, const areaPoints &obj) const |
bool | apply (const matrix< T > &src, const areaPoints &obj, matrix< T > &dest) const |
bool | apply (const matrix< T > &src, const areaPoints &obj, matrix< T > &dest, rectLocation &loc) const |
bool | apply (const areaPoints &obj, rectLocation &loc) const |
bool | apply (const ioPoints &obj, rectLocation &loc) const |
bool | apply (const pointList &obj, rectLocation &loc) const |
boundingBox & | copy (const boundingBox &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Protected Member Functions |
void | calculatePositions (const areaPoints &obj, point &destSize, point &delta) const |
void | computeLocation (const pointList &pts, rectLocation &loc) const |
bool | computeLocationFromCH (const pointList &convexHull, rectLocation &loc) const |
Detailed Description
template<class T>
class lti::boundingBox< T >
Generate an image containing a region of another one specified through a contour-instance, or compute the "best" rectLocation that contains the specified region.
After segmenting the biggest object on an image or channel, it is usually desirable to get a new image with the extracted object only. This class will allow to generate such an image. The position of the desired object will be indicated by the area points of a contour object.
Type T of the template specify the type of the matrix to be used (for images this will be rgbPixel and for channels float).
Example:
Constructor & Destructor Documentation
copy constructor
- Parameters:
-
Member Function Documentation
computes the oriented rectangular bounding box for the given point list, and leaves the result as a rectLocation.
- Parameters:
-
| obj | point list the object description |
| loc | the rectangular location will represent the smallest rectangular region that contains all points of the list. |
- Returns:
- true if successful, false otherwise.
computes the oriented rectangular bounding box for the given io points, and leaves the result as a rectLocation.
- Parameters:
-
| obj | io points with the object description |
| loc | the rectangular location will represent the smallest rectangular region that contains all points of the io points obj. |
- Returns:
- true if successful, false otherwise.
computes the oriented rectangular bounding box for the given area points, and leaves the result as a rectLocation.
- Parameters:
-
- Returns:
- true if successful, false otherwise.
Take the object specified by the area points on the given contour, and create a new image with only the object and a border of the specified size on the srcdest.
- Parameters:
-
| src | matrix with the source data. |
| obj | the areaPoints list which specifies which points of the image belong to the object. The boundary must be calculated before calling this member (i.e. you need to call obj.computeBoundary()). This is not done automatically, because many functors (like lti::objectsFromMask) compute the bounding box directly and computing it twice can cost too much time! |
| dest | matrix where the destination data will be stored. |
| loc | a rectangular location that indicates the smallest rectangular region that contains the hole object |
- Returns:
- true if successful, false otherwise
Take the object specified by the area points on the given contour, and create a new image with only the object and a border of the specified size on the srcdest.
- Parameters:
-
| src | matrix with the source data. |
| obj | the areaPoints list which specifies which points of the image belong to the object. The boundary must be calculated before calling this member (i.e. you need to call obj.computeBoundary()). This is not done automatically, because many functors (like lti::objectsFromMask) compute the bounding box directly and computing it twice can cost too much time! |
| dest | matrix where the destination data will be stored. |
- Returns:
- true if successful, false otherwise
Take the object specified by the area points, and create a new image with only the object and a border of the specified size on the srcdest.
- Parameters:
-
| srcdest | matrix with the source data. The result will be left here too. |
| obj | a contour which specifies which points of the image belong to the object. Only the area points, center and boundary points |
- Returns:
- true if successful, false otherwise
calculate the source box of the source image, the size of the destination image, and the position of the box on the destination image.
- Parameters:
-
The documentation for this class was generated from the following file: