Click here to Skip to main content
15,909,498 members

Comments by tomo5996 (Top 1 by date)

tomo5996 25-Jul-16 4:38am View    
Thank you for your response.
I tried other resolution with the external one. When I set 3200x2400, it returned 1600x1200 picture.And when 64x48 ,returned 160x120. The code using VideoInputSharp is like this.

In external cam, when (w,h) = (3200,2400), SetupDevice() success and (actualW, axtualH) returned (1600,1200).
In internal cam, when (w,h) = (320,240),(800,600) etc, SetupDevice() fails.

using (VideoInput vi = new VideoInput())
{
vi.SetIdealFramerate(indexCamera, frameRate);

if (vi.SetupDevice(indexCamera, w, h))
{
int actualW = vi.GetWidth(indexCamera);
int axtualH = vi.GetHeight(indexCamera);
byte[] buffer = new byte[vi.GetSize(indexCamera)];

if (vi.GetPixels(indexCamera, buffer))
{
}
}
}


When I use an application "Mam WebCam Photo", the internal one can return 1280x960 picture.
But I can't get it with C# libralies.