This exercise is intended to help students to understand how rectify and reference images using MATLAB. Possible applications are outcrop images (with a scale), aerial and satellite images (with reference points).
- Take a picture of a rectangular arrangement of objects, such as the exhibition of plates of rocks in the department building.
- Rectify and reference the image onto an orthogonal centimeter grid.
- Determine the size of the rock plates from the image.
Solution
- Take the image with a camera and import the image into MATLAB.
- Measure the width and the height of the rectangular arrangement of objects. In our example, the display of rock plates is 656 cm wide and 131 cm high.
- Pick pixel xy coordinates from the image using the MATLAB function ginput.
- Use the functions fitgeotrans and imwarp to rectify and reference the image.
- Use the data cursor of the Figure Window to determine the size of the rock plates.
Download the MATLAB script and example image.