12.12.2012 Views

Analysis of Ancient Mosaic Images for Dedicated ... - Institut Fresnel

Analysis of Ancient Mosaic Images for Dedicated ... - Institut Fresnel

Analysis of Ancient Mosaic Images for Dedicated ... - Institut Fresnel

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Analysis</strong> <strong>of</strong> <strong>Ancient</strong> <strong>Mosaic</strong> <strong>Images</strong> <strong>for</strong> <strong>Dedicated</strong> Applications 467<br />

Algorithm 1cms <strong>for</strong>mat coding.<br />

Require: <strong>Mosaic</strong> image I.<br />

Ensure: Tessera-oriented coding <strong>of</strong> I in filef.<br />

Tessera extraction (cf. Section 16.3).<br />

<strong>for</strong> n = 1, . . . , N do<br />

Write the number <strong>of</strong> contour pixels Nn ←f.<br />

Write the mean color value Vn ←f.<br />

Write the first contour pixel coordinates ln, cn ←f.<br />

<strong>for</strong> i = 2, . . . , Nn do<br />

Compute chain code direction <strong>for</strong> pixel i.<br />

Write direction ←f.<br />

end <strong>for</strong><br />

end <strong>for</strong><br />

Algorithm 2cms <strong>for</strong>mat decoding.<br />

Require: Compressed filef.<br />

Ensure: Tessera-oriented decoding <strong>of</strong> filefinto image I.<br />

Read file header → L, C, N, Rb, Gb, Bb.<br />

Create an image I with dimensions L × C and background color (Rb, Gb, Bb).<br />

<strong>for</strong> n = 1, . . . , N do<br />

Read tessera header → Nn, Rn, Gn, Bn, ln, cn.<br />

Set pixel (ln, cn) with color (Rn, Gn, Bn).<br />

<strong>for</strong> i = 2, . . . , Nn do<br />

Compute coordinates (li, ci).<br />

Set pixel (li, ci) with color (Rn, Gn, Bn).<br />

end <strong>for</strong><br />

Fill in the closed contour with color (Rn, Gn, Bn).<br />

end <strong>for</strong><br />

FIGURE 16.14<br />

Result <strong>of</strong> coding/decoding <strong>of</strong> the Deer image in Figure 16.10(a).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!