Skip to content

heon0945/Image-Deformation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Image-Deformation

This project attempted to implement a two-dimensional Image Distortion function using OpenGL based on the C++ language, and aims to create Interactive Image Deformation haing high DOF.

Goal

  • High DOF User Interactive Program
  • Local Deformation Parallel Calculation

Local Deformation

Vector of control point moving

For each control point, the movement from the original position to the position moved by drag is stored as a vector.

vector

Weight calculation using Gaussian

Set deformation weight using Gaussian equation so that pixels outside and within the deforamtion range are smoothly connected.

gaussian

Deformed Texture coordinate calculation

Deformed Texture coordinate = Existing Texture coordinates - Vector * Weight * Intensity (constant)

Execution

Loading the program

  • Change VS file, SDK file
  • Change image path

Adjust Images

  • Load images
  • Adjust variables (SCR_WIDTH, SCR_HEIGHT)

Control

  • Right mouse button click : Add contorl point / Delete the control point
  • Left mouse button drag : Move control point
  • ESC : End the program
  • Up : Reduce the deformation range
  • Down : Increase the deformation range
  • Left : Decrease the deformation intensity
  • Right : Increase the deformation intensity
  • R : Show/Hide the deformation ranges
  • P : Show/Hide the deformation points
  • Z : Compare the before and after images

Sample Output

specific overall

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages