Configuring Image Processing Filters and Their Order

Digitizing a scientific graph can be hindered by insufficient contrast, hard-to-distinguish colors, scanning patterns or noise. The GX-TXT Image Processing tab lets you prepare a sequence of non-geometric filters to apply to the raster. The goal is to improve the readability of the image without changing its geometry, the axis calibration or the points already acquired.

This guide is devoted to the configuration of the filters and to the Standard and Advanced modes. Generating the actual processed preview, comparing the original with the result and publishing a new Image Dataset will be covered separately.

1. Starting from a Known Scientific Source

The example uses a teaching raster of 1280 × 900 pixels containing four colored traces, a grid and slight graininess. The curves represent only synthetic signals, not experimental measurements. The image is already loaded in Curve Digitalizer through an Image Dataset.

Image Processing tab with the non-geometric enhancement panel.
Figure 1. The tab offers non-geometric processing and controls that change neither the original image nor the calibration.
Synthetic graph with four colored traces, a grid and slight graininess.
Figure 2. The synthetic color graph is the unchanging source from which the choice of operations starts.

The configuration contains a four-corner calibration, with X from 0 to 10 seconds and Y from −20 to 80 millivolts, and a series with one manual point. These elements make it possible to tell changes to the pipeline apart from changes to the scientific data.

2. Opening Image Processing

Select Image Processing in the Viewer tab bar or use View → Image Processing…. At the top of the panel there is the reminder Non-geometric image enhancement: the available filters act on contrast, intensity and channels, not on rotations, translations or distortions.

Top of the Image Processing panel with comparison and preview options.
Figure 3. The comparison, synchronization and live preview preferences are separate from the list of filters.

The left side contains the commands, while the Canvas on the right shows the image; the layout can change when side-by-side comparison is turned on.

3. The Scrollable List of Filters

The operations are shown in separate rows. Each row has a checkbox that enables the filter and, where applicable, a choice from a menu, a slider or a numeric field.

Scrollable list of filter rows with checkboxes and controls.
Figure 4. The filter rows scroll and each offers its own checkbox and controls.
Detail of filter rows with checkboxes and numeric values.
Figure 5. For each filter, enabling is distinct from the numeric value set.

The parameters state how a filter will work; the checkbox decides whether that filter takes part in the pipeline. A disabled numeric control does not correspond to an active operation.

4. The Lower Commands of the Panel

Scrolling down you find Reset filters, Try automatic enhancement, Restore filters before auto enhancement, Show processed preview, Apply processing / Preview and the Publish processed Image Dataset area.

Lower part of the panel with Reset filters, Try automatic enhancement and Apply processing / Preview.
Figure 6. Reset filters, automatic suggestion and publishing are different actions.
Publish processed Image Dataset area at the bottom of the panel.
Figure 7. The operator can prepare the pipeline without publishing a new Dataset.

These are different operations: choosing filters, generating a preview and publishing a Dataset must not be confused. In particular, having a configured pipeline does not mean that a processed raster has already been created.

5. Checking the ImageMagick Engine

GX-TXT uses ImageMagick for processing. The availability of the engine is reported at the top of Image Processing. If the engine is not configured, the other Digitalizer commands remain usable, but the result of the filters cannot be obtained.

The engine is configured through GX-TXT Configuration → Runtime → ImageMagick. There is no need to set arbitrary paths directly in the filter list.

6. Turning Off Live Preview During Preparation

The Live preview after changing a control command requests a new processing run after a filter is changed, when the engine is available. The request is briefly deferred to avoid recomputing at every small slider movement.

To prepare a pipeline calmly, temporarily turn off Live preview.

Live preview after changing a control checkbox turned off.
Figure 8. Disabling automatic recomputation lets you prepare the filters without invoking the processing.

The operations are updated in the configuration even when no new preview is generated. Apply processing / Preview stays distinct from editing the field.

7. Enabling a Numeric Parameter: Gamma

A numeric filter has a value that can be changed with the visible control. For example, Gamma acts on the non-linear relationship between input intensity and output intensity; it does not change the pixel coordinates.

Gamma row enabled with a modified value.
Figure 9. Changing the value creates a Gamma operation in the current pipeline.

The chosen number becomes part of the active operation. To verify a scientific result, you need to note both the filter type and its value.

8. Color Channel and Grayscale in Standard

In Standard mode, Color channel and Grayscale are alternatives: the first selects a component of the image; the second removes the color differences.

Color channel and Grayscale rows in Standard mode.
Figure 10. The two controls are alternatives in the simple ordering mode.
Grayscale enabled and Color channel disabled.
Figure 11. Selecting Grayscale removes the previous Color channel from the Standard pipeline.

Enabling Grayscale removes a previous Color channel operation from the Standard sequence. It therefore makes no sense to assume that both act at the same time in this simple mode.

9. Selecting a Color Channel

For Color channel the choices are Red, Green, Blue and Luminance. Choose the channel in which the trace to be recognized stands out most from the grid or the other curves.

Color channel menu with Red, Green, Blue and Luminance options.
Figure 12. Enabling Color channel removes Grayscale and lets you choose Red, Green, Blue or Luminance.

A channel can improve the contrast of one curve and worsen that of another. The choice must depend on the real color of the stroke and on the purpose of the digitization, not on a universally correct default value.

10. Enabling and Disabling a Filter with a Parameter

The Median denoise filter attenuates very small local features through median processing controlled by the radius. If the checkbox is disabled, the filter no longer appears among the actual operations.

Median denoise row after being disabled and re-enabled.
Figure 13. The example recalls the need to check the parameters after turning a filter off and on again.

In the Viewer version examined, after disabling and re-enabling a numeric filter you need to check its parameter again: some settings may go back to the default value. The checking procedure is illustrated later with Gamma.

11. Building a Standard Pipeline with Several Operations

Enable the necessary filters with their checkboxes. In the demonstration configuration ten filters are active; Grayscale stays disabled because Color channel is enabled.

Standard pipeline with several filters enabled.
Figure 14. The operations are sorted by type, not simply by the order in which they were enabled.
Rows for CLAHE, Sharpen, Invert colors and Threshold.
Figure 15. CLAHE, Sharpen, Invert colors and Threshold can be enabled and adjusted like the other rows.
CLAHE row with grid, bins and clip settings.
Figure 16. The numeric values and choices of CLAHE are explicit parameters of the pipeline.
Standard pipeline after changing individual filters.
Figure 17. The actual order is kept by Standard mode while individual filters are changed.

There is no need to use all the filters in real work. A short, scientifically motivated pipeline is often easier to check, document and reproduce than a long chain of processing steps.

12. How Standard Determines the Order

Standard sorts the filters according to a fixed sequence, independent of the order in which the user enabled them:

PositionOperation
1Color channel
2Grayscale
3Median denoise
4Auto levels
5Contrast stretch
6Brightness / contrast
7Gamma
8Local contrast (CLAHE)
9Sharpen
10Invert colors
11Threshold

Operations that are not enabled are skipped; in practice Standard keeps only the rows actually selected. This sequence is a reasonable starting point, not a guarantee of optimal quality.

13. Switching to Advanced

Selecting Advanced under Filter order shows the Advanced · exact processing order frame, with a numbered list of the actual steps.

Advanced exact processing order list with numbered steps.
Figure 18. The list shows the position, name and value of each enabled operation.
Advanced list with Move up, Move down and Remove buttons.
Figure 19. The position of the operations can be changed without changing the scientific source.

In the list, each row shows position, filter type and value. The list is distinct from the checkboxes: it describes the processing sequence, not the fixed list of all available controls.

14. Move Up and Move Down Change the Pipeline

Select a row and press Move down or Move up. For example, moving Color channel below Median denoise, the order no longer matches the one imposed by Standard.

Advanced list with Median denoise above Color channel.
Figure 20. The Median filter comes before Color channel, showing an order different from Standard.

Further moves can change the sequence again.

Advanced list after further reordering.
Figure 21. Move up and Move down change the actual order of the operations saved in the configuration.

Changing the order is scientifically significant because many photometric operations do not commute: applying A and then B is not necessarily the same as applying B and then A.

15. Movement Limits and Remove

The first step cannot be moved further up and the last cannot be moved further down. These attempts leave the pipeline unchanged.

The Remove button deletes the selected operation from the list.

Advanced list after removing one operation.
Figure 22. Remove deletes the selected row and leaves the other operations available.

Its checkbox is disabled and the other operations remain. If the filter is later re-enabled in Advanced, it may be added at the end of the list; check the order and the parameter again.

16. Out-of-Range Parameters: Median Denoise

The radius of Median denoise ranges from 1 to 10. Entering 11, the Viewer reports that the value is invalid.

Median denoise field set to 11.
Figure 23. Median denoise accepts values from 1 to 10; a value of 11 does not change the previous valid operation.
Error message for an out-of-range Median denoise radius.
Figure 24. The message identifies the numeric limit of the filter and asks for the input to be corrected.

The recorded operation keeps the previous valid value. Do not mistake the invalid number still visible in the field for the parameter actually accepted in the list.

17. Out-of-Range Parameters: Gamma

Gamma validation requires a value between 0.05 and 10. Entering 0, the Viewer rejects the change.

Gamma field set to 0.
Figure 25. The value zero is rejected and the previous valid parameter stays recorded in the pipeline.
Error message for an out-of-range Gamma value.
Figure 26. Gamma must be between 0.05 and 10 according to the processing validation.

Here too the invalid number must not be considered part of the pipeline. Correct the field with an allowed value and check the row in the list before applying the processing.

18. Going Back to Standard

When switching explicitly from Advanced to Standard, the Viewer reorders the operations according to the default sequence.

Pipeline reordered after switching back to Standard.
Figure 27. The Viewer reorders all the filters again according to the Standard sequence.

This operation should not be done carelessly when the Advanced order was chosen for a precise scientific purpose. The final result depends not only on the values but also on their order.

19. The Advanced List Is Reversible

In Advanced, a filter can be moved up and later returned to its previous position.

Advanced list restored to the previous order.
Figure 28. Two consecutive swaps can rebuild the previous order without losing the parameters.

In the example, two opposite moves rebuild the previous sequence, without losing the parameters of the operations that stayed enabled.

20. Reset Filters: Clearing the Pipeline

Reset filters deletes all the configured processing operations.

Filter list after Reset filters with all filters disabled.
Figure 29. Reset filters deletes the operations of the current configuration, not the points of the scientific series.
Empty Advanced processing order list.
Figure 30. The cleared pipeline is ready for a new sequence to be entered.

The original raster is not deleted and the manual point of the curve stays in place. Reset is useful when you want to redesign the filters starting from a state with no active operations.

21. Building an Essential Advanced Pipeline

A deliberately non-Standard example uses three operations in this order:

Gamma 1.8 → Threshold 42 → Median 3

Advanced list with Gamma, Threshold and Median in that order.
Figure 31. The order Gamma, Threshold, Median does not match the default Standard sequence.
Filter rows with Gamma 1.8, Threshold 42 and Median 3.
Figure 32. The values Gamma 1.8, Threshold 42 and Median 3 are part of the configuration that can be saved.

The Advanced list makes the order explicit. In Standard the same filters would be ordered Median → Gamma → Threshold. The two orders do not necessarily represent the same processing.

22. Why the Order Matters

Gamma changes intensities non-linearly; Threshold separates the levels with respect to a threshold; Median acts on the local result. If a threshold is applied before a tonal transformation, the decision to classify a pixel can change.

For this reason a reproducible pipeline requires names, parameters, order and source. It is not enough to write that an image was simply enhanced.

23. Saving the Configuration

After checking the order and all the values, use Configuration → Save configuration.

Configuration menu with Save configuration.
Figure 33. The operator can save the order explicitly and find it again in the same Session.

The parameters and the sequence of operations are saved in the Viewer configuration. This step must not be confused with publishing a new Image Dataset, nor with the corresponding preview having already been produced.

24. Reopening in the Same Session

Close the Viewer normally, reopen it from the Session and go back to Image Processing.

Reopened Advanced list with Gamma, Threshold and Median.
Figure 34. After Save and Reopen, Gamma 1.8, Threshold 42 and Median 3 reappear in the custom order.
Reopened Image Processing tab still in Advanced mode.
Figure 35. The list of operations is not arbitrarily rebuilt in Standard.

In the example, Gamma 1.8 → Threshold 42 → Median 3 is recovered, still in Advanced, together with the disabled Live preview preference. The persistence of the order makes it possible to reconstruct the preparation of the future processing.

25. Image Processing Is Not the Point Editor

The Image Processing tab lets you prepare an image, not edit scientific records by clicking on the Canvas. Manual editing of points takes place in the Curves tab.

Image Processing tab active with the series points unchanged.
Figure 36. A click on the image view and the Delete key in this tab neither add nor delete scientific points.

A click on the image and the Delete key, while Image Processing is active, neither add nor remove points of the series. The calibration and the source keep the same coordinates.

26. Checking the Value Before Disabling Gamma

Suppose an Advanced pipeline contains Gamma = 1.8.

Gamma row showing 1.8.
Figure 37. The numeric field shows the chosen, valid parameter of the current configuration.
Advanced list entry showing Gamma 1.8.
Figure 38. This value is the reference for checking the effect of the On/Off command.

Before using the On/Off button, it is useful to check the value in the row and in the actual sequence, so that it can be restored if needed.

27. Disabling Gamma Can Restore the Default Value

In the version examined, disabling Gamma changes its numeric control from 1.8 to 1.0, which is the default value.

Gamma row disabled with the value reset to 1.0.
Figure 39. In the version checked, disabling loses the numeric value 1.8.
Detail of the Gamma field showing 1.0 after disabling.
Figure 40. The Off checkbox restored the default instead of keeping the value written earlier.

This is a limitation to keep in mind: disabling the filter does not currently guarantee that the previously chosen parameter is kept.

28. Re-enabling Gamma Does Not Recover the Number

When Gamma is re-enabled, the row still shows 1.0 instead of 1.8.

Gamma row re-enabled still showing 1.0.
Figure 41. Re-enabling Gamma does not automatically restore the value 1.8 used before.
Advanced list entry showing Gamma 1.0 after re-enabling.
Figure 42. The correct parameter must be set again manually after the toggle.

The same kind of parameter loss was found with Median denoise. Before generating a new preview, set the desired value again and check the order of the operations, especially when Advanced mode is active.

29. Restoring Value and Order

To recover the desired sequence, set Gamma 1.8 again and move it to the intended position with the Advanced controls.

Advanced list with Gamma 1.8, Threshold 42 and Median 3 restored.
Figure 43. Entering Gamma 1.8 again and reordering the list recovers the intended pipeline.
Final Advanced pipeline before saving the configuration.
Figure 44. The last check of the sequence comes before Save configuration in the private Session.

Check the whole pipeline before saving. This avoids mistakenly using a filter with a default parameter instead of the one motivated for the image under examination.

30. Reference of the Available Filters

FilterParameterMain use
Color channelRed, Green, Blue, LuminanceIsolate a color component
GrayscaleOn / offReduce to gray levels
Median denoiseRadius 1–10Reduce local noise
Auto levelsOn / offExpand the tonal range
Contrast stretchPercentage 0–20Reduce the influence of the distribution tails
Brightness / contrastTwo values −100…100Adjust brightness and contrast
GammaPositive value, validated 0.05–10Non-linear tonal transformation
Local contrast (CLAHE)Grid, bins, clipLocal contrast
SharpenSigma 0.1–4.9Increase the apparent sharpness of edges
Invert colorsOn / offInvert the levels
ThresholdPercentage 0–100Separation by threshold

For CLAHE, the available grids are 2×2, 4×4, 8×8, 16×16 and 32×32; the available bins values are 64, 128 and 256, while clip takes integers from 1 to 5. The Sharpen control accepts the internal parameter in the form 0xSigma, for example 0x1.6.

These settings are processing tools; they are not equivalent to scale corrections or scientific measurements. The parameters must be chosen according to the original quality of the image.

31. Comparison, Preview and Automatic Suggestion

The panel also offers Compare original and processed images (split view), Synchronize pan and zoom, Show digitized curve overlays in comparison and Show processed preview. These options concern the display and do not replace the choice of filters.

The Try automatic enhancement button proposes a possible enhancement sequence; Restore filters before auto enhancement lets you recover the previous configuration, when available in the current configuration and source. An automatic proposal must not be considered valid without a visual comparison.

The Apply processing / Preview command is used to generate the processed image to be examined. Handling the two Canvases and checking the images produced will be covered in the guide devoted to the preview.

32. Getting Ready to Use the Results

Before applying a real processing:

  1. Check the source and the calibration; do not alter the original geometry.
  2. Identify the visual problem to correct: channel, noise, local contrast, gamma or threshold.
  3. Choose a limited number of filters with motivated parameters.
  4. Use Standard as a starting point, or Advanced when the order is an essential part of the method.
  5. After every re-enabling, check that the numeric values have not gone back to the defaults.
  6. Confirm the order and save the configuration.
  7. Generate and evaluate the preview before relying on the processed trace for a digitization.
  8. Publish a new Dataset only when the processed version has been checked and must be kept separately.

The pipeline does not destroy the original image. However, a more contrasted image is not necessarily more faithful to the data: a filter can remove a faint part of the line, change the apparent edge or emphasize an artifact. For scientific digitization, the reference always remains the original raster together with the documented calibration.