Home > Net >  C # directshow for image acquisition, set video playback window prompt conversion specified is inval
C # directshow for image acquisition, set video playback window prompt conversion specified is inval

Time:05-22

Directshow capture image, set video playback window, prompted to specify the transformation of the invalid, specific tip code:
M_VideoWindow=m_FilterManager as IVideoWindow;//set the broadcast form
M_VideoWindow. Owner=(int) pnl1. Handle; Invalid (conversion)
M_VideoWindow. WindowStyle=0 x40000000; Invalid (conversion)

CodePudding user response:

///& lt; Summary>
///a list of categories to see AForge. Video. DirectShow. FilterCategory,
///sample usage:
///list videoDevices=new FilterInfoCollection (FilterCategory. VideoInputDevice video equipment);
///list device (video equipment of FilterInfo)
///& lt;/summary>
//definition to collect information about the filter object
FilterInfoCollection videoDevices;
FilterInfoCollection videoDevices2;
///& lt; Summary>
///the video source from the local video capture device for video data,
///as a USB webcam (or inside), frame catcher, capture board - anything
///support DirectShow interface, for a device with the shutter button
///or support external software trigger, class is also allowed to do a snapshot,
///video size and the size of a snapshot can be configured,
///& lt;/summary>
//definition video source grab
VideoCaptureDevice videoSource;
//define the subscript
Public int selectedDeviceIndex=0;
Void the open ()
{
//instantiate the filter class
//FilterCategory VideoInputDevice video input device categories,
VideoDevices=new FilterInfoCollection (FilterCategory VideoInputDevice);
VideoSource=new VideoCaptureDevice (videoDevices [selectedDeviceIndex] MonikerString);//connect camera
//video resolution Settings
//this attribute lets you set a support video resolution
//camera, use AForge. Video. DirectShow. VideoCaptureDevice. VideoCapabilities
//attributes to support video resolution list,
//must be set before the camera began to take effect the properties,
//attribute defaults to null, this means that the default video resolution
//to use,
VideoSource. VideoResolution=videoSource. VideoCapabilities [selectedDeviceIndex];
//instantiate the good videosource class assignment to VideoSourcePlayer controls videosource attribute
VideoSourcePlayer1. VideoSource=VideoSource;

//start VideoSourcePlayer controls
VideoSourcePlayer1. Start ();


}

CodePudding user response:

What type of acquisition card, aforge.net support I need as a pacs system general image acquisition
  •  Tags:  
  • C#
  • Related