面部检测USB相机显示问题修复,面部检测UI调整
This commit is contained in:
parent
28659f0c4e
commit
43d9370d21
|
@ -0,0 +1,269 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &148439032992451701
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 654720933623175877}
|
||||
- component: {fileID: 1983862283603915538}
|
||||
- component: {fileID: 5828653655168423611}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &654720933623175877
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 148439032992451701}
|
||||
m_LocalRotation: {x: 1, y: 0, z: 0, w: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3050339006126720603}
|
||||
m_LocalEulerAnglesHint: {x: 180, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1983862283603915538
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 148439032992451701}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5828653655168423611
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 148439032992451701}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Back
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: b04f3173f946b754db673ac13842f4c1, type: 2}
|
||||
m_sharedMaterial: {fileID: 21728410361126204, guid: b04f3173f946b754db673ac13842f4c1, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 40
|
||||
m_fontSizeBase: 40
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &1502389603954548767
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3050339006126720603}
|
||||
- component: {fileID: 8128188074129425581}
|
||||
- component: {fileID: 507079510547833610}
|
||||
- component: {fileID: 5421029034145902151}
|
||||
m_Layer: 5
|
||||
m_Name: Back
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3050339006126720603
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1502389603954548767}
|
||||
m_LocalRotation: {x: 1, y: 0, z: 0, w: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 654720933623175877}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 180, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 500, y: 70}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &8128188074129425581
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1502389603954548767}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &507079510547833610
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1502389603954548767}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 20212af14cce713469fe4731c71daf13, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &5421029034145902151
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1502389603954548767}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 507079510547833610}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 0}
|
||||
m_TargetAssemblyTypeName: FaceDetectUI, Assembly-CSharp
|
||||
m_MethodName: OnBackBtnClicked
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1911d004c11199044b53b544bc61b79c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -468,140 +468,6 @@ MonoBehaviour:
|
|||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &2847583706665315191
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3214993924287872455}
|
||||
- component: {fileID: 4468664795937707024}
|
||||
- component: {fileID: 8460138717325046201}
|
||||
m_Layer: 5
|
||||
m_Name: Text (TMP)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3214993924287872455
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2847583706665315191}
|
||||
m_LocalRotation: {x: 1, y: 0, z: 0, w: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1143634904695382361}
|
||||
m_LocalEulerAnglesHint: {x: 180, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4468664795937707024
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2847583706665315191}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &8460138717325046201
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2847583706665315191}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Back
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: b04f3173f946b754db673ac13842f4c1, type: 2}
|
||||
m_sharedMaterial: {fileID: 21728410361126204, guid: b04f3173f946b754db673ac13842f4c1, type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 40
|
||||
m_fontSizeBase: 40
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &3239961382231429169
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -677,139 +543,6 @@ MonoBehaviour:
|
|||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &3554032430536705821
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1143634904695382361}
|
||||
- component: {fileID: 6144850760974050223}
|
||||
- component: {fileID: 2486682882303427592}
|
||||
- component: {fileID: 7976059553184794949}
|
||||
m_Layer: 5
|
||||
m_Name: Back
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1143634904695382361
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3554032430536705821}
|
||||
m_LocalRotation: {x: 1, y: 0, z: 0, w: 0}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 3214993924287872455}
|
||||
m_Father: {fileID: 8175218532742092749}
|
||||
m_LocalEulerAnglesHint: {x: 180, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0}
|
||||
m_AnchorMax: {x: 0.5, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 500, y: 70}
|
||||
m_Pivot: {x: 0.5, y: 1}
|
||||
--- !u!222 &6144850760974050223
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3554032430536705821}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2486682882303427592
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3554032430536705821}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 20212af14cce713469fe4731c71daf13, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &7976059553184794949
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3554032430536705821}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 2486682882303427592}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 2528519554286326098}
|
||||
m_TargetAssemblyTypeName: FaceDetectUI, Assembly-CSharp
|
||||
m_MethodName: OnBackBtnClicked
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||
m_IntArgument: 0
|
||||
m_FloatArgument: 0
|
||||
m_StringArgument:
|
||||
m_BoolArgument: 0
|
||||
m_CallState: 2
|
||||
--- !u!1 &4963945909222252759
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -1069,7 +802,7 @@ MonoBehaviour:
|
|||
m_StartCorner: 0
|
||||
m_StartAxis: 0
|
||||
m_CellSize: {x: 370, y: 300}
|
||||
m_Spacing: {x: 50, y: 50}
|
||||
m_Spacing: {x: 100, y: 0}
|
||||
m_Constraint: 0
|
||||
m_ConstraintCount: 2
|
||||
--- !u!1 &8595995707471803270
|
||||
|
@ -1167,7 +900,7 @@ MonoBehaviour:
|
|||
m_fontSize: 36
|
||||
m_fontSizeBase: 36
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_enableAutoSizing: 1
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
|
@ -1206,3 +939,109 @@ MonoBehaviour:
|
|||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1001 &2705531741818889986
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 8175218532742092749}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1502389603954548767, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Back
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 500
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 70
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 180
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5421029034145902151, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
||||
value:
|
||||
objectReference: {fileID: 2528519554286326098}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
--- !u!224 &1143634904695382361 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
m_PrefabInstance: {fileID: 2705531741818889986}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
|
|
@ -258,6 +258,7 @@ RectTransform:
|
|||
- {fileID: 4318354961022875112}
|
||||
- {fileID: 3096906925272982799}
|
||||
- {fileID: 406787417813524232}
|
||||
- {fileID: 1278450480118782266}
|
||||
m_Father: {fileID: 475269767089658797}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
|
@ -2509,3 +2510,117 @@ MonoBehaviour:
|
|||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1001 &4316995848301698913
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 38199016232350786}
|
||||
m_Modifications:
|
||||
- target: {fileID: 1502389603954548767, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_Name
|
||||
value: Back
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_Pivot.y
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_AnchorMax.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_AnchorMax.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_AnchorMin.x
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_AnchorMin.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_SizeDelta.x
|
||||
value: 500
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_SizeDelta.y
|
||||
value: 70
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_AnchoredPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_AnchoredPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 180
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5421029034145902151, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
||||
value:
|
||||
objectReference: {fileID: 663922883719488284}
|
||||
- target: {fileID: 5421029034145902151, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName
|
||||
value: OnBackClicked
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5421029034145902151, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName
|
||||
value: GuideUI, Assembly-CSharp
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
--- !u!224 &1278450480118782266 stripped
|
||||
RectTransform:
|
||||
m_CorrespondingSourceObject: {fileID: 3050339006126720603, guid: 1911d004c11199044b53b544bc61b79c, type: 3}
|
||||
m_PrefabInstance: {fileID: 4316995848301698913}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
|
|
|
@ -493,7 +493,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &709787122
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -544,7 +544,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!64 &1014002334
|
||||
MeshCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -834,7 +834,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1838964606
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -906,7 +906,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!114 &1878964050
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -7,6 +7,7 @@ public class GlobalData : MonoSingleton<GlobalData>
|
|||
private int _cameraIndex = 0;
|
||||
private bool _isEstimationDebugMode = true;
|
||||
private bool _isFlip = false;
|
||||
private bool _showFaceDetectCameraCaptureImage = false;
|
||||
|
||||
public PositionType Position
|
||||
{
|
||||
|
@ -30,6 +31,7 @@ public class GlobalData : MonoSingleton<GlobalData>
|
|||
|
||||
public int CameraIndex { get => _cameraIndex; internal set => _cameraIndex = value; }
|
||||
public bool IsEstimationPrintMode { get => _isEstimationDebugMode; internal set => _isEstimationDebugMode = value; }
|
||||
public bool ShowFaceDetectCameraCaptureImage { get => _showFaceDetectCameraCaptureImage; internal set => _showFaceDetectCameraCaptureImage = value; }
|
||||
}
|
||||
|
||||
public enum InputDeviceType
|
||||
|
|
|
@ -23,21 +23,10 @@ public partial class SROptions
|
|||
EventManager.Instance.Dispatch(YogaEventType.ChangeCaptureCameraDevice);
|
||||
}
|
||||
|
||||
[Category("瑜伽设置")]
|
||||
public void PrintCurrentCamera()
|
||||
[Category("瑜伽设置"), DisplayName("健康监测显示摄像头捕获界面")]
|
||||
public void SetFaceDetectCameraCaptureImage()
|
||||
{
|
||||
var devices = WebCamTexture.devices;
|
||||
if (devices.Length == 0)
|
||||
{
|
||||
LogPrint.Error("No camera detected!");
|
||||
return;
|
||||
}
|
||||
|
||||
LogPrint.Warning($"Current camera: {devices[GlobalData.Instance.CameraIndex].name}");
|
||||
foreach (var device in devices)
|
||||
{
|
||||
LogPrint.Warning($"Camera: {device.name}");
|
||||
}
|
||||
GlobalData.Instance.ShowFaceDetectCameraCaptureImage = !GlobalData.Instance.ShowFaceDetectCameraCaptureImage;
|
||||
}
|
||||
|
||||
[Category("瑜伽设置"), DisplayName("WebCamera和USBCamera之间转换")]
|
||||
|
|
|
@ -11,7 +11,7 @@ public abstract class FaceDetectManagerBase : MonoBehaviour
|
|||
//Related To DNN Model
|
||||
protected dnn.DNNUtils dnnUtils;
|
||||
|
||||
protected Texture2D videoTexture;
|
||||
protected Texture2D _videoTexture;
|
||||
protected double _lndmrkEstScore;
|
||||
protected Mat mat4Process;
|
||||
protected Mat grayMat4Process;
|
||||
|
@ -30,6 +30,7 @@ public abstract class FaceDetectManagerBase : MonoBehaviour
|
|||
float lndmrkEstScore;
|
||||
|
||||
protected FaceDetectUI panel;
|
||||
protected Texture2D _cutTexture;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Awake()
|
||||
|
@ -68,10 +69,11 @@ public abstract class FaceDetectManagerBase : MonoBehaviour
|
|||
//if (probExp != null)
|
||||
// probExp.Dispose();
|
||||
|
||||
Dispose();
|
||||
}
|
||||
protected abstract void InitMatHelper();
|
||||
|
||||
protected abstract void DestroyManager();
|
||||
protected abstract void Dispose();
|
||||
|
||||
private void InitVariable()
|
||||
{
|
||||
|
|
|
@ -13,13 +13,46 @@ public class USBFaceDetectManager : FaceDetectManagerBase, IUVCDrawer
|
|||
public RawImage cutImage;
|
||||
private Material _flipImg;
|
||||
private int[] _positionRect;
|
||||
private Texture2D _cutTexture;
|
||||
public int[] PositionRect
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_positionRect == null)
|
||||
_positionRect = PictureUtility.GetPositionRect(UVCManager.Instance.DefaultWidth, UVCManager.Instance.DefaultHeight);
|
||||
return _positionRect;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void InitMatHelper()
|
||||
{
|
||||
_flipImg = new Material(Shader.Find("Unlit/FlipHorizontal")); ;
|
||||
InvokeRepeating("GCCollection", 0, 1f);
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
mat4Display = new Mat(UVCManager.Instance.DefaultWidth, UVCManager.Instance.DefaultHeight, CvType.CV_8UC4);
|
||||
mat4Process = new Mat(PositionRect[2] - PositionRect[0], PositionRect[3] - PositionRect[1], CvType.CV_8UC4);
|
||||
mat4DisplayTexture = new Mat(UVCManager.Instance.DefaultWidth, UVCManager.Instance.DefaultHeight, CvType.CV_8UC4);
|
||||
|
||||
_videoTexture = new Texture2D(UVCManager.Instance.DefaultWidth, UVCManager.Instance.DefaultHeight, TextureFormat.RGBA32, false);
|
||||
_cutTexture = new Texture2D(PositionRect[2] - PositionRect[0], PositionRect[3] - PositionRect[1], TextureFormat.RGBA32, false);
|
||||
|
||||
image.texture = _videoTexture;
|
||||
cutImage.texture = _cutTexture;
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
Destroy(_videoTexture);
|
||||
Destroy(_cutTexture);
|
||||
_videoTexture = null;
|
||||
_cutTexture = null;
|
||||
mat4Display.Dispose();
|
||||
mat4Process.Dispose();
|
||||
mat4DisplayTexture.Dispose();
|
||||
}
|
||||
|
||||
protected void GCCollection()
|
||||
{
|
||||
if (enabled == true && gameObject.activeInHierarchy == true)
|
||||
|
@ -34,24 +67,7 @@ public class USBFaceDetectManager : FaceDetectManagerBase, IUVCDrawer
|
|||
|
||||
protected override Mat GetMat()
|
||||
{
|
||||
Mat img = null;
|
||||
if (UVCManager.Instance != null &&
|
||||
UVCManager.Instance.GetAttachedDevices() != null && UVCManager.Instance.GetAttachedDevices().Count > 0)
|
||||
{
|
||||
var devices = UVCManager.Instance.GetAttachedDevices();
|
||||
for (int i = 0; i < devices.Count; i++)
|
||||
{
|
||||
UVCManager.CameraInfo device = devices[i];
|
||||
//LogPrint.Log($"device: {device}, device name:{device.DeviceName} texture: {device.previewTexture}");
|
||||
}
|
||||
//image.texture = devices.FirstOrDefault().previewTexture;
|
||||
textureToFlipTexture2D(devices.FirstOrDefault().previewTexture, videoTexture);
|
||||
|
||||
img = new Mat(UVCManager.Instance.DefaultHeight, UVCManager.Instance.DefaultWidth, CvType.CV_8UC4);
|
||||
Utils.texture2DToMat(videoTexture, img);
|
||||
}
|
||||
|
||||
return img;
|
||||
return null;
|
||||
}
|
||||
private void textureToFlipTexture2D(Texture texture, Texture2D texture2D)
|
||||
{
|
||||
|
@ -77,58 +93,84 @@ public class USBFaceDetectManager : FaceDetectManagerBase, IUVCDrawer
|
|||
RenderTexture.active = prevRT;
|
||||
}
|
||||
|
||||
//protected override void AnalyzingFace()
|
||||
//{
|
||||
// mat4Display = GetMat();
|
||||
// if (mat4Display == null)
|
||||
// return;
|
||||
// //mat4Display.copyTo(mat4Process);
|
||||
// var roiRect = new OpenCVCompact.Rect(
|
||||
// _positionRect[0],
|
||||
// _positionRect[1],
|
||||
// Mathf.Abs(_positionRect[2] - _positionRect[0]),
|
||||
// Mathf.Abs(_positionRect[3] - _positionRect[1]));
|
||||
private void textureToTargetPosTexture2DFlipped(Texture texture, Texture2D texture2D)
|
||||
{
|
||||
if (texture == null)
|
||||
throw new ArgumentNullException("texture");
|
||||
|
||||
// mat4Process = new Mat(mat4Display, roiRect);
|
||||
if (texture2D == null)
|
||||
throw new ArgumentNullException("texture2D");
|
||||
|
||||
if (PositionRect[2] - PositionRect[0] > texture.width || PositionRect[3] - PositionRect[1] > texture.height)
|
||||
{
|
||||
LogPrint.Error($"{PositionRect[0]},{PositionRect[1]},{texture.width}||{PositionRect[2]},{PositionRect[3]},{texture.height}");
|
||||
throw new ArgumentException("取值框超过目标像素最大范围");
|
||||
}
|
||||
|
||||
|
||||
// //Face Detect
|
||||
// panel.RefreshData(LandmarkDetect());
|
||||
RenderTexture prevRT = RenderTexture.active;
|
||||
RenderTexture tempRT = RenderTexture.GetTemporary(texture.width, texture.height, 0, RenderTextureFormat.ARGB32);
|
||||
Graphics.Blit(texture, tempRT, _flipImg);
|
||||
|
||||
RenderTexture.active = tempRT;
|
||||
texture2D.ReadPixels(new UnityEngine.Rect(PositionRect[0], PositionRect[1], PositionRect[2] - PositionRect[0], PositionRect[3] - PositionRect[1]), 0, 0, false);
|
||||
texture2D.Apply(false, false);
|
||||
RenderTexture.ReleaseTemporary(tempRT);
|
||||
|
||||
RenderTexture.active = prevRT;
|
||||
}
|
||||
|
||||
protected override void AnalyzingFace()
|
||||
{
|
||||
if (UVCManager.Instance == null || UVCManager.Instance.GetAttachedDevices() == null || UVCManager.Instance.GetAttachedDevices().Count <= 0)
|
||||
return;
|
||||
|
||||
if (image.gameObject.activeInHierarchy != GlobalData.Instance.ShowFaceDetectCameraCaptureImage)
|
||||
image.gameObject.SetActive(GlobalData.Instance.ShowFaceDetectCameraCaptureImage);
|
||||
|
||||
if (cutImage.gameObject.activeInHierarchy != GlobalData.Instance.ShowFaceDetectCameraCaptureImage)
|
||||
cutImage.gameObject.SetActive(GlobalData.Instance.ShowFaceDetectCameraCaptureImage);
|
||||
|
||||
|
||||
var devices = UVCManager.Instance.GetAttachedDevices();
|
||||
|
||||
// Imgproc.rectangle(mat4Display, roiRect, new Scalar(255, 0, 0), 2);
|
||||
textureToFlipTexture2D(devices.FirstOrDefault().previewTexture, _videoTexture);
|
||||
textureToTargetPosTexture2DFlipped(devices.FirstOrDefault().previewTexture, _cutTexture);
|
||||
Utils.texture2DToMat(_videoTexture, mat4Display);
|
||||
Utils.texture2DToMat(_cutTexture, mat4Process);
|
||||
|
||||
panel.RefreshData(LandmarkDetect());//Face Detect
|
||||
OpenCVCompact.Rect roiRect = new OpenCVCompact.Rect(PositionRect[0], PositionRect[1], PositionRect[2] - PositionRect[0], PositionRect[3] - PositionRect[1]);
|
||||
Imgproc.rectangle(mat4Display, roiRect, new Scalar(255, 0, 0), 2);
|
||||
//DebugPint();
|
||||
//}
|
||||
}
|
||||
|
||||
protected override void DebugPint()
|
||||
{
|
||||
//image.texture = videoTexture;
|
||||
if (mat4Process.rows() == _cutTexture.height)
|
||||
{
|
||||
LogPrint.Log("mat4Process.rows() " + mat4Process.rows() + " mat4Process.cols() " + mat4Process.cols());
|
||||
Mat cutMat = mat4Process.clone();
|
||||
|
||||
LogPrint.Log($"mat4Display type:{mat4Display.type()}.{CvType.CV_8UC3},{CvType.CV_8UC4}");
|
||||
|
||||
//Utils.matToTexture2D(cutMat, _cutTexture);
|
||||
Utils.matToTexture2D(cutMat, _cutTexture);
|
||||
}
|
||||
|
||||
if (mat4Display.rows() == videoTexture.height)
|
||||
if (mat4Display.rows() == _videoTexture.height)
|
||||
{
|
||||
//mat4Display.copyTo(mat4DisplayTexture);
|
||||
Mat display = mat4Display.clone();
|
||||
//Utils.matToTexture2D(display, videoTexture);
|
||||
Utils.matToTexture2D(display, _videoTexture);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void DestroyManager()
|
||||
protected override void Dispose()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#region UVC
|
||||
public UVCFilter[] UVCFilters;
|
||||
private Texture SavedTexture;
|
||||
|
||||
|
||||
public bool OnUVCAttachEvent(UVCManager manager, UVCDevice device)
|
||||
{
|
||||
var result = !device.IsRicoh || device.IsTHETA;
|
||||
|
@ -160,16 +202,7 @@ public class USBFaceDetectManager : FaceDetectManagerBase, IUVCDrawer
|
|||
|
||||
private void HandleOnStartPreview(Texture tex)
|
||||
{
|
||||
SavedTexture = videoTexture;
|
||||
|
||||
videoTexture = new Texture2D(UVCManager.Instance.DefaultWidth, UVCManager.Instance.DefaultHeight, TextureFormat.RGBA32, false);
|
||||
_positionRect = PictureUtility.GetPositionRect(UVCManager.Instance.DefaultWidth, UVCManager.Instance.DefaultHeight);
|
||||
_cutTexture = new Texture2D(_positionRect[2], _positionRect[3], TextureFormat.RGBA32, false);
|
||||
image.texture = videoTexture;
|
||||
cutImage.texture = _cutTexture;
|
||||
|
||||
//mat4Display = new Mat(UVCManager.Instance.DefaultWidth, UVCManager.Instance.DefaultHeight, CvType.CV_8UC4);
|
||||
mat4DisplayTexture = new Mat(UVCManager.Instance.DefaultWidth, UVCManager.Instance.DefaultHeight, CvType.CV_8UC4);
|
||||
|
||||
LogPrint.Log("Screen.width " + Screen.width + " Screen.height " + Screen.height + " Screen.orientation " + Screen.orientation);
|
||||
|
||||
|
@ -184,7 +217,6 @@ public class USBFaceDetectManager : FaceDetectManagerBase, IUVCDrawer
|
|||
{
|
||||
try
|
||||
{
|
||||
transform.GetComponent<Renderer>().material.mainTexture = SavedTexture;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
@ -10,7 +10,7 @@ public class WebCamFaceDetectManager : FaceDetectManagerBase
|
|||
public RawImage cutImage;
|
||||
bool webCamReady = false;
|
||||
private int[] _positionRect;
|
||||
private Texture2D _cutTexture;
|
||||
//private Texture2D _cutTexture;
|
||||
|
||||
//Image Capture
|
||||
OpenCVCompact.WebCamTextureToMatHelper _webCamTextureToMatHelper;
|
||||
|
@ -26,7 +26,7 @@ public class WebCamFaceDetectManager : FaceDetectManagerBase
|
|||
return _webCamTextureToMatHelper.GetMat();
|
||||
}
|
||||
|
||||
protected override void DestroyManager()
|
||||
protected override void Dispose()
|
||||
{
|
||||
_webCamTextureToMatHelper.Dispose();
|
||||
}
|
||||
|
@ -34,10 +34,10 @@ public class WebCamFaceDetectManager : FaceDetectManagerBase
|
|||
{
|
||||
if (webCamReady == true)
|
||||
{
|
||||
if (mat4Display.rows() == videoTexture.height)
|
||||
if (mat4Display.rows() == _videoTexture.height)
|
||||
{
|
||||
mat4Display.copyTo(mat4DisplayTexture);
|
||||
Utils.matToTexture2D(mat4DisplayTexture, videoTexture);
|
||||
Utils.matToTexture2D(mat4DisplayTexture, _videoTexture);
|
||||
|
||||
}
|
||||
if (mat4Process.rows() == cutImage.texture.height)
|
||||
|
@ -53,9 +53,9 @@ public class WebCamFaceDetectManager : FaceDetectManagerBase
|
|||
{
|
||||
Mat webCamTextureMat = _webCamTextureToMatHelper.GetMat();
|
||||
|
||||
videoTexture = new Texture2D(webCamTextureMat.cols(), webCamTextureMat.rows(), TextureFormat.RGBA32, false);
|
||||
_videoTexture = new Texture2D(webCamTextureMat.cols(), webCamTextureMat.rows(), TextureFormat.RGBA32, false);
|
||||
//gameObject.GetComponent<Renderer>().material.mainTexture = videoTexture;
|
||||
image.texture = videoTexture;
|
||||
image.texture = _videoTexture;
|
||||
_positionRect = PictureUtility.GetPositionRect(webCamTextureMat.cols(), webCamTextureMat.rows());
|
||||
_cutTexture = new Texture2D(_positionRect[2], _positionRect[3], TextureFormat.RGBA32, false);
|
||||
cutImage.texture = _cutTexture;
|
||||
|
|
|
@ -74,7 +74,11 @@ public class FaceDetectUI : UIPanelBase
|
|||
}
|
||||
|
||||
AddFixObj("Heart rate"); //Heart rate
|
||||
AddFixObj("Blood oxygen"); //Blood oxygen
|
||||
AddFixObj("Heart rate variability"); //Blood oxygen
|
||||
AddFixObj("Average heart rate"); //Blood oxygen
|
||||
AddFixObj("Max heart rate"); //Blood oxygen
|
||||
AddFixObj("Blood Oxygen saturation"); //Blood oxygen
|
||||
AddFixObj("Respiration rate"); //Blood oxygen
|
||||
}
|
||||
|
||||
private void AddFixObj(string title)
|
||||
|
|
|
@ -221,4 +221,10 @@ public class GuideUI : UIPanelBase
|
|||
manager.IsOnCamCapture = true;
|
||||
CVEstimator.Instance.StartEstimation();
|
||||
}
|
||||
|
||||
public void OnBackClicked()
|
||||
{
|
||||
UIManager.Instance.CloseCurrent();
|
||||
LoadingManager.Instance.Load("Boot");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue