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

Method CorrectBlobOrder

deps/tesseract/ccstruct/blobs.cpp:515–521  ·  view source on GitHub ↗

Swaps the outlines of *this and next if needed to keep the centers in increasing x.

Source from the content-addressed store, hash-verified

513// Swaps the outlines of *this and next if needed to keep the centers in
514// increasing x.
515void TBLOB::CorrectBlobOrder(TBLOB* next) {
516 TBOX box = bounding_box();
517 TBOX next_box = next->bounding_box();
518 if (box.x_middle() > next_box.x_middle()) {
519 Swap(&outlines, &next->outlines);
520 }
521}
522
523#ifndef GRAPHICS_DISABLED
524void TBLOB::plot(ScrollView* window, ScrollView::Color color,

Callers 1

ApplySeamMethod · 0.80

Calls 3

SwapFunction · 0.85
bounding_boxFunction · 0.70
bounding_boxMethod · 0.45

Tested by

no test coverage detected