Improving Accuracy and Flexibility of Industrial Robots Using Computer Vision

A high level of positioning accuracy is an essential requirement in a wide range of industrial robots’ applications. Robot calibration is a process by which robot positioning accuracy can be improved. During a manipulator control system design, and periodically in the course of task performing, manipulator geometry calibration is required. Nowadays robot calibration plays an increasingly important role in robot production as well as in robot implementation and operation within computer-integrated manufacturing where the simulated robot must reflect the real robot geometry (Elatta, et al. 2004; Khalil & Dombre, 2004; Perez, et al. 2009).


Introduction
A high level of positioning accuracy is an essential requirement in a wide range of industrial robots' applications.Robot calibration is a process by which robot positioning accuracy can be improved.During a manipulator control system design, and periodically in the course of task performing, manipulator geometry calibration is required.Nowadays robot calibration plays an increasingly important role in robot production as well as in robot implementation and operation within computer-integrated manufacturing where the simulated robot must reflect the real robot geometry (Elatta, et al. 2004;Khalil & Dombre, 2004;Perez, et al. 2009).
Until the end of twentieth century algorithms for manipulator calibration using open kinematic chain were developed.The main constraint in practical implementation of these algorithms was request for accurate measurement of manipulator end-effector.A variety of measurement techniques ranging from coordinate measuring machines, proximity measuring systems, theodolites, and laser tracking interferometer systems have been employed for calibration tasks.These systems were very expensive, tedious to use or with low working volume (Driels, 1994;Khalil, et al. 1995;Vincze, et al. 1994).
To overcome the above limitations, mobile closed kinematic chain method has been proposed that obviates the need for pose measurement by forming a manipulator into a mobile closed kinematic chain (Bennett & Hollerbach, 1991).Using the closed kinematic chain reduces the number of parameters, which can be determined, and the speed of conversion.
Compared to the mechanical measuring devices, the camera system is low cost, fast, automated, user-friendly, non-invasive and can provide high accuracy (Zhuang & Roth, 1994).That is why in the last ten years re-focus is on the research on calibration with open chain manipulators with application of computer vision.If two calibrated cameras observe the same scene point, its 3D coordinates can be computed as the intersection of two of rays originated from that scene point (principle of stereo vision).In that case, the position of the point in the 3D scene can be calculated from the disparity of two image points.The reliable solution of this correspondence problem is a key step in any stereo vision, and automatic manipulator calibration.Automatic solution of the correspondence problem is under extensive exploration.Until now there is no solution, in general case.The inherent Fig. 1.Coordinate systems assignment for robot modelling O B X B Y B Z B -base coordinate system of the manipulator O E X E Y E Z E -end-effector (tool) coordinate system of the manipulator (we denote the origin O E as the endpoint of the robot) O i X i Y i Z i (i=1, n) -coordinate system fixed to the i th link (O n X n Y n Z n -coordinate system fixed to the terminal link) of the manipulator.
The original D-H representation of a rigid link depends on geometric parameters.Four parameters a,d, and θ denote manipulator link length, link offset, joint twist and joint angle, respectively.Composite 4x4 homogeneous transformation matrix A i-1,i known as the D-H transformation matrix for adjacent coordinate system i and i-1, is: (1) The homogeneous matrix A B,i which specifies the location of the i th coordinate system with respect to the base coordinate system is the chain product of successive coordinate transformation matrices A i-1,i , and expressed as: . (2) Particularly, for i=n we have A B,n matrix which specifies the position and orientation of the end-effector of the manipulator with respect to the base coordinate system.Matrix A B,n is a function of the 4n geometrical parameters which are constant for fixed robot geometry, and n joint coordinates that change their value when manipulator moves.
Moreover, a robot is not intended to perform a single operation at the workcell, it has interchangeable different tools.In order to facilitate the programming of the task, it is more practical to have transformation matrix defining the tool coordinate system with respect to the terminal link coordinate system A n,E .
... ,, 1 1 , 2 1 , Thus, the transformation matrix A w,E can be written as: . (3) Since the world coordinate system can be chosen arbitrarily by the user, six parameters are needed to locate the robot base relative to the world coordinate system.From independence to some manipulator parameters it follows that consecutive coordinate systems are represented at most by four independent parameters.
Since the end-effector coordinate system can be defined arbitrarily with respect to the terminal link coordinate system (O n X n Y n Z n ), six parameters are needed to define the matrix A n,E .If we extend the robot notation to the definition of the end-effector coordinate system, it follows that the end-effector coordinate system introduces four independent parameters.For more details the reader can refer to (Khalil, 2004).
Based on (1), ( 2), (3) dependence between joint coordinates and geometrical parameters, and endpoint location of the tool can be written as: (4) where x, q, g 0 denotes end-effector position vector expressed in the world coordinate system, vector of the joint variables, and vector of the geometric parameters, respectively.Dimension of the vector x is 6 if measurement can be made on the location and orientation of the endeffector.However, most frequently only location of the endpoint is measured, and therefore dimension of a vector x is 3. Dimension of the vector q is equivalent to the number of DOF (Degree of Freedom) of manipulator.Dimension of the vector g 0 is at most 4n+6.

Geometric parameters estimation based on the differential model
The calibration of the geometric parameters is based on estimating the parameters minimizing the difference between a function of the real robot variables and corresponding mathematical model.Many authors (Jackson, et al. 1995;Khalil, 1991;Maric & Potkonjak, 1999;Renders, et al. 1991) presented open-loop methods that estimate the kinematic parameters of manipulators performing on the basis of joint coordinates and the Cartesian coordinates of the end-effector measurements.The joint encoder's outputs readings are joint coordinates.It is assumed that there is a measuring device that can sense the position (sometimes orientation) of an end-effector Cartesian coordinates.
A mobile closed kinematic chain method has been proposed that obviates the need for pose measurement by forming a manipulator into a mobile closed kinematic chain (Bennett & Hollerbach, 1991;Khalil, et al. 1995).Self motion of the mobile closed chain places manipulator in a number of configurations and the kinematic parameters are determined from the joint position readings alone.
The calibration using the end-efector coordinates (open-loop method) is the most popular one.The model represented by equation ( 4) is nonlinear in g 0 , and we must linearize it in order to apply linear estimators.The differential model provides the differential variation of the location of the end-effector as a function of the differential variation of the geometric parameters.Difference between the measurement (x) and calculated end-effector location (x m ) represents minimized criteria function.Let Δx = x -x m , and Δg = g 0 -g be the pose error vector of end-effector and geometric parameter error vector, respectively (g -vector of geometric parameters estimation).From equation ( 4), the calibration model can be represented by the linear differential equation ( 5) where: g is the (p x 1) vector of geometric parameters estimation Δx = x -x m is the (r x 1) pose error vector of end-effector Δg = g 0 -g is the geometric parameters error vector J g is the (r x p) sensitivity matrix relating the variation of the endpoint position with respect to the geometric parameters variation (calibration Jacobian matrix) (Maric & Potkonjak, 1999;Khalil, et al. 1991).
To estimate Δg we apply equation ( 5) for a number of manipulator configurations.It gives the system of equations: where is: and E is the error vector which includes the effect of unmodeled non-geometric parameters: . ( 8) Equation ( 6) can be used to estimate iteratively the geometric parameters.This equation is solved to get the least-squares error solution to the current parameters estimate.The leastsquares solution can be obtained from: (9) At the each iteration, geometric parameters are updated by adding Δg to the current value of g: (,) By solving equations ( 9) and (10) alternately, the procedure is iterated until the Δg approaches to zero.
Calibration of manipulator is an identification process, and hence, one should take a careful look at the identifiability of the model parameters (Benett & Hollerbach, 1991;Khalil, et al. 1991).A general method to determine these parameters have been proposed in (Benett & Hollerbach, 1991).Determination of the identifiable (base) geometric parameters is based on the rank of the matrix Φ.Some parameters of manipulator related to the locked passive joints may become unidentifiable in the calibration algorithm due to the mobility constraints.It reduces number of identifiable parameters in general for the closed-loop kinematic chain approach, compared with open-loop case.
As the measurement process is generally time consuming, the goal is to use set of manipulator configurations that uses limited number of optimum points on the parameters estimation.Furthermore, goal is to minimize the effect of noise on the parameters estimation.The condition number of the matrix Φ gives a good estimate of the persistent excitation (Khalil, 2004).Therefore, much work has been done on finding the so-called optimal excitation.The task of selecting the optimum manipulator configurations to be used during the calibration is discussed and solutions are proposed in (Bay, 1993;Benett & Hollerbach, 1991;Khalil, et al. 1995).It is worth noting that most of geometric calibration methods give an acceptable condition number using random configurations.The paper (Sun & Hollerbach, 2008) presents an updated algorithm to reduce the complexity of computing and observability index for kinematic calibration of robots.An active calibration algorithm is developed to include an updated algorithm in the pose selection process.

Computer vision
Computer vision has developed significantly over the last ten years and now has become standard automation component.It represents qualitative bounce in the area of metrology and sensing because it provides us with a remarkable amount of information about our surroundings, without direct physical contact (Torreão, 2011).
Calibration of cameras is necessary first step in vision system using.Camera calibration is the process of determining the internal camera (geometric and optical) characteristics and the 3D position and orientation of the camera frame relative to a world coordinate system.
If the camera calibration is performed then for every scene point in a world coordinate system it is possible to determine the position of its image point in image plain.
Inverse perspective transformation is very important for computer vision application in industrial automation.If two calibrated cameras observe the same scene point, its 3D coordinates can be computed as the intersection of two of rays originated from that scene point.The epipolar geometry is a basis of a system with two cameras (principle of stereo vision).
A special relative position of the stereo cameras is called rectified configuration.In that case the position of the point in the 3D scene can be calculated from the disparity of two image points.
g gg  

www.intechopen.com
Improving Accuracy and Flexibility of Industrial Robots Using Computer Vision 145

Camera model
This section describes the camera model.Fig. 2. illustrates the basic geometry of the camera model.The camera performs transformation from the 3D projective space to the 2D projective space.The projection is carried by an optical ray originating (or reflected) from a scene point P. The optical ray passes through the optical center Oc and hits the image plane at the point p. O w X w Y w Z w -world coordinate system (fixed reference system), where O w represents the principal point.The world coordinate system is assigned in any convenient location.
O c X c Y c Z c -camera centered coordinate system, where O c represents the principal point on the optical center of the camera.The camera coordinate system is the reference system used for camera calibration, with the Z c axis the same as the optical axis.
O i X i Y i Z i -image coordinate system, where O i represents the intersection of the image plane with the optical axis.
Let (x w , y w , z w ) are the 3D coordinates of the object point P in the 3D world coordinate system, and (u,v) position of the corresponding pixel in the digitized image.A projection of the point P to the image point p may be represented by a 3x4 projection matrix (or camera matrix) M (Tsai, 1987;Zhuang, 2008): is called the internal (intrinsic) camera transformation matrix.Parameters , , u 0 and v 0 are so called internal distortion-free camera parameters.
R and T, a 3x3 orthogonal matrix representing the camera's orientation and a translation vector representing its position, are given by: , , respectively.The parameters r 11 , r 12 , r 13 , r 21 , r 22 , r 23 , r 31 , r 32 , r 33 , t x , t y , t z are external (extrinsic) parameters and represent the camera's position referred to the world coordinate system Projection in an ideal imagining system is governed by the pin-hole model.Real optical system suffers from a number types of distortion.The first one is caused by real lens spherical surfaces and manifests itself by radial position error.Radial distortion causes an inward or outward displacement of a given image point from its ideal (distortion free) location.This type of distortion is mainly caused by flawed radial curvature curve of the lens elements.A negative radial displacement (a point is imaged at a distance from the principle point that is smaller than predicted by the distortion free model) of the image point is referred to as barrel distortion.A positive radial displacement (a point is imaged at a distance from point that is larger than the predicted by the distortion free model) of the image point is referred to as pin-cushion distortion.The displacement is increasing with distance from the optical axis.This type of distortion is strictly symmetric about the optical axis.Fig. 3. illustrates the effect of radial distortion.

Fig. 3. Effect of radial distortion illustrated on a grid
The radial distortion of a perfectly centered lens is usually modelled using the equations: Improving Accuracy and Flexibility of Industrial Robots Using Computer Vision 147 where r is the radial distance from the principal point of the image plane, and k 1 , k 2 ,… are coefficients of radial distortion.Only even powers of the distance r from the principal point occur, and typically only the first, or the first and the second terms in the power series are retained.
The real imagining systems also suffer from tangential distortion, which is at right angle to the vector from the center of the image.That type of distortion is generally caused by improper lens and camera assembly.Like radial distortion, tangential distortion grows with distance from the center of distortion and can be represented by equations: , ( 16) .( 17) Fig. 4. illustrates the effect of tangential distortion.

Fig. 4. Effect of tangential distortion
The reader is referred to (Tsai, 1987;Sonka, et al. 2008;Weng, et al. 1992) for more elaborated and more complicated lens models.
Note that one can express the distorted image coordinates as a power series using undistorted image coordinates as variables, or one can express undistorted image coordinates as a power series in the distorted image coordinates.The r in the above equations can be either based on actual image coordinates or distortion-free coordinates.
Bearing in mind the radial and tangential distortion, correspondence between distortion-free and distorted pixels image coordinates can be expressed by: , The parameters representing distortion of an image are: k 1 , k 2 , …, l 1 , l 2 ,… The distortion tends to be more noticeable with wide-angle lenses than telephoto lenses.Electro-optical systems typically have larger distortions than optical systems made of glass.

Camera calibration
Camera calibration is considered as an important issue in computer vision applications (particularly in robotics).With the increasing need for higher accuracy measurement in computer vision, it has also attracted research e f f o r t i n t h i s s u b j e c t .T a s k o f c a m e r a calibration is to compute the camera projection matrix M from a set of image-scene point correspondences.By correspondences it means a set where p i is a homogeneous vector representing image point and P i is a homogeneous vector representing scene point, at the i th step.Equation ( 11) gives an important result: the projection of a point P to an image point p by a camera is given by a linear mapping (in homogeneous coordinates): . ( 20) The matrix M is non-square and thus the mapping is many-to-one.All scene points on a ray project to a single image point.
To compute M, system of homogeneous linear equations has to be solved , where s i are scale factors.
Camera calibration is performed by observing a calibration object whose geometry in 3D space is known with very good precision.The calibration object usually consists of two or three planes orthogonal to each other.These approaches require an expensive calibration apparatus.Accurate planar targets are easier to make and maintain than three-dimensional targets.There is a number of techniques which only requires the camera to observe a planar pattern(s) shown at a few different orientation (Fig. 5.).The calibration points are created by impressing a template of black squares (usually chess-board pattern) or dots on top of white Fig. 5. Illustration of experimental setup for camera calibration using coplanar set of points Improving Accuracy and Flexibility of Industrial Robots Using Computer Vision 149 planar surface (steel or even a hard book cover (Zhuang, 2008)).The corners of the squares are treated as a calibration points.Because the corners are always rounded, it is recommended to measure the coordinate of a number of points along the edges of the square away from the corners, and then extrapolate the edges to obtain position of the corners which lie on the intersection of adjacent edges.
Due to the high accuracy performance requirement for camera calibration, a sub-pixel estimator is desirable.It is a procedure that attempts to estimate the value of an attribute in the image to greater precision than that normally considered attainable within restrictions of the discretization.Since the CCD camera has relatively low resolution, interest in a sub-pixel method arises when one applies CCD-based image systems to the computer integrated manufacturing (Kang, et al. 2008, Perez, et al. 2009).
Camera calibration entails solving for a large number of calibration parameters, resulting in the large scale nonlinear search.The efficient way of avoiding this large scale nonlinear search is to use two-stage technique, described in (Tsai, 1987).This type methods, in the first stage, use a closed-form solution for most of the calibration parameters, and in the second stage iterative solution for the other parameters.
In (Weng, et al. 1992) a two-stage approach was adopted with some modification.In the first step, the calibration parameters are estimated using a closed-form solution based on a distortion-free camera model.In the second step, the parameters estimated in the first step are improved iteratively through a nonlinear optimization, taking into account camera distortion.Since the algorithm that computes a closed-form solution is no iterative, it is fast, and solution is generally guaranteed.In the first step, only points near the optical axis are used.Consequently, the closed-form solution isn't affected very much by distortion and is good enough to be used as an initial guess for further optimization.If an approximate solution is given as an initial guess, the number of iterations can be significantly reduced, and the globally optimal solution can be reliably reached.

Stereo vision
Calibration of one camera and knowledge of the coordinates of one image point allows us to determine a ray in space uniquely (back-projection of point).Given a homogeneous image point p, we want to find its original point P from the working space.This original point P is not given uniquely, but all points on a scene ray from image point p.Here, we will consider how to compute 3D scene point P from projections p i in the several cameras, or projections p i in one camera at different positions (different images are denoted by superscript i).Assume that m views are available, so that we have to solve linear system , i=1,…,m. ( This approach is known as triangulation (it can be interpreted in terms of similar triangles).Geometrically, it is a process of finding the common intersection of m rays given by backprojection of the image points by the cameras.In the reality, image points p i are corrupted by noise, and the rays will not intersect and the system would have no solution.We might compute P as the scene point closest to all of the skew rays.
If two calibrated cameras observe the same scene point P, its 3D coordinates can be computed as the intersection of two of such rays.The epipolar geometry is a basis of a system with two cameras (principle of stereo vision).It is illustrated on Fig. 6.The epipoles e 1 and e 2 go to infinity, and epipolar lines coincide with image rows, as a consequence.For the rectified configuration, if the internal calibration parameters of both cameras are equal, it implies that corresponding points can be sought in 1D space along image rows (epipolar lines).
The optical axes are parallel, which leads to the notion of disparity that is often used in stereo vision literature.Top view of two cameras stereo configuration with parallel optical axes is shown in Fig. 8. World coordinate system is parallel to cameras' coordinate systems.The principal point O w of the world coordinate system is assigned on the midway on the baseline.The coordinate z w of point P represents its distance from the cameras (z w = 0), and can be calculated from the disparity d = u 1 -u 2 .Values u 1 -u 2 are measured at the same height (same rows of images).Noting that: we have: .
The remaining two coordinates of the 3D point P can be calculated from equations: correspondence problem can in practical cases be reduced using several constrains.A vast list of references about this task can be found in the (Sonka, et al. 2008).
The geometric transformation that changes a general cameras configuration with nonparallel epipolar lines to the parallel ones is called image rectification.More deep explanation about computing the image rectification can be found out in (Sonka, et al. 2008).

Robot calibration using computer vision
Measurement of robot manipulator end-effector pose (i.e.position and orientation) in the reference coordinate system is unquestionably the most critical step towards a successful open-loop robot calibration.A variety of measurement techniques ranging from coordinate measuring machines, proximity measuring systems, theodolites, and laser tracking interferometer systems to inexpensive customized fixtures have been employed for calibration tasks.These systems are very expensive, tedious to use or with low working volume (Driels, 1994;Khalil, et al. 1995;Vincze, et al. 1994).In general, the measurement system should be accurate, inexpensive and should be operated automatically.The goal is to minimize the calibration time and the robot unavailability.
To overcome the above limitations, advances in robot calibration allow the start using a computer vision to calibrate a robot.Compared to those mechanical measuring devices, the camera system is low cost, fast, automated, user-friendly, non-invasive and can provide high accuracy (Zhuang & Roth, 1994).
There are two types of setups for vision-based robot pose measurement.The first one is to fix cameras in the robot environment so that the cameras can see a calibration fixture mounted on the robot end-effector while the robot changes its configuration.The second typical setup is to mount a camera or a pair of cameras on the end-effector of the robot manipulator (Albada, et al. 1994;Meng & Zhuang, 2007;Motta, et al. 2001;Motta & McMaster, 2002).
The stationary camera configuration requires the use of stereo system placed at fixed location.It is not possible compute 3D scene point P position from only one projection p, on the camera plane.The stereo system has to be placed in location that maintains necessary field-of-view overlap.The proper camera position needs to be selected empirically.The stereo system must be calibrated before manipulator calibration.The manipulator is placed in a number of configurations.From pair of images the location (position and orientation) of the calibration board is computed for every configuration (Fig. 9.).At the each configuration, geometric parameters are updated by adding Δg (calculated in accordance with equation ( 10)) to the current value of g.
If it is enough to measure only the end-effector pose (usually tool's tip) for robot calibration, then it is not necessary to use a calibration plate.Based on pair of images of manipulator tool 3D position of its tip is calculated.In this case, the main problem is automatic detection of points matching the manipulator's tip on both images.
This type of setups have two distinct advantages.First, it is non-invasive.The cameras are normally installed outside of the robot workspace, and need not be removed after robot calibration.Second, there is no need to identify the transformation from the camera to the end-effector, although this transformation is easy to compute in this case.

Fig. 9. A manipulator calibration using stationary camera configuration
The major problem existing in all stationary camera setups is system accuracy.The accuracy improves with the decrease of distance between stereo system and object point.An approximated estimate of the errors in the point coordinates, for a simplified case is given by where e is the maximum 1D error in the point coordinates due to image quantization error, d is the distance from the point to the stereo system, Δl is the half of the 1D physical size of the image pixel.
In a case of stereo system with parallel optical axes one more problem exists.It is the small field of view by both cameras.In order to have larger scene area overlapped by the both cameras each camera has to be titled towards the geometrical center line of the two cameras.
The moving camera approach (a camera on the end-effector) can resolve the conflict between high accuracy and large field-of-view of the cameras as the cameras only need to perform local measurements.The global information on the robot end-effector pose is provided by a stationary calibration fixture (Fig. 10.).In general, eye in hand robot calibration can be classified into two-step and one-step method.
Let us start with the two-step stereo camera setup case.The stereo cameras are rigidly fixed to the end-effector of the manipulator, as shown in Fig. 9.In the first step the stereo cameras are calibrated.After camera calibration (internal and external camera parameters are known), the 3D position of any object point (from its images) can be computed with the respect to the camera coordinate system.Since camera coordinate system is fixed with respect to the end-effector coordinate system, it moves with the manipulator from one calibration configuration to another.On that way the position of cameras becomes known in world coordinate system at each manipulator configuration.Thus the homogeneous transformation A w,C can be calculated for every configuration.For a known transformations A w,B and A E,C it follows: A w,C (q,g) = A w,B A B,E (q,g)A E,C .Thus the geometric parameters of the manipulator can be identified from the set of transformations A w,C (q,g).

Fig. 10. A manipulator calibration with hand-mounted cameras
In a monocular camera setup, a camera is rigidly fixed to the moving end-effector.In accordance with procedure presented in section 2.2 internal and external parameters of the camera are calculated by observing a planar target(s).In the next phase, the robot is moved from one configuration to another.The external camera parameters are calculated at each manipulator configuration, with the fixed value of internal parameters.It means that the position of the end-effector is computed for each manipulator configuration.The manipulator geometric parameters can be estimated using obtained positions.
In a one-step method, both the camera parameters as well as manipulator geometric parameters are identified simultaneously.This method can be divided into stereo camera and monocular camera setup.The paper (Zhuang & Roth, 1994) focuses on the one-step method, and compares it with two-step method.
In the moving camera approach, as the cameras are mounted on the robot end-effector, this method is invasive.The second disadvantage of this method is that normally computes the position of the camera instead the end-effector.Thus a remaining task is to identify the transformation from the camera system to the tool system, which is a non-trivial task (Meng & Zhuang, 2007;Tsai & Lenz, 1989). www.intechopen.com

The procedure for automated calibration of manipulators using computer vision
Visual stereo systems are increasingly used as standard components of a computer integrated manufacturing (Tian, et al. 2010).The cameras are normally installed outside of the robot workspace.Keeping in mind what was previously stated, the automatic calibration procedure using a fixed stereo system is presented.There is request for automatic manipulator calibration without operators' intervention and without additional equipment.
First step is to use visual system for correct detection of manipulator's end-effector.Thus, it is recommended to set marker on the end-effector of the manipulator.Marker design is very important step in marker detection problem using SIFT algorithm.Recommended planar marker (black -white), (shown on Fig. 11.-( 1)) meets several assumptions: it is very easy to create and set on manipulator's end-effector, it is suitable for automatic recognition, characteristic point in the center of marker is defined very precisely, etc.The first step in the automatic calibration of manipulator is marker recognition at any point of robot workspace.This task is a typical problem of object recognition.It is needed to find a marker on image (Fig. Test results of marker recognition with different plain texture using SIFT algorithm shown that proposed marker has 6 matches which is the best result.Further, Marker11 has 3 matches, Marker4 and Marker7 have 2 matches and Marker5 has 1 match, but it is not enough number of matching for marker detection using SIFT algorithm.The other markers do not have matches.Comparing different marker patterns it was shown that proposed marker is very simple to implement and reliability of its automatic detection is the highest. Automatic recognition of marker on image of robot is general problem of object recognition.Object recognition in cluttered real-world scenes requires local image features that are unaffected by nearby clutter or partial occlusion.The features must be at least partially invariant to illumination, 3D projective transforms, and common object variations.However, the features must also be sufficiently distinctive to identify specific objects among many alternatives.The difficulty of the object recognition problem is due in large part to the lack of success in finding such image features.However, recent research on the use of dense local features has shown that efficient recognition can often be achieved by using local image descriptors sampled at a large number of repeatable locations (Matthew & Lowe, 2002).
SIFT (Lowe, 2004) is an algorithm used for detection and description of local image features in the area of computer vision.This algorithm extracts points of interest of desired object for any type of object on the image, which correspond to the centre of characteristic features.
Using results of the algorithm, the object can be located on image with plenty of other objects, and is also suitable for matching of correspondent points which can be useful for 3D scene reconstruction.Primary goal of the SIFT algorithm is identification of image feature locations on image scale space, invariant compared to: size of the object, translation, rotation, obstruction, variations of illumination, 3D object projective transformation and deformation.Object models are presented as 2D locations of SIFT features that are invariant to affine transformations.
SIFT algorithm is very robust and it became industrial standard in area of computer vision thanks to its invariance on early mentioned effects.Bearing in mind its good features, SIFT was used for marker detection on manipulator's workspace image.).On the basis of marker pattern SIFT detects several characteristic points on image of robot, which are in the area of marker.Invariance of SIFT algorithm on mentioned inconsistencies with the marker is confirmed.It should be noted that large area of robot workspace is white.This is a huge drawback keeping in mind that the parts of marker are white too.From this standpoint it can be argued that SIFT algorithm gives a satisfactory detection reliability of requested object area.On the other hand, plain texture of marker (i.e.insufficiently density of local features) makes correspondence of points from a training image and image that is being searched not sufficiently accurate (Mikolajczyk & Schmid, 2004).Hence, the marker center cannot be precisely detected using SIFT.Some corresponding points on the image that is being searched fall outside of marker area.
For these reasons, SIFT algorithm cannot be used for accurately determination of reference point which is in the center of window.It is necessary to use another method to determine marker borders and reference point in the center of window.For this purpose, using characteristic image features obtained by SIFT, one can determine the area of marker and then apply the Canny edge detector on that image segment.
Area closed to marker is reliably detected on image which is being searched using SIFT (see Fig.After accurate detection of marker position (and referent point on the marker) it is necessary to determine 3D position of marker referent point (manipulator end-effector or tool) in one camera's image plane using the same scene from the second camera.To solve this task it is necessary to determine again correspondent points on the both camera images.The assumptions on correspondence requirements are significantly different in this phase of calibration procedure.Manipulator images obtained from cameras of stereo system contain marker image recorded simultaneously.From there, follows that in process of correspondence determination invariance on object size, rotation, illumination and deformations of object is not required.Light invariance of occlusion and 3D projective transforms is necessary too.Since the object images (markers) are translated along epipolar line on both images of stereo system, invariance of translator is not allowed.Translation (disparity) on two images is the basic information that should be accurately determined using the stereo system.
In the paper (Maric & Djalic, 2011) algorithm based on the most similar intensity area correlation has been proposed.The algorithm assumes that more pixels have similar intensity (color), without special texture.Therefore, correlation of two pixels does not provide sufficient information because of the existence of more similar candidates.Thus, correlation of more adjacent pixels which are forming the windows of hxw pixels is determined.When stereo system with parallel optical axes is used, the epipolar lines of both cameras lie on the same height on both images, as shown on Fig. 14. (26) The value of disparity d, for which is obtained minimal value of criteria function, gives the position of window which is the best correlated with the reference window.Therefore, the corresponding windows are on the same height on both images, but shifted along u axe for: Tests were conducted on modular Robix manipulator.Robotic structural system Robix RCS-6 is a combination of light industrial properties and educational ease to use robots.It is modular system that allows the manipulator configuration formed by six rotational joints.The RCS-6 is primarily intended for use by schools and universities and it can be a productive and useful tool.Joint drives are DC motors.To manipulate with Robix manipulator external access to control functions of Rascal Control Software is possible through DLL (dynamic link library) in any programming language.The robot has a repeatability of 5 mm.
For the purpose of calibration, system with two cameras is set parallel on all axis.Fixed stereo camera system was used for image recording.Cameras used for implementation of ,m i n , , disparity u v c u v d  stereo cameras system are off-the-shelf Logitech C120 with adjustable focus and set to recording on 1280x1024 resolution (Kosic, et al., 2010).Stereo system baseline, as distance between cameras (optical axes) is 13 cm.
The algorithm was tested with markers (on Fig. 11.) placed on the end-effector of a modular Robix manipulator.Fig. 12. and Fig. 15.present images from left and right cameras, respectively.Fig. 16.shows graphical representation of criteria function for disparity change along epipolar line, from minimum to maximum value.It is obvious, as it shown on Fig. 16. that a reliable method of determining the corresponding points is obtained by using marker and selected criteria function.Selected criteria function has a pronounced global minimum.For successfully finding of corresponding points, choice of window size (hxw pixels) is crucial.In the classical problem of correspondence, if the window is too small, it increases probability of occurrence of a large number of candidates for correspondence.This increases probability of wrong selection of corresponding points.On the other hand, if the window size is too large, there is a possibility for error because of a constant value of disparity within the window.Therefore, there is no single recommendation for the best window size.In special cases, even an adaptive window size is suggested, but such algorithms are generally very complex, compute demanding and not widely accepted in practice.
In accordance with previous demonstration, windows size will depend on the size of the marker when it is necessary to determine markers correspondence on two images.Marker is an area with nearly two constant intensities (color).Assumptions about the window size effects (relative to marker size) on the reliability of the correspondence procedure have been analysed and tested in (Maric & Djalic, 2011).Physical marker dimensions are 5x5 mm which corresponding to 21x21 pixel size.Window size has been altered from 5x5 to 37x37 pixels.Value of criteria function is divided with number of pixels that belongs to window.In this way, the criteria function represents the average inconsistency for every pixel of two windows.Diagram of minimum value change of criteria function with change of window size is illustrated on Fig. 17  The illustration confirms that the best results are achieved by adopting that window size is close to marker size.
Parallel manipulators are emerging in the industry.These manipulators have main property of having their end-effectors connected with several kinematic chains to their base, rather than one for the standard serial manipulators.This allows parallel manipulators to bear higher loads, at higher speed and often with a higher repeatability.However, the large number of links and passive joints often limits their performances in terms of accuracy.A kinematic calibration is thus needed.Even though, kinematic model of parallel manipulator is different to model of serial one, the calibration methods and procedures presented above for the serial manipulators can be for the parallel manipulators (Renaud, et al. 2006).

Improving flexibility of industrial robots
To respond to the rapid changes of product design, manufacturers need a more flexible fabrication system.To increase flexibility of production system, first step is improving flexibility of machine serving robots.
To increase flexibility of the industrial robots (with conventional fixed-anatomy manipulators), the handling system is equipped with tool change system.Today's industry is mainly using industrial robots with automatic tool change.Automatic tool change increases robot's productivity and flexibility.However, conventional fixed-anatomy manipulators, equipped with automatic tool change system, do not satisfy the requirements to adapt such robot to variable tasks and environments.
In recent years, modular reconfigurable manipulators were developed to fulfil the requirements of the flexible production system.It is composed of interchangeable links and joint modules of various sizes and shapes.By reconfiguring the modules, different manipulators can be created to meet a variety of tasks requirements using standard mechanical and electrical interfaces.Serial and parallel modular reconfigurable manipulators are under development.New modular reconfigurable manipulators can be easily reassembled into a variety of configurations and different geometries (Bi, et al. 2003;Chen, et al. 2003;Yim, et al. 2003).
Every reconfiguration of anatomy of manipulator causes change in geometry of its kinematic chain.It is necessary to establish model's form and exacts parameter values.This is realized according to automatic identification method as described by presented algorithm.
To achieve high level of flexibility in complex production systems manipulator's flexibility is not enough (especially with cooperative work and the changing environment).Flexibility of the other parts of the flexible production cells is needed too.
During the course of manufacturing processes it is necessary to fix, locate and position the work piece or product.This is referred to as fixturing.For a production system to be fully flexible, all of its components have to be flexible, including the fixtures.The reconfigurable fixtures have the ability to be changed (reconfigured), to suit different parts and products.The reconfigurable fixture sets the product interface point to correct position by the use of external measuring device.By the external measuring device it is possible position key features of the product to be constrained and build the fixture top-down instead of bottomup.Several reconfigurable fixtures have been developed (Jonsson & Ossbahr, 2010).
To reposition a fixture different approaches have been tested.It can be done manually, by actuators and using the robots.The external measuring system adds cost.NC (Numerical Control) machine can be used for measurement, but it is time consuming process, and the cycle time of manufacturing process is needed to allow this type of operation.
For a more automated reconfiguration it is recommended to use robots for repositioning and computer vision system to measure the position of pick interface that will hold the part.Furthermore, using robot and computer vision already presented in manufacturing, opens up economically the best solution since it doesn't constitute an extra cost.Proposed algorithm is supporting accurate and effective tasks execution designed by principles of full flexibility.During the execution of main program for the management of flexible production cell accuracy of executed movements is monitored based on marker's position at the top of the tool(s) and fixator.In the case of small geometry change, parameters of proper model are automatically recalibrated in real-time.For details, see explanation in (Maric & Potkonjak, 1999).
Machining setup verification is widely used before starting the actual machining operation.It is particularly time consuming in the case of high flexible manufacturing systems.The paper (Tian, et al. 2010) presents a computer vision system to quickly verify the similarity between the actual setup and its digital model.That enables integration of CAD (Computeraided design) and CAM (Computer-aided manufacturing), and higher flexibility of manufacturing system.

Conclusion
In this chapter algorithm for automatic identification of kinematic model of manipulator's geometry in order to increase its accuracy and flexibility is presented.Marker and stereo system with parallel optical axes are used for measurement of 3D position of tool's tip and/or fixtures of work pieces.To achieve complete automation, accuracy improvement and reliability in parameters' estimates evaluation combination of well-known algorithms for image processing (SIFT, Canny and Area based Correlation) is proposed.Illustrations given in text confirm compliance of conducted analysis, expected features of the algorithm and results of experiments.Algorithm is analyzed in the laboratory, so it is necessary to do additional verification in industrial environment.Hence, it is necessary to continue with analysis of level of algorithm invariance in adverse exploitation conditions.This primarily refers to larger object density in workspace (occlusion and collision), poor lighting and extreme marker rotation.Furthermore, it is necessary to conduct analysis in reliability and accuracy after which one can determine orientation of industrial manipulators' end-effector using proposed procedure.

Fig. 2 .
Fig. 2. The basic geometry of the camera model Prior describing the perspective transformation and camera model, let us define the basic coordinate systems.The coordinate frames are defined as follows:

FigO
Fig. 6.The epipolar geometry Let 1 c O , 2 c O represents the optical centres of the first and second camera, respectively.The same consideration holds if one camera takes two images from two different locations.In that case 1 c O represents optical centre of the camera when the first image is obtained, and

Fig. 7 .
Fig. 7.The rectified configuration of two cameras

Fig. 8 .
Fig. 8. Top view of two cameras with parallel optical axes rectified configuration Fig. 11.Training images of marker

Fig. 12 .
Fig. 12. Characteristic points on the images and their matching as a result of the SIFT algorithm The outcome of marker detection using SIFT algorithm is illustrated on Fig. 12.On the same figure detected characteristic points and result of their matching are also shown.Conclusions derived from the properties of SIFT algorithm are confirmed by experiments (also illustrated on Fig. 12.).On the basis of marker pattern SIFT detects several Fig. 13.a) The area of marker ; b) Marker edges determined using Canny edge detector

Fig. 14 .
Fig. 14.Windows position of two corresponding pointsWindow of hxw pixels is formed.The window central pixel represents the marker referent point on one of two images from stereo system (eg.Left image).This window is used as referent area to be searched on the second image (i.e.right image).On the second image the same size window is observed on the same height as on the first image.By changing window disparity d the second window is sliding along u axe.Measure of two windows intensity likelihood, i.e. criteria function, is calculated as sum of squared differences of all pixels intensities in both windows.

Fig. 15 .
Fig. 15.Result of marker detection on the image from right stereo cameras system using area based correlation algorithm .

Fig. 17 .
Fig. 17.Graphical representation of criteria function for disparity change along epipolar line