Sign in to follow this  
MadJik

Majority Color Effect (ymd:100726)

Recommended Posts

MadJik    158

Majority Color Effect Plugin

What's this?

 

This plugin is added to the menu Effects, submenu Stylize.

In fact it was originally 99% made with CodeLab...(1% for external text editor, and for the icon).

This is based on the (french) cellular automat using the majority rule.

See the link for more... http://interstices.info/display.jsp?id=c_27035

The automate is based on boolean (0 or 1) cells. I had to adapt it for colors (0-255).

The principle is each cell will take the value of its neighbours that have the majority.

For each cell, I compute the average of the cell + its neighbours.

If the cell color is greater than the average then it takes the value of the greatest value found. Else it take the value of the lowest value found.

 

So there are 3 modes:

Keep original colors: use min/max values found separately for R,G & B.

Reduce to primal colors: use 0/255 separately for R,G & B.

Reduce to black and white: use min/max values found and take the average of RGB to have a grey color.

 

Download it!

Plugin Majority.dll

ar.pngHere is the DLLal.png

 

The MadJik's All plugins package is available !

http://forums.getpaint.net/index.php?showtopic=7186

 

 

How to install

Close Paint.net

Unzip and (re)place the DLL in your Effect folder usually: C:/Program Files/Paint.NET/Effects

 

 

The User interface

majorityUI.png

...Choose the color mode: see previous explanations.

...Radius of tolerance: how many row/column to compute from the single pixel. Big values could take a long time to render.

...Color tolerance level: color level to define the default average between low or high colors.

...Include transparent pixels:Check to apply the effect on alpha channel as well.

 

 

Some examples:

1. Original model from http://www.photo-libre.fr

http://photoslibre.free.fr/photoslibres/gens/people/10.jpg

...and abstract Nebulous (from Codelab)

model1.jpg  modelb1.jpg

2. mode=0, radius=4, tolerance=127 (applied on the model)

model2.jpg  modelb2.jpg

3. mode=1, radius=4, tolerance=127 (applied on the model)

model3.jpg  modelb3.jpg

4. mode=2, radius=4, tolerance=127 (applied on the model)

model4.jpg  modelb4.jpg

5. mode=1, radius=1, tolerance=127 (applied on the model)

+ (run again) mode=2, radius=1, tolerance=127

model5.jpg  modelb5.jpg

Edited by MadJik
refresh UI and rehosted images

Share this post


Link to post
Share on other sites
MadJik    158

Another test of this plugin:

source:

http://photoslibre.free.fr/photoslibres/transport/12.jpg

Before:

model2a.jpg

 

After:

model2b.jpg

To do this I duplicate the layer 3 times and run the effect with differents settings, then cut out some dark/white sections to have a good (IMO)combination.

And for fun the 'Rick' effect:

model2c.jpg

Edited by MadJik
rehosted images

Share this post


Link to post
Share on other sites
Helio    2

Hey, this is actually pretty cool. It might produce a good result if afterwards using the Oil Painting effect.

Share this post


Link to post
Share on other sites
MadJik    158
Max tolerance gives a frosted glass effect. Really fun effect. :lol:

statuezy1.th.jpg statuexfq6.th.jpg

Yes, I was just uploading images...

6. mode=0, radius=3, tolerance=0 on left 255 on right

model6.jpgmodel7.jpg

Model to compare (look at the eyes!)

model1.jpgmodel.gif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this