java.lang.Object
Ch21_Geometric_Operations.Mesh_Warp_Interactive
- All Implemented Interfaces:
PlugInFilter
,JavaDocHelp
ImageJ plugin, performs piecewise affine transformation by triangulation of the input image, as described in Sec. 21.1.8 (see Fig. 21.13) of [1].
The plugin projects a triangular grid onto the image which is mouse-editable, i.e., grid points can be selected and dragged. Note that the outer grid points (along the image border) cannot be moved. The grid is drawn as a graphic overlay. In each repaint iteration, pixel values are re-calculated by
- finding the containing (distorted) triangle of the pixel,
- calculating the affine mapping w.r.t. the original (undistorted) triangle,
- apply target-to-source mapping of pixel coordinates to the original (source) image and
- retrieving the interpolated pixel values from the original image.
The following mouse and keypoint events are observed:
- left mouse botton: select and drag grid points,
- right mouse botton: reset the grid,
- ctrl/+ key: zoom in,
- ctrl/- key; zoom out,
- enter or escape key: finish editing.
Note that this is a simplistic implementation which leaves much room for improvements and increased efficiency.
[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).
- Version:
- 2022/11/25
-
Field Summary
Fields inherited from interface ij.plugin.filter.PlugInFilter
CONVERT_TO_FLOAT, DOES_16, DOES_32, DOES_8C, DOES_8G, DOES_ALL, DOES_RGB, DOES_STACKS, DONE, FINAL_PROCESSING, KEEP_THRESHOLD, NO_CHANGES, NO_IMAGE_REQUIRED, NO_UNDO, NO_UNDO_RESET, PARALLELIZE_IMAGES, PARALLELIZE_STACKS, ROI_REQUIRED, SNAPSHOT, STACK_REQUIRED, SUPPORTS_MASKING
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor, asks to open a predefined sample image if no other image is currently open. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface imagingbook.core.jdoc.JavaDocHelp
getJavaDocUrl
-
Constructor Details
-
Mesh_Warp_Interactive
public Mesh_Warp_Interactive()Constructor, asks to open a predefined sample image if no other image is currently open.
-
-
Method Details
-
setup
- Specified by:
setup
in interfacePlugInFilter
-
run
- Specified by:
run
in interfacePlugInFilter
-