Logarithm and Exponential Data

Building the Cantata Workspace


To build the logarithm table of length 256 with values ranging from 0 to 255, we can use the following recipe:

  1. Create a 1D ramp signal type "float" (width 1, height 256) varying from 0 to 1000 using the following parameters in the Piecewise Linear operator:
    Number Rows:  256	Sampling Freq: 1
    Number Cols:    1	Minimum Value: 0
    Number Bands:   1	Maximum Value: 1000
    X Period:     256	Y Period:      256
    X Rise Time:    0	Y Rise Time:   256
    X Fall Time:    0	Y Fall Time:   0
    X Pulse Width   0	Y Pulse Width: 0
    
  2. Take the log(value+1) of the table using the Logarithm operator.
  3. Normalize and convert the result of the logarithm table to type unsigned byte using the Normalize operator.
  4. Plot the table using the 2D Plot operator.
  5. To make this 1D signal a color table it is necessary to transfer the data from the Value segment to the Map segment. Use the Copy from Value operator.
  6. You can print the table using the operators Print Data and File Viewer.

To build the exponential table, you can follow the same procedure described above but applying the Exponential operator in step 2.


Exercises


DIP Feedback Form

Copyright © 1995 KRI, ISTEC, Ramiro Jordán, Roberto Lotufo. All Rights Reserved.