File tree 1 file changed +7
-5
lines changed
face/multi-tracker/app/src/main/java/com/google/android/gms/samples/vision/face/multitracker 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 20
20
import android .os .Bundle ;
21
21
import android .util .Log ;
22
22
23
+ import com .google .android .gms .samples .vision .face .multitracker .ui .camera .CameraSourcePreview ;
24
+ import com .google .android .gms .samples .vision .face .multitracker .ui .camera .GraphicOverlay ;
25
+
23
26
import com .google .android .gms .vision .CameraSource ;
24
27
import com .google .android .gms .vision .MultiDetector ;
25
28
import com .google .android .gms .vision .MultiProcessor ;
26
29
import com .google .android .gms .vision .barcode .BarcodeDetector ;
27
30
import com .google .android .gms .vision .face .FaceDetector ;
28
- import com .google .android .gms .samples .vision .face .multitracker .ui .camera .CameraSourcePreview ;
29
- import com .google .android .gms .samples .vision .face .multitracker .ui .camera .GraphicOverlay ;
30
31
31
32
import java .io .IOException ;
32
33
@@ -95,11 +96,12 @@ public void onCreate(Bundle icicle) {
95
96
Log .w (TAG , "Detector dependencies are not yet available." );
96
97
}
97
98
98
- // Creates and starts the camera. Note that this will use a higher resolution by default
99
- // (1024x768) in comparison to other face detection examples, because the barcode detector
100
- // works better at higher resolutions .
99
+ // Creates and starts the camera. Note that this uses a higher resolution in comparison
100
+ // to other detection examples to enable the barcode detector to detect small barcodes
101
+ // at long distances .
101
102
mCameraSource = new CameraSource .Builder (context , multiDetector )
102
103
.setFacing (CameraSource .CAMERA_FACING_BACK )
104
+ .setRequestedPreviewSize (1600 , 1024 )
103
105
.setRequestedFps (15.0f )
104
106
.build ();
105
107
startCameraSource ();
You can’t perform that action at this time.
0 commit comments