How can i add effects to data(grayscale) before send for detect function?
B4X:
Sub Camera1_Preview (data() As Byte)
'i should apply grayscale effect here
Dim bb As JavaObject
bb = bb.InitializeStatic("java.nio.ByteBuffer").RunMethod("wrap", Array(data))
BitmapCreatorEffects class includes all kinds of very simple to use image effects. The class is cross platform and compatible with B4J (v6.3+), B4A (v8.3+) and B4i (v5.0+). Example: 'Greyscale an image: Dim GreyImage As B4XBitmap = effects.GreyScale(ExistingBmp) 'Blur an image: Dim BlurImage As...
Public Sub GreyScale (bmp As B4XBitmap) As B4XBitmap
Dim bc As BitmapCreator = CreateBC(bmp)
Dim argb As ARGBColor
For x = 0 To bc.mWidth - 1
For y = 0 To bc.mHeight - 1
bc.GetARGB(x, y, argb)
Dim c As Int = argb.r * 0.21 + argb.g * 0.72 + 0.07 * argb.b
argb.r = c
argb.g = c
argb.b = c
bc.SetARGB(x, y, argb)
Next
Next
Return bc.Bitmap
End Sub
Buen día colegas. Alguien sabe si hay algún ejemplo para escanear una chapa patente automotor con la cámara y que coloque los caracteres en un campo para consulta a la base de datos? Muchas gracias