public void ShowPointCloud(byte[] mycolorInfo, ushort[] depthInfo, int width, int height) { List <Vector3d> myVectors = Vertices.ConvertToVector3DList_FromArray(depthInfo, width, height); List <float[]> myColors = PointCloudUtils.CreateColorInfo(mycolorInfo, depthInfo, width, height); this.lastPointCloud = myVectors; this.lastColors = myColors; this.OpenGLControl.ShowPointCloud("Color Point Cloud", myVectors, myColors); }
public void TransformPointCloud_SaveObjFile() { //open a file DepthMetaData DepthMetaData = new DepthMetaData(); byte[] colorInfo = null; DepthMetaData.ReadDepthWithColor_OBJ(path, "KinectFace1.obj", ref DepthMetaData.FrameData, ref colorInfo); List <Vector3d> myVectors = Vertices.ConvertToVector3DList_FromArray(DepthMetaData.FrameData, DepthMetaData.XResDefault, DepthMetaData.YResDefault); List <float[]> myColorsFloats = PointCloudUtils.CreateColorInfo(colorInfo, DepthMetaData.FrameData, DepthMetaData.XResDefault, DepthMetaData.YResDefault); List <Vertex> myVertexList = Model3D.CreateVertexList(myVectors, myColorsFloats); VertexUtils.ScaleByFactor(myVertexList, 0.9); VertexUtils.RotateVertices30Degrees(myVertexList); VertexUtils.TranslateVertices(myVertexList, 10, 3, 5); Model3D.Save_ListVertices_Obj(myVertexList, path, "transformed.obj"); }
public void ShowPointCloud(ushort[] depthInfo, int width, int height) { List <Vector3d> myVectors = Vertices.ConvertToVector3DList_FromArray(depthInfo, width, height); this.OpenGLControl.ShowPointCloud("Depth Point Cloud", myVectors, null); }