Go to Post I'm not suffering from my FIRST "addiction". I enjoy every minute of it. - Katie_UPS [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Spotlight this post!  
Unread 27-02-2015, 11:00
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: No robot code after running for a while (Java VM ran out of memory)

Our vision targeting module is doing its work in a separate thread processing each video frame. It saves the processing result away for the main robot thread to retrieve when it needs the target info. Part of the processing result is the filtered image. Since the processed image is saved away for the main robot thread to access later, the vision task thread allocated another frame buffer for capturing and processing the next frame. That's the problematic allocation. We looked closer on why we need to save away the processed frame and discovered it used the frame to determine the distance to the tote (sample vision code from WPI). Looking further, the method that needs the processed image is to determine the image size. In particular, just the image width. Therefore, we can easily determine the image size right after processing the image and just save away the image size instead of passing along the entire image frame. Therefore, we no longer need to allocate another frame buffer for processing the next frame. Just re-use the previous buffer.
__________________
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 22:25.

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