oliveiracwb / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

API documentation mistake #1396

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The documentation says that SetImage does not create a copy of Pix:
https://code.google.com/p/tesseract-ocr/source/browse/api/baseapi.cpp#534
but in implementation it does(twice):
https://code.google.com/p/tesseract-ocr/source/browse/api/baseapi.cpp#926
https://code.google.com/p/tesseract-ocr/source/browse/ccmain/thresholder.cpp#143
Am I right?

Original issue reported on code.google.com by bam...@gmail.com on 21 Dec 2014 at 4:28

GoogleCodeExporter commented 9 years ago
Not quite. The documentation says "Tesseract doesn't take a copy or ownership 
or pixDestroy the image", meaning the image data itself, not Pix. pixClone 
returns a new pointer to the same structure, so while there is a copy(/are two 
copies) of the Pix, there's no copying of the image. 

Original comment by joregan on 13 May 2015 at 12:32