Merge pull request #17570 from HannibalAPE:text_det_recog_demo
authorWenqing Zhang <GordonZhangwq@gmail.com>
Thu, 3 Dec 2020 18:47:40 +0000 (02:47 +0800)
committerGitHub <noreply@github.com>
Thu, 3 Dec 2020 18:47:40 +0000 (18:47 +0000)
commit22d64ae08fbf75162e0b6b0ca031be736343d92c
tree552fc1fd49c15204cbc8c42c8ff2d25c7b6eaf5a
parent5ecf6937747e1b37c3d73c3f6fe46f9b2dc404ca
Merge pull request #17570 from HannibalAPE:text_det_recog_demo

[GSoC] High Level API and Samples for Scene Text Detection and Recognition

* APIs and samples for scene text detection and recognition

* update APIs and tutorial for Text Detection and Recognition

* API updates:
(1) put decodeType into struct Voc
(2) optimize the post-processing of DB

* sample update:
(1) add transformation into scene_text_spotting.cpp
(2) modify text_detection.cpp with API update

* update tutorial

* simplify text recognition API
update tutorial

* update impl usage in recognize() and detect()

* dnn: refactoring public API of TextRecognitionModel/TextDetectionModel

* update provided models
update opencv.bib

* dnn: adjust text rectangle angle

* remove points ordering operation in model.cpp

* update gts of DB test in test_model.cpp

* dnn: ensure to keep text rectangle angle

- avoid 90/180 degree turns

* dnn(text): use quadrangle result in TextDetectionModel API

* dnn: update Text Detection API
(1) keep points' order consistent with (bl, tl, tr, br) in unclip
(2) update contourScore with boundingRect
19 files changed:
doc/opencv.bib
doc/tutorials/dnn/dnn_OCR/dnn_OCR.markdown
doc/tutorials/dnn/dnn_text_spotting/detect_test1.jpg [new file with mode: 0644]
doc/tutorials/dnn/dnn_text_spotting/detect_test2.jpg [new file with mode: 0644]
doc/tutorials/dnn/dnn_text_spotting/dnn_text_spotting.markdown [new file with mode: 0644]
doc/tutorials/dnn/dnn_text_spotting/text_det_test_results.jpg [new file with mode: 0644]
doc/tutorials/dnn/dnn_text_spotting/text_rec_test.png [new file with mode: 0644]
doc/tutorials/dnn/table_of_content_dnn.markdown
modules/dnn/include/opencv2/dnn/dnn.hpp
modules/dnn/src/model.cpp
modules/dnn/test/test_common.hpp
modules/dnn/test/test_common.impl.hpp
modules/dnn/test/test_model.cpp
samples/data/alphabet_36.txt [new file with mode: 0644]
samples/data/alphabet_94.txt [new file with mode: 0644]
samples/dnn/scene_text_detection.cpp [new file with mode: 0644]
samples/dnn/scene_text_recognition.cpp [new file with mode: 0644]
samples/dnn/scene_text_spotting.cpp [new file with mode: 0644]
samples/dnn/text_detection.cpp