Hough Transform applied to a square grating.
This example shows how to load an example image, take the Linear
Hough Transform, and examine both the image and the transform with the Hough
Tool. The line spacings in each direction and the angle between the
lines can now be measured automatically.
- Set Lispix to load RGB images as gray level.
- Expand the menu bar.
Click the 'Open color images as color' button so that
it says 'Open color images as gray level'. If it
already says that, you don't need to click it.
- The square grating image that you are about to load is a JPEG image.
JPEG encoding is for RGB color, so even gray level images will be loaded
that way. The grating image will appear blue if loaded as a color image
into Lispix. (NIH Image and Photoshop load the image as a gray level automatically,
presumably assuming that if two of the color planes are zero, then the
remaining plane represents a gray level image. Lispix does not make that
- Open the square trating 30kx image.
- Square grating image:
- The image is this the size shown, and the Hough transform is larger.
I cropped the grating image
for this example for these web pages:
- Invoke the Hough Transform
- Open the Hough Tool, set some parameters:
- These steps set up the Hough Tool, so that clicking on the Hough Transform
will mark the corresponding line in the image, and clicking on the image
will mark the corresponding sinusoid in the Hough Transform.
- The sinusoids are barely visible – many of them add together to
make the dot that corresponds to any line.
- Note that you can click and drag in either image to see the corresponding
graphic in the other image in real time.
- Hough Tool Graphics: