BBongiovanni's picture
inital commit
cd7fffd

A newer version of the Gradio SDK is available: 4.37.2

Upgrade
metadata
title: points-4-perspective
emoji: πŸ“
colorFrom: blue
colorTo: yellow
sdk: gradio
sdk_version: 3.45.2
app_file: app.py
pinned: false
python_version: 3.9.18

points-4-perspective

A cute little tool that applies a 4-point perspective transform based on coordinates the user defines on the image. To compute the transformation matrix, we define target coordinates from a top-down perpendicular view relative to the source coordinates. We then use this transformation matrix on the image to warp its perspective to get the top-down view of whatever ROI the user selects in the image - neat! Input Image Output Image

This approach defines the aspect ratio of the target coordinates based on the source coordinates, which does not produce an accurate aspect ratio. To get around this, width/height sliders are provided to the user to adjust the output image dimensions. App Screenshot