Go to Post Keep in mind that words can be harsh and people do not forget what is said against them. Please, for your teammates sake, keep your egos in check and try to use some tact and consideration. - Andy Baker [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-02-2015, 20:35
jon_bui jon_bui is offline
Registered User
FRC #3882
 
Join Date: Jan 2012
Location: hawaii
Posts: 4
jon_bui is an unknown quantity at this point
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.
Reply With Quote
  #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,722
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
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:35.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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