43 #ifndef vpImagePoint_H
44 #define vpImagePoint_H
52 #include <visp/vpConfig.h>
53 #include <visp/vpMath.h>
145 inline void set_i(
const double i) { this->i = i ; }
156 inline void set_j(
const double j) { this->j = j ; }
167 inline void set_ij(
const double i,
const double j) {
181 inline double get_i()
const {
return i ; }
192 inline double get_j()
const {
return j ; }
203 inline void set_u(
const double u) { j = u ; }
214 inline void set_v(
const double v) { i = v ; }
225 inline void set_uv(
const double u,
const double v) {
239 inline double get_u()
const {
return j ; }
250 inline double get_v()
const {
return i; }
277 bool inRectangle(
const vpRect &rect )
const;
295 double i1 = ip1.
get_i();
296 double j1 = ip1.
get_j();
297 double i2 = ip2.
get_i();
298 double j2 = ip2.
get_j();
301 ( std::fabs(i1-i2) <= std::fabs(
vpMath::maximum(i1, i2))*std::numeric_limits<double>::epsilon() )
303 ( std::fabs(j1-j2) <= std::fabs(
vpMath::maximum(j1, j2))*std::numeric_limits<double>::epsilon() )
317 double i1 = ip1.
get_i();
318 double j1 = ip1.
get_j();
319 double i2 = ip2.
get_i();
320 double j2 = ip2.
get_j();
323 ( std::fabs(i1-i2) > std::fabs(
vpMath::maximum(i1, i2))*std::numeric_limits<double>::epsilon() )
325 ( std::fabs(j1-j2) > std::fabs(
vpMath::maximum(j1, j2))*std::numeric_limits<double>::epsilon() )
385 const double offset ) {
445 const double offset ) {
469 const double scale ) {
493 const double scale ) {
529 VISP_EXPORT
inline std::ostream&
operator<< (std::ostream &os,
void set_j(const double j)
VISP_EXPORT vpImagePoint operator-(const vpImagePoint &ip1, const double offset)
VISP_EXPORT vpImagePoint operator/(const vpImagePoint &ip1, const double scale)
VISP_EXPORT vpImagePoint operator*(const vpImagePoint &ip1, const double scale)
void set_i(const double i)
VISP_EXPORT vpImagePoint operator+(const vpImagePoint &ip1, const double offset)
const vpImagePoint & operator=(const vpImagePoint &ip)
VISP_EXPORT bool operator!=(const vpImagePoint &ip1, const vpImagePoint &ip2)
VISP_EXPORT vpImagePoint operator+(const vpImagePoint &ip1, const int offset)
static Type maximum(const Type &a, const Type &b)
This class aims to compute the homography wrt.two images.
void set_ij(const double i, const double j)
void set_u(const double u)
VISP_EXPORT bool operator==(const vpImagePoint &ip1, const vpImagePoint &ip2)
static double sqr(double x)
void set_v(const double v)
VISP_EXPORT std::ostream & operator<<(std::ostream &os, const vpImagePoint &ip)
vpImagePoint(const vpImagePoint &ip)
VISP_EXPORT vpImagePoint operator-(const vpImagePoint &ip1, const int offset)
VISP_EXPORT vpImagePoint operator-(const vpImagePoint &ip1, const vpImagePoint &ip2)
vpImagePoint(double i, double j)
static double sqrDistance(const vpImagePoint &iP1, const vpImagePoint &iP2)
void set_uv(const double u, const double v)
Defines a rectangle in the plane.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
virtual ~vpImagePoint()
Destructor.
VISP_EXPORT vpImagePoint operator+(const vpImagePoint &ip1, const vpImagePoint &ip2)
static double distance(const vpImagePoint &iP1, const vpImagePoint &iP2)