![]() |
How to pause GRIP data input?
We are using GRIP for our image processing and we need to grab the information of a single contour. Currently it is not possible for us to eliminate all other contours, so instead we are using the largest contour to determine what the goal is.
We are currently finding the position of the largest contour in the array and finding that number value in another array (like center x, or height). This doesn't work because the smaller contours fluctuate a lot and the position of the goal/largest contour changes from the first time we get the data (area) to the second time we get the data (centerX, or height). Is there any way to pause the input from the Network Tables? Or can we take a picture using the webcam and just analyze the picture? Thanks |
Re: How to pause GRIP data input?
This feature hasn't been documented yet, but yes, you can pause GRIP using NetworkTables if you're using the very latest release candidate (v1.3-rc1).
Code:
NetworkTable table = NetworkTable.getTable("GRIP");Quote:
|
Re: How to pause GRIP data input?
Quote:
Code:
self.rotateError = 0 |
Re: How to pause GRIP data input?
In our testing of the system, we have seen the noise coming fast enough that successive calls to getArray() return different sized arrays (meaning the table updated asynchronously in the two cycles between the getArray() calls)
For now, I have solved this by checking the array size for all the elements, and if there is a mismatch I just punt that dataset. Even that isn't perfect because the array could have updated but be different sizes... but it's as close as I can get without an atomic operation. |
| All times are GMT -5. The time now is 04:16. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi