Skip to content

Conversation

@Mrseenz
Copy link

@Mrseenz Mrseenz commented Jun 29, 2025

No description provided.

Adds the UI and logic for users to select a local photo as a virtual camera replacement method.

Changes include:
- Added TYPE_LOCAL_PHOTO to MethodType.
- Added 'Local Photo' option to the camera settings menu.
- Updated SettingFragment to handle photo selection:
  - Launches image chooser for TYPE_LOCAL_PHOTO.
  - Updates UI text and component visibility accordingly.
  - Saves the selected photo URI to MultiPreferences.
- Added necessary string resources.

Note: The actual injection of the photo into the camera feed is not yet implemented and will depend on com.hack.opensdk capabilities.
Introduces foundational work for a real-time face swap feature.

Key changes:
- Added dependencies for ML Kit, CameraX, and OpenCV (placeholder).
- Created FaceSwapPocActivity:
  - Sets up CameraX for live preview.
  - Uses ML Kit for face/landmark detection on live feed and source photo.
  - Implements conceptual OpenCV pipeline for warping and blending (YUV conversion, affine transform, masking, basic blend) and displays on an ImageView.
  - Includes OpenCV loader logic.
- Integrated Face Swap into VCamera settings:
  - Added TYPE_FACE_SWAP MethodType.
  - Added menu item and string resources.
  - Modified SettingFragment to handle selection of Face Swap mode and source photo URI, saving to MultiPreferences.

Caveats:
- OpenCV core logic in PoC is conceptual and untested.
- Integration of processed frames into the main virtual camera output (via com.hack.opensdk) is not yet implemented and requires further investigation of the SDK.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants