Log in

View Full Version : Help: Vision hsv value issues.


prairir001
08-11-2016, 21:18
my team is using a raspberry pi 3 with the microsoft lifecam 3000 for vision. ive been writing the python script. i cant seem to get to figure out how to get the hsv values for the mask. if anyone could please help me figure out how to do this it would be greatly appreciated.

KJaget
09-11-2016, 12:32
Can you be more specific on what the problem is? What libraries are you using?

Do you have a set of values and the code doesn't seem to apply them? Probably need to see code. OpenCV has an example here : http://opencv-python-tutroals.readthedocs.io/en/latest/py_tutorials/py_imgproc/py_colorspaces/py_colorspaces.html if you want a sanity check.

Do you not know which HSV values to use? In the past we've written debug code with trackbars / sliders to adjust value in real time.

Do you have problems finding a set of HSV values that work in all (most) conditions? Start reading here https://docs.google.com/presentation/d/1ediRsI-oR3-kwawFJZ34_ZTlQS2SDBLjZasjzZ-eXbQ/pub at slide 17

Or check out the method we used https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwiTrMGLm5zQAhVD5SYKHdPiBdYQFggdMAA&url=https%3A%2F%2Fwww.chiefdelphi.com%2Fmedia%2Fpa pers%2Fdownload%2F4743&usg=AFQjCNFC4kDBfDHccSXzzPpsVlCWZhpl4Q&sig2=smgelcHTylrdKXs7NPCexg&cad=rja, page 6

prairir001
09-11-2016, 13:33
we are using opencv 3.1.0. we have been trying values for a while but non of them seem to work. we are trying to isolate the magentaish color that the reflective tape gives off when you shine a light at it. one of the issues that we have found is that because the magentaish color is at the beginning and the end of spectrum, that it is very hard to isolate for that color.

Hitchhiker 42
09-11-2016, 21:25
One of the issues that we have found is that because the magentaish color is at the beginning and the end of spectrum, that it is very hard to isolate for that color.

What you could do is do one filter to get the mask for the end of the spectrum and one for the beginning of the spectrum and then add the two resulting masks together. That'll give you both parts in one filtered image.

prairir001
09-11-2016, 21:27
i figured it out earlier today but thank you for helping. :)