![]() |
Image processing lag
We just added image processing from the AxisCamera, and our robot began lagging quite a bit. Our CPU use goes to 100 percent on the robot once we try to analyze the image. Is there any way to fix this? This is our code:
Code:
public ParticleAnalysisReport[] getRectangleParticles() throws AxisCameraException, NIVisionException |
Re: Image processing lag
Lag and 100% CPU? Are you calling getRectangleParticles() repeatedly in teleopPeriodic or teleopContinuous without starting vision processing as another thread?
|
Re: Image processing lag
The part of your code we'll need to see are your teleopPeriodic() and teleopContinuous() loops. My bet is that you're trying to run your image processing at the beginning of one of those, and the whole robot has to stop while it waits for the image processing operations to clear.
|
Re: Image processing lag
Try using a timer class to see the elapsed ms of each method invocation.
Are you calling the method a ton of times? Are you checking if you have a new image? |
| All times are GMT -5. The time now is 11:41. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi