Skip to content

本项目可以用来调用 https://github.com/kerlomz/captcha_trainer 项目训练的模型,使用动态库的方式调用验证码识别服务。

Notifications You must be signed in to change notification settings

asdlei99/captcha_library_c

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Captcha C++ Library

介绍

本项目可以用来调用 https://github.com/kerlomz/captcha_trainer 项目训练的模型,使用动态库的方式调用验证码识别服务,方便集成软件集成。 关于Tensor、Input、Ouput等等的用法,官方的API文档介绍太过于草率,而且没有例子,对开发者入门极不友好,有意愿入门 TensorFlow C++ API 的各位,希望本项目能对各位有所帮助。

DLL 调用声明

函数名称 返回值 输入值
InitSession int -
PredictBase64 char* const char* base64_str
PredictFile char* const char* file_path
FreeSession - -

C++调用示例

int main()
{
	
	HINSTANCE hDllInst = LoadLibrary(TEXT("CaptchaLibrary.dll"));

	
	if (hDllInst)

	{
		typedef int(WINAPI *MYFUNC1)();
		typedef const char* (WINAPI *MYFUNC2)(const char*);
		typedef const char* (WINAPI *MYFUNC3)(const char*);
		typedef void(WINAPI *MYFUNC4)();
		string res;
		const char* result;
		MYFUNC1 _InitSession = NULL;
		MYFUNC2 _PredictBase64 = NULL;
		MYFUNC3 _PredictFile = NULL;
		MYFUNC4 _FreeSession = NULL;
		_InitSession = (MYFUNC1)GetProcAddress(hDllInst, "InitSession");
		_PredictBase64 = (MYFUNC2)GetProcAddress(hDllInst, "PredictBase64");
		_PredictFile = (MYFUNC3)GetProcAddress(hDllInst, "PredictFile");
		_FreeSession = (MYFUNC4)GetProcAddress(hDllInst, "FreeSession");

		int code = _InitSession();

		const char* s = "iVBORw0KGgoAAAANSUhEUgAAAKAAAABGCAYAAABL0p+yAAAdVElEQVR42u2cB1xUV/bH3d3/JhvdbBJj7yU2sKOwtthi743YYu8ixoJiBWyogB0RuyCoqCACgihFekeKIF2kD21ow1R+/3uf4c1MsAw40ezuO5/PRRzmvTfz3vedc37nnvsagTPOPqM14k4BZxyAnHEA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qftQuZ5/WJi+PZtu4aNnH8FiKSk9U+CwAcsYZByBnHICcccYByBkHIGeccQByxgHIGWccgJxxAHLGGQcgZxyAnHHGAcgZByBnHICccfbZ7P8B3y4wCcBs1YMAAAAASUVORK5CYII=";
		const char* f = "./test.png";
		printf("predictBase64: %s\n", _PredictBase64(s));
		printf("predictFile: %s\n", _PredictFile(f));
		_FreeSession();

		FreeLibrary(hDllInst);

		return 0;
	}
	
}

C# 调用示例

    class Program
    {

        [DllImport(@"./CaptchaLibrary.dll")]
        extern static int InitSession();

        [DllImport(@"./CaptchaLibrary.dll")]
        extern static string PredictBase64(string buffer);
        static void Main(string[] args)
        {
            InitSession();

            string param = "iVBORw0KGgoAAAANSUhEUgAAAKAAAABGCAYAAABL0p+yAAAdVElEQVR42u2cB1xUV/bH3d3/JhvdbBJj7yU2sKOwtthi743YYu8ixoJiBWyogB0RuyCoqCACgihFekeKIF2kD21ow1R+/3uf4c1MsAw40ezuO5/PRRzmvTfz3vedc37nnvsagTPOPqM14k4BZxyAnHEAcsYZByBnHICcccYByBkHIGeccQB+ApPJZHVfrJFBlpUB0T0bSIKfQZabBUilHC0cgKqZVFKD0pIapdeyc3jw9vTFrZtO8HV5gFDvp0hPfIHk2FhEesXB80YQHMw8cWPfI1huuA37ucao0OmA8sFtUN6/Ocq12qBy5lAIDFZCdMEMEm93yDIz6ME4ijgAf3NchDmRqAahkWKcuCGAlVclNtnyMfZwNrSGLMOgDj3wY4++0NXSxKSubTCocSMMbvx3TP9+FeY02455LQ2xsJ0RFrTejePtdFHeo0mdUdzra1jNH455+1fjyuqpyLK7wFH0vw5gGZ9AFyzFaQsRtFcXo/GcfHylm4+2m/Px3bo8fLE8GxpdRmDQ902h/W0TBrzaMbbd95jVXA+zv98BXQLgki4HsOyHg7jZbcpbASwjY5rRavz19gn8w84MLW+dxIyAh7BMeY44fhGkbwvpnP13AUg9nVRag9xcGXyeSnDYWIh50wTQ6VeJJrPy8belufj74ly03JCPXoYF0NpfgBkL9mO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dhAewxqLc9c/0zAlhrRsfvM633ioKCzvHSRgMl2f+qgHkKQsff1gdTAbPdyO6DTacUwDOhHuyCcQrg8QAXDsDf2QPPAnQeIZ+l0BgfgrikCrXtn9YZ6ZMTFEWIGW1A5Ys/L4B09sLEzJF4wjdrf1tpbMTPq8/hgXsEwqLTEBCaBAfnEPy6x5Z52kFt6WbUzMNwfxrzzqJnrVFFutvLgW2jonVA55cRasn//pvsaUAxhs6VLz7SnBAMm/u5att/dl41M3uiCOAqw0QUf24A34QAMU5Zu5PcTk/pSVcDx+7FBN1jGEHESmetLezfqAI+dsblneFa0QRiMZwSI+CYGMYsq+Ts3UZ78s7fzMbCzfHoMSYIJ69mqjXMW93MUgKQPmXhs4dgpVLJk2hMXmCGTgO3KE2zKQ667uPMJQ8UFpVxxPzBVlwqrvfi8PfZlTvZ6DpKOcx7B5f8eQCkVlZexfT0LV5vhUlEGdMxbu4x/LLhAswt3RASmcqR8R9qCSkVGKEbobAG2A8Hz6b/uQBUNPrItedxr+ATkIDImAzmQUXqftQuZ5/WJi+PZtu4aNnH8FiKSk9U+CwAcsYZByBnHICcccYByBkHIGeccQByxgHIGWccgJxxAHLGGQcgZxyAnHHGAcgZByBnHICccfbZ7P8B3y4wCcBs1YMAAAAASUVORK5CYII=";
            string result = PredictBase64(param);
            Console.WriteLine(result);
        }
    }

Python 调用示例

import base64
from ctypes import *
dll = cdll.LoadLibrary('CaptchaLibrary.dll')
dll.InitSession()

with open("test.png", "rb") as f:
    b = f.read()

b64 = base64.b64encode(b)
dll.PredictFile.restype = c_char_p
dll.PredictBase64.restype = c_char_p
result_file = dll.PredictFile(b"test.png")
result_base64 = dll.PredictBase64(b64)
print("PredictFile:", string_at(result_file).decode())
print("PredictBase64:", string_at(result_base64).decode())
dll.FreeSession()

Java 调用示例

感谢QQ网友:3455473568,热心提供案例。

public interface DllX extends Library {
    Main.DllX instance = (Main.DllX) Native.loadLibrary(getPath() + "\\CaptchaLibrary.dll", Main.DllX.class);
    public void InitSession();
    public String PredictFile(String path);
    public String PredictBase64(String b64);
}

public static void main(String[] args){
    Main.DllX.instance.InitSession();
    String s0 = DllX.instance.PredictBase64("iVBORw0KGgoAAAANSUhEUgAAAGQAAAA8CAIAAAAfXYiZAAAVkklEQVR4nNVcSZMcx3V+uVTW0l29TA9mgBksAwxNEAIFUCLNoBSkZQlUOKQIawkxQB9s6ihfdXLwF+hgO+QIX+STw4qwFpoO6SQvFKVQUJYsirZISiABEcAMCMwMZuue7uquqlxepg8105ilezaYsPydamqqKjO/evnye+9lNck6OTxAvHzqC8XBc7e+/yDb3dmNQ3SAPEiyVKuT3JibeenV05cvxdOTol55YE1v7sDbX/smAMTTkxdefGGffVCtjqhX+AfcvS0Q9YqoJ2e/8sXieHNX+hfsvMsoXRxw4d1P65hJk6nr//ADzCQAnPjjZ4qTmEsAYIHPQn/gjQXFP/7SC/R+mj8oVKujWp1rf/e94mBzV97+2jeTG3P9k5uBSrduzeMGZQcFaqOSnkp6spWsvvHu+NMXWeiPP3ORh8JkKp1fWXztrZVfXi0oG9jnvjE+OLI2kzLz0qu7nNwGk0sjlRkymD2BxqzMzi3+/NfZ/DJmMp1fGX/6Igv81m9mll57c/G1t9L5FdXqmEwNe0K/Yw/Usvqtnr58afeTfRilMVdyqYVpXkyfg8JkUrU66fzKyhtXZSvpny9OqlZnz8cWHva5W9/fl88ycp117otDdHdzqzu9+8CTfaBUzZk7anlttdklTzwi6hUWiIN1w6Bb7WKSgUEA6FMzzENtg6hX4mm48OILsM/VUHa67Tt3q8eP+pXyAXq5AwMd+S7e3SidrrQW3nhHz694hNNKGJ4+duT8tB+X9t9oOr+y+Nqb2fwKAGAmZStZu3Kzdv6MX4/7fEUTo2PPPBZNjO7+qL0ty0gl2910ZS2oVXgUMH74BXTgYrfL4o1KN2fmsJsSY9FI7ZC2EyPV/slCY1Br1MY5h5lUrWTpP94CgLV3bo4//dhB+7/HyBFR53LlvVvYyzqLK8FI5X7IOiiMVJhJTCVFB+CIc0AIEHKgh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bzR2IYuJmNeBwin3jMgdNZ3l5Y9stRQZZqdWQzOVyFsg/Z6a1cuaFaHZppsNZIFVTK2Z3lnVdqqbKl1e57d1wnLarZzmPG2Tbz8iEeU7aS5J0Z2UxYHIgj1TUkh/PuspXEZyZX33h36vKzspWIZjL4qzDicTFalXeWndRgrcUteYX5V17fD1mylahmR7YSvx6LkYq/SZQaqVBqm0md5eAAM7XYzfsbcPtfjPj12Bij1rqy2cEkBQdAgJUD7OWLi+1h07B4l7Ld9Wpl0827tfKh3YlsJY0nziU354opeXb6iwPI4r7HAp+FASFE+MHo1PHNc3Di00/uSZZsJcmNuWv//joAwPTk1PPP+jsUPACYXHVm5ytTE5uZSm7Mzb70w6nLz8bTkyTwOvPLyZUZl2viACjhY9Ujj50NqkM/9DCZWrtyU2U5rZVGHjohwvvdiF6gkE0DyGKMlevVbuQx5448clqUor502AgCJnd/tGp15l95PZ6eBIBdinSYq9EnzgFAocVVqwM35q698rqoV5Kbc6efv4QAWZqFJ8agJwEAOAtOjdUuTJeOjAxrGjNZf/S0SnNlsTxa/98iq8AAsihjohyGozVSQb9W3lmS27P+DHt9vlRgZ9pkWzxMKRVRAI0aBrlNcw0Wih01w1HoD14p7S0CD47BHzoV34EAAPfFNkWzz09390PozluSG3PXvvG9qeefjc9MxtOT65+j5Eqttpd/dc1YDKcnjl18hGyksx/wh8ODl1XuC78W+7Xt9Zj91J8LDAvc97xl6vlnZ7/7wyLnWXQjOtoQ9QqPAhaHI1OT2Mt23y3wweHAGmT3+vP9YP2j4G98T7aSbW+ChULU42hyDNBmt5f287Y+CBxYg+zHGR0aQ78DCfzRxx8BAMzkbz+wt7UnDvxTBYdwRvt/8p7e8P/2xw4e6O867In9vIkP7m3tid8tsn7H8UC/vv//jv8BonR/xjuddfkAAAAASUVORK5CYII=");
    String s1 = DllX.instance.PredictFile(getPath() + "\\test.png");
    System.out.println("PredictBase64: " + s0);
    System.out.println("PredictFile: " + s1);

}

private static String getPath() {
    try {
        File directory = new File("");//参数为空?
        //System.out.println("getPath: "+courseFile);
        return directory.getCanonicalPath();
    } catch (Exception exp) {
        exp.printStackTrace();
    }
    return null;
}

About

本项目可以用来调用 https://github.com/kerlomz/captcha_trainer 项目训练的模型,使用动态库的方式调用验证码识别服务。

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 95.8%
  • C 4.2%