Correct, they are there just for compilation on the assumption that the class exists on the device. You do NOT have to include mysdk.jar in your apk as an additional jar. It should be quite simple judging from the demo program you supplied.they are empty implementations, so seems to be that the role is just to define the service's functions interface.
OK, found something new...What happens when you remove the usb cable from both sides and plug it again? Is there any kind of blinking in the USB interface board green led? (If not at that moment, after rebooting your Android motherboard)
Also worth checking what happens if you connect the USB cable to USBHost 2 or USB Host3 ports on the Android board.
Public Sub getGrayImage(bmp As B4XBitmap) As Byte()
Dim gray As B4XBitmap = effects.GreyScale(bmp)
Dim creator As BitmapCreator
creator.Initialize(gray.width, gray.Height)
creator.DrawBitmap(gray, creator.TargetRect, True)
Return creator.Buffer
End Sub
Public Sub getGrayImage(bmp As B4XBitmap) As Byte()
Dim gray As B4XBitmap = effects.GreyScale(bmp) '<-- if you look at gray bitmap dimensions, they are not the same as bmp, but seem divided depending on device density
Dim creator As BitmapCreator
creator.Initialize(gray.width, gray.Height)
creator.DrawBitmap(gray, creator.TargetRect, True)
Return creator.Buffer '<-- The buffer continues to be 4 byes per pixel, when the app needs 1
End Sub
Sub GLobals
Dim ocl as OpenCVLoader
'...
End Sub
Public Sub getGrayImage(bmp As B4XBitmap) As Byte()
Dim mImgProc As OCVImgproc
Dim mUtils As OCVUtils
Dim myMat, myGrayMat As OCVMat
mUtils.bitmapToMat1(bmp, myMat)
mImgProc.cvtColor1(myMat, myGrayMat, mImgProc.COLOR_RGBA2GRAY)
Dim buffer(myGrayMat.cols*myGrayMat.rows) As Byte
myGrayMat.get(0,0,buffer)
Log(myGrayMat.toString)
Return buffer
End Sub
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?