Detailed Description
Decorator for a cv::Mat to use coordinates respect to a point Almost always that point is the center
List of all members.
Public Member Functions |
| | CenteredMat (cv::Mat &m) |
| | CenteredMat (cv::Mat &m, int center_row, int center_col) |
| | Where the pixel center of the matrix is explicitly established.
|
|
void | do_show (std::ostream &out) const |
| int | get_end (int i) const |
| bool | get_is_in_range (int i, int j) const |
| int | get_start (int i) const |
| double & | operator() (int i, int j) |
|
void | show (std::ostream &out=std::cout) const |
Protected Member Functions |
|
void | set_starts_and_ends () |
Protected Attributes |
|
int | center_col_ |
|
int | center_row_ |
|
cv::Mat | centered_ |
|
int | end_ [2] |
|
int | start_ [2] |
Constructor & Destructor Documentation
| IMP::em2d::CenteredMat::CenteredMat |
( |
cv::Mat & |
m | ) |
|
If the coordinates of the center pixel are not given, it is assumed to be the center of the matrix
| IMP::em2d::CenteredMat::CenteredMat |
( |
cv::Mat & |
m, |
|
|
int |
center_row, |
|
|
int |
center_col |
|
) |
| |
Where the pixel center of the matrix is explicitly established.
Member Function Documentation
| int IMP::em2d::CenteredMat::get_end |
( |
int |
i | ) |
const |
See get_start() function help. In the example of the 5x5 matrix, The end values would be (2,2)
| bool IMP::em2d::CenteredMat::get_is_in_range |
( |
int |
i, |
|
|
int |
j |
|
) |
| const |
Returns true if the indices are in the matrix. Remember that the indices Are those respect to the center of the matrix
| int IMP::em2d::CenteredMat::get_start |
( |
int |
i | ) |
const |
get the starting value for a dimension i (0 - rows, 1 - columns) for example, in a matrix of 5x5 centered at the origin (2,2), the starting point will be (-2,2)
| double& IMP::em2d::CenteredMat::operator() |
( |
int |
i, |
|
|
int |
j |
|
) |
| |
Returns the element (i,j) RELATIVE to the origin. Remember then that the indices can be negative. For performance the indices out of range are NOT checked
The documentation for this class was generated from the following file: