Thanks, this has been really helpful.
Question 1: I’m looking to display the rectangle around the face and I’m not quite sure how to superimpose it on the preview. Using the above code, I am able to identify the co-ordinates. Any pointers on overlaying a rectangle greatly appreciated.
Question 2: I’ve tried to identify the co-ordinates for eyes and mouth. However there doesn’t seem to be a type for ‘Point’. I’ve try using the code below without success. Again any pointers (no pun intended) also greatly appreciated.
Private Sub FaceDetection_Event (MethodName As String, Args() As Object) As Object
Dim faces() As Object = Args(0)
For Each f As Object In faces
Dim jo As JavaObject
jo = f
Dim faceRect As Rect
faceRect = jo.GetField("rect")
Log("faceRect "&faceRect.Top&" "&faceRect.Left) 'works as expected
Dim Score As Int
Score = jo.GetField("score")
Log("left "&Score) ' works as expected
Dim p As JavaObject
p.InitializeNewInstance("android.graphics.PointF", Null)
p = jo.GetField("leftEye")
Log("Point "&p.GetField("x") & " , "&p.GetField("y") ) 'Gets java.lang.RuntimeException: Object should first be initialized (JavaObject).
Next
Return Null
End Sub
Many thanks
Geoff