loading

Bottle Unwrap

The Bottle Unwrap module transforms an image that is wrapped around a bottle surface into a flat surface. This module is often used as a precursor to an OCR module in order to correct for curve distortion when imaging a curved surface. For example, the label placed on a cylindrical container can be unwrapped in order to recognize the words, images, etc. on that surface in an easier planar way.

Interface

Instructions

1. Warp - Adjust the radius of the wrap such that the image appears to flatten out. Numbers larger than the image width will shrink or compress the image whilst numbers smaller than the current image width will spread out the image by expanding the image extremes.

4. X - If the label in the image is not in the image center use the X transform to move the transform center into the center of the label. This will ensure that the image unwraps from the correct center point. If your object is not in the image center and the unwrap is applied you will notice more distortion on one side of the object. Move the X center until the image appears equally transformed on the left and right sides.

5. Y - The Y transform will shift the image center up or down in order to center the image but it does not affect the unwarping.

6. Pinch - Most images will require some adjustments in order to straighten horizintal lines after warping. This value increases with the camera's field of view.

7. Z Rotation - If the image is slightly tilted you might want to rotate the image into a more horizontal/vertical orientation. This will ensure that the bottle unwrap will operate on an aligned image.

8. Y Rotation - If the image is tilted forward or backwards (as if the camera is pointed up or down towards the label) you might need to adjust the Y Rotation which will rotate the image accordingly.

9. Pixel Resample - specifies that the image will be transformed on a per pixel basis. This is a faster technique and will make the image appear more crisp but can suffer from being too crisp in that edges may appear too sharp.

10. Bilinear Resample - provides smoother results than the Pixel method but is a slower transform.

11. Display Grid Size - the goal of this module is to align the image into a flat rectilinear surface. In order to help you tweak the parameters you can enable the Display Grid size to superimpose a grid structure on top of the image in order to better compare image lines with actual horizontal and vertical lines. Using the grid as a comparison you can change the values of the transforms in order to achieve the alignment goal.

Example

Click here to load a robofile that contains the example transform below. Note that this example includes the image below and also uses the Radial Distortion module to undistort radial effects due to the camera lens.

Source
Transformed
Source
Transformed
Source
Transformed

The unwarping process will straighten horizontal lines and allow text characters to occupy the appropriate space. Note in the last example, how the corrected transform appears like a standard grid. This is a good way to calibrate the system to ensure that you have the optimal configuration for your situation.

See Also


Radial Distortion


 New Post 

Bottle_Unwrap Related Forum PostsLast postPostsViews
Pinch?
I've been trying to flatten out the text on the prescription bottles, and the closest I have come is using bottle unwrap along ...
4 years 11 1111
object recognition
Hi Steven, I'm continuing work on the pill bottle problem. I've successfully unwrapped the bottle...
4 years 4 1082
Resulting image size
When I run a transform in the RR UI, the resulting image is the same size as the original. I can't see an obvious way to change...
4 years 6 984