Go to Post I'm thinking they subscribe to the thought that "the best offense is a good defense". They are from New England, after all. - Travis Hoffman [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 02-02-2013, 16:01
Programmer360 Programmer360 is offline
Registered User
FRC #0360
 
Join Date: Jan 2013
Location: Tacoma
Posts: 1
Programmer360 is an unknown quantity at this point
Vision Processing C++

Has anyone out there have working Vision Processing/Tracking code for Windriver? I can't seem to get the sample C++ code to work. Any advice would be useful.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-02-2013, 19:56
IDKnow IDKnow is offline
Registered User
FRC #1671
 
Join Date: Feb 2013
Location: California
Posts: 8
IDKnow is an unknown quantity at this point
Re: Vision Processing C++

Hello! I do; while I am reluctant to make it available as a first resort, I would be happy to get you started.

http://www.virtualroadside.com/WPILi...is_camera.html
There is a page describing the 'AxisCamera' Class in the WPI library.

When you initialize your camera code you need to also use this function in order to display the image in your dashboard.

Camera_Object_Name = &AxisCamera::GetInstance(CAMERAIPADDRESS);

sometimes the camera code causes some serious issues; this is my warning. I suggest you check the 'IsFreshImmage()' function before you start to try processing to lower the strain on your CRIO. Also, putting the camera code in a loop accessed through a button press or something might be a good idea.

After checking that you need a ColorImage
for example
ColorImage *image = CameraObjectName->GetImage();

Also check if 'GetWidth()' is greater than 0 at this point. if the camera is starting up it won't be and this will cause an exception when you begin image processing.

as far as the processing goes, i suggest you use the VisionAssistant provided by FIRST to see what works for filtering your target then just writing your own code with the color image lib http://www.virtualroadside.com/WPILi...lor_image.html to do the same processes.

After that all you need to do is get the x, y, values of your targets and whatever else you want!

also, you need to enable anonymous viewer login. this is done in the camera settings

Last edited by IDKnow : 03-02-2013 at 20:36. Reason: forgot to mention
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 14:40.

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