getRect(3)

NAME
getRect - 获取文字框

SYNOPSIS
#include <libkyocr.hpp>

  Classes

class kdk::kdkOCR

  Functions

std::vector<std::vector<std::vector<int>>> getRect(const std::string &imagePath);

Link with -lkyocr.

Detailed Description
The main function of the interface is to obtain the text box.

The argument imagePath is the image file path.

RETURN VALUE
Returns the coordinate matrix of the text box points and the number of text boxes of type std::vector<std::vector<std::vector<int>>>.

EXAMPLES
    #include "libkyocr.hpp"
    #include "iostream"

    using namespace kdk;

    int main(){

        std::string path = "./222.png";
        std::string path2 = "./sdsd.png";
        std::string path3 = "./222.jpg";
        kdkOCR kd1;
        //std::cout<<"aaaaaaaa";
        std::vector<std::string> result;
        result=kd1.getCls(path3,4);
        std::cout<<result.size()<<std::endl;
        for(int i=0; i<result.size();i++){
            std::cout<<result[i]<<std::endl;//打印容器的内容
        }
        //kd1.getText(path);
        return 0;
    };

CONFORMING TO
These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: getCls().

SEE ALSO
getCls(3).