Tutorial 3: Convert black and white line charts.

This tutorial shows how to convert a black and white line chart to data. A black and white line chart in this tutorial refers to a chart containing black curves, a black frame of the data area, and black grid lines. This task cannot be achieved by Chart2Data alone, since there is no algorithm available that can distinguish between black pixels having idential greyscale values. In order to complete this task we need a little help from an Image Manipulation Programme like GIMP or MS Paint. For this tutorial we use the image file from the examples called:

black_lineChart_black_grid_dashed.JPG

black_lineChart_black_Mesh_dashed

The first step is cutting out precisely the data area. In this tutorial MS Paint is used. Select the tool Rectangular Selection.
In case you do not want to do this part of this tutorial right now, you can just read it now or jump right to the Chart Conversion part below, because in the example images a cutout version of this chart is provided.

tutorial_3_1

Now select the entire data area of the chart and use Cut to cut out the selected part of the image.

tutorial_3_1b

To ensure the optimum accuracy of the data of the converted chart, it is important to select the center of the data area’s frame lines. You can verify, if you have a done a good job, by checking the thickness of the lines of the data area’s frame after the cutout process. If there is still a thin line visible after the cutout process, then you have done a good job, selecting the center of the frame lines.

tutorial_3_1c

Now select New from the File Menu to open a new empty image and insert the cutout part using Ctrl + V. Then save the new image.

tutorial_3_2

Now select the Free-Form Selection in order to select a large portion of the image that has to be removed.

tutorial_3_2b

Use the tool Cut in order to cut out the selected part of the image.

tutorial_3_2c

In order to remove single pixels close to the curves which we would like to keep in the image, we use the tool erase.

tutorial_3_2d

Let’s delete the remaining grid lines until the cutout image looks like the image below. Do not forget to erase the black pixels of the frame lines of the data area at the edges of the coutout image.

tutorial_3_2e

So your chart is supposed to look like this after the image preprocessing with MS Paint. In the circled area we can still make out the grid lines due to the “Halo”-effect as a result of the JPG compression algorithm. We do not have to worry about this, because Chart2Data can deal with it because of two features. This will be pointed out later.

Now it’s time to start Chart2Data.The tutorial is shown in expert mode (dark blue background). If you start Chart2Data for the first time the app is in Wizard mode by default (dark purple background). You can change the user mode in the App settings. Note: in case you change the user mode during a chart conversion process the new setting will be saved but will not be active since the user mode cannot be changed during a chart conversion process. The new setting will become active once you reach the start page again and choose a chart category.

From the Start Page we choose Line / Scatter Chart by clicking / tapping the Line / Scatter Chart Icon. The differences between Expert and Wizard Modes are described in tutorial 1.

Chart2Data_Screenshot_1

Then click / tap on the large folder icon to open the image.

tutorial_1_1

Open your new cutout image. For the tutorial we use the prepared image called:

black_lineChart_black_grid_dashed_CUTOUT.JPG

tutorial_3_3

Afterwards your screen should look like this. You can ignore the message (ATTENTION: entire area of image will be used as data area), because that is exactly what we intended to d0, since the whole image area is now the data area after the image cutout.

tutorial_3_3b

As in tutorial 1 we now have to set the scale limits for the x- and y-axes. Let’s start with the lower limit of the y-scale by clicking / tapping the edit-box called y-value (lower scale limit) and using the (Onscreen-)Keyboard to edit it.

tutorial_3_4

Let’s do the same for the edit-box called y-value (upper scale limit).

tutorial_3_5

Now we need to repeat the previous two steps for setting the the x-scale limits.

tutorial_3_6

tutorial_3_7

So, now that we are done, we leave all other controls untouched, since we do not need to have colored, black, or grey pixels renoved. The default value of the slider control Threshold ‘Greyscale-Conversion’ is set to a value of 200. This value tells Chart2Data which pixels have to be considered as ‘white’ (values above 200) and which pixels have to be considered as ‘black’ (values below 200). This is one feature to take care of the pixels with bright grey values originating from the “Halo”-effect of the JPG-compression algorithm. Due to the Threshold value of 200 these pixels will be considered ‘white’, so that these values do not show up in the converted data.

We click the Next button (arrow to the right on the upper right corner of the screen) to proceed.

tutorial_3_7b

Now your screen should look like the image below. We select Multiple Curves (column scan). The options column scan and row scan are described in tutorial 1. As a precaution we increase the Remove Smudge value to around 50. In case we have overlooked small parts of the grid lines and did not delete these patterns, these patterns will not be recognized as curves and will be neglected. Otherwise we would end up with the more than two y-columns in the converted data.

tutorial_3_8

Now we can finally start with the conversion process. So we click / tap on the Next button.

tutorial_3_8b

When the conversion process is finished we are prompted for a filename to store the converted data.

tutorial_1_13

When Chart2Data is finished writing the data to disc, the Results screen appears, showing the converted data. Now we are done! You may open the csv-file – created seconds ago – in your favorite spreadsheet software.

tutorial_3_10