Perspective Transform
This function block allows users to apply a perspective transformation to an image by selecting four points. These points define a rectangular area in the input image that will be transformed to fit a given target rectangle.
📥 Inputs
Image Any
The input image that you want to apply the perspective transformation on.
📤 Outputs
Image Any
The output image after applying the perspective transformation.
Transform Matrix
The matrix used for the perspective transformation, useful for understanding how the transformation has been applied.
🕹️ Controls
Mouse Clicks
Click on the image displayed in the block to define four points for the perspective transformation in a clockwise order starting from the bottom left corner.
Keyboard Controls
Press
C
to clear the existing points.Press
U
to undo the last point added.
🎨 Features
Interactive User Input
Users can interactively select points on the image using mouse clicks, allowing for easy adjustments.
Visual Feedback
The points and lines drawn on the image provide immediate visual feedback, helping users understand how the transformation will occur.
📝 Usage Instructions
Input an Image: Connect an image to the input of the block.
Select Four Points: Click on the image to define four corners of the region you want to transform in a clockwise manner starting from the bottom left.
Clear or Undo: If you make a mistake, you can press
C
to clear all points orU
to undo the last point.Evaluate: Run the block to perform the perspective transformation. The output image will reflect the transformation, and the matrix will be available for further usage.
📊 Evaluation
When evaluated, this function block returns the transformed image based on the points selected and the corresponding transformation matrix.
💡 Tips and Tricks
🛠️ Troubleshooting
Last updated