.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_packages_scikit-image_auto_examples_plot_features.py: Affine transform ================= Warping and affine transforms of images. .. image:: /packages/scikit-image/auto_examples/images/sphx_glr_plot_features_001.png :class: sphx-glr-single-img .. code-block:: python from matplotlib import pyplot as plt from skimage import data from skimage.feature import corner_harris, corner_subpix, corner_peaks from skimage.transform import warp, AffineTransform tform = AffineTransform(scale=(1.3, 1.1), rotation=1, shear=0.7, translation=(210, 50)) image = warp(data.checkerboard(), tform.inverse, output_shape=(350, 350)) coords = corner_peaks(corner_harris(image), min_distance=5) coords_subpix = corner_subpix(image, coords, window_size=13) plt.gray() plt.imshow(image, interpolation='nearest') plt.plot(coords_subpix[:, 1], coords_subpix[:, 0], '+r', markersize=15, mew=5) plt.plot(coords[:, 1], coords[:, 0], '.b', markersize=7) plt.axis('off') plt.show() **Total running time of the script:** ( 0 minutes 0.055 seconds) .. _sphx_glr_download_packages_scikit-image_auto_examples_plot_features.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: plot_features.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: plot_features.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_