Skip to content

A very basic affine transformation showcase (scale, rotation, shear, translate) created using Processing.

License

Notifications You must be signed in to change notification settings

LightDestory/Affine-Transformation-of-Image-Processing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔷 Affine Transformation of Image Processing

Preview

About the project

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.


Features

These are the implementation goal of this project:

  • Forward Mapping
  • Inverse Mapping
  • Rotation
  • Scale
  • Translate
  • Shear (Vertical and Horizontal)
  • Simple Interaction

How it works

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;

How to use a custom image

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"


Requirements

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.


How to build

Use Processing editor to export a new application with the updated source.


License

This project is under MIT License

About

A very basic affine transformation showcase (scale, rotation, shear, translate) created using Processing.

Resources

License

Stars

Watchers

Forks

Packages

No packages published