I would like to use the lines detected through the HoughLineDetection operation. However, I can't seem to figure how the array is structured. I need the normalized m and c of y=mx+c but lineDetected is an array? The below code returns bunch of numbers in the range of -1 to 1 but I have no clue how to convert them to m and c pair arrays like [0.2, 0.3]
for i in 0...Int(linesDetected){
print(lineArray?[i])
}
The array you get in that callback contains normalized slopes and Y-intercepts in pairs. ([slope, intercept, slope, intercept, etc.]). The linesDetected parameter tells you how large that array is, in pairs.
I would like to use the lines detected through the HoughLineDetection operation. However, I can't seem to figure how the array is structured. I need the normalized m and c of y=mx+c but lineDetected is an array? The below code returns bunch of numbers in the range of -1 to 1 but I have no clue how to convert them to m and c pair arrays like [0.2, 0.3]
Would be great to hear back from you.