Hi,
i'm currently working on a small application that will do basically the same as the Snapshot Maker sample application provided by AForge but it will be integrated into a larger application at a later point.
I'm using vb.net in Visual Basic Express 2010 and (as is probably obvious from that) I'm not an actual programmer, but I'm very good at googling stuff and I know my way around computers a bit...and it does seem to work
out surprisingly well so far, but now I have really hit a bit of a roadblock and need help from others with more knowledge and experience than me:
The camera I use is a Logitech C920 USB webcam which natively has FullHD 1080p resolution and the VideoSourcePlayer will output a crystal clear image in what looks very much to be FullHD resolution (that is if I run it in full screen of course). But when I try to get the current video frame, the saved file is always 640x480px.
Here's what I think the relevant piece of code is:
VideoSourcePlayer.GetCurrentVideoFrame.Save(System.Windows.Forms.Application.StartupPath & "\" & strFilename, System.Drawing.Imaging.ImageFormat.Jpeg)
label.Text = "Image Saved : " & strFilename
I guess the rest of the code is probably irrelevant since it's for the most part pretty standard and what everyone else is using and has been posted a million times elsewhere. But I can provide all the code if that is needed for some reason...
I have tried using the old desired frame size method which is no longer working of course and I have tried using videocapabilities unsuccessfully for unknown reasons (I adapted pieces of code from several other people that got it working but my combo box stays empty). But I would expect that to likely not be the reason.
From what I could find out, the Logitech C920 apparently doesn't support frame grabbing and the Snapshot Maker sample application will also show "not supported" under snapshot resolution. Taking stills, of course, works with the Logitech software, but the preview window there is so small it's practically unuseable and can't be rescaled, hence all my efforts trying to get AForge to do the same thing only with a larger preview...
Now my thoughts were that if AForge is able to pull proper resolution video from this webcam in livestream it theoretically shouldn't be a problem for AForge to grab a frame off that HD livestream and just save it in that resolution. But it seems like the webcam's driver somehow knows that AForge is grabbing a frame and maliciousy sabotages those efforts. Why it should do that is another mystery but there MUST be some way to get around that either by preventing the driver from noticing the framegrab or by cloning the HD livestream to a sandbox type of environment where it can get grabbed uninterrupted or simply by using some other method I haven't heard of yet.
But the most likely scenario is probably still that I'm just doing something wrong and a few lines of properly written code will fix the issue...
Is anybody able and willing to help me solve the issue? Any help would be greatly appreciated!