Given a contour with an easily-identifiable edge, how would one straighten it and its contents, as pictured?
相关问题
- How to get the background from multiple images by
- Try to load image with Highgui.imread (OpenCV + An
- CV2 Image Error: error: (-215:Assertion failed) !s
- How do I apply a perspective transform with more t
- How to get the bounding box of text that are overl
相关文章
- How do I append metadata to an image in Matlab?
- Behavior of uniforms after glUseProgram() and spee
- Python open jp2 medical images - Scipy, glymur
- How to smooth the blocks of a 3D voxel world?
- On a 64 bit machine, can I safely operate on indiv
- Converting PIL Image to GTK Pixbuf
- Debugging unmanaged C++ images in Visual Studio
- Calculating Vertex Normals of a mesh [duplicate]
Detect the black edge and fit a spline curve to it.
From that spline you will be able to draw normals, and mark points regularly along it. This forms a (u, v) mesh that is easy to straighten.
To compute the destination image, draw horizontal rows, which correspond to particular normals in the source. Then sampling along the horizontal corresponds to some fractional (x, y) coordinates in the source. You can perform bilinear interpolation around the neighboring pixels to achieve good quality resampling.