Thread: Request Handwrite Recognition
View Single Post
Old 07-07-2010, 03:33 PM   #18
kenjennings
Edge User
 
Guts of a Journal file and the stroke info . . .

An edge Journal file is a gzip'd compressed XML text file. The text describes the strokes. We only need some clever person to understand what is in the text file and convert it to something another handwriting recognition program would use.

I generated a test file in Journal that looks something like this:


A B C D E

This is a test

Black


Red

Blue

Orange



(Well' it looked kinda orange to me.) Inside the file it calls this color "yellow".

Uncompressed, the test Journal file looks like this:

Code:
<?xml version="1.0" standalone="no"?>
<xournal version="0.4.2.1">
<title>ESI journal v1.0</title>
<author>Kenneth Jennings</author>
<page width="396.00" height="540.00" tabname="">
<background type="solid" color="white" style="lined" />
<layer>
<stroke tool="pen" color="black" width="1.41">
72.48 81.60 72.48 80.16 73.44 78.24 74.40 76.32 75.84 73.92 76.32 72.48 76.80 71.04 77.76 69.60 78.24 67.68 79.20 66.24 79.68 64.80 80.16 63.36 80.64 61.92 81.12 60.48 81.60 59.04 81.60 57.12 82.08 55.68 82.08 57.12 82.08 58.56 82.56 61.44 82.56 63.36 82.56 64.80 82.56 67.20 83.04 69.12 83.04 71.04 83.04 72.96 83.04 74.40 83.52 75.84 84.00 77.76 84.00 79.20
</stroke>
<stroke tool="pen" color="black" width="1.41">
81.60 73.44 80.16 72.96 78.72 72.96 76.80 72.96
</stroke>
<stroke tool="pen" color="black" width="1.41">
115.20 64.80 115.20 63.36 115.20 64.80 115.20 66.72 115.20 68.16 115.20 69.60 115.20 71.52 114.72 72.96 114.72 74.40 114.72 75.84 114.72 77.28 114.72 79.20
</stroke>
<stroke tool="pen" color="black" width="1.41">
114.24 65.28 114.24 63.84 114.24 61.92 115.20 60.48 116.64 59.52 118.08 58.56 119.52 58.08 120.96 58.08 121.92 60.00 121.44 61.92 120.96 63.84 120.96 65.28 119.52 67.20 118.56 68.64 117.60 70.08 119.04 69.12 120.48 69.12 121.92 69.60 123.36 70.08 124.80 70.56 125.28 72.00 125.28 73.44 125.28 75.36 125.28 76.80 124.80 78.24 123.36 79.20 121.92 79.20 119.52 79.20 117.60 78.72 116.16 78.24
</stroke>
<stroke tool="pen" color="black" width="1.41">
157.92 65.28 157.44 63.84 156.00 63.84 154.56 64.32 152.16 64.80 149.76 65.76 148.32 66.72 145.92 68.64 143.52 72.00 143.52 73.44 143.52 74.88 144.96 77.28 146.40 78.72 148.32 79.68 150.24 80.16 152.64 80.64 155.52 80.16 158.40 79.68 161.76 79.20 164.64 78.24
</stroke>
<stroke tool="pen" color="black" width="1.41">
195.36 62.40 194.88 63.84 194.88 66.72 194.88 68.16 194.88 71.52 194.88 73.44 195.36 76.80 195.36 79.20 195.36 77.76
</stroke>
<stroke tool="pen" color="black" width="1.41">
192.48 64.80 192.00 63.36 192.48 61.92 193.92 61.44 195.36 60.96 196.80 60.48 198.72 60.48 200.64 60.48 202.56 60.96 204.00 61.44 205.44 63.36 206.40 64.80 206.88 66.24 206.88 67.68 207.36 69.60 207.36 71.04 207.36 73.44 206.88 75.84 206.40 78.24 205.44 80.16 202.56 82.08 201.12 82.56 196.80 83.04 195.36 83.04 193.92 83.04
</stroke>
<stroke tool="pen" color="black" width="1.41">
247.20 59.52 245.76 59.04 243.84 59.52 240.48 59.52 238.56 59.52 236.64 60.00 235.20 60.48 233.76 61.92 232.32 64.32 231.36 66.72 230.40 68.16 229.44 71.04 228.96 72.48 228.48 73.92 228.00 76.32 227.52 77.76 228.96 78.72 231.84 78.24 234.24 77.28 235.68 77.28 237.12 76.80 239.52 76.32 240.96 75.84 242.40 75.84
</stroke>
<stroke tool="pen" color="black" width="1.41">
231.36 71.52 232.80 71.04 234.72 70.56 236.16 70.08 238.08 69.60 240.00 69.60 241.44 69.60
</stroke>
<stroke tool="pen" color="black" width="1.41">
70.08 138.24 71.52 139.20 73.44 138.72 75.84 138.24 77.28 137.76 79.68 136.80 81.60 135.84 83.04 135.36 84.96 134.88 86.40 134.88 87.84 135.36
</stroke>
<stroke tool="pen" color="black" width="1.41">
75.36 142.56 74.88 141.12 75.84 139.68 75.84 141.12 75.84 143.04 75.84 144.96 75.84 146.40 75.84 148.80 75.84 151.20 76.32 153.12 77.76 154.08
</stroke>
<stroke tool="pen" color="black" width="1.41">
89.28 134.40 88.32 135.84 87.84 139.20 87.36 140.64 87.36 142.08 86.88 143.52 86.40 144.96 86.40 146.88 85.92 149.28 85.44 151.20 86.40 149.76 87.36 147.84 88.32 146.40 89.28 144.48 90.72 143.52 92.16 144.00 92.16 145.44 92.64 146.88 92.64 148.80 92.64 150.24 93.12 151.68
</stroke>
<stroke tool="pen" color="black" width="1.41">
100.32 143.04 98.88 143.04 98.40 144.96 98.40 146.88 97.92 148.80
</stroke>
<stroke tool="pen" color="black" width="1.41">
99.36 136.80 100.80 136.80 101.76 138.72
</stroke>
<stroke tool="pen" color="black" width="1.41">
111.84 141.12 110.40 140.64 108.48 141.12 106.56 142.08 105.12 143.52 104.16 144.96 105.60 145.92 107.52 144.96 108.96 144.00 110.40 144.48 111.84 145.92 111.84 147.36 111.84 148.80 110.88 150.24 108.96 151.20 107.04 151.68 105.60 152.16 103.68 152.64 102.24 152.64
</stroke>
<stroke tool="pen" color="black" width="1.41">
142.56 144.96 142.56 143.52 142.56 145.44 142.56 147.36 142.56 149.28 142.56 150.72
</stroke>
<stroke tool="pen" color="black" width="1.41">
141.60 135.84 141.12 134.40 142.56 135.36 143.52 136.80
</stroke>
<stroke tool="pen" color="black" width="1.41">
156.00 143.52 154.56 143.04 153.12 143.04 151.68 143.52 150.24 144.00 148.80 144.48 148.80 145.92 150.24 146.40 151.68 146.40 153.12 146.40 154.56 146.88 155.52 148.32 155.52 149.76 155.52 151.20 154.08 152.16 152.16 152.64 150.24 153.12 148.32 153.12
</stroke>
<stroke tool="pen" color="black" width="1.41">
191.52 145.92 190.08 145.92 189.12 144.48 187.68 144.00 186.24 143.52 184.80 143.52 183.36 143.52 181.44 144.48 180.48 145.92 180.00 147.36 180.96 148.80 182.40 149.28 184.32 149.28 186.24 148.32 187.68 147.36 188.64 145.92 189.12 144.48 188.16 145.92 188.16 147.84 188.16 149.76 188.64 151.68 190.08 152.64
</stroke>
<stroke tool="pen" color="black" width="1.41">
216.96 144.00 215.52 143.52 217.44 142.56 219.84 141.60 221.28 141.60 222.72 141.12 224.16 140.64 227.04 140.16 228.48 140.16 230.40 139.68
</stroke>
<stroke tool="pen" color="black" width="1.41">
223.68 132.48 222.72 133.92 222.72 135.84 222.24 137.28 222.24 138.72 222.24 140.16 221.28 143.04 220.80 144.48 220.80 145.92 220.32 147.36 219.84 148.80 219.84 150.24 219.84 151.68 221.28 152.16 222.72 152.16 224.16 151.68 226.08 151.20 227.52 150.72
</stroke>
<stroke tool="pen" color="black" width="1.41">
233.76 146.40 234.72 144.96 236.16 144.96 238.08 144.48 239.52 143.52 240.96 142.56 240.96 141.12 239.04 141.12 237.12 141.60 235.20 142.56 233.76 143.52 232.80 144.96 233.28 146.88 234.24 148.32 236.16 148.80 238.08 149.28 240.48 148.80
</stroke>
<stroke tool="pen" color="black" width="1.41">
254.88 141.12 254.88 139.68 253.44 139.20 251.52 139.68 250.08 140.64 248.64 141.60 247.20 143.04 247.68 144.48 249.12 144.00 251.04 144.00 252.48 143.52 253.92 144.48 254.40 145.92 253.92 147.36 252.96 148.80 251.52 149.76 250.08 150.24 248.16 150.24 246.72 150.72 245.28 150.72
</stroke>
<stroke tool="pen" color="black" width="1.41">
260.64 144.00 261.60 142.56 263.52 141.12 264.96 140.64 266.40 140.16 268.32 140.16 270.24 140.16 271.68 139.68
</stroke>
<stroke tool="pen" color="black" width="1.41">
267.84 131.04 266.88 133.92 265.44 138.24 265.44 139.68 265.44 141.60 265.44 143.04 265.92 145.44 267.36 146.40 268.80 146.88 270.72 146.88 272.64 146.88 274.08 146.40
</stroke>
<stroke tool="pen" color="black" width="1.41">
79.20 208.32 78.72 206.88 78.72 205.44 78.72 206.88 78.72 208.32 78.72 209.76 78.72 212.16 78.72 214.56 78.24 216.00 78.24 217.44 78.24 219.84 78.24 221.28 77.76 223.20 77.76 225.12 77.28 226.56
</stroke>
<stroke tool="pen" color="black" width="1.41">
77.28 211.68 77.28 210.24 78.72 209.28 80.16 208.32 82.08 206.88 84.00 205.92 85.44 204.96 86.88 204.96 87.84 206.40 87.36 207.84 86.40 209.76 85.44 212.16 84.00 214.08 82.56 216.00 81.12 217.44 82.56 217.92 84.00 217.92 85.44 217.44 86.88 217.44 88.32 218.40 88.32 219.84 87.36 221.28 86.40 222.72 85.44 224.16 84.00 225.12 82.56 226.08 80.64 226.56 78.72 227.52 76.80 228.00
</stroke>
<stroke tool="pen" color="black" width="1.41">
95.04 205.44 94.56 206.88 94.56 208.80 94.56 210.24 94.56 211.68 94.08 215.52 94.08 217.44 93.60 220.80 93.12 223.68 92.64 225.12
</stroke>
<stroke tool="pen" color="black" width="1.41">
105.60 216.96 105.60 215.52 104.16 215.04 102.72 216.00 101.28 216.96 99.84 218.40 98.40 220.32 98.40 221.76 99.84 222.72 101.28 222.72 102.72 222.24 104.16 220.32 105.60 218.40 106.08 216.96 106.08 215.52 104.64 216.48 104.64 217.92 104.64 219.84 105.12 221.28 106.56 222.72 108.00 222.24
</stroke>
<stroke tool="pen" color="black" width="1.41">
118.56 214.56 117.12 214.56 115.68 215.04 114.24 216.48 113.28 217.92 112.80 219.84 112.80 221.28 114.24 222.72 115.68 222.24 117.60 221.28 119.04 219.84
</stroke>
<stroke tool="pen" color="black" width="1.41">
129.60 203.04 128.16 204.00 126.72 207.36 126.24 208.80 124.80 212.16 124.32 214.08 123.84 216.00 123.36 217.44 122.88 218.88 122.40 220.80 122.88 218.88 123.84 217.44 124.80 216.00 125.76 214.56 127.68 213.12 129.12 212.16 131.04 211.20 132.96 210.24 134.88 209.28
</stroke>
<stroke tool="pen" color="black" width="1.41">
125.28 216.96 125.28 218.40 125.76 219.84 127.20 221.76 128.64 222.24 130.08 222.24
</stroke>
. . . to be continued . . .