Go to Post I swear, at IRI, Gary and I only talked about coming up with a plan to do away with Billfred, we didn't actually do anything... yet... - MissInformation [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 22-06-2016, 17:20
Ouroboroz Ouroboroz is offline
Registered User
AKA: Kevin
FRC #2554 (The Warhawks)
Team Role: Programmer
 
Join Date: Apr 2016
Rookie Year: 2014
Location: Edison NJ
Posts: 8
Ouroboroz is an unknown quantity at this point
Method From ColorImage

So the code for the threshold method is:

private BinaryImage threshold(NIVision.ColorMode colorMode, int low1, int high1, int low2,
int high2, int low3, int high3) throws NIVisionException {
BinaryImage res = new BinaryImage();
NIVision.Range range1 = new NIVision.Range(low1, high1);
NIVision.Range range2 = new NIVision.Range(low2, high2);
NIVision.Range range3 = new NIVision.Range(low3, high3);
NIVision.imaqColorThreshold(res.image, image, 1, colorMode, range1, range2, range3);
res.free();
range1.free();
range2.free();
range3.free();
return res;
}
I'm confused on the part where res is freed and the returned afterwards. If I read correctly, free() releases the memory for the image. So would return still give back the image.

PS How do I initialize a Binary Image? The constructor is not public. D:
Reply With Quote
 


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 09:36.

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