![]() |
WPILib vision error in ColorImage.cpp and BinaryImage.cpp
Hi yall,
I am playing around with WPILib for vision and all I am doing is thresholding a colorimage acquired from the axis camera into a binaryimage and then getting a particleanalysisreport vector from that image. Then, I simply find out the center of mass of the two particles. All I am doing is calling for print statements for NumOfParticles(), IsTargetFound(), and CenterOfMass() in my autonomous code (Functions defined below). All of these are outputting exactly what I expect, but, after about 5 seconds, errors alternate between "Error on line 37 of ColorImage.cpp: 0: ImaqThreshold error" and "Error on line 30 of BinaryImage.cpp: 0: Error counting particles". Then, autonomous stops and driver station shows "No Robot Code". Here's the code of my Vision class: Code:
//Vision.hCode:
//Vision.cppQuote:
|
Re: WPILib vision error in ColorImage.cpp and BinaryImage.cpp
Here is line 37 of the ColorImage.cpp
Code:
BinaryImage * ColorImage::ComputeThreshold(ColorMode colorMode,Thanks. |
Re: WPILib vision error in ColorImage.cpp and BinaryImage.cpp
That's an obnoxious assert.
But the problem is likely one of two things, you end up running out of memory or you are passing in an image of zero size (likely the second one). Check that your image has a size before you do any operations on it. |
| All times are GMT -5. The time now is 02:45. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi