카메라 이미지 메타데이터
ARCore에서는 ImageMetadata
를 사용하여
카메라 이미지 캡처 결과입니다. 일반적으로 사용되는 카메라 이미지 메타데이터의
초점 거리, 이미지 타임스탬프 데이터 또는 조명에
액세스할 수 있습니다
확인할 수 있습니다
Android Camera
모듈은 이미지에 관한 매개변수를 160개 이상 기록할 수 있습니다.
캡처된 각 프레임에 대한 캡션을 반환할 수 있습니다. 모든
가능한 메타데이터 키에 대해 자세히 알아보세요. ImageMetadata
를 참고하세요.
getImageMetadata()
사용
를 호출하여 특정 메타데이터 키 값을 가져오고 MetadataNotFoundException
를 포착합니다.
찾을 수 없습니다. 다음 예는
SENSOR_EXPOSURE_TIME
메타데이터 키 값입니다.
// Obtain the SENSOR_EXPOSURE_TIME metadata value from the frame.
Long getSensorExposureTime(Frame frame) {
try {
// Can throw NotYetAvailableException when sensors data is not yet available.
ImageMetadata metadata = frame.getImageMetadata();
// Get the exposure time metadata. Throws MetadataNotFoundException if it's not available.
return metadata.getLong(ImageMetadata.SENSOR_EXPOSURE_TIME);
} catch (MetadataNotFoundException | NotYetAvailableException exception) {
return null;
}
}
// Obtain the SENSOR_EXPOSURE_TIME metadata value from the frame.
fun getSensorExposureTime(frame: Frame): Long? {
return runCatching {
// Can throw NotYetAvailableException when sensors data is not yet available.
val metadata = frame.imageMetadata
// Get the exposure time metadata. Throws MetadataNotFoundException if it's not available.
return metadata.getLong(ImageMetadata.SENSOR_EXPOSURE_TIME)
}
.getOrNull()
}
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-10-14(UTC)
[null,null,["최종 업데이트: 2024-10-14(UTC)"],[[["ARCore provides access to camera image metadata like focal length, timestamp, and lighting information using `ImageMetadata`."],["Android's `Camera` module can record over 160 image parameters, which can be accessed through the `ImageMetadata` class."],["Developers can retrieve specific metadata values using `getImageMetadata()`, while handling potential exceptions like `MetadataNotFoundException`."],["The provided Java and Kotlin code snippets demonstrate how to obtain the `SENSOR_EXPOSURE_TIME` metadata value from a frame."]]],["ARCore utilizes `ImageMetadata` to access camera image capture metadata, such as focal length, timestamps, and lighting. The Android `Camera` module can record over 160 parameters per frame. To retrieve a specific key value, use `getImageMetadata()`, handling `MetadataNotFoundException`. The example demonstrates fetching the `SENSOR_EXPOSURE_TIME` metadata, using `getLong()` method and handling `NotYetAvailableException` if sensor data is unavailable. Refer to the `ImageMetadata` documentation for the complete list of available keys.\n"]]