Skip to content

Commit e0f2b25

Browse files
committed
Adds pixelation and example documentation
1 parent a3dc4af commit e0f2b25

37 files changed

+230
-96
lines changed

examples/Basics/Basics.pde

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
/* Example for basic image processing algorithms.
2+
* Use the mouse wheel to switch the different algorithms
3+
* and press the left mouse button to see the original image.
4+
*
5+
* Author: Nick 'Milchreis' Müller
6+
*/
7+
18
import milchreis.imageprocessing.*;
29

3-
int numberOfAlgorithms = 7;
10+
int numberOfAlgorithms = 8;
411
int currentAlgorithm = 0;
512

613
PImage image;
@@ -52,13 +59,19 @@ void draw() {
5259
processedImage = AutoBalance.apply(image);
5360
}
5461

55-
// Gaussian for blurred images
62+
// Pixelation
5663
if(currentAlgorithm == 5) {
64+
int pixelsize = (int) map(mouseX, 0, width, 0, 100);
65+
processedImage = Pixelation.apply(image, pixelsize);
66+
}
67+
68+
// Gaussian for blurred images
69+
if(currentAlgorithm == 6) {
5770
processedImage = Gaussian.apply(image, 7, 0.84089642);
5871
}
5972

6073
// Edge detection with Canny's algorithm
61-
if(currentAlgorithm == 6) {
74+
if(currentAlgorithm == 7) {
6275
processedImage = CannyEdgeDetector.apply(image);
6376
}
6477
}
@@ -73,4 +86,4 @@ void mouseWheel(MouseEvent event) {
7386
if(currentAlgorithm >= numberOfAlgorithms) {
7487
currentAlgorithm = 0;
7588
}
76-
}
89+
}

examples/BloomExample/BloomExample.pde

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/* Example for bloom effect.
2+
* Move the mouse from left to right to see different intensity
3+
* or press the left mouse button to see the original image.
4+
*
5+
* Author: Nick 'Milchreis' Müller
6+
*/
7+
18
import milchreis.imageprocessing.*;
29

310
PImage image;

examples/LUTExample/LUTExample.pde

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/* Example for lookup tables (LUT).
2+
* Use the mouse wheel to switch the different tables/styles
3+
* and press the left mouse button to see the original image.
4+
*
5+
* Author: Nick 'Milchreis' Müller
6+
*/
7+
18
import milchreis.imageprocessing.*;
29

310
PImage image;

examples/SharpenExample/SharpenExample.pde

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/* Example for sharpening an image to get a crunchy look.
2+
* The intensity of this effect increases slowly.
3+
* Press the left mouse button to see the original image.
4+
*
5+
* Author: Nick 'Milchreis' Müller
6+
*/
7+
18
import milchreis.imageprocessing.*;
29

310
PImage image;
@@ -17,6 +24,7 @@ void draw() {
1724
image(Sharpen.apply(image, sharpIntensity), 0, 0);
1825
}
1926

27+
// Reset the intensity or increase it
2028
if(sharpIntensity > 6)
2129
sharpIntensity = 0;
2230
else

examples/StackerExample/StackerExample.pde

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/* Example for stacking images.
2+
* Generates an average face by 10 example faces.
3+
* Normally the median pixel is selected.
4+
* Use the mouse button to see the average mode.
5+
*
6+
* Author: Nick 'Milchreis' Müller
7+
*/
8+
19
import milchreis.imageprocessing.*;
210

311
PImage image;

img/pixelation.png

10.2 KB
Loading

library.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
name = Image processing algorithms
66

77
# List of authors. Links can be provided using the syntax [author name](url).
8-
authors = [Milchreis](http://github.com/milchreis)
8+
authors = [Nick 'Milchreis' Müller](http://github.com/milchreis)
99

1010
# A web page for your Library, NOT a direct link to where to download it.
1111
url = http://github.com/milchreis/processing-imageprocessing
@@ -45,7 +45,7 @@ version = 3 # This must be parsable as an int
4545

4646
# The version as the user will see it. If blank, the version attribute will be
4747
# used here. This should be a single word, with no spaces.
48-
prettyVersion = 1.0.0 # This is treated as a String
48+
prettyVersion = 1.0.1 # This is treated as a String
4949

5050
# The min and max revision of Processing compatible with your Library.
5151
# Note that these fields use the revision and not the version of Processing,

library/ImageProcessing.jar

640 Bytes
Binary file not shown.

reference/allclasses-frame.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="de">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_151) on Sun Jan 07 23:55:42 CET 2018 -->
5+
<!-- Generated by javadoc (1.8.0_151) on Wed Jan 10 21:02:07 CET 2018 -->
66
<title>All Classes (Javadocs: ImageProcessing)</title>
7-
<meta name="date" content="2018-01-07">
7+
<meta name="date" content="2018-01-10">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
99
<script type="text/javascript" src="script.js"></script>
1010
</head>
@@ -23,6 +23,7 @@ <h1 class="bar">All&nbsp;Classes</h1>
2323
<li><a href="milchreis/imageprocessing/Histogram.html" title="class in milchreis.imageprocessing" target="classFrame">Histogram</a></li>
2424
<li><a href="milchreis/imageprocessing/LUT.html" title="class in milchreis.imageprocessing" target="classFrame">LUT</a></li>
2525
<li><a href="milchreis/imageprocessing/LUT.STYLE.html" title="enum in milchreis.imageprocessing" target="classFrame">LUT.STYLE</a></li>
26+
<li><a href="milchreis/imageprocessing/Pixelation.html" title="class in milchreis.imageprocessing" target="classFrame">Pixelation</a></li>
2627
<li><a href="milchreis/imageprocessing/RegionGrowing.html" title="class in milchreis.imageprocessing" target="classFrame">RegionGrowing</a></li>
2728
<li><a href="milchreis/imageprocessing/Sharpen.html" title="class in milchreis.imageprocessing" target="classFrame">Sharpen</a></li>
2829
<li><a href="milchreis/imageprocessing/Stacker.html" title="class in milchreis.imageprocessing" target="classFrame">Stacker</a></li>

reference/allclasses-noframe.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<!-- NewPage -->
33
<html lang="de">
44
<head>
5-
<!-- Generated by javadoc (1.8.0_151) on Sun Jan 07 23:55:42 CET 2018 -->
5+
<!-- Generated by javadoc (1.8.0_151) on Wed Jan 10 21:02:07 CET 2018 -->
66
<title>All Classes (Javadocs: ImageProcessing)</title>
7-
<meta name="date" content="2018-01-07">
7+
<meta name="date" content="2018-01-10">
88
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
99
<script type="text/javascript" src="script.js"></script>
1010
</head>
@@ -23,6 +23,7 @@ <h1 class="bar">All&nbsp;Classes</h1>
2323
<li><a href="milchreis/imageprocessing/Histogram.html" title="class in milchreis.imageprocessing">Histogram</a></li>
2424
<li><a href="milchreis/imageprocessing/LUT.html" title="class in milchreis.imageprocessing">LUT</a></li>
2525
<li><a href="milchreis/imageprocessing/LUT.STYLE.html" title="enum in milchreis.imageprocessing">LUT.STYLE</a></li>
26+
<li><a href="milchreis/imageprocessing/Pixelation.html" title="class in milchreis.imageprocessing">Pixelation</a></li>
2627
<li><a href="milchreis/imageprocessing/RegionGrowing.html" title="class in milchreis.imageprocessing">RegionGrowing</a></li>
2728
<li><a href="milchreis/imageprocessing/Sharpen.html" title="class in milchreis.imageprocessing">Sharpen</a></li>
2829
<li><a href="milchreis/imageprocessing/Stacker.html" title="class in milchreis.imageprocessing">Stacker</a></li>

0 commit comments

Comments
 (0)