Notice
Recent Posts
Recent Comments
Link
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
Tags
more
Archives
Today
Total
관리 메뉴

Jack 오답노트

Camera Focus 관련 정리 본문

android

Camera Focus 관련 정리

기릿 2022. 10. 19. 14:18

 

 포커스를 MF 로 숫자로 고정시키거나 탭해서 고정시켜야하는데 탭해서 포커스 고정이 삼성 일부 기기에서만 안 됨

왜 안되는지 한참 찾아보다가 몇몇 레퍼런스들 링크함

 

https://stackoverflow.com/questions/65896511/unable-to-focus-distance-in-camera2-api

더보기

Android API delivers possibilities for turning on/off some features, but handling API calls must be implemented by manufacturer of device, and sometimes manufacturer is making own camera app for user, giving some higher permissions and/or access to hidden API for this app and all other camera apps can't use these features...

https://groups.google.com/a/android.com/g/camerax-developers/c/0I5rxKt4oV4?pli=1 

 

Problem with focus in specific cases

Can you try to focus on father objects (real objects like a cup / a book, not the background) on these problematic devices and see if it focuses correctly ?     The coordinates conversion is wrong in your original codes,  so I'd like to confirm  if t

groups.google.com

https://sourceforge.net/projects/opencamera/files/

얜 오픈소스 카메라 앱인데 보고 참조

 

 1. startFocusAndMetering 으로 초점 영역 지정 후 고정
영역지정은 되나 disableAutoCancel()이 몇몇 기기에서 안 먹혀서 (삼성에서 카메라 사용 시 af 기능을 따로 제공해서 고정해놓은 포커싱 풀림) 불가능
 2. disableAutoCancel() 대신 초 단위로 포커싱하고 초를 길게 주는 편법도 안 먹힘
 3. AF mode 끄기 - 꺼도 1번과 같은 이유로 자동 초점이 잘 잡힘
 4. cameraX 내에서 Camera 2 Lib extend 해서 초점 거리 직접 주기
 
- CameraX 생성할때 extend 시켜줌 -> 초점 거리 바뀔때마다 카메라 죽였다 켜야함. 
- Camera2에서도 자동초점을 중간에 중지시키는 건 갤럭시에서 안 통하는데 애초부터 거리기준 매뉴얼 포커싱으로 주니까 자동 포커싱이 꺼짐!
- CameraX는 매뉴얼 지원을 안함

 

CameraX는 on/off 가 안먹혀도 camera2는 먹히는 듯 하니 아예 camera2 로 구현을 해야하거나,, (이건 테스트 해봐야 함)

연속 초점으로 맞춰두고 그냥 초점 잡을 땐 촬영을 막는게 나을 듯하다

Comments