Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork24
Collection of basic image processing algorithms for processing
License
MIT, Unknown licenses found
Licenses found
Milchreis/processing-imageprocessing
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This library collects various image processing algorithms and provides simple access to them. All algorithms are implementedin Java and runs without any other dependencies. Some algorithms are pretty standard and others maybe do you know from Photoshop.It starts with less basic features and grow over the last years.If you need high power performance better useopencv for processing.
If you like this project and you want to keep me awake 🤪
If you want to use this library in your processing sketch you can download it via the integratedContribution Manager.
The following algorithms are supported in this library. Click on the link to see an example image and a code snippet.
Photo taken by memore here
PImageprocessedImage =Grayscale.apply(image);
PImageprocessedImage =Flip.apply(image,horizontal,vertical);// horizontal and vertical are boolean
// invertRed, invertGreen and invertBlue are booleanPImageprocessedImage =InvertColors.apply(image,invertRed,invertGreen,invertBlue);
PImageprocessedImage =Threshold.apply(image);// Auto thresholdPImageprocessedImage =Threshold.apply(image,value);// Threshold value between 0 and 255
PImageprocessedImage =Dilation.apply(image,radius);// radius is a positive number
PImageprocessedImage =Erosion.apply(image,radius);// radius is a positive number
// intensity and vignetteWidth are floats between 0.0 and 1.0PImageprocessedImage =Vignette.apply(image,intensity,vignetteWidth);
PImageprocessedImage =Quantization.apply(image,shades);// shades is a positive number between 1 and 255
PImageprocessedImage =PaletteMapping.apply(image,color1,color2,color3);// Add any number of colors from dark to light
// difference is a float between 0.0 and 1.0 from less to very differentfloatdifference =Comparison.howDifferent(image1,image2);// differenceImage is the difference between the pixel values (black is no difference, white is high difference)PImagedifferenceImage =Comparison.calculateDifferenceImage(image1,image2);
PImageprocessedImage =Gaussian.apply(image,7,0.84089642);// kernel size and sigma
// pixelsize is a positive numberPImageprocessedImage =Pixelation.apply(image,pixelsize);// Pixelize a sub area of the input imagePImageprocessedImage =Pixelation.apply(image,pixelsize,subX,subY,subWidth,subHeight);
PImageprocessedImage =TiltShift.apply(image,blurIntensity,horizontal,position,sharpWideness);
PImageprocessedImage =CannyEdgeDetector.apply(image);
PImageprocessedImage =SobelEdgeDetector.apply(image);// for colored sobel (for each color channel)PImageprocessedImage =SobelEdgeDetector.apply(image,false);
PImageprocessedImage =Brightness.apply(image,value);// value isa positive number for brighting up or a negative for darken down
// intensity is between -1.0 and 1.0PImageprocessedImage =Contrast.apply(image,intensity);
// intensity is between 0.0 and 10.0// 0.0 to 1.0 decreases and all above increases the saturationPImageprocessedImage =Saturation.apply(image,intensity);
// intensity between -1.0 and 1.0PImageprocessedImage =Lights.apply(image,intensity);
// intensity between -1.0 and 1.0PImageprocessedImage =Shadows.apply(image,intensity);
PImageprocessedImage =AutoBalance.apply(image);
PImageprocessedImage =Bloom.apply(image,intensity);// intensity between 0 and 255
PImageprocessedImage =Sharpen.apply(image,sharpIntensity);// sharpIntensity between 0.0 and 10.0
// hue is a value between 0 and 360// offset is the color range which is accepted (in hue range)// shift is the number of the subtracted or added hue valuePImageprocessedImage =ColorShift.applyHue(image,hue,offset,shift);// or short: ColorShift.apply(image, hue, offset, shift)PImageprocessedImage =ColorShift.applySaturation(image,hue,offset,shift);PImageprocessedImage =ColorShift.applyBrightness(image,hue,offset,shift);
LUTstyle =LUT.loadLut(LUT.STYLE.CONTRAST);PImageprocessedImage =LUT.apply(image,style);
PImageprocessedImage =RetroConsole.applyGameboy(image,pixelSize);
PImageprocessedImage =Glitch.apply(image,intensity,scanlineheight);
PImageprocessedImage =Matte.apply(image,matteIntensity,// intensity for the lifting blacks between 0 and 255contrastIntensity,// intensity for the constrast between 0 and 255saturationIntensity);// change for the saturation between -0.5 and 0.5
// intensity between 0.0 and 1.0PImageprocessedImage =Sabattier.apply(image,intensity);PImageprocessedImage =Sabattier.applyRed(image,intensity);PImageprocessedImage =Sabattier.applyGreen(image,intensity);PImageprocessedImage =Sabattier.applyBlue(image,intensity);
| random angles | fixed angle |
|---|---|
![]() | ![]() |
PImageprocessedImage =Strokes.apply(image,gridSize,lineLength);PImageprocessedImage =Strokes.apply(image,gridSize,// is positive and the area for compound pixelslineLength,// is positive and the length in pixels for each linelineWeight,// is positive and the weight of each line in pixellinesPerGrid,// the number of lines per gridlineIntensity,// alpha value for each line between 0 and 255degree,// if set the rotation is fixed in degree, otherwise randominColor,// true for colors else black and whitebackgroundColor);// color for the background
// default dithering algorithm is BAYER_4x4PImageprocessedImage =Dithering.apply(image);// change algrithm: BAYER_2x2, BAYER_4x4, BAYER_8x8PImageprocessedImage =Dithering.apply(image,Dithering.Algorithm.BAYER_8x8);// use a curstom kernel (kernel = float[])PImageprocessedImage =Dithering.aapply(PImageimage,kernel);
PImageprocessedImage =Halftone.apply(image,dotsize);// dot size in pixelPImageprocessedImage =Halftone.apply(image,dotsize,grid);// grid = true, on false honeycomb stylePImageprocessedImage =Halftone.apply(image,dotsize,foreground,background);// background and foreground colorsPImageprocessedImage =Halftone.apply(image,dotsize,foreground,background,grid);PImageprocessedImage =Halftone.apply(image,dotsize,foreground,background,spacing,grid);// size between dots in pixels
// tone is a color and intensity is a value between 0.0 and 1.0colortone =color(255,11,120);floatintensity =0.8f;PImageprocessedImage =Toning.apply(image,tone,intensity);
PImageprocessedImage =SplitToning.apply(image,highlightTone,// Color for highlighs (f.e. color highlightTone = color(211, 180, 21);intensityHighlights,// intensity for the toning in highlights between 0.0 and 1.0shadowTone,// Color for the shadows (f.e. color shadowTone = color(124, 32, 201);intensityShadows);// intensity for the toning in the shadows between 0.0 and 1.0
PImageprocessedImage =SineWave.apply(image,rowHeight,weight,backgroundColor,wavesColor);
// keeps the original colorsPImageprocessedImage =Knitting.apply(image,size);// Sets foreground and background color and uses a thresholdPImageprocessedImage =Knitting.apply(image,size,threshold,240, #EE0000);
PImageprocessedImage =ASCII.apply(image);// characterset = ASCII.SHORT_SET or ASCII.LONG_SET, another String from black to whitePImageprocessedImage =ASCII.apply(image,characterset);PImageprocessedImage =ASCII.apply(image,characterset,fontSize);// fontSize is an integerPImageprocessedImage =ASCII.apply(image,characterset,fontSize,foregroundColor,backgroundColor,toneInColor);// To get the ASCII image as plain string use the following methodPImageprocessedImage =ASCII.getAsciiText(image);
// Add so many images in the end as you needPImageprocessedImage =Stacker.apply(Stacker.ALGORITHM.AVERAGE,image1,image2);PImageprocessedImage =Stacker.apply(Stacker.ALGORITHM.MEDIAN,image1,image2);
// intensity is a float between 0.0 and 1.0PImageprocessedImage =Blend.apply(image1,image2,intensity);
My special thanks goes toavatarr for implementing andpublishing basic algorithms. Also thank you very much Tom Gibara for your great blog post and the implementation ofthecanny edge detector.
Moreover I thank youJoseph HENRY for the Sine-Wave-effect code anduheinema for the Sabattier code in theProcessing Discourse.
About
Collection of basic image processing algorithms for processing
Topics
Resources
License
MIT, Unknown licenses found
Licenses found
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.









































