Repository navigation
Add offline App Bokeh for people and objects - #339
Merged
Merged
Conversation
Reviewer's Guide일반 Camera2 JPEG 한 장을 보존한 채 MiDaS v2.1/LiteRT CPU로 상대 깊이를 추정하고, 사용자가 선택한 피사체를 기준으로 오프라인 배경 흐림을 편집·저장하는 App Bokeh 경로를 추가했으며 UI 상태 전이, 모델 무결성, 테스트와 아키텍처·사용자 문서를 함께 갱신했습니다. Sequence diagram for offline App Bokeh capture and editingsequenceDiagram
actor User
participant MainActivity
participant Camera2
participant AppBokehEditor
participant AppBokehProcessor
participant MiDaS
participant MediaLibrary
User->>MainActivity: chooseAppBokeh()
MainActivity->>Camera2: configure Preview + JPEG
User->>MainActivity: captureAppBokeh()
MainActivity->>Camera2: capturePhoto()
Camera2-->>MainActivity: JPEG URI
MainActivity->>MediaLibrary: save original JPEG
MainActivity->>AppBokehEditor: openAppBokehEditor(uri)
AppBokehEditor->>AppBokehProcessor: load(uri)
AppBokehProcessor->>MiDaS: infer RGB image
MiDaS-->>AppBokehProcessor: 256x256 relative depth
AppBokehProcessor-->>AppBokehEditor: Scene
User->>AppBokehEditor: select focus and strength
AppBokehEditor->>AppBokehProcessor: render(scene, focusX, focusY, strength)
AppBokehProcessor-->>AppBokehEditor: bokeh bitmap
User->>AppBokehEditor: saveCopy()
AppBokehEditor->>AppBokehProcessor: save(scene, result, source, focusX, focusY, strength)
AppBokehProcessor->>MediaLibrary: save JPEG, depth PNG, metadata
Entity relationship diagram for App Bokeh output artifactserDiagram
ORIGINAL_JPEG ||--o{ BOKEH_JPEG : produces
ORIGINAL_JPEG ||--o| DEPTH_PNG : derives
ORIGINAL_JPEG ||--o| PROCESS_METADATA : describes
ORIGINAL_JPEG {
string uri
}
BOKEH_JPEG {
string uri
int width
int height
}
DEPTH_PNG {
string uri
int width
int height
}
PROCESS_METADATA {
string model
string modelSha256
float focusX
float focusY
int strength
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
제조사 Bokeh나 센서 Depth를 제공하지 않는 기기에서도 일반 JPEG 한 장으로 사물과 인물의 상대 깊이를 추정해 배경 흐림을 적용할 수 있도록
LIVE → Depth → App Bokeh를 추가합니다.Camera2 Preview+JPEG만 구성하며 분석 YUV·DEPTH16·제조사 확장 세션은 사용하지 않습니다. 촬영 원본을 저장한 뒤 MiDaS v2.1과 LiteRT CPU로 깊이를 추정하고, 편집기에서 피사체 지점·강도·원본/깊이/결과 비교를 제공합니다. 복사본 JPEG, 깊이 PNG, 메타데이터를 저장하며 원본은 보존합니다. 모델은 공식 릴리스의 SHA-256을 확인해 APK에 포함하고 MIT 라이선스를 함께 배포합니다.
검증
docflow check --build,docflow check --ci, 문서 회귀 검사 37개 통과.실기기 기록:
docs/validation/app-bokeh.md. 스트림·모델·저장 계약:docs/design/APP-BOKEH.md.제약
현재는 촬영 후 편집이며 실시간 효과가 아닙니다. 출력 긴 변은 최대 1600픽셀, 깊이는 256×256 상대 역깊이입니다. 책상 뒤쪽 경계 등에는 흐림 번짐이 남아 있으며 모든 피사체·기기에서 품질을 보장하지 않습니다. 이번 새 장면의 품질 검증은 후면 사물 한 장입니다. 첫 빌드에는 약 66 MB 모델 다운로드가 필요하고 실행은 오프라인입니다.
검증 사진과 화면 캡처는 사용자와 합의한 로컬 전용 자료여서 PR에 첨부하지 않았습니다. 제조사 Portrait와 센서 Depth 메뉴는 유지합니다.
Summary by Sourcery
Add an offline App Bokeh workflow that captures a standard JPEG, estimates relative depth on-device, and lets users apply and save adjustable background blur without modifying the original.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests:
Chores:
UI/UX 리뷰 후 보완
Live 선택창의 제목·닫기 아이콘·흰색 선택 표시와 Gallery의 저장 버튼 스타일을 재사용했습니다. Bokeh/Original/Depth의 선택 상태를 시각·접근성 정보로 표시하고, 강도 변경 시 Bokeh 결과로 돌아갑니다. 저장 버튼은
Save Bokeh로 명확히 했으며 슬라이더 터치 높이를 48dp로 확보했습니다. 큰 글씨에서 잘리던 Original 버튼은 기존 앱에서 사용하는 자동 글자 크기 조절 방식으로 수정했습니다.SM-S936N에서 기존 사진을 재사용한 UI 검사와 115%·200% 글꼴 화면 확인을 통과했습니다. 기기 글꼴 배율은 원래 값으로 복원했습니다. 수정 APK 빌드·lint, 문서 회귀 검사 37개와 문서 최신성/산출물 검사를 다시 통과했습니다.