×
Namespaces

Variants
Actions
(Difference between revisions)

Pop Art filter effect Halftoning using Imaging SDK

From Nokia Developer Wiki
Jump to: navigation, search
galazzo (Talk | contribs)
(Galazzo - - Halftone)
galazzo (Talk | contribs)
(Galazzo -)
Line 1: Line 1:
[[Category:Draft]][[Category:Windows Phone 8]][[Category:Multimedia on Java ME]][[Category:Code Snippet]][[Category:Code Examples]]
+
[[Category:Draft]][[Category:Windows Phone 8]][[Category:Code Snippet]][[Category:Code Examples]][[Category:Multimedia on Windows Phone]]
 
{{Abstract|This article explains how to implement a filter effect inspired to [http://en.wikipedia.org/wiki/Andy_Warhol Andy Warhol's Pop Art] using Halftoning technique.}}
 
{{Abstract|This article explains how to implement a filter effect inspired to [http://en.wikipedia.org/wiki/Andy_Warhol Andy Warhol's Pop Art] using Halftoning technique.}}
 +
 +
{{Note|This is an entry in the [[Nokia Original Effect Wiki Challenge 2014Q2]]}}
  
 
{{ArticleMetaData <!-- v1.3 -->
 
{{ArticleMetaData <!-- v1.3 -->
Line 38: Line 40:
  
 
Where continuous tone images contains an infinite range of colors or greys, the halftone process reduces visual reproductions to an image that is printed with only one color of ink, in dots of differing size. This reproduction relies on a basic optical illusion that these tiny halftone dots are blended into smooth tones by the human eye.
 
Where continuous tone images contains an infinite range of colors or greys, the halftone process reduces visual reproductions to an image that is printed with only one color of ink, in dots of differing size. This reproduction relies on a basic optical illusion that these tiny halftone dots are blended into smooth tones by the human eye.
 +
 +
=== Dot shapes ===
 +
Though round dots are the most common used, there are different dot types available, each of them having their own characteristics.
 +
 +
* Round dots: most common, suitable for light images, especially for skin tones. They meet at a tonal value of 70%.
 +
* Elliptical dots: appropriate for images with many objects. Elliptical dots meet at the tonal values 40% (pointed ends) and 60% (long side), so there is a risk of a pattern.
 +
* Square dots: best for detailed images, not recommended for skin tones. The corners meet at a tonal value of 50%. The transition between the square dots can sometimes be visible to the human eye.
 +
 +
In this article we will focus on round dots as the algorithm is not dependent by the shape so once learned the techmique the user can use the one he prefer, also the most strange ones.
 +
 +
== Creating the effect ==
 +
There are plenty of tutorials and well done documentation explaining how to create a custom effect. As quick recap let's remember that to create a custom effect in managed code we need to inherit from {{Icode|CustomEffectBase}} while from {{Icode|DelegatingEffect}} in C++/CX.
 +
 +
In managed code, the basic looks like that:
 +
<code csharp>
 +
public class DoubleEffect : CustomEffectBase
 +
{
 +
    public DoubleEffect(IImageProvider source) : base(source)
 +
    {
 +
    }
 +
 +
    protected override void OnProcess(PixelRegion sourcePixelRegion, PixelRegion targetPixelRegion)
 +
    {       
 +
    }
 +
}
 +
</code>
 +
 +
=== Drawing dots ===
  
 
== Summary ==
 
== Summary ==

Revision as of 23:11, 7 June 2014

This article explains how to implement a filter effect inspired to Andy Warhol's Pop Art using Halftoning technique.

Note.pngNote: This is an entry in the Nokia Original Effect Wiki Challenge 2014Q2

WP Metro Icon Multimedia.png
WP Metro Icon WP8.png
Article Metadata
Tested with
Devices(s): Nokia Lumia 925, Nokia Lumia 1020, Nokia Lumia 1520, Nokia Lumia 630
Compatibility
Platform(s):
Windows Phone 8
Article
Created: galazzo (07 Jun 2014)
Last edited: galazzo (07 Jun 2014)

Contents

Pop art

Example of Pop Art

Pop art is an art movement that emerged in the mid-1950s in Britain and in the late 1950s in the United States. Pop art presented a challenge to traditions of fine art by including imagery from popular culture such as advertising, news, etc.

Pop art employs aspects of mass culture, such as advertising, comic books and mundane cultural objects. Pop art is aimed to employ images of popular as opposed to elitist culture in art, emphasizing the banal or kitschy elements of any given culture, most often through the use of irony. It is also associated with the artists' use of mechanical means of reproduction or rendering techniques.

Andy Warhol is probably the most famous figure in Pop Art, he is the father of the effect shown in the side image that we are going to reproduce through the Nokia Imaging SDK.

Halftone

Halftone example.
Basically the effect we are going to create is made by composing the cartoon and Halftone effect. Nokia imaging SDK provide a good implementatoin of Cartoon filter, but not of the Halftone who is the one on which we will focus.


Halftone is a technique that simulates continuous tone of an image through the use of dots, varying either in size, in shape or in spacing, thus generating a gradient like effect.

Where continuous tone images contains an infinite range of colors or greys, the halftone process reduces visual reproductions to an image that is printed with only one color of ink, in dots of differing size. This reproduction relies on a basic optical illusion that these tiny halftone dots are blended into smooth tones by the human eye.

Dot shapes

Though round dots are the most common used, there are different dot types available, each of them having their own characteristics.

  • Round dots: most common, suitable for light images, especially for skin tones. They meet at a tonal value of 70%.
  • Elliptical dots: appropriate for images with many objects. Elliptical dots meet at the tonal values 40% (pointed ends) and 60% (long side), so there is a risk of a pattern.
  • Square dots: best for detailed images, not recommended for skin tones. The corners meet at a tonal value of 50%. The transition between the square dots can sometimes be visible to the human eye.

In this article we will focus on round dots as the algorithm is not dependent by the shape so once learned the techmique the user can use the one he prefer, also the most strange ones.

Creating the effect

There are plenty of tutorials and well done documentation explaining how to create a custom effect. As quick recap let's remember that to create a custom effect in managed code we need to inherit from CustomEffectBase while from DelegatingEffect in C++/CX.

In managed code, the basic looks like that:

public class DoubleEffect : CustomEffectBase 
{
public DoubleEffect(IImageProvider source) : base(source)
{
}
 
protected override void OnProcess(PixelRegion sourcePixelRegion, PixelRegion targetPixelRegion)
{
}
}

Drawing dots

Summary

844 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×