43 #include <visp/vpFeatureDisplay.h>
46 #include <visp/vpMeterPixelConversion.h>
49 #include <visp/vpDisplay.h>
52 #include <visp/vpDebug.h>
55 #include <visp/vpMath.h>
57 #include <visp/vpImagePoint.h>
73 unsigned int thickness)
99 unsigned int thickness )
111 double co = cos(thetap) ;
112 double si = sin(thetap) ;
122 if (fabs(a) < fabs(b)) {
125 ip2.
set_ij(h, (-c - a*h)/b);
131 ip2.
set_ij((-c - b*w)/a, w);
150 double rho2,
double theta2,
154 unsigned int thickness)
158 displayLine(rho1, theta1, cam, I, color, thickness) ;
159 displayLine(rho2, theta2, cam, I, color, thickness) ;
175 double mu20,
double mu11,
double mu02,
179 unsigned int thickness)
185 unsigned int number_of_points = 45 ;
186 const double incr = 2 * M_PI/(double)number_of_points ;
190 double s = sqrt(
vpMath::sqr(mu20-mu02)+4*mu11*mu11) ;
193 if (fabs(mu11)<1e-6) e =0 ;
194 else e = (mu02-mu20+s)/(2*mu11) ;
195 double a =sqrt( (mu02+mu20+s)/2.0) ;
196 double b =sqrt( (mu02+mu20-s)/2.0) ;
200 double e1 = atan(e) ;
204 double ce = cos(e1) ;
205 double se = sin(e1) ;
211 for( i = 0; i < number_of_points+2 ; i++)
213 double x1 = a *cos(k) ;
214 double y1 = b *sin(k) ;
215 double x11 = x + ce *x1 - se *y1 ;
216 double y11 = y + se *x1 + ce *y1 ;
254 unsigned int thickness)
281 unsigned int thickness )
293 double co = cos(thetap) ;
294 double si = sin(thetap) ;
304 if (fabs(a) < fabs(b)) {
307 ip2.
set_ij(h, (-c - a*h)/b);
313 ip2.
set_ij((-c - b*w)/a, w);
332 double rho2,
double theta2,
336 unsigned int thickness)
340 displayLine(rho1, theta1, cam, I, color, thickness) ;
341 displayLine(rho2, theta2, cam, I, color, thickness) ;
358 double mu20,
double mu11,
double mu02,
362 unsigned int thickness)
368 unsigned int number_of_points = 45 ;
369 const double incr = 2 * M_PI/(double)number_of_points ;
373 double s = sqrt(
vpMath::sqr(mu20-mu02)+4*mu11*mu11) ;
376 if (fabs(mu11)<1e-6) e =0 ;
377 else e = (mu02-mu20+s)/(2*mu11) ;
378 double a =sqrt( (mu02+mu20+s)/2.0) ;
379 double b =sqrt( (mu02+mu20-s)/2.0) ;
383 double e1 = atan(e) ;
387 double ce = cos(e1) ;
388 double se = sin(e1) ;
393 for( i = 0; i < number_of_points+2 ; i++)
395 double x1 = a *cos(k) ;
396 double y1 = b *sin(k) ;
397 double x11 = x + ce *x1 - se *y1 ;
398 double y11 = y + se *x1 + ce *y1 ;