31#ifndef DOXYGEN_SHOULD_SKIP_THIS
33#import <Foundation/Foundation.h>
35#import "ImageDisplay.h"
37@implementation ImageDisplay
47 UIGraphicsBeginImageContext(image.size);
50 [image drawAtPoint:CGPointMake(0,0)];
53 CGContextRef context = UIGraphicsGetCurrentContext();
54 CGContextSetLineWidth(context, tickness);
55 CGContextSetStrokeColorWithColor(context, [color CGColor]);
57 CGContextMoveToPoint(context, ip1.get_u(), ip1.get_v());
58 CGContextAddLineToPoint(context, ip2.get_u(), ip2.get_v());
60 CGContextStrokePath(context);
63 UIImage *retImage = UIGraphicsGetImageFromCurrentImageContext();
66 UIGraphicsEndImageContext();
78 :(
double) size :(
int)tickness
80 UIGraphicsBeginImageContext(image.size);
83 [image drawAtPoint:CGPointMake(0,0)];
85 vpPoint o( 0.0, 0.0, 0.0);
86 vpPoint
x(size, 0.0, 0.0);
87 vpPoint
y( 0.0, size, 0.0);
88 vpPoint
z( 0.0, 0.0, size);
95 vpImagePoint ipo, ip1;
101 CGContextRef context = UIGraphicsGetCurrentContext();
102 CGContextSetLineWidth(context, tickness);
103 CGContextSetStrokeColorWithColor(context, [[UIColor redColor] CGColor]);
104 CGContextMoveToPoint(context, ipo.
get_u(), ipo.
get_v());
105 CGContextAddLineToPoint(context, ip1.
get_u(), ip1.
get_v());
106 CGContextStrokePath(context);
110 context = UIGraphicsGetCurrentContext();
111 CGContextSetLineWidth(context, tickness);
112 CGContextSetStrokeColorWithColor(context, [[UIColor greenColor] CGColor]);
113 CGContextMoveToPoint(context, ipo.
get_u(), ipo.
get_v());
114 CGContextAddLineToPoint(context, ip1.
get_u(), ip1.
get_v());
115 CGContextStrokePath(context);
119 context = UIGraphicsGetCurrentContext();
120 CGContextSetLineWidth(context, tickness);
121 CGContextSetStrokeColorWithColor(context, [[UIColor blueColor] CGColor]);
122 CGContextMoveToPoint(context, ipo.
get_u(), ipo.
get_v());
123 CGContextAddLineToPoint(context, ip1.
get_u(), ip1.
get_v());
124 CGContextStrokePath(context);
127 UIImage *retImage = UIGraphicsGetImageFromCurrentImageContext();
130 UIGraphicsEndImageContext();
Generic class defining intrinsic camera parameters.
Implementation of an homogeneous matrix and operations on such kind of matrices.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
static void convertPoint(const vpCameraParameters &cam, const double &x, const double &y, double &u, double &v)