File tree 4 files changed +18
-6
lines changed
src/main/java/it/localhostsoftware/mlkit/vision
4 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,9 @@ dependencies {
32
32
api(" androidx.camera:camera-lifecycle:1.1.0" )
33
33
api(" androidx.camera:camera-view:1.1.0" )
34
34
35
- api (" com.google.mlkit:barcode-scanning:17.0.2" ) // 3.2 MB
36
- api (" com.google.mlkit:text-recognition:16.0.0-beta6" ) // 4 MB
37
- api (" com.google.mlkit:image-labeling-custom:17.0.1" ) // 3.8 MB
35
+ compileOnly (" com.google.mlkit:barcode-scanning:17.0.2" ) // 3.2 MB
36
+ compileOnly (" com.google.mlkit:text-recognition:16.0.0-beta6" ) // 4 MB
37
+ compileOnly (" com.google.mlkit:image-labeling-custom:17.0.1" ) // 3.8 MB
38
38
}
39
39
40
40
publishing {
Original file line number Diff line number Diff line change @@ -6,7 +6,11 @@ import com.google.mlkit.vision.barcode.common.Barcode
6
6
import com.google.mlkit.vision.common.InputImage
7
7
import it.localhostsoftware.mlkit.vision.AbstractImageAnalyzer
8
8
9
+ /* *
10
+ To use this class add this dependency
11
+ implementation("com.google.mlkit:barcode-scanning:17.0.2")
12
+ */
9
13
class BarcodeScanner : AbstractImageAnalyzer <List <Barcode >>() {
10
14
override fun process (image : Image , rotationDegrees : Int ) =
11
- BarcodeScanning .getClient().process(InputImage .fromMediaImage(image, rotationDegrees))
15
+ BarcodeScanning .getClient().process(InputImage .fromMediaImage(image, rotationDegrees))
12
16
}
Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ import com.google.mlkit.vision.label.ImageLabelerOptionsBase
7
7
import com.google.mlkit.vision.label.ImageLabeling
8
8
import it.localhostsoftware.mlkit.vision.AbstractImageAnalyzer
9
9
10
+ /* *
11
+ To use this class add this dependency
12
+ implementation("com.google.mlkit:image-labeling-custom:17.0.1")
13
+ */
10
14
class ImageLabeler (private val options : ImageLabelerOptionsBase ) : AbstractImageAnalyzer<List<ImageLabel>>() {
11
15
override fun process (image : Image , rotationDegrees : Int ) =
12
- ImageLabeling .getClient(options).process(InputImage .fromMediaImage(image, rotationDegrees))
16
+ ImageLabeling .getClient(options).process(InputImage .fromMediaImage(image, rotationDegrees))
13
17
}
Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ import com.google.mlkit.vision.text.TextRecognition
7
7
import com.google.mlkit.vision.text.latin.TextRecognizerOptions
8
8
import it.localhostsoftware.mlkit.vision.AbstractImageAnalyzer
9
9
10
+ /* *
11
+ To use this class add this dependency
12
+ implementation("com.google.mlkit:text-recognition:16.0.0-beta6")
13
+ */
10
14
class TextRecognizer : AbstractImageAnalyzer <Text >() {
11
15
override fun process (image : Image , rotationDegrees : Int ) =
12
- TextRecognition .getClient(TextRecognizerOptions .DEFAULT_OPTIONS ).process(InputImage .fromMediaImage(image, rotationDegrees))
16
+ TextRecognition .getClient(TextRecognizerOptions .DEFAULT_OPTIONS ).process(InputImage .fromMediaImage(image, rotationDegrees))
13
17
}
You can’t perform that action at this time.
0 commit comments