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

Method AddBoxes

deps/tesseract/ccstruct/imagedata.cpp:311–321  ·  view source on GitHub ↗

Adds the supplied boxes and transcriptions that correspond to the correct page number.

Source from the content-addressed store, hash-verified

309// Adds the supplied boxes and transcriptions that correspond to the correct
310// page number.
311void ImageData::AddBoxes(const GenericVector<TBOX>& boxes,
312 const GenericVector<STRING>& texts,
313 const GenericVector<int>& box_pages) {
314 // Copy the boxes and make the transcription.
315 for (int i = 0; i < box_pages.size(); ++i) {
316 if (page_number_ >= 0 && box_pages[i] != page_number_) continue;
317 transcription_ += texts[i];
318 boxes_.push_back(boxes[i]);
319 box_texts_.push_back(texts[i]);
320 }
321}
322
323// Saves the given Pix as a PNG-encoded string and destroys it.
324void ImageData::SetPixInternal(Pix* pix, GenericVector<char>* image_data) {

Callers 1

BuildMethod · 0.80

Calls 4

ReadMemBoxesFunction · 0.85
sizeMethod · 0.45
push_backMethod · 0.45
stringMethod · 0.45

Tested by

no test coverage detected