カメラ画像のメタデータ
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ARCore では、ImageMetadata
を使用して、
カメラ画像のキャプチャ結果。一般的なタイプのカメラ画像メタデータには、
焦点距離、画像のタイムスタンプ データ、照明です。
情報です。
Android Camera
モジュールは、画像に関する 160 以上のパラメータを記録できます。
(デバイスの機能に応じて)にキャプチャします。すべての Pod のリストが
使用可能なメタデータキーについては、ImageMetadata
をご覧ください。
getImageMetadata()
を使用する
特定のメタデータキー値を取得し、MetadataNotFoundException
をキャッチします。
見当たらないからです次の例は、Cloud Storage バケットを取得する
SENSOR_EXPOSURE_TIME
メタデータキーの値。
Java
// 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;
}
}
Kotlin
// 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()
}
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-12 UTC。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"必要な情報がない"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"複雑すぎる / 手順が多すぎる"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"最新ではない"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻訳に関する問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"サンプル / コードに問題がある"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"その他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"わかりやすい"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"問題の解決に役立った"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"その他"
}]
{"lastModified": "\u6700\u7d42\u66f4\u65b0\u65e5 2024-09-12 UTC\u3002"}
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-09-12 UTC。"]]