I am currently developing an AR application and I need to get the color of the object from the camera. I need to get the webcamtexture of the camera but I don't know how because Kudan AR has it's own camera. Do you have any idea how to do this? Big thanks!
Asked
Active
Viewed 366 times
1 Answers
0
You need to create a webcam texture and play it then you can create a texture2D and getpixels of the webcame textures to get your colors.
WebCamTexture cam;
// Open the Camera on the desired device / pc cam
cam = new WebCamTexture();
cam.Play();
currentTexture =new Texture2D(cam.width, cam.height, TextureFormat.RGB24, false);
to get the webcam pixels you can do something like
cam.GetPixels();

David
- 361
- 2
- 3
- 16