Hi, can someone show me how to declare a line. I am trying to do a Hough translation
Obviously the Dim lines declaration is wrong, it just defines an object with points rather than a line with two points. The code works, but shows only the first coordinate in the log. I could not figure out the declaration in b4a. In other languages there's a vector definition, but that does not exist in B4a. Thanks for help and explanation, Georg
B4X:
'now do the Hough
Dim lines As [B]OCVMatOfPoint2f[/B]
Dim K As Int
lines.Initialize
Dim Threshold As Int = CannyMax
mImgProc.HoughLines1(tmpMat, lines, 1.0, one_degree, Threshold )
Dim allLines() As [B]OCVPoint [/B]= lines.toArray()
ToastMessageShow("Number of Lines"&allLines.Length,True)
For K = 0 To allLines.Length-1
Log (K&" "&allLines(K))
Next