Resolution TestsThis page explores the effects that scanning at various resolutions and bit-depths have on the localization accuracy of piano-roll punch holes. The test roll is a Duo-Art 5696 (Nov. 1915): Samson and Delilah Improvisation composed by Camille Saint-Saëns and performed by the composer. The sample region, shown on the right, starts 71 inches into the roll from the first note. This section was chosen since it had a range of punch lengths from 1 to 8 holes. The region represents 14 separate notes using 40 individual punches. The physical size of the region is 48.345 × 47.202 mm, or 1142 × 1115 pixels at 600 dpi.
Test scansClick on the icons in the following table to view the sample images scanned at different resolutions and bit-depths. An Epson GT-1500 flatbed scanner was used to scan the roll. However, each resolution level had slightly different physical offsets, so the color and greyscale images in the table are instead down-sampled versions of the 600 dpi color scan, and the 150 and 300 dpi 2-color images are down-samples of the 600 dpi 2-color scans. The 1200 dpi 2-color images are directly from the scanner; however, the native resolution of the scanner is 600 × 1200 dpi, so one axis is interpolated.
|24 bit||8 bit||1 bit|
|150 dpi||   |
For 2-color images, the roll was scanned at three threshold values of 20, 40 and 60. The lower threshold values generate smaller apparent diameters for the holes. The usable threshold range for the sample roll was from 20 to 70. Less than 20 will start to drop out holes, and thresholding above 70 will cause significant regions of the paper to be given the same color as the holes.
The following figure shows histograms for the pixel colors in the scan. Two peaks can be seen: a small one on the left which represents the color of the holes, and the larger peak to the right which is the color of the paper. For this test, a black background was used behind the paper to color the holes (also the lid of the scanner can be removed to generate a black background, although flattening the paper is more difficult in that case).
The figure shown below is an interactive overlay of circles covering hole punches in the 600 dpi 24-bit scan, manually placed using Adobe Illustrator. The assigned diameter of all punch holes are the same and are defined by hole #22.
Select various scan resolutions and bit depths to display underneath the manually identified punch locations. This is useful to examine how lower-resolution images and thresholding may affect punch hole identification (diameter and positioning). Also, adjust the overlay opacity and image zoom with the slides on the right. Note that zoomed image pixels are interpolated by the web browser, and may be done using different methods in different browsers.
Each of the 40 punches are numbered. The diameter of hole #22 was measured to be 1.692 mm, which is a diameter of 10.0 pixels at 150 dpi, 20.0 pixels at 300 dpi, 40.0 pixels at 600 dpi, and 79.9 pixels at 1200 dpi. At 10-feet per minute, the diameter of a hole is 33.3 milliseconds.
The separation between overlapping holes #20 and #21 is 1.196 mm (theoretically 1.191 mm for 1/256th of an inch). This is 7.1 pixels at 150 dpi, 14.1 pixels at 300 dpi, 28.3 pixels at 600 dpi, and 56.5 pixels at 1200 dpi. The duration of this distance is 23.5 milliseconds. The 1.196 mm spacing of punch holes is equivalent to 21.24 punches per inch.
Pixel durations (assuming 10 feet per minute): 3.33 ms at 150 dpi, 1.67 ms at 300 dpi, 0.833 ms at 600 dpi, and 0.417 ms at 1200 dpi. As a comparison, Standard MIDI note timing resolutions are 1 millsecond (0.9 ms).
Rows of punches are spaced 9 to the inch. The vertical distance between holes 16 and 3 is measured to be 2.974 mm (0.110 in) which is close to the theoretical value of 0.1111 inches, and represents a half-step. The vertical distance between holes 30 and 31 is 5.608 mm (0.221 in) which is close to the theoretical distance of 0.2222 inches and represents a whole-step. The distance between holes 3 and 33 is 33.671 mm (1.326 in) which represents an octave (theoretically spaced 1.3333 inches apart).
Physical coordinates of punchesThe following table gives the coordinates for the centers of each punch hole in the example images, based on the hand-aligned SVG image created in Adobe Photoshop. The units are in millimeters with the origin at the top left corner of the image. For example, the first point is 38.428 mm from the left margin, and 2.651 mm from the top margin.
It would be useful to process each of the test images in various piano-roll reading software systems (or sub-components of such systems) to see how accurately they match to the positions in the above table which are measured by hand in the 600-dpi image.