Git Product home page Git Product logo

lens-blur's Introduction

Lens Blur

Lens Blur is an example application for Windows Phone demonstrating the use of two new Imaging SDK APIs, Interactive Foreground Segmenter and Lens Blur Effect. Interactive Foreground Segmenter is first used to create a mask (foreground/background), after which Lens Blur Effect (aka “bokeh”) is applied to the areas that were marked as background.

This example application is hosted in GitHub: https://github.com/microsoft/lens-blur/

For more information on implementation visit Lumia Developer's Library: http://go.microsoft.com/fwlink/?LinkId=528375

Developed with Microsoft Visual Studio Express 2012 for Windows Phone.

Compatible with:

  • Windows Phone 8

Tested to work on:

  • Nokia Lumia 520
  • Nokia Lumia 1020
  • Nokia Lumia 1520

Instructions

Make sure you have the following installed:

  • Windows 8
  • Visual Studio Express 2012 for Windows Phone
  • Nuget 2.7 or later

To build and run the sample in emulator

  1. Open the SLN file: File > Open Project, select the solution (.sln postfix) file
  2. Select the target 'Emulator' and platform 'x86'.
  3. Press F5 to build the project and run it.

If the project does not compile on the first attempt it's possible that you did not have the required packages yet. With Nuget 2.7 or later the missing packages are fetched automatically when build process is invoked, so try building again. If some packages cannot be found there should be an error stating this in the Output panel in Visual Studio Express.

For more information on deploying and testing applications see: http://msdn.microsoft.com/library/windowsphone/develop/ff402565(v=vs.105).aspx

About the implementation

Folder Description
/ Contains the project file, the license information and this file (README.md)
LensBlurApp Root folder for the implementation files.
LensBlurApp/Assets Graphic assets like icons and tiles.
LensBlurApp/Models Application models.
LensBlurApp/Pages Application pages.
LensBlurApp/Resources Localized resources.
LensBlurApp/Properties Application property files.

Important classes:

Class Description
Pages.EffectPage Contains code for applying the blur effect.
Pages.SegmenterPage Contains code for the foreground/background segmentation.

Known issues

  • Application tombstoning is not supported.
  • Saving high resolution photos may run out of memory on low-memory devices.

License

See the license text file delivered with this project: https://github.com/microsoft/lens-blur/blob/master/License.txt

See the attributions text file for a list of built-in gallery photo attributions: https://github.com/microsoft/lens-blur/blob/master/Attributions.txt

Version history

  • 1.1.0.0: Second public release of Lens Blur

    • Built-in photo gallery to easily start testing the segmenter and the lens blur effect
    • Moved reset (annotations) button to menu
    • Effect settings are now preserved between effect configuration sessions
    • Updated blur kernel shape selection button icons to match the actual shapes
    • Photo zooming: on effect page you can now tap on the photo to enter a fullscreen zoom view
    • Changed application icon and tiles to Nokia Developer style
  • 1.0.0.0: First public release of Lens Blur

lens-blur's People

Contributors

shyofutu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lens-blur's Issues

Deadlock in GalleryPage

Lines 114-116 of LensBlurApp/Pages/GalleryPage.xaml.cs say
var task = photo.File.OpenReadAsync().AsTask();
task.Wait();

The Wait on line 114 will block the UI thread. The thread can proceed
only when the Task returned by OpenReadAsync().AsTask() completes.
However, the continuation completing this task will
be posted to the captured synchronization context from the UI thread,
which is blocked, and will never run. This results in deadlock.

Pull request #1 suggests a fix

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.