![Page 1: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/1.jpg)
![Page 2: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/2.jpg)
Session Code
Camera & Sensors in Windows Phone Application
Larry LiebermanProduct Mgr, Windows Phone DeveloperMicrosoft Corporation
![Page 3: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/3.jpg)
AgendaWhat sensors are available, and how do I use them?How do I access the camera to address various scenarios
![Page 4: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/4.jpg)
New scenarios enabled in Windows Phone 7.5
Augmented realityBarcode scanning appsCustom camerasImage processing
![Page 5: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/5.jpg)
What hardware sensors are supported?
Accelerometer
Compass
Gyro
New for 7.5
![Page 6: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/6.jpg)
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
![Page 7: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/7.jpg)
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?
![Page 8: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/8.jpg)
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
![Page 9: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/9.jpg)
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
![Page 10: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/10.jpg)
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
![Page 11: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/11.jpg)
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
![Page 12: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/12.jpg)
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?
![Page 13: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/13.jpg)
Summary Many of the most compelling mobile applications and games leverage sensors to create wildly interactive experiences
![Page 14: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/14.jpg)
Related Content
![Page 15: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/15.jpg)
Resources
![Page 16: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/16.jpg)
Feedback Your feedback is very important! Please complete an evaluation form!
Thank you!
![Page 17: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/17.jpg)
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
![Page 18: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/18.jpg)
![Page 19: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/19.jpg)
Session Code
Title of Presentation
NameCompany
NameCompany
![Page 20: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/20.jpg)
Session Code
Title of Presentation
Name Company
Name Company
Name Company
![Page 21: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/21.jpg)
Contents
![Page 22: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/22.jpg)
Slide Title First level
Second levelThird level
Fourth level Fifth level
![Page 23: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/23.jpg)
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
![Page 24: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/24.jpg)
Bar Chart Example
Category 1
Category 2
Category 3
Category 4
012345
Series 1Series 2Series 3
![Page 25: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/25.jpg)
demo
Demo Title Name
![Page 26: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/26.jpg)
video
Video Title
![Page 27: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/27.jpg)
announcement
Announcement Title
![Page 28: Camera & Sensors in Windows Phone Application](https://reader034.vdocuments.us/reader034/viewer/2022051518/568162af550346895dd33372/html5/thumbnails/28.jpg)
Code Sample Get-Process –computername srv1
class TechEdProgram{
public static void Main(){
System.Console.WriteLine("Hello, Tech·Ed!");}
}