"A positioning system is a mechanism for determining the position of an object in space."
- Wikipedia (2022)
"A positioning system is a mechanism for determining the position of an object in space."
- Wikipedia (2022)
Object
What are you tracking? A person, an asset or a phone?
Space
Outdoor, indoor, under water or on a table?
Technologies used to obtain sensor data for positioning
Algorithms used to process sensor data
ts
// Data object for the person we are trackingme.displayName = "Maxim Van de Wynckel";// Phone belonging to the personconst phone = new DataObject()phone.displayName = "Maxim's Phone";phone.setParent(me);// Watch belonging to the personconst watch = new DataObject();watch.displayName = "Maxim's Android Watch";watch.setParent(me);// IP camera identified by MACconst camera = new CameraObject("80:bb:7c:37:0e:02");camera.width = 1980;camera.height = 1024;camera.fps = 30;camera.setPosition(/* ... */);
ts
// Data object for the person we are trackingme.displayName = "Maxim Van de Wynckel";// Phone belonging to the personconst phone = new DataObject();phone.displayName = "Maxim's Phone";phone.setParent(me);// Watch belonging to the personconst watch = new DataObject();watch.displayName = "Maxim's Android Watch";watch.setParent(me);// IP camera identified by MACconst camera = new CameraObject("80:bb:7c:37:0e:02");camera.width = 1980;camera.height = 1024;camera.fps = 30;camera.setPosition(/* ... */);
ts
// Data object for the person we are trackingme.displayName = "Maxim Van de Wynckel";// Phone belonging to the personconst phone = new DataObject();phone.displayName = "Maxim's Phone";phone.setParent(me);// Watch belonging to the personconst watch = new DataObject();watch.displayName = "Maxim's Android Watch";watch.setParent(me);// IP camera identified by MACconst camera = new CameraObject("80:bb:7c:37:0e:02");camera.width = 1980;camera.height = 1024;camera.fps = 30;camera.setPosition(/* ... */);
ts
// Data object for the person we are trackingme.displayName = "Maxim Van de Wynckel";// Phone belonging to the personconst phone = new DataObject();phone.displayName = "Maxim's Phone";phone.setParent(me);// Watch belonging to the personconst watch = new DataObject();watch.displayName = "Maxim's Android Watch";watch.setParent(me);// IP camera identified by MACconst camera = new CameraObject("80:bb:7c:37:0e:02");camera.width = 1980;camera.height = 1024;camera.fps = 30;camera.setPosition(/* ... */);
Absolute
Relative
ts
// Absolute geographical positionme.setPosition(new GeographicalPosition(50.8204, 4.3921));// Relative position(s) to another objectme.addRelativePosition(new RelativeDistance("9F:F1:90:4C:F5:6A", 5.2, LengthUnit.METER));me.addRelativePosition(new RelativeDistance("DC:0F:14:B2:6B:80", 1.4, LengthUnit.METER));
ts
// Sensor that captured the frameconst camera = new CameraObject();// Create a new frameconst frame = new VideoFrame();frame.source = camera;frame.image = myImage;// Add detected objects to frameframe.addObject(/* ... */);frame.addObject(/* ... */);frame.addObject(/* ... */);
ts
ModelBuilder.create().from(new CallbackSourceNode(() => {const myObject = new DataObject("mvdewync");const frame = new DataFrame();frame.addObject(myObject);return frame;})).via(new CallbackNode((frame: DataFrame) => { /* ... */ })).to(new CallbackSinkNode((frame: DataFrame) => { /* ... */ })).build().then((model: Model) => { /* ... */ });
ts
GraphBuilder.create().from(new VideoSource({autoPlay: true,fps: 30,throttleRead: true,source: new CameraObject("sphero_video")}).load("/dev/video2")).via(new ImageTransformNode({src: [new OpenCV.Point2(307, 120),new OpenCV.Point2(1473, 87),new OpenCV.Point2(1899, 891),new OpenCV.Point2(20, 1024),],height: 800,width: 1040})).via(new ColorMaskProcessing({minRange: [90, 50, 50],maxRange: [140, 255, 255]})).via(new ContourDetectionNode()) // Custom.to();
ts
GraphBuilder.create().from(new VideoSource({autoPlay: true,fps: 30,throttleRead: true,source: new CameraObject("sphero_video")}).load("/dev/video2")).via(new ImageTransformNode({src: [new OpenCV.Point2(307, 120),new OpenCV.Point2(1473, 87),new OpenCV.Point2(1899, 891),new OpenCV.Point2(20, 1024),],height: 800,width: 1040})).via(new ColorMaskProcessing({minRange: [90, 50, 50],maxRange: [140, 255, 255]})).via(new ContourDetectionNode()) // Custom.to();
ts
GraphBuilder.create().from(new VideoSource({autoPlay: true,fps: 30,throttleRead: true,source: new CameraObject("sphero_video")}).load("/dev/video2")).via(new ImageTransformNode({src: [new OpenCV.Point2(307, 120),new OpenCV.Point2(1473, 87),new OpenCV.Point2(1899, 891),new OpenCV.Point2(20, 1024),],height: 800,width: 1040})).via(new ColorMaskProcessing({minRange: [90, 50, 50],maxRange: [140, 255, 255]})).via(new ContourDetectionNode()) // Custom.to();
ts
GraphBuilder.create().from(new VideoSource({autoPlay: true,fps: 30,throttleRead: true,source: new CameraObject("sphero_video")}).load("/dev/video2")).via(new ImageTransformNode({src: [new OpenCV.Point2(307, 120),new OpenCV.Point2(1473, 87),new OpenCV.Point2(1899, 891),new OpenCV.Point2(20, 1024),],height: 800,width: 1040})).via(new ColorMaskProcessing({minRange: [90, 50, 50],maxRange: [140, 255, 255]})).via(new ContourDetectionNode()) // Custom.to();
ts
GraphBuilder.create().from(new VideoSource({autoPlay: true,fps: 30,throttleRead: true,source: new CameraObject("sphero_video")}).load("/dev/video2")).via(new ImageTransformNode({src: [new OpenCV.Point2(307, 120),new OpenCV.Point2(1473, 87),new OpenCV.Point2(1899, 891),new OpenCV.Point2(20, 1024),],height: 800,width: 1040})).via(new ColorMaskProcessing({minRange: [90, 50, 50],maxRange: [140, 255, 255]})).via(new ContourDetectionNode()) // Custom.to();
ts
class ContourDetectionNode extends ProcessingNode<VideoFrame> {process(frame: VideoFrame): Promise<VideoFrame> {return new Promise((resolve) => {let contours = frame.image.findContours(OpenCV.RETR_EXTERNAL, OpenCV.CHAIN_APPROX_SIMPLE);if (contours.length >= 1) {// Sort contours by area and select largest area as 'ball'contours = contours.sort((a, b) => a.area - b.area);const m = contours[0].moments();const center = new OpenCV.Vec2(m.m10 / m.m00, m.m01 / m.m00);// Use the center as the 2D pixel positionconst position = new Absolute2DPosition(center.x, center.y);position.unit = LengthUnit.CENTIMETER;position.accuracy = Math.sqrt(contours[0].area);frame.addObject(new DataObject("ball").setPosition(position));}resolve(frame);});}}
ts
class ContourDetectionNode extends ProcessingNode<VideoFrame> {process(frame: VideoFrame): Promise<VideoFrame> {return new Promise((resolve) => {let contours = frame.image.findContours(OpenCV.RETR_EXTERNAL, OpenCV.CHAIN_APPROX_SIMPLE);if (contours.length >= 1) {// Sort contours by area and select largest area as 'ball'contours = contours.sort((a, b) => a.area - b.area);const m = contours[0].moments();const center = new OpenCV.Vec2(m.m10 / m.m00, m.m01 / m.m00);// Use the center as the 2D pixel positionconst position = new Absolute2DPosition(center.x, center.y);position.unit = LengthUnit.CENTIMETER;position.accuracy = Math.sqrt(contours[0].area);frame.addObject(new DataObject("ball").setPosition(position));}resolve(frame);});}}
ts
class ContourDetectionNode extends ProcessingNode<VideoFrame> {process(frame: VideoFrame): Promise<VideoFrame> {return new Promise((resolve) => {let contours = frame.image.findContours(OpenCV.RETR_EXTERNAL, OpenCV.CHAIN_APPROX_SIMPLE);if (contours.length >= 1) {// Sort contours by area and select largest area as 'ball'contours = contours.sort((a, b) => a.area - b.area);const m = contours[0].moments();const center = new OpenCV.Vec2(m.m10 / m.m00, m.m01 / m.m00);// Use the center as the 2D pixel positionconst position = new Absolute2DPosition(center.x, center.y);position.unit = LengthUnit.CENTIMETER; // Convert laterposition.accuracy = Math.sqrt(contours[0].area);frame.addObject(new DataObject("ball").setPosition(position));}resolve(frame);});}}