Unity components that rely on 3D points now ignore tracking data for frames with high 3D fitting error.
This commit is contained in:
parent
ea735ffdde
commit
cf49ba5468
6 changed files with 13 additions and 6 deletions
|
|
@ -23,6 +23,9 @@ public class OpenSee : MonoBehaviour {
|
|||
public int receivedPackets = 0;
|
||||
[Tooltip("This contains the actual tracking data")]
|
||||
public OpenSeeData[] trackingData = null;
|
||||
|
||||
[HideInInspector]
|
||||
public float maxFit3DError = 100f;
|
||||
|
||||
[System.Serializable]
|
||||
public class OpenSeeData {
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ public class OpenSeeIKTarget : MonoBehaviour
|
|||
|
||||
void RunUpdate() {
|
||||
var openSeeData = openSee.GetOpenSeeData(faceId);
|
||||
if (openSeeData == null)
|
||||
if (openSeeData == null || openSeeData.fit3DError > openSee.maxFit3DError)
|
||||
return;
|
||||
if (openSeeData.time > updated) {
|
||||
updated = openSeeData.time;
|
||||
|
|
|
|||
|
|
@ -134,8 +134,6 @@ public class OpenSeeLauncher : MonoBehaviour {
|
|||
}
|
||||
|
||||
public string[] ListCameras() {
|
||||
if (!CheckSetup(false))
|
||||
return null;
|
||||
if (usePinvoke || usePinvokeListCameras) {
|
||||
if (Environment.Is64BitProcess)
|
||||
return EscapiListCameras_x64();
|
||||
|
|
@ -143,6 +141,9 @@ public class OpenSeeLauncher : MonoBehaviour {
|
|||
return EscapiListCameras_x86();
|
||||
}
|
||||
|
||||
if (!CheckSetup(false))
|
||||
return null;
|
||||
|
||||
StringBuilder stringBuilder;
|
||||
ProcessStartInfo processStartInfo;
|
||||
Process process;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class OpenSeeShowPoints : MonoBehaviour {
|
|||
if (openSeeData == null || openSeeData.Length < 1)
|
||||
return;*/
|
||||
openSeeData = openSee.GetOpenSeeData(faceId);
|
||||
if (openSeeData == null)
|
||||
if (openSeeData == null || (show3DPoints && openSeeData.fit3DError > openSee.maxFit3DError))
|
||||
return;
|
||||
if (openSeeData.time > updated) {
|
||||
updated = openSeeData.time;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue