2017-05-28 49 views
-1

我需要一个定制的想法来检测图像中的字幕。也许一些图像处理步骤能够正确地从处理后的图像中提取(例如tesseract)字符。检测图像中的字幕

回答

1

为什么不削减图像的底部,然后对此应用tesseract? 在bash上,我会把以下内容放在bash脚本中,并将它应用于所有图像(例如xargs):

# filenames 
input="$1" 
extension=$(echo $(echo "$input"|sed 's/.*\.//g')) 
nomfich=$(basename $input .$extension) 
interm="$nomfich.tiff" 
# convert to tiff and crop 
convert -gravity South -crop 100%x15%+0+0 -density 300 $input $interm 
# ocr 
tesseract $interm $nomfich