[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
Enable frame timestamp tests for MSMF
Add functional test for camera live timestamps
Remove trailing whitespace
Add timestamp test to all functional tests. Protect div by 0
Add Timestamps to MSMF Video Capture by index
Add option for NMS for boxes with different labels
* DetectionModel impl
* Add option for NMS for boxes with different labels
In the detect function in modules/dnn/include/opencv2/dnn/dnn.hpp, whose implementation can be found at modules/dnn/src/model.cpp, the Non Max Suppression (NMS) is applied only for objects of the same label. Thus, a flag
was added with the purpose to allow developers to choose if they want to keep the default implementation or wether they would like NMS to be applied to all the boxes, regardless of label.
The flag is called nmsDifferentLabels, and is given a default value of false, which applies the current default implementation, thus allowing existing projects to update opencv without disruption
Solves issue opencv#18832
* Change return type of set & Add default constr
* Add assertions due to default constructor
The test has race condition, which is addressed by the patch.
The race is next:
Master thread is calling execute (effectively blocked, waiting for
callback to be called)
"Async" thread picks up the callback
Call the callback
Then sets the variables in test
After call back is called, master thread is unblocked and may check
the variables (set in point 4 by the "async" thread) earlier then they
actually changed
Changes:
callback should be called as the last step (after flag variables are
set), as it effectively unblock the master thread
fixes#18974
- explicitly declared default constructor
- made initilizer_list constructor to accept the list by copy
-- as it is more canonical (and as copying the initializer_list does
not force copy of the list items)
-- current version anyway does not do what it is intended to
- Suppressed FFMPEG + h264, h265 as it does not pass tests with CI configuration.
- Suppressed MediaFoundation backend as it always returns zero for now.