Camera & Sensors in Windows Phone Application

Preview:

DESCRIPTION

Session Code. Camera & Sensors in Windows Phone Application. Larry Lieberman Product Mgr , Windows Phone Developer Microsoft Corporation. Agenda. What sensors are available, and how do I use them? How do I access the camera to address various scenarios. - PowerPoint PPT Presentation

Citation preview

Session Code

Camera & Sensors in Windows Phone Application

Larry LiebermanProduct Mgr, Windows Phone DeveloperMicrosoft Corporation

AgendaWhat sensors are available, and how do I use them?How do I access the camera to address various scenarios

New scenarios enabled in Windows Phone 7.5

Augmented realityBarcode scanning appsCustom camerasImage processing

What hardware sensors are supported?

Accelerometer

Compass

Gyro

New for 7.5

Motion sensor

Motion Sensor

[cos γ .cos α −cos β . sin α+sin β . sin γ .cosα sin β .sin α+cos β . sin γ .cos α

cos γ . sin α cos β .cos α+sin β . sin γ . sin α − sin β .cos α+cos β . sin γ .sin α

− sin γ sin β .cos γ cos β .sin γ ]All the sensors + a bunch of math!

Use this sensor whenever available

Why not always use motion sensor?Motion.IsSupported is false

Motion will work even without gyroscopeWhen you want data specific to the sensor reading

Accelerometer – acceleration (in g’s)Gyro –rotational velocity (rad/s)Compass – heading (degrees)

Advanced UsagesCustom motion algorithmsGestures?

Two Ways to Access the CameraPhotoCamera Class:

New ISV Managed API developed for WPSilverlight 4 WebCam API

Ported SL4 API with added functionality and perf

Scenarios Dictate Which Camera API Choice

Silverlight 4 WebCamReuse SL4 WebCam KnowledgeEasily Target Desktop and PhoneRecord Video and Audio into a File

PhotoCameraTake High Quality PhotosHandling Hardware ButtonHandling Flash mode and Focus

Camera “Good to Know”Output for Video recorded is MP4Always check for device specific support for Flash modeUse Y or YUV format for Processing Samples

Hardware Availability and Debugging

Not all phones will have same hardware configurationGyro and Compass optional (but if Gyro present, Compass present)Motion Sensor quality based on sensors present

Accelerometer, Gyro, and Compass - best qualityAccelerometer and Compass – good for AR scenarios(reduced quality without Gyro)

Physical hardware required for most debugging scenarios

Accelerometer can be debugged with emulator

Re-capGyro, compass, and motion sensor are coming

The new motion sensor class does all the hard math for youYou can still access raw sensor data if you need to

New camera API’s will enable cool new scenarios on the phone

Augmented RealityCustomer Photo Camera

Questions?

Summary Many of the most compelling mobile applications and games leverage sensors to create wildly interactive experiences

Related Content

Resources

Feedback Your feedback is very important! Please complete an evaluation form!

Thank you!

Questions? Session Code Speaker Name

Title Email Blog …

You can ask your questions at “Ask the expert” zone within an hour after end of this session

Session Code

Title of Presentation

NameCompany

NameCompany

Session Code

Title of Presentation

Name Company

Name Company

Name Company

Contents

Slide Title First level

Second levelThird level

Fourth level Fifth level

PowerPoint GuidelinesFont, size, and color for text have been formatted for you in the Slide MasterUse the color palette shown belowHyperlink color: www.microsoft.com

Sample FillSample FillSample Fill

Sample FillSample FillSample Fill

Bar Chart Example

Category 1

Category 2

Category 3

Category 4

012345

Series 1Series 2Series 3

demo

Demo Title Name

video

Video Title

announcement

Announcement Title

Code Sample Get-Process –computername srv1

class TechEdProgram{

public static void Main(){

System.Console.WriteLine("Hello, Tech·Ed!");}

}

Recommended