Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Perspective-Transformer

This Python program uses OpenCV to perform a perspective transformation on an image. It allows the user to specify the coordinates of four points in the source image and maps them to a new image of specified dimensions.

Usage

  1. Run the script.

  2. Follow the on-screen prompts to provide the necessary input: Image filename (e.g., image.jpg) New height and width of the desired image Coordinates of the four corners (top left, bottom left, top right, bottom right)

Note: You need to know the coordinates of the four corners in the source image.

  1. The program will process the image and save the transformed image as Modified image.jpg in the current directory.

Example

Enter the filename for conversion along with the format, e.g., .jpg: example.jpg Required height of the image: 500 Required width of the image: 700 Coordinates of the top left corner, separated by a comma: 50,50 Coordinates of the bottom left corner, separated by a comma: 50,450 Coordinates of the top right corner, separated by a comma: 650,50 Coordinates of the bottom right corner, separated by a comma: 650,450 DONE! You can close the program or press ENTER

About

Perform a perspective transformation on an image using the coordinates of four doors

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages