/// <summary> /// Sends images to the server /// Encodes image to jpg and then sends it /// Updates display to show progress /// </summary> private void ExitSendImages() { Mat imOut = Mesh3DController.AllData[track]; Texture2D result = Unity.MatToTexture(imOut); result.Apply(); byte[] im = result.EncodeToJPG(100); //AllBytes.Add(im); ConExit.SendIM(im); im = null; Debug.Log(content); Destroy(result); }
// Start is called before the first frame update void Start() { //Update screen to reflect points to be sent content = "Sending " + Mesh3DController.AllData.Count + " Images"; Debug.Log(content); Text_Status.text = content; //Create connection to Server and test it ConExit.ConnectOut(); ConExit.SendArrayCount(Mesh3DController.AllData.Count); content = "Sending " + Mesh3DController.AllData.Count + "Images"; }