Skip to content

hsvFinder.cpp

Liam Lawrence edited this page Mar 16, 2017 · 2 revisions

hsvFinder.cpp is the file that helps a programmer easily find the HSV values of their target so it is much easier to create a range. The only variable you might have to change is the camera number, which I explained above in the main.cpp section.

Just click on the pixel you want and it will return the HSV value of that spot, you can then create the range yourself. In my experience you want H and S to be extremely tight, and V is more dependent on your camera settings. These are the ranges that I have for this year:

  • H ± 2
  • S ± 3
  • V ± 153

I set camera settings using a program called qv4l2. Camera settings can be crucial to a successful vision system, having a low exposure means that there will be less time trying to make sure vision works in different lighting conditions. Here is what our vision camera looks like this year.

ra

The settings we are using are the following:

  • Brightness: 0
  • Contrast: 0
  • Saturation: 255
  • Hue: 0
  • Gain: 15
  • Exposure: 20
  • Manual Exposure: On
  • Auto WB: Off
  • Auto Gain: Off
Clone this wiki locally