next up previous contents index
Next: Fourier Transform Up: Process menu Previous: Enhance spots   Contents   Index


Trace curve

Tnimage can convert an image of a graph, chromatogram, etc., into an ASCII file. Currently, tnimage only traces in 1 dimension, and from left to right. Contour tracings will be implemented later.

Procedure for tracing curves

  1. Convert the image to grayscale. Pseudocolor images cannot be traced accurately.
  2. Clean up the image to remove any stray specks, labels, or other points that could be confused with the graph. The entire image must be clean, including the edges. The trace will jump to the darkest y-value point for each x value, regardless of where it is located on the image, even if it is not visible on the screen. Use ``Paint region'' if necessary to eliminate nonwhite areas from the image.
  3. Select ``Image...Trace curve''.
  4. To cause the trace to be saved automatically, check ``Save trace''.
  5. If ``Plot trace'' is checked, the data will be displayed. Clicking on the ``Save'' button will save it. While the graph is visible, it is possible to smooth it, subtract a background, measure areas, etc. (See ``Plotting densitometry results'').
  6. Find the pixel value of the curve to trace by moving the mouse onto the desired area. The pixel value is displayed in the information box on the left after ``i=''. Set ``Color to track'' to this value.
  7. Click on ``OK'', then move the mouse cursor to the left end of the curve and click the left mouse button.


A cross-hair cursor indicates what is being traced out. Click on ``Cancel'' when finished.

Sometimes, sharpening or thresholding the image can improve the tracing. If there are extremely sharp corners in the image, it may be necessary to manually create a channel between the ascending and descending parts of the peak to force the trace to follow to the top. This can be done by selecting ``Draw'' from the menu, or pressing F2 (=manual draw), and carefully moving around with the cursor keys (Be sure to back up your image before starting).

Checking ``Debug'' waits for a keypress after each x increment (in the DOS version) and prints the x, y, and the pixel value being tracked. This is helpful if stray noise pixels are accidentally getting included in the scan. In Unix, this option prints the values to stdout without pausing. It is possible to get a file containing this debug information by starting tnimage with the command tnimage $ >$ debug.file .

Only pixels on the selected image are included in the trace. Thus, in order to trace something in the background, it must be converted to an image first (use ``File...Create/resize image''). The tracing algorithm tracks whatever pixel is closest to the selected tracking color for each x value. Thus, if the image contains a pixel closer to the tracking color than any pixels on the curve, the cursor will jump to this area instead of tracing the curve. If the pixel is beyond the edge of the screen, the cursor will jump to the edge of the screen. If this occurs, it will be necessary to delete the offending area before tracing anything (The ``backspace'' key is the most convenient way to do this).


next up previous contents index
Next: Fourier Transform Up: Process menu Previous: Enhance spots   Contents   Index
root 2006-11-13