|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
2014 Vision Processing
I'm looking for some advice on getting vision processing to work on the DS. I have successfully integrated the vision processing in the DB VI following the "Tutorial 8 - Integrating Vision into Robot Code" if I remember correctly. After some testing with reflective tape, it does give us a distance value(which fluctuates), but that's all. We really need it to tell us whether or not the goal is "hot", but I'm not sure what to change in order to fix it. Any help would be greatly appreciated. If you need a copy of the project, let me know.
Last edited by Clancularius : 27-01-2014 at 17:48. |
|
#2
|
||||
|
||||
|
Re: 2014 Vision Processing
Our team took the Identifying Target example, isolated the boolean value that tells whether or not a "Horizontal" target was identified and we use that to tell whether or not we're facing a hot goal.
This can be found by starting the Indentfying Targets example and finding the LED on the front panel that says "Horizontal." The boolean terminal is inside a few bundles but I'm sure when you see the LED, you can trace the value yourself. |
|
#3
|
|||
|
|||
|
Re: 2014 Vision Processing
There is an enum in the TargetInfo>>Scores that indicates that a horizontal and vertical are the right distance and orientation to be a hot goal. The data in the cluster is pretty complete, and you can dissect and use any portion of it.
If you decide to use only the horizontal segment's score, your tradeoff is that a horizontal particle from a fluorescent light or window or other reflection may pass that test. Requiring the horizontal and vertical gives a bit more confidence in the interpretation, but it also requires that both are visible. Perhaps an even better solution would be to calculate a hot-score. Some points are awarded for the presence of the H piece. Other points are awarded for the V piece in the correct location. You can then decide assign your score threshold based on your strategy. Greg McKaskle |
|
#4
|
||||
|
||||
|
Re: 2014 Vision Processing
Thanks for your help, I was able to get the vision processing to work properly on the DS. Now that it works, I want to know exactly what the "Score Limit" value controls. Following the tutorial, it has you put that variable on the DB. I assume it is the confidence, or percent chance that what the camera is seeing is actually the horizontal and vertical indicators. How exactly does it work into the program? I have tried deciphering the code myself with no success.
I also noticed the two LED's named "horizontal?" in the front panel of the "score and rank" VI (If I remember correctly) in the "target info" cluster, one in the horizontal column and the other in vertical. Was that just a programming error? Should they both be named "horizontal?"? I apologize if I haven't explained anything clearly, I don't have access to the code as I type this. If I've made any errors, I will fix them when I can. |
|
#5
|
|||
|
|||
|
Re: 2014 Vision Processing
Ultimately, you want a Boolean value of whether the target exists in the sea of pixels coming from the camera. And if it is there, where do I aim.
But it is rare that the captured image of the objects perfectly match our descriptions of them. This is due to lighting effects, sensor noise, lens distortion, lens defects, JPEG compression, camera movement, limited number of pixels, etc. To deal with these inaccuracies in the image, the image processing code postpones the Boolean decision about whether the target is in the pixels for as long as possible. Instead, it calculates a score for various attributes. Instead of saying that is definitely a rectangle, it says that is scores XX out of 100 in rectangularity. It does the same for other attributes Is it the right aspect ratio. Are the objects the expected distance from one another? But at some point you want the Boolean decision, and that is where score limit comes in. In this case, it is simply applied to all of the scores being measured and they determine the Boolean answer. If you were to decide that you care less about lets say rectangularity, you could ignore it, give it a lower score limit, or modify its scoring calculation to count off less for defects. The initial score limit of 70 was based on the images provided with the example code. If your algorithm is being too lenient and calling "target" on a freshman wearing a green teeshirt, then you probably need to raise it. If it rejecting a target, you can look at the annotated text to see by how much and on which score. Then you can decide if you should lower the score or fix the imaging to have better data to analyze. Or perhaps you need to rethink how a score or measurement is being made and whether it is important enough to reject. As for the LEDs named "Horizontal?". A false value means that it is a vertical segment and a true means it was determined to be a horizontal one. When one of each is near enough to each other they may be scored as hot and labeled as left or right side of the field. Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|