ARFrame (AR 會話中的一幀數(shù)據(jù)) | 屬性 (具體數(shù)據(jù)特征) | 具體參數(shù) | 描述 |
---|---|---|---|
ARFrame | camera (相機信息) | transform (位置和方向) |
simd_float4x4 :表示相機在 3D 空間中的位置和方向,包含平移和旋轉(zhuǎn)信息。 |
intrinsics (內(nèi)參矩陣) |
simd_float3x3 :相機內(nèi)參矩陣,描述鏡頭的焦距和圖像中心,用于從 3D 坐標到 2D 圖像的投影。 |
||
anchors (錨點信息) | count (錨點數(shù)量) |
Int :當前幀中錨點的數(shù)量,表示虛擬物體的數(shù)量,幫助開發(fā)者了解場景的復雜性。 |
|
identifier (唯一標識符) |
UUID :錨點的唯一標識符,用于區(qū)分不同的虛擬對象,使得每個對象能夠被獨立跟蹤和管理。 |
||
transform (錨點變換) |
simd_float4x4 :表示該錨點在 3D 空間中的位置和方向,類似于相機變換。 |
||
lightEstimate (光照估計) | ambientIntensity (環(huán)境光強度) |
Float :當前環(huán)境的光照強度(以勒克斯為單位),用于調(diào)整虛擬物體的光照效果,使其看起來更加自然。 |
|
ambientColorTemperature (光色溫) |
Float :環(huán)境光的色溫(以開爾文為單位),影響物體的渲染色彩和真實感,幫助改善虛擬與現(xiàn)實的融合。 |
||
capturedImage (捕獲的圖像) | capturedImage (原始圖像數(shù)據(jù)) |
CVPixelBuffer :當前幀的原始圖像數(shù)據(jù),包含攝像頭捕獲的畫面,可用于進行圖像處理或后續(xù)渲染。 |
|
timestamp (時間戳) | timestamp (捕獲時間) |
TimeInterval :該幀捕獲的時間,通常以秒為單位,方便進行時間相關(guān)的處理或同步。 |
|
worldMappingStatus (世界映射狀態(tài)) | worldMappingStatus (環(huán)境理解狀態(tài)) |
ARFrame.WorldMappingStatus :表示 ARKit 對環(huán)境理解的狀態(tài)(如 .notAvailable 、.limited 、.extending 和 .mapped ),指示 AR 會話的質(zhì)量和穩(wěn)定性。 |
|
detectedBody (檢測到的身體) | detectedBody (人體數(shù)據(jù)) |
ARBody2D? 或 ARBodyAnchor? :如果檢測到人體骨架,返回相關(guān)數(shù)據(jù)(如身體位置和姿勢),否則為 nil ,可用于與用戶進行交互。 |
|
segmentationBuffer (分割圖像) | segmentationBuffer (圖像分割數(shù)據(jù)) |
CVPixelBuffer? :表示當前場景的分割圖像,用于區(qū)分不同區(qū)域(如前景和背景),幫助提高渲染效果和視覺真實感。 |
|
depthData (深度數(shù)據(jù)) | depthData (深度信息) |
AVDepthData? :場景的深度信息,提供距離數(shù)據(jù),用于計算虛擬物體與現(xiàn)實世界之間的遮擋效果,增強 AR 體驗的真實感。 |
ARBody2D 的人體節(jié)點信息如下
let skeleton = body.skeleton
for na in skeleton.definition.jointNames
{
print("--->(na)")
}
空間位置信息 : skeleton.jointLandmarks
--->head_joint
--->neck_1_joint
--->right_shoulder_1_joint
--->right_forearm_joint
--->right_hand_joint
--->left_shoulder_1_joint
--->left_forearm_joint
--->left_hand_joint
--->right_upLeg_joint
--->right_leg_joint
--->right_foot_joint
--->left_upLeg_joint
--->left_leg_joint
--->left_foot_joint
--->right_eye_joint
--->left_eye_joint
--->root
--->right_ear_joint
--->left_ear_joint
以上表格json化
{
"ARFrame": {
"description": "AR 會話中的一幀數(shù)據(jù)",
"attributes": [
{
"name": "camera",
"description": "相機信息",
"subAttributes": [
{
"name": "transform",
"type": "simd_float4x4",
"description": "表示相機在 3D 空間中的位置和方向,包含平移和旋轉(zhuǎn)信息。"
},
{
"name": "intrinsics",
"type": "simd_float3x3",
"description": "相機內(nèi)參矩陣,描述鏡頭的焦距和圖像中心,用于從 3D 坐標到 2D 圖像的投影。"
}
]
},
{
"name": "anchors",
"description": "錨點信息",
"subAttributes": [
{
"name": "count",
"type": "Int",
"description": "當前幀中錨點的數(shù)量,表示虛擬物體的數(shù)量,幫助開發(fā)者了解場景的復雜性。"
},
{
"name": "identifier",
"type": "UUID",
"description": "錨點的唯一標識符,用于區(qū)分不同的虛擬對象,使得每個對象能夠被獨立跟蹤和管理。"
},
{
"name": "transform",
"type": "simd_float4x4",
"description": "表示該錨點在 3D 空間中的位置和方向,類似于相機變換。"
}
]
},
{
"name": "lightEstimate",
"description": "光照估計",
"subAttributes": [
{
"name": "ambientIntensity",
"type": "Float",
"description": "當前環(huán)境的光照強度(以勒克斯為單位),用于調(diào)整虛擬物體的光照效果,使其看起來更加自然。"
},
{
"name": "ambientColorTemperature",
"type": "Float",
"description": "環(huán)境光的色溫(以開爾文為單位),影響物體的渲染色彩和真實感,幫助改善虛擬與現(xiàn)實的融合。"
}
]
},
{
"name": "capturedImage",
"description": "捕獲的圖像",
"subAttributes": [
{
"name": "capturedImage",
"type": "CVPixelBuffer",
"description": "當前幀的原始圖像數(shù)據(jù),包含攝像頭捕獲的畫面,可用于進行圖像處理或后續(xù)渲染。"
}
]
},
{
"name": "timestamp",
"description": "時間戳",
"subAttributes": [
{
"name": "timestamp",
"type": "TimeInterval",
"description": "該幀捕獲的時間,通常以秒為單位,方便進行時間相關(guān)的處理或同步。"
}
]
},
{
"name": "worldMappingStatus",
"description": "世界映射狀態(tài)",
"subAttributes": [
{
"name": "worldMappingStatus",
"type": "ARFrame.WorldMappingStatus",
"description": "表示 ARKit 對環(huán)境理解的狀態(tài)(如 .notAvailable、.limited、.extending 和 .mapped),指示 AR 會話的質(zhì)量和穩(wěn)定性。"
}
]
},
{
"name": "detectedBody",
"description": "檢測到的身體",
"subAttributes": [
{
"name": "detectedBody",
"type": "ARBody2D? 或 ARBodyAnchor?",
"description": "如果檢測到人體骨架,返回相關(guān)數(shù)據(jù)(如身體位置和姿勢),否則為 nil,可用于與用戶進行交互。"
}
]
},
{
"name": "segmentationBuffer",
"description": "分割圖像",
"subAttributes": [
{
"name": "segmentationBuffer",
"type": "CVPixelBuffer?",
"description": "表示當前場景的分割圖像,用于區(qū)分不同區(qū)域(如前景和背景),幫助提高渲染效果和視覺真實感。"
}
]
},
{
"name": "depthData",
"description": "深度數(shù)據(jù)",
"subAttributes": [
{
"name": "depthData",
"type": "AVDepthData?",
"description": "場景的深度信息,提供距離數(shù)據(jù),用于計算虛擬物體與現(xiàn)實世界之間的遮擋效果,增強 AR 體驗的真實感。"
}
]
}
]
}
}