Final
This commit is contained in:
parent
f4e168dce8
commit
716b28b3e5
|
@ -8,7 +8,7 @@ Material:
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name: Black
|
m_Name: Black
|
||||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
m_Shader: {fileID: 10750, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
m_ShaderKeywords: _EMISSION
|
m_ShaderKeywords: _EMISSION
|
||||||
m_LightmapFlags: 1
|
m_LightmapFlags: 1
|
||||||
m_EnableInstancingVariants: 0
|
m_EnableInstancingVariants: 0
|
||||||
|
|
|
@ -156,7 +156,7 @@ MonoBehaviour:
|
||||||
fy: 650
|
fy: 650
|
||||||
cx: 320
|
cx: 320
|
||||||
cy: 240
|
cy: 240
|
||||||
DarknessThreshold: 280
|
DarknessThreshold: 400
|
||||||
--- !u!33 &12666034
|
--- !u!33 &12666034
|
||||||
MeshFilter:
|
MeshFilter:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -164,7 +164,7 @@ MeshFilter:
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 12666032}
|
m_GameObject: {fileID: 12666032}
|
||||||
m_Mesh: {fileID: 1198122122}
|
m_Mesh: {fileID: 940414303}
|
||||||
--- !u!23 &12666035
|
--- !u!23 &12666035
|
||||||
MeshRenderer:
|
MeshRenderer:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -182,7 +182,7 @@ MeshRenderer:
|
||||||
m_RenderingLayerMask: 1
|
m_RenderingLayerMask: 1
|
||||||
m_RendererPriority: 0
|
m_RendererPriority: 0
|
||||||
m_Materials:
|
m_Materials:
|
||||||
- {fileID: 1272638553}
|
- {fileID: 1166857367}
|
||||||
m_StaticBatchInfo:
|
m_StaticBatchInfo:
|
||||||
firstSubMesh: 0
|
firstSubMesh: 0
|
||||||
subMeshCount: 0
|
subMeshCount: 0
|
||||||
|
@ -517,13 +517,13 @@ Transform:
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||||
--- !u!43 &1198122122
|
--- !u!43 &940414303
|
||||||
Mesh:
|
Mesh:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
m_PrefabInstance: {fileID: 0}
|
m_PrefabInstance: {fileID: 0}
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name: ImageTargetMesh21968
|
m_Name: ImageTargetMesh7576
|
||||||
serializedVersion: 9
|
serializedVersion: 9
|
||||||
m_SubMeshes:
|
m_SubMeshes:
|
||||||
- serializedVersion: 2
|
- serializedVersion: 2
|
||||||
|
@ -677,7 +677,7 @@ Mesh:
|
||||||
offset: 0
|
offset: 0
|
||||||
size: 0
|
size: 0
|
||||||
path:
|
path:
|
||||||
--- !u!21 &1272638553
|
--- !u!21 &1166857367
|
||||||
Material:
|
Material:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -686,7 +686,7 @@ Material:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_Name: 'finger_drawing_templateMaterial
|
m_Name: 'finger_drawing_templateMaterial
|
||||||
|
|
||||||
21980'
|
7588'
|
||||||
m_Shader: {fileID: 4800000, guid: bd60f254bfe034e099e9f70c306d67e7, type: 3}
|
m_Shader: {fileID: 4800000, guid: bd60f254bfe034e099e9f70c306d67e7, type: 3}
|
||||||
m_ShaderKeywords:
|
m_ShaderKeywords:
|
||||||
m_LightmapFlags: 5
|
m_LightmapFlags: 5
|
||||||
|
@ -699,7 +699,7 @@ Material:
|
||||||
serializedVersion: 3
|
serializedVersion: 3
|
||||||
m_TexEnvs:
|
m_TexEnvs:
|
||||||
- _MainTex:
|
- _MainTex:
|
||||||
m_Texture: {fileID: 2800000, guid: 362f2e29ecb348259b1cb6c2d5535bea, type: 3}
|
m_Texture: {fileID: 2800000, guid: 5b01e8d346ff4a5482324fe1d8c6c674, type: 3}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
m_Floats: []
|
m_Floats: []
|
||||||
|
@ -1115,7 +1115,7 @@ MonoBehaviour:
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
mWorldCenterMode: 0
|
mWorldCenterMode: 0
|
||||||
mWorldCenter: {fileID: 12666038}
|
mWorldCenter: {fileID: 0}
|
||||||
--- !u!81 &2010761165
|
--- !u!81 &2010761165
|
||||||
AudioListener:
|
AudioListener:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -64,7 +64,7 @@ MonoBehaviour:
|
||||||
autoInitTracker: 0
|
autoInitTracker: 0
|
||||||
autoStartTracker: 0
|
autoStartTracker: 0
|
||||||
webcam:
|
webcam:
|
||||||
deviceNameSetInEditor: 'USB Camera #2'
|
deviceNameSetInEditor: 'USB Camera #5'
|
||||||
flipHorizontally: 0
|
flipHorizontally: 0
|
||||||
turnOffWebCam: 0
|
turnOffWebCam: 0
|
||||||
renderTextureLayer: 30
|
renderTextureLayer: 30
|
||||||
|
|
|
@ -6,8 +6,6 @@ using Vuforia;
|
||||||
public class change_everything : MonoBehaviour
|
public class change_everything : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
private TextMesh colorQuad;
|
|
||||||
|
|
||||||
private GameObject color;
|
private GameObject color;
|
||||||
private GameObject brightness;
|
private GameObject brightness;
|
||||||
private Renderer rend;
|
private Renderer rend;
|
||||||
|
@ -31,3 +29,4 @@ public class change_everything : MonoBehaviour
|
||||||
rend.material.color = Color.HSVToRGB(color_rot, 1, bright_rot);
|
rend.material.color = Color.HSVToRGB(color_rot, 1, bright_rot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,18 +154,15 @@ public class homo_draw : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Mat homo = Calib3d.findHomography(imagePoints, dstPoints);
|
Mat homo = Calib3d.findHomography(imagePoints, dstPoints);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Mat output = camImgCopy.clone();
|
Mat output = camImgCopy.clone();
|
||||||
//Mat outputSkullMat = skullTextureMat.clone();
|
//Mat outputSkullMat = skullTextureMat.clone();
|
||||||
|
|
||||||
Imgproc.warpPerspective(camImageMat, output, homo, output.size());
|
Imgproc.warpPerspective(camImageMat, output, homo, output.size());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Imgproc.circle(output, new Point(45, 390), 5, new Scalar(255, 0, 0, 255));
|
Imgproc.circle(output, new Point(45, 390), 5, new Scalar(255, 0, 0, 255));
|
||||||
|
|
||||||
|
|
||||||
|
@ -179,8 +176,8 @@ public class homo_draw : MonoBehaviour
|
||||||
|
|
||||||
|
|
||||||
Mat yetAnotherClone = camImgCopy.clone();
|
Mat yetAnotherClone = camImgCopy.clone();
|
||||||
|
print(r + g + b);
|
||||||
|
|
||||||
if (r+g+b < DarknessThreshold)
|
if (r+g+b < DarknessThreshold)
|
||||||
{
|
{
|
||||||
print("finger lol");
|
print("finger lol");
|
||||||
|
@ -190,9 +187,7 @@ public class homo_draw : MonoBehaviour
|
||||||
Imgproc.cvtColor(output, lelImg, Imgproc.COLOR_BGR2HSV);
|
Imgproc.cvtColor(output, lelImg, Imgproc.COLOR_BGR2HSV);
|
||||||
|
|
||||||
var newOutput = output.clone();
|
var newOutput = output.clone();
|
||||||
Core.inRange(lelImg, new Scalar(r - 30, g - 30, b - 30), new Scalar(r + 30, g + 30, b + 30), newOutput);
|
MatDisplay.DisplayMat(newOutput, MatDisplaySettings.BOTTOM_LEFT);
|
||||||
|
|
||||||
|
|
||||||
var nicePoint = LocateFinger(newOutput);
|
var nicePoint = LocateFinger(newOutput);
|
||||||
if (nicePoint != null)
|
if (nicePoint != null)
|
||||||
{
|
{
|
||||||
|
@ -201,7 +196,6 @@ public class homo_draw : MonoBehaviour
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
MatDisplay.MatToTexture(newOutput, ref planeOutText);
|
MatDisplay.MatToTexture(newOutput, ref planeOutText);
|
||||||
|
|
||||||
planeRend.sharedMaterial.mainTexture = planeOutText;
|
planeRend.sharedMaterial.mainTexture = planeOutText;
|
||||||
|
@ -215,15 +209,10 @@ public class homo_draw : MonoBehaviour
|
||||||
Core.addWeighted(camImageMat, 0.95f, circleClone, 0.7f, 0.0f, yetAnotherClone);
|
Core.addWeighted(camImageMat, 0.95f, circleClone, 0.7f, 0.0f, yetAnotherClone);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Display the Mat that includes video feed and debug points
|
//Display the Mat that includes video feed and debug points
|
||||||
MatDisplay.DisplayMat(yetAnotherClone, MatDisplaySettings.FULL_BACKGROUND);
|
MatDisplay.DisplayMat(yetAnotherClone, MatDisplaySettings.FULL_BACKGROUND);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
imagePoints.Dispose();
|
imagePoints.Dispose();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -238,11 +227,8 @@ public class homo_draw : MonoBehaviour
|
||||||
return new Point(j, i);
|
return new Point(j, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,5 +73,5 @@ Material:
|
||||||
- _UVSec: 0
|
- _UVSec: 0
|
||||||
- _ZWrite: 1
|
- _ZWrite: 1
|
||||||
m_Colors:
|
m_Colors:
|
||||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
- _Color: {r: 1, g: 0, b: 0, a: 1}
|
||||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class python_test : MonoBehaviour
|
||||||
//sr = new StreamReader(process.StandardOutput.BaseStream, System.Text.Encoding.Default, true, 1024, true);
|
//sr = new StreamReader(process.StandardOutput.BaseStream, System.Text.Encoding.Default, true, 1024, true);
|
||||||
|
|
||||||
|
|
||||||
_webcamtex = new WebCamTexture("HD Pro Webcam C920 #3", 1920, 1080);
|
_webcamtex = new WebCamTexture("HD Pro Webcam C920", 1920, 1080);
|
||||||
_webcamtex.Play();
|
_webcamtex.Play();
|
||||||
//DoStuff();
|
//DoStuff();
|
||||||
baseObject.SetActive(false);
|
baseObject.SetActive(false);
|
||||||
|
@ -180,9 +180,9 @@ public class python_test : MonoBehaviour
|
||||||
GameObject fbx = intToPiece[intPiece];
|
GameObject fbx = intToPiece[intPiece];
|
||||||
GameObject piece = Instantiate(fbx);
|
GameObject piece = Instantiate(fbx);
|
||||||
piece.transform.localScale = baseObject.transform.localScale;
|
piece.transform.localScale = baseObject.transform.localScale;
|
||||||
piece.transform.position = new Vector3((float)(bp.x + i * 0.04),
|
piece.transform.position = new Vector3((float)(bp.x + i * 0.043),
|
||||||
bp.y,
|
bp.y,
|
||||||
(float)(bp.z + j * 0.04));
|
(float)(bp.z + j * 0.040));
|
||||||
pieces.Add(piece);
|
pieces.Add(piece);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4
AR-3/Assets/tester.py
Normal file
4
AR-3/Assets/tester.py
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
import time
|
||||||
|
|
||||||
|
time.sleep(5)
|
||||||
|
print("lleelel")
|
|
@ -1 +1 @@
|
||||||
m_EditorVersion: 2018.3.5f1
|
m_EditorVersion: 2018.3.12f1
|
||||||
|
|
Loading…
Reference in New Issue
Block a user