MCPcopy Create free account
hub / github.com/creatale/node-dv / start_seam_list

Function start_seam_list

deps/tesseract/ccstruct/seam.cpp:269–280  ·  view source on GitHub ↗

* @name start_seam_list * * Initialize a list of seams that match the original number of blobs * present in the starting segmentation. Each of the seams created * by this routine have location information only. */

Source from the content-addressed store, hash-verified

267 * by this routine have location information only.
268 */
269void start_seam_list(TWERD* word, GenericVector<SEAM*>* seam_array) {
270 seam_array->truncate(0);
271 TPOINT location;
272
273 for (int b = 1; b < word->NumBlobs(); ++b) {
274 TBOX bbox = word->blobs[b - 1]->bounding_box();
275 TBOX nbox = word->blobs[b]->bounding_box();
276 location.x = (bbox.right() + nbox.left()) / 2;
277 location.y = (bbox.bottom() + bbox.top() + nbox.bottom() + nbox.top()) / 4;
278 seam_array->push_back(new SEAM(0.0f, location));
279 }
280}

Callers 2

RebuildBestStateMethod · 0.85

Calls 4

NumBlobsMethod · 0.80
truncateMethod · 0.45
bounding_boxMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected