I'm trying to use this framework with own model and it works well.
My issue is about versions of androidx.camera
, I faced with issue that
CameraXPreviewHelper depends on old version of camera-core.
androidx.camera:camera-core:1.0.0-alpha06
This is part of main method to open camera from helper class.
public void startCamera(Activity context, CameraFacing cameraFacing, SurfaceTexture surfaceTexture) {
LensFacing cameraLensFacing = cameraFacing ==
CameraFacing.FRONT ? LensFacing.FRONT : LensFacing.BACK;
PreviewConfig previewConfig = (new Builder()).setLensFacing(cameraLensFacing)
.setTargetResolution(TARGET_SIZE).build();
this.preview = new Preview(previewConfig);
this.preview.setOnPreviewOutputUpdateListener((previewOutput) -> {
.
.
.
}
Unfortunately preview.setOnPreviewOutputUpdateListener
do not exist anymore (removed since 1.0.0-alpha07).
What is the correct way to implement camera preview with mediapipe based on latest camera api? (or any other api)
Reported issue as well
update: Would be grateful if someone could mark it with tag [mediapipe], Thanks!