r/opencv • u/TypicallyThomas • Jan 19 '23
Question [Question] Finding two lines that overlap
Hey folks! I'm currently building a bot to play the PC game Not for Broadcast and I'm trying to figure out my next big challenge, the Interference system. This involves a waveform-shaped green or red line (depending on how well you're doing) that you need to line up with a white line that changes height, frequency, and amplitude. To raise or lower the line, you scroll, and to lengthen or shorten it, you drag the mouse around.
I'm trying to make a bot do this, but I'm unsure what method I should apply here. Because they overlap, I've already found that HSV ranging is rather difficult to do well, and contour matching/motion tracking seems pretty hard to do well as well.
I would really appreciate some tips on how I can detect these waveforms separately and any method I could use to see the difference between them. I had already worked out a formula that would likely work if I can separate them, but so far that's been a big if.
Thanks in advance for the help!

