Go to Post 27 ft/s? They must really "Rush" around the field - Michael Corsetto [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 20-01-2012, 17:38
CodeYeti's Avatar
CodeYeti CodeYeti is offline
FRC Addict
AKA: Matt Coffin
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Colorado
Posts: 81
CodeYeti is an unknown quantity at this point
BinaryImage constructors protected?

I've been writing some target tracking code over the last couple of days, and just hit a bit of a roadblock. It seems to me that the constructors for the BinaryImage class have no modifiers, and default to protected, so they can't be accessed from the vision part of our Robot code? Am i missing something or is this not working as intended?
Reply With Quote
  #2   Spotlight this post!  
Unread 20-01-2012, 18:07
youxinche95 youxinche95 is offline
Registered User
AKA: Eugene Che
FRC #0649 (MSET)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2010
Location: Saratoga, CA
Posts: 18
youxinche95 is an unknown quantity at this point
Re: BinaryImage constructors protected?

I don't think you use a constructor to create a binary image. I got mine from a colorImage.getThreshold.

hope this helps!
Reply With Quote
  #3   Spotlight this post!  
Unread 20-01-2012, 18:24
CodeYeti's Avatar
CodeYeti CodeYeti is offline
FRC Addict
AKA: Matt Coffin
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Colorado
Posts: 81
CodeYeti is an unknown quantity at this point
Re: BinaryImage constructors protected?

The primary reason that I need to actually CREATE a BinaryImage is that I'm playing with using the LAB (IMAQ_CIE) color space and the ColorImage class doesn't provide a nice API for that yet. Also, is there any reason that the extract<nth>ColorPanel(...) methods in ColorImage are also protected? I've gotten around this for the time being by placing my camera class in WPI's image package, but thats obviously not the "correct" way to do things in the long run.

Last edited by CodeYeti : 20-01-2012 at 18:29.
Reply With Quote
  #4   Spotlight this post!  
Unread 20-01-2012, 18:25
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: BinaryImage constructors protected?

You never actually construct binary images yourself; you simply obtain the reference to them from other camera methods. Therefore, the binary image constructors being protected is an issue.

edit: Could you clarify that post? I don't understand what you're asking due to the grammar errors.
__________________
Attending: MN Duluth Regional
Reply With Quote
  #5   Spotlight this post!  
Unread 20-01-2012, 18:33
CodeYeti's Avatar
CodeYeti CodeYeti is offline
FRC Addict
AKA: Matt Coffin
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Colorado
Posts: 81
CodeYeti is an unknown quantity at this point
Re: BinaryImage constructors protected?

Wow. I usually proof-read my posts. I guess I'm just super tired. Regardless, the post should be cleared up now. Moving on, there are no "camera methods" for the LAB color space (that I know of). Therefore, I have to create my own BinaryImage and use the threshold method from NIVision to obtain mask that matches my threshold in the LAB color space.
Reply With Quote
  #6   Spotlight this post!  
Unread 20-01-2012, 19:17
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: BinaryImage constructors protected?

I'm still not sure I understand why you need to create a binary image, though. Binary images are simply the results of filters, not images that filters are run on. Why couldn't you simply compare, using, say, the NIVision assistant, filters on LAB images compared to filters on your own supplied HSL images?
__________________
Attending: MN Duluth Regional
Reply With Quote
  #7   Spotlight this post!  
Unread 20-01-2012, 19:24
CodeYeti's Avatar
CodeYeti CodeYeti is offline
FRC Addict
AKA: Matt Coffin
FRC #0662 (Rocky Mountain Robotics)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Colorado
Posts: 81
CodeYeti is an unknown quantity at this point
Re: BinaryImage constructors protected?

I'm not quite sure what you mean by the NIVision assistant, but basically, none of this would be needed if there was some method in ColorImage to the effect of
Code:
public BinaryImage thresholdLAB(int lightnessLow, int lightnessHigh, int aLow, int aHigh, int bLow, int bHigh)
Because there isn't such a method, I've been trying to add something like it to a custom wrapper class (wraps around ColorImage).

Sort of off-topic but wouldn't Objective-C Categories come in handy big time right here? Bummer Java doesn't have something similar.

Also, what did you mean when you talked about comparing filters on LAB images with filters on HSL images? the problem is that I can't apply a filter in the LAB color space, unless I'm just blind and missing something huge.
Reply With Quote
  #8   Spotlight this post!  
Unread 20-01-2012, 20:40
theprgramerdude theprgramerdude is offline
WPI Freshman
AKA: Alex
FRC #2503 (Warrior Robotics)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2008
Location: Brainerd, Minnesota
Posts: 347
theprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud oftheprgramerdude has much to be proud of
Re: BinaryImage constructors protected?

What I'm wondering is, why don't you simply use the HSL colorspace, as opposed to the LAB color space? I'm sure multiple filters on the same image in HSL would achieve the same effect.

The NIVision assistant is installed along with some of the FIRST software, possibly the utilities update or the full LabView software.
__________________
Attending: MN Duluth Regional
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 22:21.

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