{"id":24663,"date":"2025-04-19T10:29:24","date_gmt":"2025-04-19T02:29:24","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/24663.html"},"modified":"2025-04-19T10:29:24","modified_gmt":"2025-04-19T02:29:24","slug":"python-%e9%bc%a0%e6%a0%87%e8%bd%a8%e8%bf%b9%e7%ae%97%e6%b3%95-%e9%98%b2%e6%ad%a2%e6%b8%b8%e6%88%8f%e6%a3%80%e6%b5%8b","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/24663.html","title":{"rendered":"Python \u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5 - \u9632\u6b62\u6e38\u620f\u68c0\u6d4b"},"content":{"rendered":"<h2>\u4e00.\u7b80\u4ecb<\/h2>\n<p>\u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5\u662f\u4e00\u79cd\u6a21\u62df\u4eba\u7c7b\u9f20\u6807\u64cd\u4f5c\u7684\u7a0b\u5e8f&#xff0c;\u5b83\u80fd\u591f\u6a21\u62df\u51fa\u81ea\u7136\u800c\u771f\u5b9e\u7684\u9f20\u6807\u79fb\u52a8\u8def\u5f84\u3002<\/p>\n<\/p>\n<p>\u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5\u7684\u5e95\u5c42\u5b9e\u73b0\u91c7\u7528C\/C&#043;&#043;\u8bed\u8a00&#xff0c;\u539f\u56e0\u5728\u4e8eC\/C&#043;&#043;\u63d0\u4f9b\u4e86\u9ad8\u6027\u80fd\u7684\u6267\u884c\u80fd\u529b\u548c\u76f4\u63a5\u8bbf\u95ee\u64cd\u4f5c\u7cfb\u7edf\u5e95\u5c42\u8d44\u6e90\u7684\u80fd\u529b\u3002<\/p>\n<p>\u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5\u5177\u6709\u4ee5\u4e0b\u4f18\u52bf&#xff1a;<\/p>\n<ul>\n<li>\u6a21\u62df\u4eba\u5de5\u8f68\u8ff9&#xff1a;\u7b97\u6cd5\u80fd\u591f\u6a21\u62df\u51fa\u975e\u8d1d\u585e\u5c14\u66f2\u7ebf\u7684\u81ea\u7136\u9f20\u6807\u79fb\u52a8&#xff0c;\u907f\u514d\u4e86\u673a\u68b0\u5f0f\u7684\u76f4\u7ebf\u79fb\u52a8\u3002<\/li>\n<li>\u9002\u5f53\u7684\u505c\u987f\/\u52a0\u901f\/\u51cf\u901f&#xff1a;\u7b97\u6cd5\u80fd\u591f\u6839\u636e\u9700\u8981\u6a21\u62df\u51fa\u9f20\u6807\u7684\u505c\u987f\u3001\u52a0\u901f\u548c\u51cf\u901f&#xff0c;\u4f7f\u5f97\u8f68\u8ff9\u66f4\u52a0\u771f\u5b9e\u3002<\/li>\n<li>\u968f\u673a\u8f68\u8ff9&#xff1a;\u5728\u56fa\u5b9a\u4e24\u70b9\u95f4&#xff0c;\u7b97\u6cd5\u80fd\u591f\u751f\u6210\u4e0d\u540c\u7684\u968f\u673a\u8f68\u8ff9&#xff0c;\u589e\u52a0\u4e86\u8f68\u8ff9\u7684\u4e0d\u53ef\u9884\u6d4b\u6027\u3002<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"481\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419022922-68030a828d39c.png\" width=\"747\" \/><\/p>\n<h2>\u4e8c.\u5e94\u7528\u573a\u666f<\/h2>\n<ul>\n<li>\u6e38\u620f\u9f20\u6807\u8f68\u8ff9\u68c0\u6d4b&#xff08;\u68c0\u6d4b\u80fd\u8fc7\u65e0\u754ffps\u7c7b\u578b\u3001\u4f20\u5947\u3001\u68a6\u5e7b\u7b49\u6e38\u620f&#xff0c;\u5df2\u7ecf\u5728\u6e38\u620f\u4e2d\u9a8c\u8bc1&#xff09;<\/li>\n<li>\u6ed1\u5757\u62d6\u52a8\u9a8c\u8bc1<\/li>\n<li>\u90e8\u5206\u7f51\u9875\u9f20\u6807\u8f68\u8ff9\u68c0\u6d4b<\/li>\n<\/ul>\n<h2>\u4e09.\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00<\/h2>\n<h3>1.C&#043;&#043;\u5934\u6587\u4ef6<\/h3>\n<p>\/******************************************************************************************\/<\/p>\n<p>&#064;SDK\u529f\u80fd\u63cf\u8ff0&#xff1a;C&#043;&#043;\u9f20\u6807\u8f68\u8ff9<\/p>\n<p>\/******************************************************************************************\/<\/p>\n<p>#ifndef _SN_SDK_H__<br \/>\n#define _SN_SDK_H__<\/p>\n<p>#include &lt;windows.h&gt;<\/p>\n<p>enum SN_TRACK_MOVE_TYPE<br \/>\n{<br \/>\nTRACK_MOVE_TYPE_NORMAL&#061;0,\/\/ \u7528\u4e8e\u5e38\u89c4\u8f68\u8ff9 &#8211; \u666e\u901a\u6e38\u620f\u9f20\u6807\u8f68\u8ff9<br \/>\nTRACK_MOVE_TYPE_SLIDER,\/\/ \u7528\u4e8e\u6ed1\u5757\u8f68\u8ff9&#xff0c;\u6bd4\u5e38\u89c4\u5e38\u89c4\u8f68\u8ff9\u5bc6\u5ea6\u66f4\u5927 &#8211; \u6ed1\u5757\u9a8c\u8bc1\u8f68\u8ff9<br \/>\n};<\/p>\n<p>enum SN_TRACK_POINT_TYPE<br \/>\n{<br \/>\nTRACK_POINT_TYPE_NORMAL&#061;0,\/\/ \u9ed8\u8ba4\u7edd\u5bf9\u5750\u6807<br \/>\nTRACK_POINT_TYPE_RELATIVE,\/\/ \u76f8\u5bf9\u5750\u6807<br \/>\n};<\/p>\n<p>\/\/\u8fd4\u56de\u53c2\u6570<br \/>\ntypedef struct SN_RESULT {<\/p>\n<p>int code;\/\/\u9519\u8bef\u7801&#xff0c;\u5982\u679c\u4e3a 0 \u8868\u793a\u6210\u529f&#xff0c;\u5426\u5219\u8868\u793a\u9519\u8bef\u53f7<br \/>\nchar message[4096];\/\/\u9519\u8bef\u4fe1\u606f&#xff0c;\u5982\u679c\u4e3a &#034;OK&#034; \u8868\u793a\u6210\u529f&#xff0c;\u5426\u5219\u8fd4\u56de\u9519\u8bef\u4fe1\u606f<\/p>\n<p>}SN_RESULT;<\/p>\n<p>\/\/\u5750\u6807\u53c2\u6570<br \/>\ntypedef struct SN_POINT<br \/>\n{<br \/>\nint x;\/\/\u5c4f\u5e55\u5750\u6807&#xff0c;\u5de6\u4e0a\u89d2&#xff08;0&#xff0c;0&#xff09;&#xff0c;\u53f3\u4e0b\u89d2&#xff08;1920&#xff0c;1080 &#8211; \u4ee5\u5b9e\u9645\u5c4f\u5e55\u4e3a\u51c6&#xff09;<br \/>\nint y;\/\/\u5c4f\u5e55\u5750\u6807&#xff0c;\u5de6\u4e0a\u89d2&#xff08;0&#xff0c;0&#xff09;&#xff0c;\u53f3\u4e0b\u89d2&#xff08;1920&#xff0c;1080 &#8211; \u4ee5\u5b9e\u9645\u5c4f\u5e55\u4e3a\u51c6&#xff09;<\/p>\n<p>}SN_POINT;<\/p>\n<p>\/\/\u8f68\u8ff9\u53c2\u6570<br \/>\ntypedef struct SN_POINT_PARAMS<br \/>\n{<br \/>\nstruct SN_POINT point;\/\/\u5c4f\u5e55\u5750\u6807&#xff0c;\u5de6\u4e0a\u89d2&#xff08;0&#xff0c;0&#xff09;&#xff0c;\u53f3\u4e0b\u89d2&#xff08;1920&#xff0c;1080 &#8211; \u4ee5\u5b9e\u9645\u5c4f\u5e55\u4e3a\u51c6&#xff09;<br \/>\nint delayTime;  \/\/\u5ef6\u65f6\u65f6\u95f4&#xff08;\u5355\u4f4d&#xff1a;\u6beb\u79d2&#xff09;&#xff0c;\u4ec5\u4f9b\u53c2\u8003<\/p>\n<p>}SN_POINT_PARAMS;<\/p>\n<p>\/*\u521b\u5efa\u53e5\u67c4<br \/>\n*<br \/>\n* \u53c2\u6570&#xff1a;<br \/>\n*[in] szKey&#xff1a;\u5361\u5bc6(\u8d2d\u4e70\u5361\u5bc6&#xff1a;https:\/\/shop.4yuns.com\/links\/7C9F16B7)<br \/>\n* [in] pOnnxFilePath&#xff1a;\u8bbe\u7f6e onnx \u6a21\u578b\u6587\u4ef6\u8def\u5f84&#xff0c;\u5982\u679c\u8bbe\u7f6e\u4e3a NULL&#xff0c;\u9ed8\u8ba4\u548c DLL\u6587\u4ef6\u540c\u7ea7\u76ee\u5f55<br \/>\n* [out] pResult&#xff1a;\u8fd4\u56de\u9519\u8bef\u4fe1\u606f&#xff0c;\u53c2\u6570pResult.code(\u9519\u8bef\u7801)\u5982\u679c\u4e3a 0 \u8868\u793a\u6210\u529f&#xff0c;\u5426\u5219\u8868\u793a\u9519\u8bef\u53f7;<br \/>\n*<br \/>\n* \u8fd4\u56de\u503c&#xff1a;\u6210\u529f\u8fd4\u56de\u53e5\u67c4&#xff0c;\u5931\u8d25\u8fd4\u56deNULL<br \/>\n*<br \/>\n*\/<br \/>\nHANDLE WINAPI apiSNCreateHandle(char* szKey, char* pOnnxFilePath, SN_RESULT* pResult);<\/p>\n<p>\/*\u8bbe\u7f6e\u9f20\u6807\u79fb\u52a8\u8f68\u8ff9\u53c2\u6570&#xff0c;\u8c03\u8282\u8f68\u8ff9\u5bc6\u5ea6\/\u901f\u5ea6\/\u8f68\u8ff9\u7c7b\u578b&#xff0c;\u76ee\u524d\u53ef\u4ee5\u652f\u6301\u6ed1\u5757\u8f68\u8ff9\/\u666e\u901a\u8f68\u8ff9<br \/>\n*<br \/>\n* \u53c2\u6570&#xff1a;<br \/>\n*[in] handle&#xff1a;\u53e5\u67c4&#xff08;\u901a\u8fc7\u8c03\u7528apiSNCreateHandle\u5f97\u5230&#xff09;<br \/>\n*  [in] density&#xff1a;\u8f68\u8ff9\u5bc6\u5ea6\u8c03\u8282 ,\u5fc5\u987b\u5927\u4e8e\u6216\u8005\u7b49\u4e8e 1&#xff0c;\u9ed8\u8ba4 5,\u4e3e\u4e2a\u4f8b\u5b50&#xff1a;\u5047\u5982\u8f68\u8ff9\u6709 100 \u4e2a\u70b9&#xff0c;\u7d2f\u8ba1\u8017\u65f6 1000 \u6beb\u79d2&#xff0c;\u8bbe\u7f6e density \u5982\u4e0b&#xff1a;<br \/>\n*-  density &#061; 1  \u65f6&#xff0c;\u8f68\u8ff9\u6709 100\/1&#061;100 \u4e2a\u70b9&#xff0c;\u6574\u4e2a\u8f68\u8ff9\u7d2f\u8ba1\u8017\u65f6 1000\/1&#061;1000 \u6beb\u79d2 &#xff08;\u9ed8\u8ba4 1  \u500d\u901f\u5ea6&#xff09;<br \/>\n*-  density &#061; 2  \u65f6&#xff0c;\u8f68\u8ff9\u6709 100\/2&#061;50  \u4e2a\u70b9&#xff0c;\u6574\u4e2a\u8f68\u8ff9\u7d2f\u8ba1\u8017\u65f6 1000\/2&#061;500  \u8c6a\u79d2 &#xff08;\u7b49\u4ef7 2  \u500d\u901f\u5ea6&#xff09;<br \/>\n*-  density &#061; 3  \u65f6&#xff0c;\u8f68\u8ff9\u6709 100\/3&#061;33  \u4e2a\u70b9&#xff0c;\u6574\u4e2a\u8f68\u8ff9\u7d2f\u8ba1\u8017\u65f6 1000\/3&#061;333  \u8c6a\u79d2 &#xff08;\u7b49\u4ef7 3  \u500d\u901f\u5ea6&#xff09;<br \/>\n*-  density &#061; 5  \u65f6&#xff0c;\u8f68\u8ff9\u6709 100\/5&#061;20  \u4e2a\u70b9&#xff0c;\u6574\u4e2a\u8f68\u8ff9\u7d2f\u8ba1\u8017\u65f6 1000\/5&#061;200  \u8c6a\u79d2 &#xff08;\u7b49\u4ef7 5  \u500d\u901f\u5ea6&#xff09;<br \/>\n*-  density &#061; 20 \u65f6&#xff0c;\u8f68\u8ff9\u6709 100\/20&#061;5  \u4e2a\u70b9&#xff0c;\u6574\u4e2a\u8f68\u8ff9\u7d2f\u8ba1\u8017\u65f6 1000\/20&#061;50  \u8c6a\u79d2 &#xff08;\u7b49\u4ef7 20 \u500d\u901f\u5ea6&#xff09;<br \/>\n*<br \/>\n*  [in] type&#xff1a;\u8f68\u8ff9\u7c7b\u578b&#xff08;0\u4ee3\u8868\u7edd\u5bf9\u666e\u901a\u8f68\u8ff9&#xff0c;1\u4ee3\u8868\u6ed1\u5757\u8f68\u8ff9&#xff08;\u83b7\u5f97\u7684\u8f68\u8ff9\u70b9\u6570\u6bd4\u666e\u901a\u8f68\u8ff9\u70b9\u6570\u66f4\u591a&#xff09;,\u5177\u4f53\u53c2\u8003enum SN_TRACK_MOVE_TYPE&#xff09;<br \/>\n*<br \/>\n* \u8fd4\u56de\u503c&#xff1a;\u8fd4\u56de\u53c2\u6570SN_RESULT.code(\u9519\u8bef\u7801)\u5982\u679c\u4e3a 0 \u8868\u793a\u6210\u529f&#xff0c;\u5426\u5219\u8868\u793a\u9519\u8bef\u53f7;<br \/>\n*<br \/>\n*\/<br \/>\nint WINAPI apiSNSetTrackParams(HANDLE handle, int density&#061;5, int type&#061;0);<\/p>\n<p>\/*\u83b7\u53d6\u9f20\u6807\u79fb\u52a8\u8f68\u8ff9<br \/>\n*<br \/>\n* \u53c2\u6570&#xff1a;<br \/>\n*[in] handle&#xff1a;\u53e5\u67c4&#xff08;\u901a\u8fc7\u8c03\u7528apiSNCreateHandle\u5f97\u5230&#xff09;<br \/>\n* [in] startPoint&#xff1a;\u5f00\u59cb\u5750\u6807&#xff0c;\u5de6\u4e0a\u89d2&#xff08;0&#xff0c;0&#xff09;&#xff0c;\u53f3\u4e0b\u89d2&#xff08;1920&#xff0c;1080 &#8211; \u4ee5\u5b9e\u9645\u5c4f\u5e55\u4e3a\u51c6&#xff09;<br \/>\n* [in] endPoint&#xff1a;\u7ed3\u675f\u5750\u6807&#xff0c;\u5de6\u4e0a\u89d2&#xff08;0&#xff0c;0&#xff09;&#xff0c;\u53f3\u4e0b\u89d2&#xff08;1920&#xff0c;1080 &#8211; \u4ee5\u5b9e\u9645\u5c4f\u5e55\u4e3a\u51c6&#xff09;<br \/>\n*  [in] type&#xff1a;\u8f68\u8ff9\u5750\u6807\u7c7b\u578b&#xff08;0\u4ee3\u8868\u7edd\u5bf9\u5750\u6807&#xff0c;1\u4ee3\u8868\u76f8\u5bf9\u5750\u6807,\u5177\u4f53\u53c2\u8003enum SN_TRACK_POINT_TYPE&#xff09;<br \/>\n* [out] points&#xff1a;\u8f68\u8ff9\u6570\u7ec4&#xff0c;\u5982\u679c\u6570\u7ec4\u4e2d\u5143\u7d20 point \u51fa\u73b0(10000,10000),\u8868\u793a\u9f20\u6807\u8f68\u8ff9\u7ed3\u675f<br \/>\n*<br \/>\n* \u8fd4\u56de\u503c&#xff1a;\u8fd4\u56de\u53c2\u6570SN_RESULT.code(\u9519\u8bef\u7801)\u5982\u679c\u4e3a 0 \u8868\u793a\u6210\u529f&#xff0c;\u5426\u5219\u8868\u793a\u9519\u8bef\u53f7;<br \/>\n*<br \/>\n*\/<br \/>\nint WINAPI apiSNMouseMove(HANDLE handle, SN_POINT *startPoint, SN_POINT *endPoint, int type, SN_POINT_PARAMS* points);<\/p>\n<p>\/*\u83b7\u53d6\u7248\u672c\u53f7<br \/>\n*<br \/>\n* \u53c2\u6570&#xff1a;<br \/>\n*[in] handle&#xff1a;\u53e5\u67c4&#xff08;\u901a\u8fc7\u8c03\u7528apiSNCreateHandle\u5f97\u5230&#xff09;<br \/>\n* [out] szVersion&#xff1a;\u7248\u672c\u53f7<br \/>\n*<br \/>\n* \u8fd4\u56de\u503c&#xff1a;\u8fd4\u56de\u53c2\u6570SN_RESULT.code(\u9519\u8bef\u7801)\u5982\u679c\u4e3a 0 \u8868\u793a\u6210\u529f&#xff0c;\u5426\u5219\u8868\u793a\u9519\u8bef\u53f7;<br \/>\n*<br \/>\n*\/<br \/>\nint WINAPI apiSNGetVersion(HANDLE handle, char* szVersion);<\/p>\n<p>\/*\u83b7\u53d6\u5361\u5bc6\u5230\u671f\u65f6\u95f4<br \/>\n*<br \/>\n* \u53c2\u6570&#xff1a;<br \/>\n*[in]  handle&#xff1a;\u53e5\u67c4&#xff08;\u901a\u8fc7\u8c03\u7528apiSNCreateHandle\u5f97\u5230&#xff09;<br \/>\n* [out] pResult&#xff1a;\u8fd4\u56de\u9519\u8bef\u4fe1\u606f&#xff0c;\u53c2\u6570pResult-&gt;code(\u9519\u8bef\u7801)\u5982\u679c\u4e3a 0 \u8868\u793a\u6210\u529f&#xff0c;\u5426\u5219\u8868\u793a\u9519\u8bef\u53f7;<br \/>\n*<br \/>\n* \u8fd4\u56de\u503c&#xff1a;\u8fd4\u56de\u5361\u5bc6\u5230\u671f\u65f6\u95f4&#xff0c;\u5931\u8d25\u8fd4\u56deNULL&#xff0c;\u9519\u8bef\u4fe1\u606f\u8bf7\u67e5\u770b\u53c2\u6570 pResult-&gt;message<br \/>\n*<br \/>\n*\/<br \/>\nchar* WINAPI apiSNGetKeyExpiresTime(HANDLE handle, SN_RESULT* pResult);<\/p>\n<p>\/*\u83b7\u53d6\u9519\u8bef\u4fe1\u606f<br \/>\n*<br \/>\n* \u53c2\u6570&#xff1a;<br \/>\n*[in] handle&#xff1a;\u53e5\u67c4&#xff08;\u901a\u8fc7\u8c03\u7528apiSNCreateHandle\u5f97\u5230&#xff09;<br \/>\n*<br \/>\n* \u8fd4\u56de\u503c&#xff1a;\u8fd4\u56de\u53c2\u6570SN_RESULT.code(\u9519\u8bef\u7801)\u5982\u679c\u4e3a 0 \u8868\u793a\u6210\u529f&#xff0c;\u5426\u5219\u8868\u793a\u9519\u8bef\u53f7;<br \/>\n*<br \/>\n*\/<br \/>\nint WINAPI apiSNGetError(HANDLE handle);<\/p>\n<p>\/*\u91ca\u653e\u53e5\u67c4&#xff08;\u5185\u5b58&#xff09;<br \/>\n*<br \/>\n* \u53c2\u6570&#xff1a;<br \/>\n*[in] handle&#xff1a;\u53e5\u67c4&#xff08;\u901a\u8fc7\u8c03\u7528apiSNCreateHandle\u5f97\u5230&#xff09;<br \/>\n*<br \/>\n* \u8fd4\u56de\u503c&#xff1a;\u8fd4\u56de\u53c2\u6570SN_RESULT.code(\u9519\u8bef\u7801)\u5982\u679c\u4e3a 0 \u8868\u793a\u6210\u529f&#xff0c;\u5426\u5219\u8868\u793a\u9519\u8bef\u53f7;<br \/>\n*<br \/>\n*\/<br \/>\nint WINAPI apiSNDestroyHandle(HANDLE handle);<\/p>\n<p>#endif \/\/ !_SN_SDK_H__ <\/p>\n<h3>2.\u5176\u4ed6\u7f16\u7a0b\u8bed\u8a00<\/h3>\n<p>\u4e3a\u4e86\u6613\u4e8e\u96c6\u6210\u548c\u4f7f\u7528&#xff0c;\u6211\u4eec\u5c06\u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5\u5c01\u88c5\u4e3aDLL&#xff08;\u52a8\u6001\u94fe\u63a5\u5e93&#xff09;\u3002\u8fd9\u79cd\u5c01\u88c5\u65b9\u5f0f\u4e0d\u4ec5\u4fdd\u7559\u4e86\u7b97\u6cd5\u7684\u6027\u80fd\u4f18\u52bf&#xff0c;\u8fd8\u63d0\u4f9b\u4e86\u8de8\u5e73\u53f0\u548c\u8de8\u8bed\u8a00\u7684\u517c\u5bb9\u6027&#xff0c;\u76ee\u524d\u652f\u6301\u7f16\u7a0b\u8bed\u8a00\u5982\u4e0b&#xff1a;<\/p>\n<ul>\n<li>C&#043;&#043;<\/li>\n<li>Python<\/li>\n<li>\u6613\u8bed\u8a00<\/li>\n<\/ul>\n<p>\u63a8\u7b97\u8f68\u8ff9\u7b97\u6cd5\u8017\u65f6\u5747\u4e3a\u6beb\u79d2\u7ea7&#xff0c;&lt;&#061; 5ms &#xff0c;\u901f\u5ea6\u8d85\u5feb&#xff0c;fps\u7c7b\u578b\u6e38\u620f\u5b8c\u5168\u65e0\u538b\u529b&#xff01;<\/p>\n<h3>3.\u9f20\u6807\u8f68\u8ff9API\u8c03\u7528\u6d41\u7a0b\u56fe<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"613\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419022922-68030a82b206f.png\" width=\"504\" \/><\/p>\n<p><span style=\"color:#fe2c24\">\u6ce8\u610f&#xff1a;\u5982\u679c\u662f\u591a\u7ebf\u7a0b&#xff0c;\u6bcf\u4e2a\u7ebf\u7a0b\u90fd\u9700\u8981\u901a\u8fc7apiSNCreateHandle\u521b\u5efaHANDLE\u53e5\u67c4,\u8fd9\u6837\u624d\u80fd\u591a\u4e2a\u7ebf\u7a0b\u4e92\u4e0d\u5f71\u54cd<\/span><\/p>\n<h3>4.\u52a0\u8f7dC&#043;&#043;\u9f20\u6807\u8f68\u8ff9dll\u63a5\u53e3<\/h3>\n<p> &#039;&#039;&#039;<\/p>\n<p>&#064;SDK\u529f\u80fd\u63cf\u8ff0&#xff1a;\u9f20\u6807\u8f68\u8ff9<\/p>\n<p>&#039;&#039;&#039;<br \/>\nfrom ctypes import cdll, Structure, c_int, c_char, c_char_p, POINTER, create_string_buffer<br \/>\nimport ctypes<br \/>\nimport platform<br \/>\nclass SN_RESULT(ctypes.Structure):<br \/>\n    _fields_ &#061; [(&#034;code&#034;, ctypes.c_int),<br \/>\n                (&#034;message&#034;, ctypes.c_char * 4096)]<\/p>\n<p>class SN_POINT(ctypes.Structure):<br \/>\n    _fields_ &#061; [(&#034;x&#034;, ctypes.c_int),<br \/>\n                (&#034;y&#034;, ctypes.c_int)]<\/p>\n<p>class SN_POINT_PARAMS(ctypes.Structure):<br \/>\n    _fields_ &#061; [(&#034;point&#034;, SN_POINT),<br \/>\n                (&#034;delayTime&#034;, ctypes.c_int)]<\/p>\n<p>class SN_MOUSE_TRACK_SDK:<br \/>\n    def __init__(self, key, onnx_path, dll_path):<br \/>\n        self.key &#061; key.encode(&#039;utf-8&#039;)<br \/>\n        self.onnx_path &#061; onnx_path.encode(&#039;utf-8&#039;)<br \/>\n        self.sn_sdk &#061; ctypes.WinDLL(dll_path)<br \/>\n        self.handle &#061; None<br \/>\n        self.result &#061; SN_RESULT()<br \/>\n        self._initialize_sdk()<\/p>\n<p>    def _initialize_sdk(self):<br \/>\n        self.sn_sdk.apiSNCreateHandle.argtypes &#061; [ctypes.POINTER(ctypes.c_char), ctypes.POINTER(ctypes.c_char),<br \/>\n                                                  ctypes.POINTER(SN_RESULT)]<br \/>\n        self.sn_sdk.apiSNCreateHandle.restype &#061; ctypes.c_void_p<br \/>\n        # \u68c0\u6d4b\u5f53\u524d\u662f x64 \u8fd8\u662f x86<br \/>\n        print(platform.architecture())<br \/>\n        self.handle &#061; self.sn_sdk.apiSNCreateHandle(self.key, self.onnx_path, ctypes.byref(self.result))<br \/>\n        if self.result.code !&#061; 0:<br \/>\n            print(f&#034;Failed to create handle: {self.result.message.decode(&#039;gbk&#039;, errors&#061;&#039;replace&#039;)}&#034;)<br \/>\n        else:<br \/>\n            print(&#034;sn_sdk.apiSNCreateHandle success&#034;)<\/p>\n<p>    def get_version(self):<br \/>\n        version &#061; ctypes.create_string_buffer(4096)<br \/>\n        self.sn_sdk.apiSNGetVersion.argtypes &#061; [ctypes.c_void_p, ctypes.POINTER(ctypes.c_char)]<br \/>\n        self.sn_sdk.apiSNGetVersion.restype &#061; ctypes.c_int<\/p>\n<p>        if self.handle is None:<br \/>\n            print(&#034;apiSNCreateHandle fail!&#034;)<br \/>\n            return &#034;&#034;<\/p>\n<p>        result &#061; self.sn_sdk.apiSNGetVersion(self.handle, version)<br \/>\n        if result !&#061; 0:<br \/>\n            raise Exception(f&#034;Failed to get version: {result}&#034;)<br \/>\n        return version.value.decode()<\/p>\n<p>    def set_track_params(self, density, other_param):<br \/>\n        self.sn_sdk.apiSNSetTrackParams.argtypes &#061; [ctypes.c_void_p, ctypes.c_int, ctypes.c_int]<br \/>\n        self.sn_sdk.apiSNSetTrackParams.restype &#061; ctypes.c_int<br \/>\n        return self.sn_sdk.apiSNSetTrackParams(self.handle, density, other_param)<\/p>\n<p>    def get_key_expires_time(self):<br \/>\n        self.sn_sdk.apiSNGetKeyExpiresTime.argtypes &#061; [ctypes.c_void_p, ctypes.POINTER(SN_RESULT)]<br \/>\n        self.sn_sdk.apiSNGetKeyExpiresTime.restype &#061; ctypes.c_char_p<br \/>\n        if self.handle is None:<br \/>\n            print(&#034;apiSNCreateHandle fail!&#034;)<br \/>\n            return &#034;&#034;<br \/>\n        return self.sn_sdk.apiSNGetKeyExpiresTime(self.handle, ctypes.byref(self.result))<\/p>\n<p>    def move_mouse(self, start_point, end_point, type, num_points&#061;4096):<br \/>\n        points_array &#061; (SN_POINT_PARAMS * num_points)()<br \/>\n        self.sn_sdk.apiSNMouseMove.argtypes &#061; [ctypes.c_void_p, POINTER(SN_POINT), POINTER(SN_POINT), ctypes.c_int,<br \/>\n                                               POINTER(SN_POINT_PARAMS)]<br \/>\n        self.sn_sdk.apiSNMouseMove.restype &#061; ctypes.c_int<\/p>\n<p>        if self.handle is None:<br \/>\n            print(&#034;apiSNCreateHandle fail!&#034;)<br \/>\n            # \u5f3a\u5236\u7ed9 points_array \u8d4b\u503c<br \/>\n            points_array[0].point.x &#061; 10000  # \u8bbe\u7f6e X \u5750\u6807<br \/>\n            points_array[0].point.y &#061; 10000  # \u8bbe\u7f6e Y \u5750\u6807<br \/>\n            points_array[0].delayTime &#061; 0  # \u8bbe\u7f6e\u5ef6\u8fdf\u65f6\u95f4<br \/>\n            return points_array<\/p>\n<p>        result_code &#061; self.sn_sdk.apiSNMouseMove(self.handle, start_point, end_point, type, points_array)<br \/>\n        if result_code !&#061; 0:<br \/>\n            print(f&#034;Failed to move mouse start_point:{start_point.x},{start_point.y} end_point:{end_point.x},{end_point.y} ,Error core:{result_code}&#034;)<br \/>\n            # \u5f3a\u5236\u7ed9 points_array \u8d4b\u503c<br \/>\n            points_array[0].point.x &#061; 10000  # \u8bbe\u7f6e X \u5750\u6807<br \/>\n            points_array[0].point.y &#061; 10000  # \u8bbe\u7f6e Y \u5750\u6807<br \/>\n            points_array[0].delayTime &#061; 0  # \u8bbe\u7f6e\u5ef6\u8fdf\u65f6\u95f4<\/p>\n<p>        return points_array<\/p>\n<p>    def destroy_handle(self):<br \/>\n        self.sn_sdk.apiSNDestroyHandle.argtypes &#061; [ctypes.c_void_p]<br \/>\n        self.sn_sdk.apiSNDestroyHandle.restype &#061; ctypes.c_int<br \/>\n        return self.sn_sdk.apiSNDestroyHandle(self.handle)<\/p>\n<p>if __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    #from sn_mouse_track import SN_MOUSE_TRACK_SDK, SN_POINT<\/p>\n<p>    # \u521d\u59cb\u5316 SDK &#8211; \u53ea\u9700\u8981\u521b\u5efa\u4e00\u6b21<br \/>\n    sdk &#061; SN_MOUSE_TRACK_SDK(key&#061;&#034;SNKJUMWwseUjELLDsmvxPH1WYNcZAUDbWdYdEgWjUhxL&#034;,<br \/>\n                             onnx_path&#061;&#034;d:\/\/SNTrack.onnx&#034;,<br \/>\n                             dll_path&#061;&#034;d:\/\/SNSDK.dll&#034;)<\/p>\n<p>    # \u83b7\u53d6\u7248\u672c\u53f7<br \/>\n    version &#061; sdk.get_version()<br \/>\n    print(&#034;SDK Version:&#034;, version)<\/p>\n<p>    # \u8bbe\u7f6e\u8f68\u8ff9\u53c2\u6570 &#xff0c;\u8be6\u7ec6\u53c2\u6570\u89e3\u91ca\u53c2\u8003 SNSDK.h<br \/>\n    sdk.set_track_params(density&#061;5, other_param&#061;0)<\/p>\n<p>    # \u83b7\u53d6\u5361\u5bc6\u5230\u671f\u65f6\u95f4<br \/>\n    expires_time &#061; sdk.get_key_expires_time()<br \/>\n    print(&#034;Key expires time:&#034;, expires_time)<\/p>\n<p>    # \u6a21\u62df\u9f20\u6807\u79fb\u52a8 &#8211; \u901a\u8fc7\u8bbe\u7f6e\u5f00\u59cb\u548c\u7ed3\u675f\u4f4d\u7f6e&#xff0c;\u4e0d\u505c\u83b7\u53d6\u8f68\u8ff9&#xff08;\u4ec5\u4ec5\u53ea\u662f\u6f14\u793a\u4ee3\u7801&#xff0c;\u53ea\u83b7\u53d6\u4e00\u6b21\u8f68\u8ff9&#xff09;<br \/>\n    while True:<br \/>\n        start_point &#061; SN_POINT(100, 100)<br \/>\n        end_point &#061; SN_POINT(800, 800)<br \/>\n        points_array &#061; sdk.move_mouse(start_point, end_point, type&#061;0)<\/p>\n<p>        # \u6253\u5370\u8f68\u8ff9\u70b9<br \/>\n        for i, point in enumerate(points_array):<br \/>\n            if point.point.x &#061;&#061; 10000 and point.point.y &#061;&#061; 10000:<br \/>\n                break<br \/>\n            print(f&#034;Point {i}: ({point.point.x}, {point.point.y}, {point.delayTime})&#034;)<\/p>\n<p>        # \u4ec5\u4ec5\u53ea\u662f\u6f14\u793a\u4ee3\u7801&#xff0c;\u53ea\u83b7\u53d6\u4e00\u6b21\u8f68\u8ff9<br \/>\n        break<\/p>\n<p>    # \u9500\u6bc1\u53e5\u67c4<br \/>\n    sdk.destroy_handle()<\/p>\n<p>&#039;&#039;&#039;<br \/>\n(&#039;64bit&#039;, &#039;WindowsPE&#039;)<br \/>\nsn_sdk.apiSNCreateHandle success<br \/>\nSDK Version: 1.0<br \/>\nKey expires time: b&#039;2026-02-04 10:39:38&#039;<br \/>\nPoint 0: (100, 100, 0)<br \/>\nPoint 1: (110, 102, 1)<br \/>\nPoint 2: (135, 105, 2)<br \/>\nPoint 3: (175, 111, 8)<br \/>\nPoint 4: (224, 135, 8)<br \/>\nPoint 5: (276, 153, 5)<br \/>\nPoint 6: (307, 165, 2)<br \/>\nPoint 7: (352, 188, 9)<br \/>\nPoint 8: (377, 201, 8)<br \/>\nPoint 9: (404, 221, 5)<br \/>\nPoint 10: (422, 236, 5)<br \/>\nPoint 11: (441, 252, 2)<br \/>\nPoint 12: (460, 270, 9)<br \/>\nPoint 13: (482, 293, 8)<br \/>\nPoint 14: (506, 317, 7)<br \/>\nPoint 15: (531, 342, 1)<br \/>\nPoint 16: (553, 374, 2)<br \/>\nPoint 17: (582, 417, 9)<br \/>\nPoint 18: (604, 448, 8)<br \/>\nPoint 19: (622, 476, 5)<br \/>\nPoint 20: (638, 498, 1)<br \/>\nPoint 21: (648, 514, 3)<br \/>\nPoint 22: (658, 528, 8)<br \/>\nPoint 23: (667, 543, 7)<br \/>\nPoint 24: (678, 563, 5)<br \/>\nPoint 25: (687, 578, 1)<br \/>\nPoint 26: (697, 598, 2)<br \/>\nPoint 27: (710, 622, 9)<br \/>\nPoint 28: (719, 638, 8)<br \/>\nPoint 29: (728, 657, 5)<br \/>\nPoint 30: (735, 671, 1)<br \/>\nPoint 31: (743, 686, 2)<br \/>\nPoint 32: (752, 705, 9)<br \/>\nPoint 33: (761, 721, 8)<br \/>\nPoint 34: (769, 737, 5)<br \/>\nPoint 35: (776, 751, 2)<br \/>\nPoint 36: (784, 767, 9)<br \/>\nPoint 37: (792, 783, 2)<br \/>\nPoint 38: (796, 793, 9)<br \/>\nPoint 39: (799, 800, 24)<\/p>\n<p>Process finished with exit code 0<\/p>\n<p>&#039;&#039;&#039; <\/p>\n<h3>5.\u4e91\u76d8\u6e90\u7801\u4e0b\u8f7d<\/h3>\n<ul>\n<li>\u767e\u5ea6\u4e91\u76d8<\/li>\n<li>\u5938\u514b\u4e91\u76d8<\/li>\n<li>123\u4e91\u76d8<\/li>\n<\/ul>\n<p>\u4e91\u76d8\u76ee\u5f55\u4ecb\u7ecd&#xff1a;<\/p>\n<p>demo &#8211; \u5305\u542b\u5404\u79cd\u7f16\u7a0b\u8bed\u8a00\u7684demo<\/p>\n<p>dll &#8211; \u5206\u522b\u662fx86\u548cx64\u5e73\u53f0\u6240\u9700\u8981\u7684dll\/lib\/h\u6587\u4ef6<\/p>\n<p>windows \u9f20\u6807\u8f68\u8ff9\u6d4b\u8bd5\u5de5\u5177 &#8211; exe\u6d4b\u8bd5\u9f20\u6807\u8f68\u8ff9\u6548\u679c( demo \u4e2d\u7684 c&#043;&#043; \u5de5\u7a0b\u7f16\u8bd1\u540e\u7684exe\u53ef\u6267\u884c\u6587\u4ef6)<\/p>\n<h2>\u56db.\u6548\u679c\u6f14\u793a<\/h2>\n<p>1.\u5f00\u59cb\u5750\u6807\u4e3a&#xff08;100&#xff0c;100&#xff09;&#xff0c;\u7ed3\u675f\u5750\u6807\u4e3a&#xff08;800&#xff0c;800&#xff09;&#xff0c;\u901a\u8fc7\u8c03\u7528\u63a5\u53e3\u83b7\u5f97 4 \u6761\u9f20\u6807\u8f68\u8ff9<\/p>\n<p>2.\u5f00\u59cb\u5750\u6807\u4e3a&#xff08;1000&#xff0c;100&#xff09;&#xff0c;\u7ed3\u675f\u5750\u6807\u4e3a&#xff08;800&#xff0c;800&#xff09;&#xff0c;\u901a\u8fc7\u8c03\u7528\u63a5\u53e3\u83b7\u5f97 2 \u6761\u9f20\u6807\u8f68\u8ff9<\/p>\n<p><img decoding=\"async\" alt=\"\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419022922-68030a82d6e95.gif\" \/>\u200b<\/p>\n<h2>\u4e94.\u5e38\u89c1\u95ee\u9898<\/h2>\n<p>1.\u662f\u5426\u652f\u6301\u591a\u7ebf\u7a0b<\/p>\n<p>\u652f\u6301<\/p>\n<p>2.\u5982\u4f55\u4f7f\u7528\u591a\u7ebf\u7a0b<\/p>\n<p>\u53c2\u8003\u524d\u9762\u7684\u300a2.\u9f20\u6807\u8f68\u8ff9API\u8c03\u7528\u6d41\u7a0b\u56fe\u300b&#xff0c;\u591a\u7ebf\u7a0b\u548c\u5355\u7ebf\u7a0b\u7c7b\u4f3c&#xff1b;\u5982\u679c\u662f\u591a\u7ebf\u7a0b,\u90a3\u4e48\u6bcf\u4e2a\u7ebf\u7a0b\u90fd\u9700\u8981\u901a\u8fc7apiSNCreateHandle\u521b\u5efaHANDLE\u53e5\u67c4,\u8fd9\u6837\u624d\u80fd\u591a\u4e2a\u7ebf\u7a0b\u4e92\u4e0d\u5f71\u54cd<\/p>\n<p>3.\u5982\u4f55\u5224\u65ad\u8f68\u8ff9\u7ed3\u675f<\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u5faa\u73af\u5224\u65ad\u5f97\u5230\u7684\u8f68\u8ff9\u5750\u6807&#xff0c;\u5982\u679c\u5f53\u524d\u5750\u6807\u7684X\u503c\u548cY\u503c\u90fd\u662f1000\u7684\u60c5\u51b5\u4e0b&#xff0c;\u9ed8\u8ba4\u8f68\u8ff9\u7ed3\u675f<\/p>\n<p><span style=\"color:#fe2c24\">&#xff08;\u4e4b\u524d\u7684\u5224\u65ad\u662f&#xff08;-1&#xff0c;-1&#xff09;\u4f5c\u4e3a\u8f68\u8ff9\u7ed3\u675f\u7684\u6807\u8bb0&#xff0c;\u73b0\u5728\u4fee\u6539\u4e3a&#xff08;10000&#xff0c;10000&#xff09;\u4f5c\u4e3a\u8f68\u8ff9\u7ed3\u675f\u6807\u8bb0&#xff0c;\u76ee\u7684\u662f\u4e3a\u4e86\u517c\u5bb9\u76f8\u5bf9\u5750\u6807&#xff09;<\/span><\/p>\n<p>4.\u9f20\u6807\u8f68\u8ff9\u8bbe\u7f6e\u76f8\u5bf9\u5750\u6807<\/p>\n<p>\u5728\u51fd\u6570 apiSNMouseMove \u4e2d type \u53c2\u6570&#xff0c;0 \u4e3a \u7edd\u5bf9\u5750\u6807 ; 1 \u4e3a\u76f8\u5bf9\u5750\u6807<\/p>\n<p>5.\u5982\u4f55\u8c03\u8282\u70b9\u7684\u5bc6\u96c6\u7a0b\u5ea6<\/p>\n<p>\u5728&#xff08;2024.12.22&#xff09;SDK2.0\u7248\u672c\u4e2d\u65b0\u589e\u63a5\u53e3 apiSNSetTrackParams \u4e2d\u7684 density \u53c2\u6570\u53ef\u4ee5\u7528\u6765\u8c03\u8282\u8f68\u8ff9\u5bc6\u5ea6&#xff0c;\u4e3e\u4e2a\u4f8b\u5b50&#xff1a;<\/p>\n<ul>\n<li>density &#061; 1 \u65f6&#xff0c;\u9ed8\u8ba4\u8f68\u8ff9\u6709 100 \u4e2a\u70b9&#xff0c;\u6574\u4e2a\u8f68\u8ff9\u7d2f\u8ba1\u8017\u65f6 1000 \u6beb\u79d2 &#xff08;\u9ed8\u8ba4 1 \u500d\u901f\u5ea6&#xff09;<\/li>\n<li>density &#061; 2 \u65f6&#xff0c;\u8f68\u8ff9\u6709 100\/2&#061;50 \u4e2a\u70b9&#xff0c;\u6574\u4e2a\u8f68\u8ff9\u7d2f\u8ba1\u8017\u65f6 500\u00a0\u6beb\u79d2 &#xff08;\u7b49\u4ef7 2 \u500d\u901f\u5ea6&#xff09;<\/li>\n<li>density &#061; 3 \u65f6&#xff0c;\u8f68\u8ff9\u6709 100\/3&#061;33 \u4e2a\u70b9&#xff0c;\u6574\u4e2a\u8f68\u8ff9\u7d2f\u8ba1\u8017\u65f6 333 \u6beb\u79d2 &#xff08;\u7b49\u4ef7 3 \u500d\u901f\u5ea6&#xff09;<\/li>\n<li>density &#061; 5 \u65f6&#xff0c;\u8f68\u8ff9\u6709 100\/5&#061;20 \u4e2a\u70b9&#xff0c;\u6574\u4e2a\u8f68\u8ff9\u7d2f\u8ba1\u8017\u65f6 200 \u6beb\u79d2 &#xff08;\u7b49\u4ef7 5 \u500d\u901f\u5ea6&#xff09;<\/li>\n<\/ul>\n<p><span style=\"color:#fe2c24\">\u4e0d\u540c\u7684\u6e38\u620f\u9700\u8981\u7684\u8f68\u8ff9\u5bc6\u5ea6\u4e0d\u4e00\u6837&#xff0c;\u7c7b\u4f3c fps \u6e38\u620f&#xff0c;\u9f20\u6807\u6ed1\u52a8\u8f68\u8ff9\u6bd4\u8f83\u5feb&#xff0c;density \u53ef\u4ee5\u8bbe\u7f6e\u4e3a 5 \u6216\u8005\u66f4\u9ad8 ; \u7c7b\u4f3c\u9b54\u517d\u4e16\u754c\u6216\u8005\u68a6\u5e7b&#xff0c;density \u53ef\u4ee5\u8c03\u8282\u4e3a 2 \u6216\u8005 3\u6216\u80055<\/span><\/p>\n<p>6.\u6ed1\u5757\u9a8c\u8bc1\u8f68\u8ff9<\/p>\n<p>\u5728\u51fd\u6570 apiSNSetTrackParams \u4e2d type \u53c2\u6570&#xff0c;0 \u4e3a\u666e\u901a\u9f20\u6807\u8f68\u8ff9 ; 1 \u4e3a\u6ed1\u5757\u8f68\u8ff9<\/p>\n<p><span style=\"color:#fe2c24\">\u666e\u901a\u9f20\u6807\u8d35\u548c\u6ed1\u5757\u8f68\u8ff9\u533a\u522b&#xff1a;\u6ed1\u5757\u8f68\u8ff9\u6bd4\u666e\u901a\u9f20\u6807\u8f68\u8ff9\u5750\u6807\u70b9\u66f4\u591a&#xff08;\u76f8\u540c\u7684\u5f00\u59cb\/\u7ed3\u675f\u5750\u6807&#xff09;&#xff0c;\u70b9\u4e0e\u70b9\u4e4b\u95f4\u66f4\u52a0\u5bc6\u96c6&#xff0c;\u8f68\u8ff9\u7684\u5f00\u59cb\u548c\u7ed3\u675f\u6682\u505c\/\u52a0\u901f\u66f4\u52a0\u660e\u663e<\/span><\/p>\n<h2>\u516d.\u66f4\u65b0\u65e5\u5fd7<\/h2>\n<ul>\n<li>2024.02.06 c&#043;&#043; \u6a21\u62df\u4eba\u5de5\u9f20\u6807\u8f68\u8ff9demo<\/li>\n<li>2024.06.06 python \u6a21\u62df\u4eba\u5de5\u9f20\u6807\u8f68\u8ff9demo<\/li>\n<li>2024.06.25 \u65b0\u589e\u9519\u8bef\u65e5\u5fd7\u4fe1\u606f<\/li>\n<li>2024.07.15 \u4f18\u5316\u6c34\u5e73\/\u5782\u76f4\u8f68\u8ff9<\/li>\n<li>2024.08.20 \u4f18\u5316\u90e8\u5206\u8f68\u8ff9\u53ef\u80fd\u51fa\u73b0\u8d1f\u6570\u7684\u95ee\u9898<\/li>\n<li>2024.09.19 \u4f18\u5316\u90e8\u5206\u8f68\u8ff9\u5ef6\u8fdf\u65f6\u95f4\u4e3a0\u7684\u60c5\u51b5&#xff08;\u53ef\u80fd\u4f1a\u9020\u6210\u9f20\u6807\u77ac\u79fb&#xff09;<\/li>\n<li>2024.09.21 \u4fee\u590d\u90e8\u5206\u6c34\u5e73\/\u5782\u76f4\u8f68\u8ff9\u51fa\u73b0\u8d1f\u6570\u7684\u60c5\u51b5<\/li>\n<li>2024.09.28 \u65b0\u589e\u6613\u8bed\u8a00demo<\/li>\n<li>2024.11.01 \u4fee\u6539\u63a5\u53e3,\u517c\u5bb9\u6613\u8bed\u8a00\u4ee3\u7801<\/li>\n<li>2024.11.17 \u652f\u6301\u79fb\u52a8\u8f68\u8ff9\u4e3a\u76f8\u5bf9\u5750\u6807&#xff08;\u9ed8\u8ba4\u662f\u8f68\u8ff9\u662f\u7edd\u5bf9\u5750\u6807&#xff09;<\/li>\n<li>2024.12.15 \u65b0\u589e\u6587\u5b57\u8bc6\u522bOCR&#xff0c;\u652f\u6301\u7f16\u7a0b\u8bed\u8a00\u5982\u4e0b&#xff1a;\n<ul>\n<li>Python<\/li>\n<li>\u6613\u8bed\u8a00<\/li>\n<li>C\u8bed\u8a00<\/li>\n<li>C&#043;&#043;<\/li>\n<\/ul>\n<\/li>\n<li>2024.12.22 \u4f18\u5316\u9f20\u6807\u8f68\u8ff9\n<ul>\n<li>\u65b0\u589e\u6ed1\u5757\u8f68\u8ff9<\/li>\n<li>\u4f18\u5316\u9f20\u6807\u8f68\u8ff9 &#8211; \u652f\u6301\u5bc6\u5ea6\u8c03\u8282<\/li>\n<\/ul>\n<\/li>\n<li><span style=\"color:#fe2c24\">2024.12.29<\/span>\n<ul>\n<li><span style=\"color:#fe2c24\">\u4fee\u590d\u9f20\u6807\u8f68\u8ff9\u53ef\u80fd\u4f1a\u5d29\u6e83\u7684\u95ee\u9898<\/span><\/li>\n<li><span style=\"color:#fe2c24\">\u4fee\u590dOCR\u6587\u5b57\u8bc6\u522b\u5931\u8d25\u95ee\u9898&#xff08;\u5e26\u6709\u4e2d\u6587\u8def\u5f84\u7684\u56fe\u7247&#xff09;<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.2k\u6b21\uff0c\u70b9\u8d5e38\u6b21\uff0c\u6536\u85cf58\u6b21\u3002demo &#8211; \u5305\u542b\u5404\u79cd\u7f16\u7a0b\u8bed\u8a00\u7684demodll &#8211; \u5206\u522b\u662fx86\u548cx64\u5e73\u53f0\u6240\u9700\u8981\u7684dll\/lib\/h\u6587\u4ef6windows \u9f20\u6807\u8f68\u8ff9\u6d4b\u8bd5\u5de5\u5177 &#8211; exe\u6d4b\u8bd5\u9f20\u6807\u8f68\u8ff9\u6548\u679c( demo \u4e2d\u7684 c++ \u5de5\u7a0b\u7f16\u8bd1\u540e\u7684exe\u53ef\u6267\u884c\u6587\u4ef6)_python\u751f\u6210\u9f20\u6807\u8ff9\u7b97\u6cd5\u4ee3\u7801<\/p>\n","protected":false},"author":2,"featured_media":24660,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1925,1927,1928,1929,1924,1926],"topic":[],"class_list":{"0":"post-24663","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-python","11":"tag-1929","12":"tag-1924","13":"tag-1926"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python \u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5 - \u9632\u6b62\u6e38\u620f\u68c0\u6d4b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/24663.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python \u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5 - \u9632\u6b62\u6e38\u620f\u68c0\u6d4b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.2k\u6b21\uff0c\u70b9\u8d5e38\u6b21\uff0c\u6536\u85cf58\u6b21\u3002demo - \u5305\u542b\u5404\u79cd\u7f16\u7a0b\u8bed\u8a00\u7684demodll - \u5206\u522b\u662fx86\u548cx64\u5e73\u53f0\u6240\u9700\u8981\u7684dll\/lib\/h\u6587\u4ef6windows \u9f20\u6807\u8f68\u8ff9\u6d4b\u8bd5\u5de5\u5177 - exe\u6d4b\u8bd5\u9f20\u6807\u8f68\u8ff9\u6548\u679c( demo \u4e2d\u7684 c++ \u5de5\u7a0b\u7f16\u8bd1\u540e\u7684exe\u53ef\u6267\u884c\u6587\u4ef6)_python\u751f\u6210\u9f20\u6807\u8ff9\u7b97\u6cd5\u4ee3\u7801\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/24663.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-19T02:29:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419022922-68030a828d39c.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/24663.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/24663.html\",\"name\":\"Python \u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5 - \u9632\u6b62\u6e38\u620f\u68c0\u6d4b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-19T02:29:24+00:00\",\"dateModified\":\"2025-04-19T02:29:24+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/24663.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/24663.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/24663.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python \u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5 - \u9632\u6b62\u6e38\u620f\u68c0\u6d4b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Python \u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5 - \u9632\u6b62\u6e38\u620f\u68c0\u6d4b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/24663.html","og_locale":"zh_CN","og_type":"article","og_title":"Python \u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5 - \u9632\u6b62\u6e38\u620f\u68c0\u6d4b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb3.2k\u6b21\uff0c\u70b9\u8d5e38\u6b21\uff0c\u6536\u85cf58\u6b21\u3002demo - \u5305\u542b\u5404\u79cd\u7f16\u7a0b\u8bed\u8a00\u7684demodll - \u5206\u522b\u662fx86\u548cx64\u5e73\u53f0\u6240\u9700\u8981\u7684dll\/lib\/h\u6587\u4ef6windows \u9f20\u6807\u8f68\u8ff9\u6d4b\u8bd5\u5de5\u5177 - exe\u6d4b\u8bd5\u9f20\u6807\u8f68\u8ff9\u6548\u679c( demo \u4e2d\u7684 c++ \u5de5\u7a0b\u7f16\u8bd1\u540e\u7684exe\u53ef\u6267\u884c\u6587\u4ef6)_python\u751f\u6210\u9f20\u6807\u8ff9\u7b97\u6cd5\u4ee3\u7801","og_url":"https:\/\/www.wsisp.com\/helps\/24663.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-19T02:29:24+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250419022922-68030a828d39c.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/24663.html","url":"https:\/\/www.wsisp.com\/helps\/24663.html","name":"Python \u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5 - \u9632\u6b62\u6e38\u620f\u68c0\u6d4b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-19T02:29:24+00:00","dateModified":"2025-04-19T02:29:24+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/24663.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/24663.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/24663.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Python \u9f20\u6807\u8f68\u8ff9\u7b97\u6cd5 - \u9632\u6b62\u6e38\u620f\u68c0\u6d4b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/24663","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=24663"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/24663\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/24660"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=24663"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=24663"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=24663"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=24663"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}