getCls(3)

NAME
getCls - 获取文字内容

SYNOPSIS
#include <libkyocr.hpp>

  Classes

class kdk::kdkOCR

  Functions

std::vector<std::string> getCls(const std::string &imagePath, int nums);

Link with -lkyocr.

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

The argument imagePath is the image file path.

The argument nums is the number of text stacks processed simultaneously.

RETURN VALUE
Returns the text string in the image of type std::vector<std::string>.

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: getRect().

SEE ALSO
getRect(3).