A very basic showcase of image processing's affine transformation (scale, rotation, shear, translate) created using Processing.
The aim of this project is to show the various affine transformation available and to point out the difference between forward mapping and inverse mapping.
These are the implementation goal of this project:
- Forward Mapping
- Inverse Mapping
- Rotation
- Scale
- Translate
- Shear (Vertical and Horizontal)
- Simple Interaction
It just applies the basic affine transformation on a sample image (Lenna). Using the pre-configured keys you can manipulate the transformation.
- Pressing C (case-insensitive) will change the current transformation;
- Pressing S (case-insensitive) will save the current image as origin image so the next transformations will be applied starting from the saved state;
- Pressing R (case-sensitive) will reset the origin image to the un-transformed/initial one;
- Pressing r (case-sensitive) will revert the current image state to the origin state;
- Pressing V (case-insensitive) will change the mapping function (Forward and Inverse);
- Pressing +, -, /, * will alter the transformation:
- Rotation [+, -]: Increase/Decrease the degree;
- Scale [+, -]: Increase/Decrease the zoom factor;
- Translation [+, -]: Increase/Decrease the X offset;
- Translation [*, /]: Increase/Decrease the Y offset;
- Shear Vertical [+, -]: Increase/Decrease the degree;
- Shear Horizontal [+, -]: Increase/Decrease the degree;
This showcase doesn't allow to load a custom image, but you can easly import your own image by replacing the "lenna.png" image located inside the data folder.
* It is important that your image is in a PNG format and that it is called "lenna.png"
If you are using the no java-jre bundle version you require:
- Java8+ installed on your system
Otherwise you don't need any pre-requisite.
Use Processing editor to export a new application with the updated source.
This project is under MIT License