Purpose
This technical note explains how to manually apply a rotation to an image on the FH/FHV7 system using the Position Compensation Unit. This method is typically used to ensure the image is correctly oriented for operator viewing.
Summary/Issue Description
In certain scenarios, operators may need to rotate an image without using built-in functions such as shape search or position-finding algorithms. This ensures the image aligns appropriately for manual inspection or other applications.
Root Cause
The default orientation of captured images may not always align with operator requirements, necessitating manual adjustment to achieve the desired alignment.
Solution
Determine Required Variables:
Let w be the image width.
Let h be the image height.
Let θ be the rotation angle in radians.
Horizontal offset (xoffset):
xoffset = - (w cos(θ) - h * sin(θ) - w)/2
Vertical offset (yoffset):
yoffset = - (w sin(θ) + h * cos(θ) - h)/2
Example to manually rotate the image:
Use the Calculation Unit and Position Compensation Unit to apply the required rotation. For an image with dimensions 640x480 and a rotation of 22 degrees:
X Offset Expression:
-(640*COS(U1.D00)-480*SIN(U1.D00)-640)/2
Y Offset Expression:
-(640*SIN(U1.D00)+480*COS(U1.D00)-480)/2
Calculation Unit:
Position Compensation Unit:
Result:

Date/Revision History
First review 12/26/2024 V1.0
2nd Review 01/15/2025
Author:
Andrea Balderrama, Technical Support Engineer
References
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article