new version openalpr (with openalpr-utils-classifychars. Segmentation fault (core dumped))

958 views
Skip to first unread message

Denis Derevyanchuk

unread,
Dec 25, 2014, 2:49:20 AM12/25/14
to open...@googlegroups.com
Hi to all.
have trouble with openalpr-utils-classifychars


2.  Collect many pics with imageclipper (sample):

3. run openalpr-utils-classifychars eu ./pics ./pics_out/
Usage: 
n -- Next plate
p -- Previous plate
W -- Select image and save characters according to OCR results, then go to next image
s -- Save characters
<- and -> -- Cycle between images
Ent/space -- Select plate

Within a plate
<- and -> -- Cycle between characters
[0-9A-Z] -- Identify a character (saves the image)
ESC/Ent/Space -- Back to plate selection
Warning: You are running an unsupported version of Tesseract.
Expecting version 3.03, your version is: 3.02.02
./pics/uaplate1.png
Segmentation fault (core dumped)

and got Segmentation fault (core dumped)

openalpr.conf not changed. Clean ubuntu installation.

Any suggestions? 

Matt

unread,
Dec 27, 2014, 10:23:04 PM12/27/14
to open...@googlegroups.com
I added a fix to the latest code that may resolve the segmentation fault.

Diogo Melo

unread,
Jan 12, 2015, 9:22:16 AM1/12/15
to open...@googlegroups.com
I'm also getting segmentation fault and I have compiled the version from commit 64e2967 (2014/01/11 by Matt Hill) from git.

Bellow is the output. Any idea about what is causing it?

root@f27400705243:/opt/ocr-samples3/pos/imageclipper# /opt/openalpr/src/build/misc_utilities/openalpr-utils-classifychars br ./ ./output
libdc1394 error: Failed to initialize libdc1394
Usage: 
n -- Next plate
p -- Previous plate
W -- Select image and save characters according to OCR results, then go to next image
s -- Save characters
<- and -> -- Cycle between images
Ent/space -- Select plate

Within a plate
<- and -> -- Cycle between characters
[0-9A-Z] -- Identify a character (saves the image)
ESC/Ent/Space -- Back to plate selection
Error: missing configuration entry for: common->skip_detection
.//20141002-140400.431-2.jpg_0000_0318_0173_0164_0053.png
Starting CharacterAnalysis identification
Threshold 0 had 6 good indices.
Threshold 1 had 3 good indices.
Threshold 2 had 3 good indices.
CharacterAnalysis::findOuterBoxMask
Winning image index (findOuterBoxMask) is: 0
Best fit score: 6 Index: 0
The winning score is: 3
The winning score is: 2
Rejecting due to top/bottom points that are out of range
Rejecting due to top/bottom points that are out of range
Rejecting due to top/bottom points that are out of range
Rejecting due to top/bottom points that are out of range
Rejecting due to top/bottom points that are out of range
Rejecting due to top/bottom points that are out of range
CharacterAnalysis, plate inverted: MEAN: [91.4455, 0, 0, 0] : 0
Starting CharacterSegmenter
Segmenter: inverted: 1
 Adding label threshold: 0
 Adding label threshold: 1
 Adding label threshold: 2
All Boxes size 16
All Boxes size 12
All Boxes size 13
All Boxes size 0
 Adding label All Histograms
 Adding label Best Boxes
Edge Filter: Entire right region is erased
Edge Filter: left=88 right=325
 Adding label Edge Filter #1
Mostly Empty Filter: box index: 0 this box had a score of : 1 MIN_FULL_BOXES: 1
 Box Score: 1
 Box Score: 2
 Box Score: 3
 Box Score: 3
 Box Score: 3
Mostly Empty Filter: box index: 5 this box had a score of : 1 MIN_FULL_BOXES: 1
 Box Score: 1
 Box Score: 3
 Box Score: 3
 Box Score: 2
 Box Score: 3
 Box Score: 3
Mostly Empty Filter: box index: 11 this box had a score of : 0 MIN_FULL_BOXES: 1
 Box Score: 0
Merging 2 boxes -- 6 and 7
 Box Score: 2
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Adding label threshold: 0
 Adding label threshold: 1
 Adding label threshold: 2
All Boxes size 6
All Boxes size 6
All Boxes size 6
All Boxes size 0
 Adding label All Histograms
 Adding label Best Boxes
Edge Filter: left=0 right=290
 Adding label Edge Filter #1
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
 Box Score: 3
Character CLEAN: (height) removing box 0 in threshold 1 -- Height 7 < 8.4
Character CLEAN: (area) removing box 6 in threshold 1 -- Area 14 < 23.1
Character CLEAN: (area) removing box 6 in threshold 2 -- Area 17 < 23.1
Character CLEAN: (area) removing box 8 in threshold 2 -- Area 0 < 9.6
Segmentation fault (core dumped)

Diogo Melo

unread,
Jan 12, 2015, 9:23:41 AM1/12/15
to open...@googlegroups.com
Here is the backtrace from GDB:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5bd0d7b in tesseract::Classify::ComputeCharNormArrays(FEATURE_STRUCT*, INT_TEMPLATES_STRUCT*, unsigned char*, unsigned char*) () from /usr/local/lib/libtesseract.so.3
(gdb) bt
#0  0x00007ffff5bd0d7b in tesseract::Classify::ComputeCharNormArrays(FEATURE_STRUCT*, INT_TEMPLATES_STRUCT*, unsigned char*, unsigned char*) () from /usr/local/lib/libtesseract.so.3
#1  0x00007ffff5bd5b6b in tesseract::Classify::CharNormTrainingSample(bool, int, tesseract::TrainingSample const&, GenericVector<tesseract::UnicharRating>*) () from /usr/local/lib/libtesseract.so.3
#2  0x00007ffff5bf8882 in tesseract::TessClassifier::UnicharClassifySample(tesseract::TrainingSample const&, Pix*, int, int, GenericVector<tesseract::UnicharRating>*) () from /usr/local/lib/libtesseract.so.3
#3  0x00007ffff5bd3b22 in tesseract::Classify::CharNormClassifier(TBLOB*, tesseract::TrainingSample const&, ADAPT_RESULTS*) () from /usr/local/lib/libtesseract.so.3
#4  0x00007ffff5bd3c95 in tesseract::Classify::DoAdaptiveMatch(TBLOB*, ADAPT_RESULTS*) () from /usr/local/lib/libtesseract.so.3
#5  0x00007ffff5bd3f24 in tesseract::Classify::AdaptiveClassifier(TBLOB*, BLOB_CHOICE_LIST*) () from /usr/local/lib/libtesseract.so.3
#6  0x00007ffff5bcb93d in tesseract::Wordrec::call_matcher(TBLOB*) () from /usr/local/lib/libtesseract.so.3
#7  0x00007ffff5bcb986 in tesseract::Wordrec::classify_blob(TBLOB*, char const*, C_COL, BlamerBundle*) () from /usr/local/lib/libtesseract.so.3
#8  0x00007ffff5bc8bab in tesseract::Wordrec::classify_piece(GenericVector<SEAM*> const&, short, short, char const*, TWERD*, BlamerBundle*) () from /usr/local/lib/libtesseract.so.3
#9  0x00007ffff5bba08d in tesseract::Wordrec::chop_word_main(WERD_RES*) () from /usr/local/lib/libtesseract.so.3
#10 0x00007ffff5bcb821 in tesseract::Wordrec::cc_recog(WERD_RES*) () from /usr/local/lib/libtesseract.so.3
#11 0x00007ffff5b08e62 in tesseract::Tesseract::recog_word_recursive(WERD_RES*) () from /usr/local/lib/libtesseract.so.3
#12 0x00007ffff5b08ff5 in tesseract::Tesseract::recog_word(WERD_RES*) () from /usr/local/lib/libtesseract.so.3
#13 0x00007ffff5afa160 in tesseract::Tesseract::tess_segment_pass_n(int, WERD_RES*) () from /usr/local/lib/libtesseract.so.3
#14 0x00007ffff5ac12a5 in tesseract::Tesseract::match_word_pass_n(int, WERD_RES*, ROW*, BLOCK*) () from /usr/local/lib/libtesseract.so.3
#15 0x00007ffff5ac1482 in tesseract::Tesseract::classify_word_pass1(tesseract::WordData*, WERD_RES*) () from /usr/local/lib/libtesseract.so.3
#16 0x00007ffff5ac46d6 in tesseract::Tesseract::classify_word_and_language(void (tesseract::Tesseract::*)(tesseract::WordData*, WERD_RES*), tesseract::WordData*) () from /usr/local/lib/libtesseract.so.3
#17 0x00007ffff5ac4dea in tesseract::Tesseract::RecogAllWordsPassN(int, ETEXT_DESC*, GenericVector<tesseract::WordData>*) () from /usr/local/lib/libtesseract.so.3
#18 0x00007ffff5ac5701 in tesseract::Tesseract::recog_all_words(PAGE_RES*, ETEXT_DESC*, TBOX const*, char const*, int) () from /usr/local/lib/libtesseract.so.3
#19 0x00007ffff5ab403d in tesseract::TessBaseAPI::Recognize(ETEXT_DESC*) () from /usr/local/lib/libtesseract.so.3
#20 0x00007ffff7b6598b in alpr::OCR::performOCR(alpr::PipelineData*) () from /opt/openalpr/src/build/openalpr/libopenalpr.so.2
#21 0x000000000040b6c7 in main ()
(gdb) 

Matt

unread,
Jan 21, 2015, 10:30:47 PM1/21/15
to open...@googlegroups.com
I haven't seen that one before.  Can you attach your openalpr.conf and the image file that causes the segfault?  I'll try and reproduce the problem.
Reply all
Reply to author
Forward
0 new messages