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

Method Clone

deps/tesseract/cube/char_samp.cpp:542–554  ·  view source on GitHub ↗

clones the object

Source from the content-addressed store, hash-verified

540
541// clones the object
542CharSamp *CharSamp::Clone() const {
543 // create the cropped char samp
544 CharSamp *samp = new CharSamp(left_, top_, wid_, hgt_);
545 samp->SetLabel(label32_);
546 samp->SetFirstChar(first_char_);
547 samp->SetLastChar(last_char_);
548 samp->SetNormTop(norm_top_);
549 samp->SetNormBottom(norm_bottom_);
550 samp->SetNormAspectRatio(norm_aspect_ratio_);
551 // copy the bitmap to the cropped img
552 Copy(0, 0, wid_, hgt_, samp);
553 return samp;
554}
555
556// Load a Char Samp from a dump file
557CharSamp *CharSamp::FromCharDumpFile(unsigned char **raw_data_ptr) {

Callers 1

RecognizeMethod · 0.80

Calls 6

SetFirstCharMethod · 0.80
SetLastCharMethod · 0.80
SetNormTopMethod · 0.80
SetNormBottomMethod · 0.80
SetNormAspectRatioMethod · 0.80
SetLabelMethod · 0.45

Tested by

no test coverage detected