Lab: Image Statistics

[Exercises] [Workspace]

Purpose: The purpose of this lab exercise is to calculate the histogram of an image, obtain the statistical parameters of an image, and to interpret the histogram of the image.

Activities:

  1. Calculate the histogram and statistics of the $DIP/data/gull.kdf image

    1. Read the image $DIP/data/gull.kdf and display it using the following operators from the cantata menu

      1. Glyphs:Input/Output:Data Files:User defined
      2. Glyphs:Visualization:Non-Interactive Display:Display Image
      3. Connect the operators and display the image

    2. Get the main statistics of the $DIP/data/gull.kdf image using the Statistics operator. Show the contents of the statistics in an ASCII output file using the operator File Viewer. From the cantata menu select

      1. Glyphs:Data Manip:Analysis & Information:Statistics
      2. Glyphs:Input/Output:Information:File Viewer
      3. Connect the output of User defined to the input of Statistics
      4. Connect the ASCII output of the Statistics object to the input of the File Viewer. To determine which of the two Statistics outputs is the ASCII output without opening he pane, place the mouse cursor over an output arrow on the Statistics operator, and look at the cantata status between the operator menus and the workspace. The name associated with the output arrow will be displayed there.
      5. Run the Statistics operator and the File Viewer to see the statistics of the image.

    3. Take the histogram of the image using the Histogram operator. Plot the histogram using the Display 2D Plot operator. From the cantata menus, select

      1. Glyphs:Data Manip:Histogram Operators:Histogram
      2. Glyphs:Visualization:Plot Display:Display 2D Plot
      3. Connect the output of User defined to the input of Histogram
      4. Connect the output of Histogram to the input of Display 2D Plot and run the operators.

  2. Repeat the steps above using the floating point image $DIP/data/spine.kdf. Compute the histogram from 1000 to 2000 using 100 bins.

    1. open the User defined pane and select the $DIP/data/spine.kdf.
    2. open the Histogram pane and set the "Number of Bins to 100", the "Bin Width" to 10, and the "Minimum" to 1000.
    3. Run the workspace. Look at the results of the statistics calculation. The minimum value in the image is 1024 and the maximum value is 1862, therefore so all values in the image have been included in the histogram.


Exercises

  1. Display and take the histogram of the image $DIP/data/lenina.kdf.

    1. What are the minimum and maximum pixel values in the image?
    2. What can you say regarding the range of gray-level used in the digitalization of this image?
    3. Why is the minimum value not zero and why so many values equal to 255?
    4. Can you give a name to those effects?

  2. Display and take the histogram of the image $DIP/data/musc1.kdf.

    1. How many different cell populations can you find in the image?
    2. Are they represented clearly in the histogram?


Khoros Workspace
Execute the visual program c1s3image-stats.wk



Main DIP Menu
DIP Feedback Form
Copyright © 1997-1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved