@@ -9,62 +9,71 @@ _Photo is taken by me [more here](https://www.instagram.com/milchreisjunkie/)_
99
1010#### Grayscale image
1111![ alt text] ( https://github.com/Milchreis/processing-imageprocessing/blob/master/img/gray.png?raw=true )
12- ```
12+ ``` java
1313PImage processedImage = Grayscale . apply(image);
1414```
1515
1616#### Threshold image
1717![ alt text] ( https://github.com/Milchreis/processing-imageprocessing/blob/master/img/threshold.png?raw=true )
18- ```
18+ ``` java
1919PImage processedImage = Threshold . apply(image); // Auto threshold
2020PImage processedImage = Threshold . apply(image, value); // Threshold value between 0 and 255
2121```
2222
2323#### Dilation image
2424![ alt text] ( https://github.com/Milchreis/processing-imageprocessing/blob/master/img/dilation.png?raw=true )
25- ```
26- PImage processedImage = Dilation.apply(image, radius); // radius is a positive number
25+ ``` java
26+ PImage processedImage = Dilation . apply(image, radius); // radius is a positive number
2727```
2828
2929#### Erosion image
3030![ alt text] ( https://github.com/Milchreis/processing-imageprocessing/blob/master/img/erosion.png?raw=true )
31- ```
32- PImage processedImage = Erosion.apply(image, radius); // radius is a positive number
31+ ``` java
32+ PImage processedImage = Erosion . apply(image, radius); // radius is a positive number
3333```
3434
3535#### AutoBalance image
3636![ alt text] ( https://github.com/Milchreis/processing-imageprocessing/blob/master/img/autobalance.png?raw=true )
37+ ``` java
38+ PImage processedImage = AutoBalance . apply(image);
3739```
38- PImage processedImage = AutoBalance.apply(image);
40+
41+ #### Pixelize image
42+ ![ alt text] ( https://github.com/Milchreis/processing-imageprocessing/blob/master/img/pixelation.png?raw=true )
43+ ``` java
44+ // pixelsize is a positive number
45+ PImage processedImage = Pixelation . apply(image, pixelsize);
46+ // Pixelize a sub area of the input image
47+ PImage processedImage = Pixelation . apply(image, pixelsize, subX, subY, subWidth, subHeight);
3948```
4049
4150#### Gaussian blur image
4251![ alt text] ( https://github.com/Milchreis/processing-imageprocessing/blob/master/img/gaussian.png?raw=true )
43- ```
52+ ``` java
4453PImage processedImage = Gaussian . apply(image, 7 , 0.84089642 ); // kernel size and sigma
4554```
4655
4756#### Edge detection image
4857![ alt text] ( https://github.com/Milchreis/processing-imageprocessing/blob/master/img/canny.png?raw=true )
49- ```
58+ ``` java
5059PImage processedImage = CannyEdgeDetector . apply(image);
5160```
5261
5362#### Bloom image
5463![ alt text] ( https://github.com/Milchreis/processing-imageprocessing/blob/master/img/bloom.png?raw=true )
55- ```
64+ ``` java
5665PImage processedImage = Bloom . apply(image, intensity); // intensity between 0 and 255
5766```
5867
5968#### Sharpen image
6069![ alt text] ( https://github.com/Milchreis/processing-imageprocessing/blob/master/img/sharpen.png?raw=true )
61- ```
70+ ``` java
6271PImage processedImage = Sharpen . apply(image, sharpIntensity); // sharpIntensity between 0.0 and 10.0
6372```
6473
6574#### Lookup table image
6675![ alt text] ( https://github.com/Milchreis/processing-imageprocessing/blob/master/img/lut.png?raw=true )
67- ```
76+ ``` java
6877LUT style = LUT . loadLut(LUT. STYLE. CONTRAST );
6978PImage processedImage = LUT . apply(image, style);
7079```
0 commit comments