Setting up project:
III. Data structure:
*******************************
– a docImage class:
– a box class
– minR (int)
– minC (int) – maxR (int) – maxC (int) method:
– constructor (…) – a boxNode class
– (int) boxType // 1 for page, 2 for column, 3 for zone; 4 for text-line; 5 for text-word; etc. // In this project we use 3 for zone and 4 for text-line.
– (box) BBox // bounding box
– (boxNode*) next // points to boxNode in the same level.
method:
– constructor (…)
– a boxQ class
– (boxNode*) Qfront // Always points to a dummy node. The front node is one after dummy node. – (boxNode*) QBack // points to the last node in the list, initially points to dummy node.
method:
– constructor (…)
-insertQ (Q, newBoxNode) // insert the box at the end of Q
// QBack->next?newBoxNode. // QBack?newBoxNode
– (int) numRows – (int) numCols – (int) minVal
– (int) maxVal
– (int) numStructRows // if not using file, you may hardcode it. – (int) numStructCols // if not using file, you may hardcode it. – (int) structMin // if not using file, you may hardcode it.
– (int) structMax // if not using file, you may hardcode it.
– (int) rowOrigin // if not using file, you may hardcode it. – (int) colOrigin // if not using file, you may hardcode it.
– (int **) imgAry // a 2D array, dynamically allocate, size of numRows + 2 by numCols + 2. Zero-framed the imgAry – (int) structElem [3] // 111, either hardcoded or read from argv [3]
– (int*) HPP // a 1-D array, size of numRows +2, to store the horizontal projection profile, dynamically allocate,
// initialize to 0.
– (int*) VPP // a 1-D array, size of numCols +2, to store the vertical projection profile, dynamically allocate,
// initialize to 0.
– (int*) binHPP // a 1-D array of the binarized HPP, dynamically allocate at run time, size as HPP.
– (int*) binVPP // a 1-D array to store the binarized VPP, dynamically allocate at run time, size as VPP. – (int*) morphHPP // a 1-D array to store the result of 1D morphological closing of binHPP, dynamically
// allocate, size as HPP
– (int*) morphVPP // a 1-D array to store the result of 1D morphological closing of binVPP, dynamically
// allocate, size as VPP
– (boxQ) QHead // A linked list queue (with a dummy node) of bounding boxes.
// initialize front and back of queue point to dummy node. – (box) zoneBox // The smallest bounding box enclosed the zone.
– (int) thrVal // the threshold value provided in argv [2] – (int) runsHPP // The number of runs in morphHPP.
– (int) runsVPP // The number of runs in morphVPP.
– (int) readingDirection // 1 for horizontal, 2 for vertical.
– methods:
– constructor (…) // establishes, allocates and initializes all members of docImage class.
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more