Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


video stream from windows usb device is upside down using aforge using -'c#,windows-7-x64,aforge'


video stream from windows usb device is upside down using aforge  using -'c#,windows-7-x64,aforge'

I am using AForge.net version 2.25 to display video feed from a USB digital microscope, Celestron 44302-B.  Using the software for the microscope, video displayed properly on a Windows 7 x64 workstation.  

Code is based on sample application with Aforge.  The result is shown below where the video feed in  AForge.Controls.videoSourcePlayer is upside down.

I can easily flip a single bitmap (snapshot taken from the video stream) but I want to allow the user to orient and focus the microscope while the video feed is connected and running.

using AForge.Controls
using AForge.Video;
using AForge.Video.DirectShow;

void connectButton_Click(object sender, EventArgs e)
{
      VideoCaptureDevice _videoDevice = new VideoCaptureDevice(_videoDevices[devicesCombo.SelectedIndex].MonikerString);

        if (_videoDevice != null)
        {
            if ((_videoCapabilities != null) && (_videoCapabilities.Length != 0))
            {
                _videoDevice.VideoResolution = _videoCapabilities[videoResolutionsCombo.SelectedIndex];
            }

            if ((_snapshotCapabilities != null) && (_snapshotCapabilities.Length != 0))
            {
                _videoDevice.ProvideSnapshots = true;
                _videoDevice.SnapshotResolution = _snapshotCapabilities[snapshotResolutionsCombo.SelectedIndex];
                _videoDevice.SnapshotFrame += videoDevice_SnapshotFrame;

            }

           EnableConnectionControls(false);
           videoSourcePlayer.VideoSource = _videoDevice;              
           videoSourcePlayer.Start();

        }

}




Test using microscope

    

asked Sep 7, 2015 by rajesh
0 votes
18 views



Related Hot Questions



Government Jobs Opening


...