2011-01-31 89 views
1

我已經編寫了一個在Silverlight 4中使用攝像頭的程序。唯一的問題是白天我的攝像頭被大量曝光過度。有沒有辦法調整曝光?是否可以使用Silverlight 4調整攝像頭的曝光度?

以下是我的一些代碼,以防萬一您想了解我如何使用網絡攝像頭的一般想法。

 // Initialize the webcam 
     captureSource = new CaptureSource(); 
     captureSource.VideoCaptureDevice = CaptureDeviceConfiguration.GetDefaultVideoCaptureDevice(); 

     // Fill the Viewport Rectangle with the VideoBrush 
     var vidBrush = new VideoBrush(); 
     vidBrush.SetSource(captureSource); 

     //ViewRectangle.Fill = new SolidColorBrush(Colors.Cyan); 
     ViewRectangle.Fill = vidBrush; 

     // Wire the VideoSink and the webcam together 
     sink = new CaptureHandlingVideoSink { CaptureSource = captureSource }; 
     sink.Process += Process; 

謝謝!

回答

0

不幸的是,這是不可能的。您可以檢查攝像頭的驅動程序/設置。或者您可能想要降低拍攝圖像的亮度作爲後期處理步驟。這在一定範圍內起作用。當然,完全曝光過度的圖像無法更正。

您可以在本文中找到一個亮度和對比度修正算法,我寫: http://channel9.msdn.com/coding4fun/articles/PicFx--Windows-Phone-Picture-Effects-Application--Part-1

+0

謝謝Rene ...在我發佈這個問題之前,我正在忙着閱讀你的關於實時人臉檢測的文章。我剛纔發現你回答這個問題有點奇怪......我的意思是這個星球上有六十億人,對吧?!?我想只有少數人可以在Silverlight中使用網絡攝像頭。無論如何...回去工作。 – 2011-01-31 14:10:05

相關問題