hi Johan, many thx for your suport.
i tested all focus mode here.
' FOCUS_MODE_CONTINUOUS_PICTURE
' FOCUS_MODE_CONTINUOUS_VIDEO
' FOCUS_MODE_AUTO
' FOCUS_MODE_EDOF
' FOCUS_MODE_FIXED
' FOCUS_MODE_INFINITY
avocr.FocusMode = avocr.FOCUS_MODE_MACRO
the best for my device is the MODE_MACRO, all anothers dont FOCUS here.
but in mode macro have a problem.
He is focusing only if you approach the document very closely.
here is the result using FOCUS_MODE_MACRO (i need scan this document)
View attachment 53693
and here is FOCUS_MODE_MACRO Next to the document (with works next, but i need take all document Like the picture above)
View attachment 53694
Very close: has focus
Distant: no
its possible make a continuos focus for this lib?
on cam ex class in any distance the focus Self adjust
i found this subs on cam ex (maybe can help)
Public Sub GetSupportedFocusModes As List
r.target = parameters
Return r.RunMethod("getSupportedFocusModes")
End Sub
Public Sub SetContinuousAutoFocus
Dim modes As List = GetSupportedFocusModes
If modes.IndexOf("continuous-picture") > -1 Then
SetFocusMode("continuous-picture")
Else If modes.IndexOf("continuous-video") > -1 Then
SetFocusMode("continuous-video")
End If
End Sub
Public Sub SetFocusMode(Mode As String)
r.target = parameters
r.RunMethod2("setFocusMode", Mode, "java.lang.String")
End Sub
Public Sub GetFocusDistances As Float()
Dim F(3) As Float
r.target = parameters
r.RunMethod4("getFocusDistances", Array As Object(F), Array As String("[F"))
Return F
End Sub
Public Sub GetSupportedPictureFormats As List
r.target = parameters
Return r.RunMethod("getSupportedPictureFormats")
End Sub
camEx.SetJpegQuality(100)
camEx.SetContinuousAutoFocus
camEx.CommitParameters
camEx.StartPreview
the continuous focus is working very good on cam ex.
i think on your lib have only fixed modes
can u try add this pls?
another question.
its possible get all text of this document? And not only of a square touched
i need scan a document like the images, get all string possible and send via server.
thx again for u support
i really need this lib, if works ok, i send u 50$
i made a job offer about this, u lib is very next what i need
https://www.b4x.com/android/forum/threads/ocr-lib-to-b4a-real-time.77197/
thx