Hello, my team is planning on lining up with the cargo hatch using vision processing. I tried using grip but wasnt able to fully differentiate the reflective tape from everything else. Anyone able to help me on what to do? I tried following on wpilbij.screensteps but wasnt able to get everything working right.
You need better color threshold values. An HSL filter would work well.
Changing camera settings also helps a lot. Decreasing the camera exposure until only the very brightest objects are visible makes the vision processing much easier.
Do you have a colored light shining on the tape? This can help make it easier to distinguish, as there is then a larger color difference. In 2017 we had a green ring of light surrounding the pixy-cam, and when it hit the tape it reflected off of it. Out of curiosity, are you trying to use the gaffers tape on the floor to line up, or the retro-reflective? If it’s the gaffers, the background can matter. If you have a carpeted area I’d suggest trying to get a similar background and then mess with the filter settings.
Hi thanks for responding, we are currently using the reflective tape. I just got the filters in an hour ago. We are using the spotlight off of a relay. That also seems to be an issue, the spotlight is only on strobe and we can’t figure that out. Know of any way to put it on solid?
And in addition, I truly don’t really know what I’m doing with GRIP. I had the code generated but my main problem is that I can’t do anything with GRIP without the build team having everything done.
- You should be using a ring light, not a strobe light. AndyMark sells them for $9
- You can use GRIP for tuning a pipeline for finding the vision targets. All you need is a computer, camera, and ring light. No robot needed.
GRIP by itself isn’t going to be enough for this year - it doesn’t have a way to differentiate the left- and right-hand targets. You’ll have to write the code yourself to do a little more processing after a generated pipeline. (Hint: use minAreaRect
to help find the angle of a contour)
Would you possibly be able to help me figure out what to use as I cant find many resources on how to differentiate.
Well, what’s the difference between the two vision targets? How do you tell them apart?