I'm need to detect lines by drawing a line across the lines :)
The number of lines are unknown and differs from image to image. The direction of the lines can also differ. But for my example below I have six vertical lines.
I then want to draw a line across the six lines and my drawn line should detect the lines and also pinpoint the found line by adding a circle in a color. The goal is to receive an int with the lines found so I can continue doing calculations.
I have an Image encapsuled within a canvas.
<Canvas x:Name="Cnv" Width="640" Height="480"
PreviewMouseUp="Image_MouseLeftButtonUp"
PreviewMouseMove="MapImg_MouseMove">
<Image x:Name="MapImg" Width="640" Height="480" Source="/images/test.png"/>
</Canvas>
I've managed to create the function so I can draw a line but I've searched quite a lot trying to find a solution for the detection. I successfully detected shapes with AForge framework but that was for a whole image from my understanding.
Very grateful for you help if possible.
EDIT: The line that should detect the lines are drawn and the other lines comes from an image / bitmap. Is there anything that might detect the lines by contrast (detecting the white)?
EDIT 2: Replace the picture with a more accurate image trying to explain.