0
$\begingroup$

I can't find a solution for my problem and I need your help.

I have to create an application to detect if a valve is open or close like this :

https://www.youtube.com/watch?v=VY92fqmSdfA

Some valves had a handle with color, but some valve don't, I dont know how I am going to resolve this problem to detect the valve position "close" or "open" without colors, I can't use machine learning because I have only 3 valves without colors and I can't create a large database.

enter image description here

enter image description here

$\endgroup$
  • $\begingroup$ Without some examples for frames it will be hard to do. $\endgroup$ – Royi Oct 9 at 15:00
  • $\begingroup$ sorry i can't share the original images, but they have the same shape of the valves in the video without colors. $\endgroup$ – all.west Oct 10 at 7:31
  • $\begingroup$ I add 2 images of the valve when it's open and when it's close, i apply cany filter to my images. $\endgroup$ – all.west Oct 10 at 14:03
  • $\begingroup$ Compare the expense of coming up with an unaided algorithm to the expense of attaching easily machine-read markers to the handle. $\endgroup$ – TimWescott Oct 12 at 0:35
  • $\begingroup$ @TimWescott attaching an easily machine-read markers to the handle is not a bad idea, but i have to try before if i can do it without markers i can't find the best method to solve this problem, i read about graph cut and watershed but i read about this 2 methods are not stable in real time $\endgroup$ – all.west Oct 12 at 8:42
0
$\begingroup$

Template matching in the link below will work as a solution.

https://www.docs.opencv.org/2.4/doc/tutorials/imgproc/histograms/template_matching/template_matching.html

The downside is you will need templates of all your valves handles(coloured or not), also the templates and images will have to be the same resolution. Based on whether the template or the template rotated by 90 degrees matches you can come to a decision on the valves state.

$\endgroup$
  • $\begingroup$ Thank you for your answer, i will try template matching but I think it's not going to give me a good detection. I find this article about graph cut it's maybe a solution but unfortunately I don't have enough time and skills to implement it with c++ :researchgate.net/publication/… $\endgroup$ – all.west Oct 10 at 15:40
  • $\begingroup$ I thought also about watershed but i didn't test it yet $\endgroup$ – all.west Oct 10 at 16:02
  • $\begingroup$ I tried Template matching and it's not working form me $\endgroup$ – all.west Oct 11 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.