Thread: Camera Overlay
View Single Post
  #2   Spotlight this post!  
Unread 10-02-2015, 14:17
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
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.
Reply With Quote