Lecture 7th: WebCam applications

Source: Internet
Author: User
Tags visual studio 2010

2010.11.7 su Peng

Content

-Connecting WebCam objects in Silverlight

-Use a WebCam object in Silverlight

-Save WebCam in Silverlight

 

Prerequisites

-Install Visual Studio 2010

-Install Expression Blend4

-Install Silverlight tools for Visual Studio 2010

-Understand C #

 

Start WebCam

-CaptureSource class

-CaptureDeviceConfiguration

-AllowedDeviceAccess

-RequestDeviceAccess

-VideoBrush object

 

Demo

-Use of WebCam

Enable OOB Application

DragMove indicates dragging and dropping the form, and Close indicates closing the form.

AllowedDeviceAccess indicates that video objects are allowed to be accessed. RequestDeviceAccess indicates that the camera is installed and occupied by other programs.

 

-CaptureImageAsync

-WriteableBitmap object

 

Demo

-Example of a WebCam object

Use WriteableBitmap to draw the parameters in the event.

Demo is from Yang Guo under the bodhi tree. Canvas is taken out as WriteableBitmap. Note that we can not only take out the video source Brush, but also use WriteableBitmap to take out the style of any Xaml object theoretically, save as an Image object.

Run the program and you will be prompted whether to use the camera device. This prompt is not provided in the example just now because the previous example is an OOB application, which has been installed on the desktop and checked with the confidence permission. Therefore, this question is not asked.

The original video uses the first method, which does not intercept text, but uses bitmap to intercept the Canvas, so the text will also be truncated.

 

Summary

-Connecting WebCam objects in Silverlight

-Use a WebCam object in Silverlight

-Save WebCam in Silverlight

2010.11.25

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.