Go to Post There's a stark difference between bragging and taking pride in your work. While "Ha ha! We're better than you! We won seventeen regionals and you didn't!" would clearly fall in the former, listing your achievements would definitely fall in the latter. - artdutra04 [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

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-02-2010, 14:05
boya3706 boya3706 is offline
Registered User
FRC #0020
 
Join Date: Feb 2010
Location: Cohoes NY
Posts: 5
boya3706 is an unknown quantity at this point
freshImage() routine anomaly

We need an asynchronous method of checking (from Java) to see that a new a new image is available from the camera. The documentation implies that the method freshImage() serves that purpose. However, it does NOT.

The documentation for the freshImage() method in the AxisCamera class says that its return value should be "true if the latest image from the camera has not been retrieved yet". The implication is that the return value will sometimes be false. However, our observation is that freshImage() always returns a value of true -- evidently because it actually waits for AxisCamera to have a new image.

Is there an asynchronous method (from Java) of checking that a new image is available from the camera?
  #2   Spotlight this post!  
Unread 07-02-2010, 03:53
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: freshImage() routine anomaly

Quote:
Originally Posted by boya3706 View Post
We need an asynchronous method of checking (from Java) to see that a new a new image is available from the camera. The documentation implies that the method freshImage() serves that purpose. However, it does NOT.

The documentation for the freshImage() method in the AxisCamera class says that its return value should be "true if the latest image from the camera has not been retrieved yet". The implication is that the return value will sometimes be false. However, our observation is that freshImage() always returns a value of true -- evidently because it actually waits for AxisCamera to have a new image.

Is there an asynchronous method (from Java) of checking that a new image is available from the camera?
I'm not sure if it used to block, but it doesn't in the current version. At least the C++ part of it doesn't. Is there something in the Java code that is waiting?

Have you updated to the latest (Feb 3rd or so) Java update?
  #3   Spotlight this post!  
Unread 07-02-2010, 10:29
boya3706 boya3706 is offline
Registered User
FRC #0020
 
Join Date: Feb 2010
Location: Cohoes NY
Posts: 5
boya3706 is an unknown quantity at this point
Re: freshImage() routine anomaly

I haven't seen a java update for FRC posted on any site.... would you mind posting a link for it?
  #4   Spotlight this post!  
Unread 08-02-2010, 21:01
boya3706 boya3706 is offline
Registered User
FRC #0020
 
Join Date: Feb 2010
Location: Cohoes NY
Posts: 5
boya3706 is an unknown quantity at this point
Re: freshImage() routine anomaly

JHersh, thanks for the reply. We finally figured it out. freshImage() is indeed working correctly.

At first, the problem was that our processing loop was running very long compared to the camera refresh rate. In that circumstance, of course, freshImage() would always return true.

Then, we commented out all the processing code -- including getImage(). We didn't realize that it was the call to getImage() had a side-effect that impacts freshImage(). Once we put the call to getImage() back into the code, a subsequent call to freshImage() indeed returned false.

Our apologies if we confused anyone. freshImage() has NO anomoalous behavior.
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
pic: 816's 2009 Robot! Anomaly V8.0 thefro526 Extra Discussion 3 15-02-2009 08:50
printf() inside interrupt routine? Nathan Programming 14 10-02-2008 16:44
Martin Gear Anomaly? sanddrag Technical Discussion 3 09-02-2005 15:34
Routine declaration syntax error (Or: Where's wlado?) Astronouth7303 Programming 15 24-03-2004 05:51
Master uP Initialization Routine Ulibrium Technical Discussion 5 24-01-2002 16:43


All times are GMT -5. The time now is 02:01.

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