react-native-rectangle-doc-scanner 10.2.0 → 10.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -93,15 +93,18 @@ class CameraController(
|
|
|
93
93
|
Log.d(TAG, "[CAMERAX] PreviewView scaleType: ${previewView.scaleType}")
|
|
94
94
|
Log.d(TAG, "[CAMERAX] PreviewView implementationMode: ${previewView.implementationMode}")
|
|
95
95
|
preview = Preview.Builder()
|
|
96
|
+
.setTargetResolution(android.util.Size(1920, 1080)) // 16:9 resolution
|
|
96
97
|
.build()
|
|
97
|
-
.also {
|
|
98
|
-
|
|
98
|
+
.also { previewUseCase ->
|
|
99
|
+
Log.d(TAG, "[CAMERAX] Setting SurfaceProvider...")
|
|
100
|
+
previewUseCase.setSurfaceProvider(previewView.surfaceProvider)
|
|
99
101
|
Log.d(TAG, "[CAMERAX] SurfaceProvider set successfully")
|
|
100
102
|
}
|
|
101
103
|
|
|
102
104
|
// ImageAnalysis UseCase for document detection
|
|
103
105
|
imageAnalyzer = ImageAnalysis.Builder()
|
|
104
106
|
.setBackpressureStrategy(ImageAnalysis.STRATEGY_KEEP_ONLY_LATEST)
|
|
107
|
+
.setTargetResolution(android.util.Size(1280, 960)) // Limit resolution for analysis
|
|
105
108
|
.build()
|
|
106
109
|
.also {
|
|
107
110
|
it.setAnalyzer(cameraExecutor) { imageProxy ->
|