#include <image_ref.h>
An (x,y) image co-ordinate
Definition at line 47 of file image_ref.h.
CVD::ImageRef::ImageRef |
( |
| ) |
|
|
inline |
CVD::ImageRef::ImageRef |
( |
int |
xp, |
|
|
int |
yp |
|
) |
| |
|
inline |
Construct an ImageRef
- Parameters
-
xp | The x co-ordinate |
yp | The y co-ordinate |
Definition at line 203 of file image_ref.h.
CVD::ImageRef::ImageRef |
( |
std::istream & |
is | ) |
|
|
inline |
int CVD::ImageRef::area |
( |
| ) |
const |
|
inline |
Area (product of x and y; signed)
Definition at line 407 of file image_ref.h.
The equivalent of doing .* in matlab.
Definition at line 412 of file image_ref.h.
void CVD::ImageRef::end |
( |
const ImageRef & |
size | ) |
|
|
inline |
Resets the ImageRef to the maximum co-ordinate in the image i.e. (size.x - 1, size.y - 1)
- Parameters
-
size | The size of the image |
Definition at line 245 of file image_ref.h.
void CVD::ImageRef::home |
( |
| ) |
|
|
inline |
unsigned int CVD::ImageRef::mag_squared |
( |
| ) |
const |
|
inline |
Magnitude-squared (x*x + y*y)
Definition at line 401 of file image_ref.h.
bool CVD::ImageRef::next |
( |
const ImageRef & |
max | ) |
|
|
inline |
Step to the next co-ordinate in the image (in horizontal scanline order). Successive calls to this function will work along each row of the image. If the next co-ordinate is off the end of the image, it returns false.
- Parameters
-
Definition at line 220 of file image_ref.h.
Step to the next co-ordinate in the image (in horizontal scanline order), for pixels within a rectangular window Successive calls to this function will work backwards along each row of the image. If the next co-ordinate is off the start of the image, it returns false.
- Parameters
-
min | The minimum (x,y) co-ordinates in the window |
max | The minimum (x,y) co-ordinates in the window |
Definition at line 225 of file image_ref.h.
bool CVD::ImageRef::operator!= |
( |
const ImageRef & |
ref | ) |
const |
|
inline |
Logical not equals
- Parameters
-
ref | The co-ordinate to compare with |
Definition at line 263 of file image_ref.h.
ImageRef CVD::ImageRef::operator* |
( |
const double |
scale | ) |
const |
|
inline |
Multiply both x and y co-ordinates by a scalar
- Parameters
-
Definition at line 302 of file image_ref.h.
ImageRef & CVD::ImageRef::operator*= |
( |
const double |
scale | ) |
|
|
inline |
Multiply both x and y co-ordinates by a scalar
- Parameters
-
Definition at line 274 of file image_ref.h.
Add an offset to the co-ordinate
- Parameters
-
Definition at line 314 of file image_ref.h.
Add an offset to the co-ordinate
- Parameters
-
Definition at line 288 of file image_ref.h.
ImageRef CVD::ImageRef::operator- |
( |
| ) |
const |
|
inline |
Unary minus. Negates both x and y components.
Definition at line 268 of file image_ref.h.
Subtract an offset from the co-ordinate
- Parameters
-
Definition at line 320 of file image_ref.h.
Subtract an offset from the co-ordinate
- Parameters
-
Definition at line 295 of file image_ref.h.
ImageRef CVD::ImageRef::operator/ |
( |
const double |
scale | ) |
const |
|
inline |
Divide both x and y co-ordinates by a scalar
- Parameters
-
Definition at line 308 of file image_ref.h.
ImageRef & CVD::ImageRef::operator/= |
( |
const double |
scale | ) |
|
|
inline |
Divide both x and y co-ordinates by a scalar
- Parameters
-
Definition at line 281 of file image_ref.h.
bool CVD::ImageRef::operator< |
( |
const ImageRef & |
other | ) |
const |
|
inline |
An ImageRef is less than another ImageRef if it is earlier in the standard horizontal scan-line order, i.e. has a smaller y-co-ordinate or the same y-co-ordinate but a smaller x-co-ordinate. An ordering of ImageRefs is needed to allow them to be used in STL for sets, maps, multisets, multimaps etc.
Definition at line 372 of file image_ref.h.
ImageRef CVD::ImageRef::operator<< |
( |
int |
i | ) |
const |
|
inline |
Bitwise left-shift operator
- Parameters
-
Definition at line 356 of file image_ref.h.
ImageRef & CVD::ImageRef::operator<<= |
( |
int |
i | ) |
|
|
inline |
Bitwise left-shift operator
- Parameters
-
Definition at line 326 of file image_ref.h.
Assigment
- Parameters
-
ref | The co-ordinate to copy |
Definition at line 251 of file image_ref.h.
bool CVD::ImageRef::operator== |
( |
const ImageRef & |
ref | ) |
const |
|
inline |
Logical equals
- Parameters
-
ref | The co-ordinate to compare with |
Definition at line 258 of file image_ref.h.
bool CVD::ImageRef::operator> |
( |
const ImageRef & |
other | ) |
const |
|
inline |
An ImageRef is greater than another ImageRef if it is earlier in the standard horizontal scan-line order, i.e. has a smaller y-co-ordinate or the same y-co-ordinate but a smaller x-co-ordinate.
Definition at line 377 of file image_ref.h.
ImageRef CVD::ImageRef::operator>> |
( |
int |
i | ) |
const |
|
inline |
Bitwise right-shift operator
- Parameters
-
Definition at line 361 of file image_ref.h.
ImageRef & CVD::ImageRef::operator>>= |
( |
int |
i | ) |
|
|
inline |
Bitwise right-shift operator
- Parameters
-
Definition at line 333 of file image_ref.h.
int & CVD::ImageRef::operator[] |
( |
int |
i | ) |
|
|
inline |
Square bracket subscripts for easy loops. 0=x 1=y other=error.
Definition at line 383 of file image_ref.h.
int CVD::ImageRef::operator[] |
( |
int |
i | ) |
const |
|
inline |
Square bracket const subscripts for easy loops. 0=x 1=y other=error.
Definition at line 392 of file image_ref.h.
bool CVD::ImageRef::prev |
( |
const ImageRef & |
max | ) |
|
|
inline |
Step to the previous co-ordinate in the image (in horizontal scanline order). Successive calls to this function will work backwards along each row of the image. If the next co-ordinate is off the start of the image, it returns false.
- Parameters
-
Definition at line 230 of file image_ref.h.
Step to the previous co-ordinate in the image (in horizontal scanline order), for pixels within a rectangule window Successive calls to this function will work backwards along each row of the image. If the next co-ordinate is off the start of the image, it returns false.
- Parameters
-
min | The minimum (x,y) co-ordinates in the window |
max | The minimum (x,y) co-ordinates in the window |
Definition at line 235 of file image_ref.h.
ImageRef CVD::ImageRef::shiftl |
( |
int |
i | ) |
const |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 340 of file image_ref.h.
ImageRef CVD::ImageRef::shiftr |
( |
int |
i | ) |
const |
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 348 of file image_ref.h.
Left-multiply an ImageRef by a scalar. Mutiplies both x and y.
- Parameters
-
scale | The multiplier |
ref | The ImageRef to scale |
Definition at line 367 of file image_ref.h.
std::ostream & operator<< |
( |
std::ostream & |
os, |
|
|
const ImageRef & |
ref |
|
) |
| |
|
related |
Write an ImageRef to a stream in the format "[x y]"
- Parameters
-
os | The stream |
ref | The co-ordinate |
Definition at line 424 of file image_ref.h.
std::istream & operator>> |
( |
std::istream & |
is, |
|
|
ImageRef & |
ref |
|
) |
| |
|
related |
Read an ImageRef from a stream. Any format with two successive numbers will work
Definition at line 431 of file image_ref.h.
The documentation for this class was generated from the following file: