Introduction
I posted an article DirectX Video Stream and Frame Capture a few months before, and I got a few feedbacks. Please refer to the article for more information. As a response to many requests, I added again some examples on how to use the video capture library.
In this example, I added a sample code to change the video format from NTSC to PAL and vice versa. A code piece to change the brightness, and the old, grasp a frame from video and finally save to a video file.
Actually this example is prepared in a rush, so I would hope anyone to send me any comments so that I can update it again. Thanks.
Using the code
To change to PAL_B standard:
private void button2_Click(object sender, System.EventArgs e)
{
capture.VideoFormat= DShowNET.AnalogVideoStandard.PAL_B;
}
To set brightness:
void button2_Click_1(object sender, System.EventArgs e)
{
VideoProcAmp_prop Brightness;
Brightness=
capture.Get_VideoProcAmpProp(
DShowNET.VideoProcAmpProperty.VideoProcAmp_Brightness);
capture.Set_VideoProcAmpProp(
DShowNET.VideoProcAmpProperty.VideoProcAmp_Brightness,5106);
}
To capture a frame:
void button1_Click(object sender, System.EventArgs e)
{
capture.FrameEvent2 += new Capture.HeFrame(CaptureDone);
capture.GrapImg();
}
Points of Interest
Thanks for everyone who gave me suggestions for adding these functions to the code. I am sorry that this is not a robust sample, I created it just for demo purpose. Please tell me if you have any questions and suggestions.