Time for action – using imtool to extract useful information

Now that we know what the imtool can do, let's use it to get some more information about our image. Suppose that we want to know the color, depth, and size of our image, the values of the pixels around an area we want to inspect, and the distances (in pixels) of some pairs of points on the image, we will have to take the following steps:

  1. Click on the third icon from the left, Time for action – using imtool to extract useful information, that displays information about the image. You will see that the new window that appears contains a lot of information about the image, including its width, height, and bit depth.
    Time for action – using imtool to extract useful information
  2. To make your task easier, you should first zoom in using the magnifying glass with the plus symbol (Time for action – using imtool to extract useful information). Let's zoom in on the area containing the moving track (top of the image).
  3. Then, click on Time for action – using imtool to extract useful information and place the blue crosshair that appears on the image on the track. You will now be able to see the values of the pixels in the small area selected by your crosshair. If you enlarge the selected area by dragging its sides, the values will not be visible, but you will still be able to inspect details in the image.
    Time for action – using imtool to extract useful information
  4. Now let's measure the dimensions of the track that we have zoomed in on. Zoom in as much as you like to see the details and then click on Time for action – using imtool to extract useful information.
  5. To measure the length between two points, you should left-click on the first point and keeping the left mouse button clicked, move the cursor to the second point and release the mouse button. This will draw a line between the two points you selected and place a label on it, displaying its length in pixels. Let's repeat this process to measure the dimensions of the truck.
    Time for action – using imtool to extract useful information
  6. Now that you have measured the distances you needed, you might want to save the resulting image with the overlaid distance measurements. Click on File and then Print to Figure, in order to display your processed image in a new window and then navigate to File | Save As to get a chance to select the name and type of the image you want to save.

What just happened?

The process described previously is generally useful for people who work with image enhancement and analysis. In image processing, you will often need to inspect an image in terms of color values or measured in terms of distance, and so on. The analysis of the image regions should be easily extractable so that the results can be passed on to others. These functionalities are covered by imtool. In our example, we used the image information icon, which gave us an idea on what values to expect (8 bit depth means values from 0 to 255) and what the image dimensions are. Then, we located and inspected the region of our choice using the zoom in/out and the pixel values inspection tools. When we decided on the actual part of the image we wanted to measure, we used the distance measurement tool to see the dimensions of the selected object on screen. Finally, we exported our enhanced results to a new image of our chosen format, using the Print to Figure functionality.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset