Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Java (http://www.chiefdelphi.com/forums/forumdisplay.php?f=184)
-   -   Camera Overlay (http://www.chiefdelphi.com/forums/showthread.php?t=134264)

jon_bui 09-02-2015 20:35

Camera Overlay
 
Anyone know where I can find tutorials for the Microsoft HD camera? My team is trying put an overlay on our driver station image, but we haven't had any luck. We used the Java examples, but we don't know how to change the shapes in the example or the thickness of the lines.

notmattlythgoe 10-02-2015 14:17

Re: Camera Overlay
 
Try something like this:

Code:

Rect square = new Rect();
square.left = (int)tote.BoundingRectLeft;
square.top = (int)tote.BoundingRectTop;
square.height = (int)(tote.BoundingRectBottom - tote.BoundingRectTop);
square.width = (int)(tote.BoundingRectRight - tote.BoundingRectLeft);
                               
Rect dot = new Rect();
dot.left = (int)((tote.BoundingRectRight + tote.BoundingRectLeft) / 2);
dot.top = (int)((tote.BoundingRectTop + tote.BoundingRectBottom) / 2);
dot.height = 5;
dot.width = 5;

NIVision.imaqDrawShapeOnImage(destinationImage, sourceImage, square, DrawMode.DRAW_VALUE, ShapeMode.SHAPE_RECT, 1);
NIVision.imaqDrawShapeOnImage(destinationImage, sourceImage, dot, DrawMode.PAINT_VALUE, ShapeMode.SHAPE_OVAL, 5);

The last parameter in each of the NIVision method calls is the thickness.


All times are GMT -5. The time now is 10:53.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi