 |
Visual Servoing Platform
version 3.2.0
|
50 #include <visp3/blob/vpDot.h>
51 #include <visp3/core/vpCameraParameters.h>
52 #include <visp3/core/vpDebug.h>
53 #include <visp3/core/vpImage.h>
54 #include <visp3/core/vpPixelMeterConversion.h>
55 #include <visp3/core/vpPoint.h>
56 #include <visp3/gui/vpDisplayGTK.h>
57 #include <visp3/gui/vpDisplayOpenCV.h>
58 #include <visp3/gui/vpDisplayX.h>
59 #include <visp3/robot/vpRobotAfma6.h>
60 #include <visp3/sensor/vp1394TwoGrabber.h>
61 #include <visp3/vision/vpPose.h>
62 #if defined(VISP_HAVE_AFMA6) && defined(VISP_HAVE_DC1394)
78 vpDisplayX display(I, 100, 100,
"Current image");
79 #elif defined(VISP_HAVE_OPENCV)
81 #elif defined(VISP_HAVE_GTK)
109 for (
int i = 0; i < 4; i++) {
111 std::cout <<
"Click on dot " << i << std::endl;
119 std::cout <<
" Coordinates: " << dot[i].
getCog() << std::endl;
135 robot.getCameraParameters(cam, I);
140 for (
int i = 0; i < 4; i++) {
159 for (
int i = 0; i < 4; i++) {
172 std::cout <<
"Pose cMo: " << std::endl << cMo;
183 std::cout <<
"Robot pose in reference frame: " << p << std::endl;
193 std::cout <<
"Pose rMc: " << std::endl << rMc;
201 std::cout <<
"Robot pose in articular: " << p << std::endl;
203 robot.get_fMc(p, rMc);
204 std::cout <<
"Pose rMc from MGD: " << std::endl << rMc;
213 std::cout <<
"Pose rMo = rMc * cMo: " << std::endl << rMo;
221 std::cout <<
"Catch an exception: " << e << std::endl;
228 std::cout <<
"Sorry, test not valid. You should have an Afma6 robot..." << std::endl;
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
void setWorldCoordinates(const double oX, const double oY, const double oZ)
void set_x(const double x)
Set the point x coordinate in the image plane.
Generic class defining intrinsic camera parameters.
Control of Irisa's gantry robot named Afma6.
static double deg(double rad)
vpImagePoint getCog() const
void addPoint(const vpPoint &P)
Class that consider the case of a translation vector.
Implementation of column vector and the associated operations.
void extract(vpRotationMatrix &R) const
bool computePose(vpPoseMethodType method, vpHomogeneousMatrix &cMo, bool(*func)(const vpHomogeneousMatrix &)=NULL)
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
vpHomogeneousMatrix getPosition() const
static void display(const vpImage< unsigned char > &I)
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
Implementation of a rotation matrix and operations on such kind of matrices.
void setGraphics(const bool activate)
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
Class for firewire ieee1394 video devices using libdc1394-2.x api.
void buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
void acquire(vpImage< unsigned char > &I)
Class used for pose computation from N points (pose from point only). Some of the algorithms implemen...
void set_y(const double y)
Set the point y coordinate in the image plane.
static void flush(const vpImage< unsigned char > &I)
vpRotationMatrix buildFrom(const vpHomogeneousMatrix &M)
Class that defines what is a point.
vpRxyzVector buildFrom(const vpRotationMatrix &R)
Implementation of an homogeneous matrix and operations on such kind of matrices.
void initTracking(const vpImage< unsigned char > &I)
error that can be emited by ViSP classes.
This tracker is meant to track a dot (connected pixels with same gray level) on a vpImage.
Implementation of a rotation vector as Euler angle minimal representation.