Posts

Showing posts with the label emgucv

Emgucv Image to LoadRawTextureData

Emgucv Image to LoadRawTextureData I need help for converting Emgucv videoCapture image to LoadRawTextureData of unity to display images/videos in Unity3d 2018.1. I am able to display images but it show strange lines and distorted image effects or some kind of shuttering/scattering. I read the question in this post and apply the solution but the problem is not solved Convert Mat to Texture2d(Stackoverflow) I think the Colorspace of Emgucv image did not matched with the texture2d. Code: void Start () { vc = new VideoCapture(0); vc.FlipVertical = true; //The image I am getting from webcam is flipped myMaterial = GetComponent<Renderer>().material; frameHeight = (int)vc.GetCaptureProperty(Emgu.CV.CvEnum.CapProp.FrameHeight); frameWidth = (int)vc.GetCaptureProperty(Emgu.CV.CvEnum.CapProp.FrameWidth); camera = new Texture2D(frameHeight,frameWidth, TextureFormat.RGB24, false,false); } I am getting images in this part of code and converting the color space as p...