|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Vision Distance Question
This is the first year we've really tried vision, so if I seem lost, it's because all of vision is pretty much new to me, but I successfully integrated the 2017 vision example code into our vision code for this year. The camera display in vision shows the camera, and is filtering to show only our reflective tape correctly, however, the distance reading comes back as infinite(inf). Any ideas?
|
|
#2
|
|||
|
|||
|
Re: Vision Distance Question
Quote:
|
|
#3
|
||||
|
||||
|
Re: Vision Distance Question
|
|
#4
|
|||
|
|||
|
Re: Vision Distance Question
It finds it as red currently. I appreciate the replies and links, I'll try changing the threshold later today and update on the results, if that doesn't work I'll give those pdf links a go. Thanks for the replies!
|
|
#5
|
||||
|
||||
|
Re: Vision Distance Question
Red means it doesn't have a valid targst. Try changing the score cutoff.
|
|
#6
|
||||
|
||||
|
Re: Vision Distance Question
His problem is probably that the line along which it searches for edges is vertical, thus not crossing any stripes. This causes the distance calculation to fail, regardless of score cutoff. The line also needs to extend a few pixels past the overall bounding rectangle on either end.
|
|
#7
|
|||
|
|||
|
Re: Vision Distance Question
Now I'm getting errors. I changed nothing coming into today but as soon as I connect my driver station started pumping out errors like there was no tomorrow. This was the error: ERROR 1043 Register For Events in Calibration Helper2.vi->Vision Processing.vi->Robot Main.viLabVIEW: The property or method is not supported in this version of LabVIEW. ERROR -1074395152 IMAQ Vision: (Hex 0xBFF607F0) Font file not found. ERROR -1074395152 IMAQ Vision: (Hex 0xBFF607F0) Font file not found. ERROR 1043 Register For Events in Calibration Helper2.vi->Vision Processing.vi->Robot Main.viLabVIEW: The property or method is not supported in this version of LabVIEW.
Any ideas? |
|
#8
|
||||
|
||||
|
Quote:
Font file not found is okay, it means the font for the scoring numbers that are overlayed on the displayed images in the front panel of vision processing.vi isn't on the RoboRIO. For the other error, you will need to remove the calibration code (or disable it). When targeting the peg, calibration does pretty much nothing. Make sure that when you want to save changes to values entered in the front panel, right click -> data operations -> make current value default, then save the VI. Otherwise, it will reset the value on you when you close the VI or try to build the project. |
|
#9
|
|||
|
|||
|
Re: Vision Distance Question
The errors about the event not being supported are caused by putting desktop code on the roboRIO. There is a call to the calibration helper that passes the reference to the picture control. This lets you click and draw a line on the colored region and it calculates the HSL range settings based on your statistic settings.
But this can't work in a headless RT environment. In that situation, you remove the cal from the roboRIO, and if you still want it, you put it into your dashboard and share the results to the robot. Greg McKaskle |
|
#10
|
|||
|
|||
|
Re: Vision Distance Question
I resolved the errors, thank you for the help on that, but now I'm back to the first problem. I tried lowering the score cutoff and using a horizontal line, but both still come back red with an infinite reading. Any ideas?
|
|
#11
|
||||
|
||||
|
Re: Vision Distance Question
Increase your line border values, they need to be greater than, say, 2 or 3, and by default they are 6 and 1.
|
|
#12
|
|||
|
|||
|
Re: Vision Distance Question
Alright, I'm getting readings perfectly now if I put the reflective tape horizontal, rather than vertical, because with the code that I have now, I can't do the mouse drag to calibrate it, and I can't figure out how to make the calibration line horizontal instead of vertical. I tried switching the control for that in the distance calculation subVI, but it had no effect. Where do is the option for it to track horizontally rather than vertically as it does by default?
|
|
#13
|
||||
|
||||
|
Re: Vision Distance Question
Quote:
|
|
#14
|
|||
|
|||
|
Re: Vision Distance Question
Even after all of this it still is reading infinite. It appears to still be using a vertical line instead of a horizontal. I'm clueless as to what I'm doing wrong at this point.
|
|
#15
|
|||
|
|||
|
Re: Vision Distance Question
I think the problem is the number of qualified particles I'm getting. I can't get more than 2 or 3 of them. Any ideas as to why or how to fix it?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|