AD splash image

AD751 –
a tool for laid lines density measurements 
from paper structure reproductions


The analysis of the density of papermaking mould screen imprints is instrumental in dating, localizing and classifying papers. By dividing digital reproductions of paper structures into spots, the AD751 offers a precise measurement tool with rich statistical possibilities, both quantitative and qualitative. AD751 is based on the Fourier transform. The technique of locating the frequency of the laid lines is discussed in this article, with emphasis on the benefits and problems of the ‘emboss’ high-pass filter.


AD751 was successfully used for analysing 5000 paper reproductions at the Instituto Centrale di Patologia del Libro, Rome and for 18000 more at the Royal Library, The Hague.


An article discuss the methodological issues, the automated solution and the historical information that can be obtained.


Vlad Atanasiu & Multimedia Press

60, rue Vitruve, 75020 Paris, France
atanasiu@excite.com
http://mywebpage.netscape.com/atanasiuvlad/frq/

28 September 2003

 
 

A D 7 5 1 v 1.12



D O C U M E N T A T I O N






Install
License
Analysis settings
Reading the windows
Version history
Handling the data files
AD751’s name explained
 

Install


Windows 98/NT/2000 standalone version

  1. Create a directory called ad751w and copy ad751w.exe into it.
  2. Double-click on the ad751w.exe file which will create other files.
  3. Double-click on the ad751.bat file to launch the AD751 application.
Image samples are to be found in the batch directory.
 

Matlab files
 

  1. Unzip the ad751m.zip file
  2. Copy the ave folder under the Matlab directory toolbox
  3. Start Matlab and add the toolbox/ave/ path with subfolders to the Matlab search path ( [ File > Set path > Add with Subfolders ] )
  4. Start AD751 from the Matlab command by typing ad751
Functions from the following toolboxes are used: matlab, image analysis, mapping, neural network, satistics.

Image samples are to be found in the ../toolbox/ave/images/ad751/batch/ directory.
 
 

License



based on the MIT Open Source License:
http://www.opensource.org/licenses/mit-license.html

Copyright (c) 2002-3 Vlad ATANASIU & Multimedia Press - AD751 v1.12

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

If you modify the software you can add your own copyright in the line following the initial notice as follows:
Copyright (c) <year> <your name> - AD751 modified <version starting with v1.0>
 
 

Screenshots


Figure 1.
The settings window

Figure 2. - below
Rotating the image (square region enclosed by the green line)

Figure 3. - below
Measuring the spot densities and computing global statistics

 
 

Analysis settings


  1. Buttons
    1. Load image
      Close windows
      Help
      About
      Analyse
  2. Methods
    1. Hi-fi measure
      Multi-spot measure
      Global measure
  3. Filters
    1. Trim borders
      Centered
      Axial orientation
      Double emboss
      Unraster
  4. Scale
    1. 1:1 reproductions
      Rescaled image
      Add ½ line
  5. Varia
    1. Jet colormap
      Language
      Batch / Show / Pause
Button – [ Load image ]

This button opens a file explorer dialog box, letting you chose the image(s) you want to analyse. It will be displayed on the right side of the windows and its path under the [ Load image ] button. Its dimensions are given beneath it.

Supported image formats are jpg, tif (compressed tif's are not supported and such files will be skipped), bmp, png, pcx, hdf, xwd.

It is possible to analyse images one by one or in batches. In the later case you can load an image from the folder wich contain all the images you want to analyse, check the [ Batch ] checkbox and press the [ Analyse ] button. Files that cannot be processed are skipt.

You can also write a txt file containing the absolute adresses of the image files - thus it is possible to process images in different directories and subdirectories in just one batch. Example:

C:\\MATLAB6p5\toolbox\ave\images\ad751\batch\00027.jpg
C:\\MATLAB6p5\toolbox\ave\images\ad751\batch\00027.jpg
...

Sample images are provided in the batch directory. Don't forget to make a copy if you intend to empty the directory.
 

Button – [ Close windows ]

Closes all windows opened during the analysis process.
 

Button – [ Help ]

Opens this file in a web browser.
 

Button – [ About ]

Author, version and acknowledgements for AD751.
 

Button – [ Analyse ]

Once all settings were chosen, pressing this button will start the image analysis. All data are automatically saved in files at the location where the image or batch file is located.
 

Method – [ Hi-fi measure ]

This is the most precise method, but also the most slow one. It looks over the whole image for spots of exactly 20 even spaced laid lines, computing their respective densities. Spots with aberrant values are discarded (a difference greater than 1mm from the values given by a auto multi-spot measurement). If no 20 lines spot is found, the multi-spot measure will be used.

All density measurements are made by considering the distance between the peak of the 1st laid line to one pixel before the 21st line.
 

Method – [ Multi-spot measure ]

This method moves a spot of fixed width at a specified interval across the whole image and computers the spot density. The density that would be that of 20 lines is inferred from the actual spot density, whatever the number of laid lines in it. This is the source of a slight difference from the hi-fi mode.

AD751 attempts to have spot heights with 20 lines. Therefore the height of the spot is deduced by dividing the entire image height by the total number of lines and multiplied by 20. The step of the spot movement is half its height.

To maximise the analysis sensibility the spots are equal in width to the image.

Aberrant values are disregarded. Is considered ‘aberrant’ a spot not containing between 16 & 24 inclusive lines.

It is possible to skip from automatic height evaluation to manual height setting. This feature can help fine-tune a particular spot so that it contains exactly 20 lines.
 

Method – [ Global measure ]

In the global method the density is given by the number of laid lines covering the space between the first line in the image to one pixel before the last one.

Blurs in the image can cause one or more lines to disappear – this is a supplementary reason to why the global measure is less precise than the hi-fi measure.
 

Filters – [ Trim borders ]

By using the sliders by the side of the image you can chose for analysis just one region of interest out of the whole image. It is however strongly recommended that borders such as rules superposed on the image, be cut off.

You cannot trim an image if there is no image loaded - as is the case when you start AD751. Load an image in order to trim it.
 

Filters – [ Centered ]

This option allows you to define a region of interest centered on the center of the image. It's dimension will not vary if the image is replaced (unless the subsequent image is smaller, in which case the region is reduced to the image's dimension).

The option is usefull if you want to analyse a group of images of varying dimensions and want to keep the dimension of the analysed region constant. It also helps eliminate borders on different sized images.

If this option is unchecked, AD751 will cut a constant number of pixels counting from the outside inwards.

Please note that in this case and if you batch images where you start with a large sized image and trim a surface bigger than the total surface of any following image, the trim will be reset to zero to accomodate the change in size.
 

Filters – [ Axial orientation ]

In order to give correct results the laid lines have to be horizontal. By enabling this checkbox the image will be axially orientated and you can see the slant analysis by enabling show.
 

Filters – [ Double emboss ]

In the case of strongly compressed images, such as low quality jpg files, you have to uncheck this box, otherwise the results will be erroneous.
 

Filters – [ Unraster ]

If the image to be analysed is scanned from a printed document, like a watermark catalogue or album, the unraster option will suppress most of the fine typographic raster that interferes with the laid lines structure. The preset cutoff value supresses 30% of the highest frequencies. You can modify this value.

(If don't get good results, look at the Fourier transform in the Axial orientation window: if there are many maximas (red dots) inside the red square increase the cutoff value until they fall outside the square).
 

Scale – [ 1 : 1 reproduction ]

In order to compute the density, AD751 has to know the real life dimensions of the supplied image. In the case you use reproduction methods such as electronradiography or betagraphy, the resulting image will be in a 1:1 proportion to the original paper. To how many millimetres corresponds a pixel will depend on the scanning resolution. For image in a 1:1 scale digitised at 150 dpi, 1 pixel is 0.169333… mm.

The formula is : 25.4 / [scanning resolution in dots-per-inch (dpi)].
 

Scale – [ Rescaled image ]

If your image reproduce a paper at another scale than 1:1, you have to enable this setting and give the value of 1 pixel expressed in millimetres.
 

Scale – [ Add ½ line ]

Standard laid lines measurements are done on 20 ½ lines. If you have good reasons to use a density expressed for just 20 lines, then you can uncheck this option.
 

Varia – [ Jet colormap ]

Changes the color appearence of grayscale previsualization images. Can be usefull to emphasize aspects of the image, such as the attachement points of watermarks to the screen.
 

Varia – [ Language ]

The information displayed on windows or saved in files can be in Dutch, English, French, German or Italian.
 

Varia – [ Batch / Show / Pause ]

If you check this option all the images in the current directory will be analysed. They can be displayed and a pause made in-between so that you can inspect the analysis (press a key on the keyboard to move on to the next image - the images are left open on the screen for further examination and comparison). To spare time you can uncheck these last two options – a percentage bar will show you then the progress of the analysis.

You can cancel the batch process at any time without loosing the information from the images allready analysed: data is saved as soon as an image was analysed.
 

Reading the windows


The parameters window contains the command buttons described above, the analysis settings and a display of the image to be analyses.

The axial orientation is the second window that will show up in the case you enabled the appropriate option. The NW corner image shows the image to be analysed, after trimming and the slant (red line) found after orthogonalisation. For the axial orientation just a square in the middle of the image will be used (circumscribed by a green line). The Fourier transform is performed on this region (NE corner, displayed is the power spectrum) and the frequency corresponding to the laid lines indicated by arrows. Sideviews of the Fft facilitate the visualisation of its magnitudes on the FFTs of both the unfiltered and filtered image. If 'unraster' is enabled, then the cutoff frequency is displayed.

The laid lines frequency corresponds to the maximum on the Y-axis starting after the last frequency considered as noise. This threshold was found by filtering the image with a 90° ‘emboss’ filter, which would cut the low frequencies and leave as maximum magnitude of the Fft the laid lines frequency. Then the threshold will be set 4 units (if double emboss is unchecked, 15 units) lower than the maximum and the real lines frequency computed on the non-filtered input image.

The analysis window displays the location of the different analysed spots, with their respective densities and – for the multi-spot and global method – the number of lines they contain. The maximum density spot is displayed in red and those with aberrant values in yellow. Finally statistical measurements are provided:

  • spot mean density for 20 ½ lines (or 20 according to the user’s settings);
  • range of variation (maximum – minimum spot density);
  • standard deviation (of the sample, not population);
  • slant of laid lines before axial orientation.


Both spot and statistical data are saved in files.

By clicking with the right mouse button on the image or on the window itself, the image can be magnified. By holding down the mouse and moving it across the image, a region of interest can be zoomed.
 

Handling the data files


Statistical analysis on a large amount of images can be achieved by using the density data automatically saved by AD751 at each analysis, in the directory from where the image or batch file was loaded.

The AD751 Results - Spots.txt file contains the densities of each analysed spot, except for spots considered as aberrant, which are stored in the AD751 Results - Faults.txt file. The AD751 Results - Statistics.txt file stores the statistical calculations and the AD751 Results - Lines.txt file the number of lines for each spot. The settings used during each analysis session, as well as the amount of processed images and time is recorded in the AD751 Results - Settings.txt file.

The files can be imported in word processors for display, or in specialised programs for further statistical interpretation or visualisation.

Note that fractional numbers are displayed with a dot separator and not a comma, i.e. pi = 3.14 and not pi = 3,14. You may have to replace dots with commas when importing the data.
 
 

Version history


v1.13 / 11 October 2005
– Bug removed: if files with the same name than the AD751 splash image ('splash.jpg') or the help file ('help.html') do exist on the Matlab path, that one is loaded whichever is first, which might not be that of AD751. Bug corrected by specifying the directory where the files are to be found (ad751/).

v1.12 / 28 September 2003
– Tip: it was found that most images do not need a double emboss, so the default status of the checkbox was set to 'off'
– New functionality: you can load images from a list saved in a text file, thus it is possible to process images in different directories and subdirectories (see help on [ Load ])
– Bug removed: unraster was not working properly (the horizontal positioning of the filter was misplaced, so just images having rasters -45° to +45° were correctly unrasterized)
– Bug removed: headers will be written to results files when those files are created
– New functionality: 'Jet colormap'... after all not so usefull...
– It is possible now to modify the unraster cutoff limit
– Now loads black&white images also
– Shows plot of emboss-filtered image
– Shows unraster cutoff frequency
– Tab order OK
– Quirck bug removed: if the lowest dimension of the image was even and the maximal frequency was half of its dimension (the so-called Nyquist frequency) it diden't have a symetric value in the oposite DFT quadrant, so the slant angle was not correctly computed (ex.: KB8555, with a raster every two pixels set at 45°)

v1.11 / 20 August 2003
– Data from new measurements is added to that from previous analysis (prior to v1.11 each new data was overwriting the older one) - this is usefull when you analyse images one by one and want to have all the measurements in one file
– When batching the results are saved in files as soon as an image is analysed (and not at the end of the batch process) : memory is freed and long batches can be interrupted without loosing the allready computed data
– Bug removed : when hifi did not give any results, the density of the last spot measured during a batch was overriden with 'auto multi-spot'
– Bug removed : rasterized images that should have been analysed with the 'unrasterise' checkbox enabled, could have lead to AD751 to stop working
– A new file called 'settings' gives the the file name, the method, trimming coordinates, status of centered trimming, axial orientation, slant, double emboss, unraster, the scale, status of 1/2 line adding, number of mesurements from total, total files to be processed, files left over, start, end of process time, elapsed time
– Added a cancel buton on the wait bar in batch mode - no more need to force AD751 to close down to stop a batch process
– Scale saved from now on in settings file
– Slant saved only in statistics file
– Path of files given also when batching

v1.10 / 31 March 2002
– Minor orthograph & display issues.

v1.09 / 05 July 2002
– Line breaks & tabs need no more to be manually converted from delimitators when reading the results files - they are automatically generated.
– Waitbar displays remaing time of image batching.

v1.08
– You don't need anymore to generate manually a list of images for batch - if batch is checked you analyse all the images in the current directory.
– LZW compressed tif files are skipped in batch mode and the program doesen't block anymore when finding one
– The [ about ] button is accessible even before loading an image.
 
 

AD751’s name explained


AD751 stands for the year of the battle of Talas Valley, near Samarqand, Central Asia, occured between Muslim and Chinese armies, when the legend has that the knowledge of papermaking started its westward journey.


http://www.freenet.kg/kyrgyzstan/manas.html