I'm using VideoCaptureDevice for showing live stream video with resolution 1280 × 720 landscape , i need to change camera to portrait orientation to be vertical without losing quality ?
How can i do this ?
here is my code
private void StartCapture()
{
try
{
FinalFrame = new VideoCaptureDevice(CaptureDevice[SharedData.SelectedCamera].MonikerString);// specified web cam and its filter moniker string
int ind = 0;
int lastVal = 0;
for (int i = 0; i < FinalFrame.VideoCapabilities.Length; i++)
{
Size frame = FinalFrame.VideoCapabilities[i].FrameSize;
if (frame.Width > lastVal)
{
ind = i;
lastVal = frame.Width;
}
}
FinalFrame.VideoResolution = FinalFrame.VideoCapabilities[ind];
FinalFrame.NewFrame += new NewFrameEventHandler(FinalFrame_NewFrame);// click button event is fired,
FinalFrame.Start();
}
catch { }
}