1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2491],{6903:(e,n,t)=>{t.d(n,{A:()=>s});t(6540);var r=t(1176),i=t(4848);function s(){return(0,i.jsx)(r.A.Google,{style:{display:"block",textAlign:"center"},layout:"in-article",format:"fluid",client:"ca-pub-7015533392136941",slot:"7527831842"})}},9038:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"services/baidu-ocr","title":"\u767e\u5ea6\u6587\u5b57\u8bc6\u522b","description":"\u5212\u8bcd\u7ffb\u8bd1\u7684\u622a\u56fe\u7ffb\u8bd1\u529f\u80fd\u53ef\u4ee5\u6539\u4e3a\u4f7f\u7528\u767e\u5ea6\u901a\u7528\u6587\u5b57\u8bc6\u522b\uff08\u9ad8\u7cbe\u5ea6\u7248\uff09\u670d\u52a1\u5c06\u622a\u56fe\u8f6c\u6210\u6587\u5b57\u8fdb\u884c\u7ffb\u8bd1\uff0c\u5b83\u6bd4\u5212\u8bcd\u7ffb\u8bd1\u5185\u7f6e\u7684 Tesseract OCR \u66f4\u5feb\u4e14\u66f4\u51c6\u786e\u3002","source":"@site/docs/services/baidu-ocr.mdx","sourceDirName":"services","slug":"/services/baidu-ocr","permalink":"/docs/services/baidu-ocr","draft":false,"unlisted":false,"editUrl":"/docs/edit-note?docs%2Fservices%2Fbaidu-ocr.mdx","tags":[],"version":"current","lastUpdatedAt":1762083386000,"frontMatter":{},"sidebar":"servicesSidebar","previous":{"title":"\u706b\u5c71\u7ffb\u8bd1","permalink":"/docs/services/hs-api"},"next":{"title":"\u641c\u72d7\u7ffb\u8bd1\uff08\u5df2\u4e0b\u7ebf\uff09","permalink":"/docs/services/sg-api"}}');var i=t(4848),s=t(8453);t(6903);const o={},l="\u767e\u5ea6\u6587\u5b57\u8bc6\u522b",c={},a=[{value:"\u7b2c\u4e00\u79cd\uff1a\u8d2d\u4e70\u3010\u5957\u9910\u5305\u3011\u76f4\u63a5\u4f7f\u7528",id:"\u7b2c\u4e00\u79cd\u8d2d\u4e70\u5957\u9910\u5305\u76f4\u63a5\u4f7f\u7528",level:2},{value:"\u7b2c\u4e8c\u79cd\uff1a\u81ea\u884c\u7533\u8bf7\u767e\u5ea6\u6587\u5b57\u8bc6\u522b\u670d\u52a1",id:"\u7b2c\u4e8c\u79cd\u81ea\u884c\u7533\u8bf7\u767e\u5ea6\u6587\u5b57\u8bc6\u522b\u670d\u52a1",level:2},{value:"\u4ef7\u683c",id:"prices",level:3},{value:"\u7533\u8bf7\u6b65\u9aa4",id:"steps",level:3},{value:"\u7b2c\u4e00\u6b65\uff1a\u8fdb\u884c\u4e2a\u4eba\u8ba4\u8bc1",id:"register",level:4},{value:"\u7b2c\u4e8c\u6b65\uff1a\u521b\u5efa\u6587\u5b57\u8bc6\u522b\u5e94\u7528",id:"create-app",level:4},{value:"\u7b2c\u4e09\u6b65\uff1a\u83b7\u53d6 API Key \u548c Secret Key",id:"fill-in",level:4},{value:"\u9519\u8bef\u6392\u67e5",id:"troubleshooting",level:3},{value:"\u5e38\u89c1\u95ee\u9898",id:"\u5e38\u89c1\u95ee\u9898",level:3},{value:"\u586b\u5199\u5bc6\u94a5\u540e\u51fa\u73b0 \u201cCannot read property 'reduce' of undefined\u201d \u7684\u62a5\u9519",id:"\u586b\u5199\u5bc6\u94a5\u540e\u51fa\u73b0-cannot-read-property-reduce-of-undefined-\u7684\u62a5\u9519",level:4}];function d(e){const n={a:"a",admonition:"admonition",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",ol:"ol",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"\u767e\u5ea6\u6587\u5b57\u8bc6\u522b",children:"\u767e\u5ea6\u6587\u5b57\u8bc6\u522b"})}),"\n",(0,i.jsxs)(n.p,{children:["\u5212\u8bcd\u7ffb\u8bd1\u7684\u622a\u56fe\u7ffb\u8bd1\u529f\u80fd\u53ef\u4ee5\u6539\u4e3a\u4f7f\u7528\u767e\u5ea6\u901a\u7528\u6587\u5b57\u8bc6\u522b\uff08\u9ad8\u7cbe\u5ea6\u7248\uff09\u670d\u52a1\u5c06\u622a\u56fe\u8f6c\u6210\u6587\u5b57\u8fdb\u884c\u7ffb\u8bd1\uff0c\u5b83\u6bd4\u5212\u8bcd\u7ffb\u8bd1\u5185\u7f6e\u7684 ",(0,i.jsx)(n.a,{href:"https://tesseract-ocr.github.io/",children:"Tesseract OCR"})," \u66f4\u5feb\u4e14\u66f4\u51c6\u786e\u3002"]}),"\n",(0,i.jsx)(n.p,{children:"\u5728\u5212\u8bcd\u7ffb\u8bd1\u5167\u4f7f\u7528\u767e\u5ea6\u6587\u5b57\u8bc6\u522b\u7684\u65b9\u5f0f\u6709\u4e24\u79cd\u3002"}),"\n",(0,i.jsx)(n.h2,{id:"\u7b2c\u4e00\u79cd\u8d2d\u4e70\u5957\u9910\u5305\u76f4\u63a5\u4f7f\u7528",children:"\u7b2c\u4e00\u79cd\uff1a\u8d2d\u4e70\u3010\u5957\u9910\u5305\u3011\u76f4\u63a5\u4f7f\u7528"}),"\n",(0,i.jsx)(n.p,{children:"\u53ea\u9700\u8d2d\u4e70\u5212\u8bcd\u7ffb\u8bd1\u7684\u3010\u5957\u9910\u5305\u3011\uff0c\u5373\u53ef\u76f4\u63a5\u4f7f\u7528\u5305\u62ec\u767e\u5ea6\u6587\u5b57\u8bc6\u522b\u5728\u5167\u7684\u6240\u6709\u670d\u52a1\u3002"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"/docs/pricing/package",children:"\u70b9\u51fb\u67e5\u7
170b\u5957\u9910\u5305\u7684\u8be6\u7ec6\u8bf4\u660e"})}),"\n",(0,i.jsx)(n.h2,{id:"\u7b2c\u4e8c\u79cd\u81ea\u884c\u7533\u8bf7\u767e\u5ea6\u6587\u5b57\u8bc6\u522b\u670d\u52a1",children:"\u7b2c\u4e8c\u79cd\uff1a\u81ea\u884c\u7533\u8bf7\u767e\u5ea6\u6587\u5b57\u8bc6\u522b\u670d\u52a1"}),"\n",(0,i.jsxs)(n.admonition,{type:"tip",children:[(0,i.jsx)(n.p,{children:"\u6587\u6863\u5185\u5bb9\u53ef\u80fd\u4f1a\u8fc7\u65f6\uff0c\u8bf7\u4ee5\u767e\u5ea6\u4e91\u5b98\u7f51\u8bf4\u660e\u4e3a\u51c6\u3002"}),(0,i.jsxs)(n.p,{children:["\u76f8\u5173\u94fe\u63a5\uff1a",(0,i.jsx)(n.a,{href:"https://cloud.baidu.com/product/ocr_general",children:"\u767e\u5ea6\u901a\u7528\u6587\u5b57\u8bc6\u522b\u4ecb\u7ecd"})," ",(0,i.jsx)(n.a,{href:"https://cloud.baidu.com/doc/OCR/s/fk3h7xu7h",children:"\u767e\u5ea6\u4e91\u6587\u5b57\u8bc6\u522b\u63a5\u53e3\u514d\u8d39\u989d\u5ea6"})]})]}),"\n",(0,i.jsx)(n.h3,{id:"prices",children:"\u4ef7\u683c"}),"\n",(0,i.jsxs)(n.p,{children:["\u5982\u679c\u4f60\u5728 2021 \u5e74 5 \u6708 26 \u65e5\u4e4b\u524d\u5df2\u7ecf\u8fdb\u884c\u5b9e\u540d\u8ba4\u8bc1\u5e76\u4e14\u4f7f\u7528\u8fc7\uff0c\u90a3\u4e48\u4f60\u6bcf\u5929\u90fd\u6709 500 \u6b21\u7684\u514d\u8d39\u4f7f\u7528\u989d\u5ea6\u3002\u5728\u8fd9\u4e4b\u540e\u7533\u8bf7\u7684\u8bdd\uff0c",(0,i.jsx)(n.a,{href:"https://cloud.baidu.com/doc/OCR/s/fk3h7xu7h",children:"\u6bcf\u6708\u6709 1000 \u6b21\u7684\u514d\u8d39\u4f7f\u7528\u989d\u5ea6"}),"\u3002"]}),"\n",(0,i.jsxs)(n.p,{children:["\u5177\u4f53\u8c03\u6574\u89c1",(0,i.jsx)(n.a,{href:"https://ai.baidu.com/support/news?action=detail&id=2390",children:"\u767e\u5ea6\u4e91\u514d\u8d39\u989d\u5ea6\u8c03\u6574\u901a\u77e5"}),"\u3002"]}),"\n",(0,i.jsx)(n.h3,{id:"steps",children:"\u7533\u8bf7\u6b65\u9aa4"}),"\n",(0,i.jsx)(n.h4,{id:"register",children:"\u7b2c\u4e00\u6b65\uff1a\u8fdb\u884c\u4e2a\u4eba\u8ba4\u8bc1"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\u8fdb\u5165\u767e\u5ea6\u667a\u80fd\u4e91\u63a7\u5236\u53f0 ",(0,i.jsx)(n.a,{href:"https://console.bce.baidu.com/",children:"https://console.bce.baidu.com/"})]}),"\n",(0,i.jsx)(n.li,{children:"\u5b8c\u6210\u4e2a\u4eba\u8ba4\u8bc1"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u5982\u679c\u4f60\u4e4b\u524d\u7533\u8bf7\u8fc7",(0,i.jsx)(n.a,{href:"/docs/services/baidu-api",children:"\u767e\u5ea6\u7ffb\u8bd1\u63a5\u53e3"}),"\uff0c\u90a3\u4e48\u4f60\u5df2\u7ecf\u8ba4\u8bc1\u8fc7\u4e86\u3002"]}),"\n",(0,i.jsx)(n.h4,{id:"create-app",children:"\u7b2c\u4e8c\u6b65\uff1a\u521b\u5efa\u6587\u5b57\u8bc6\u522b\u5e94\u7528"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\u8fdb\u5165",(0,i.jsx)(n.a,{href:"https://console.bce.baidu.com/ai/#/ai/ocr/overview/index",children:"\u6587\u5b57\u8bc6\u522b\u63a7\u5236\u53f0"}),"\u3002\u5982\u679c\u94fe\u63a5\u6709\u8bef\uff0c\u4e5f\u53ef\u4ee5\u4ece\u5de6\u4fa7\u83dc\u5355\u4e2d\u641c\u7d22\u201c\u6587\u5b57\u8bc6\u522b\u201d\u7136\u540e\u8fdb\u5165"]}),"\n",(0,i.jsxs)(n.li,{children:["\u70b9\u51fb\u201c\u521b\u5efa\u5e94\u7528\u201d\u6309\u94ae\uff0c\u7136\u540e\u586b\u5199\u8868\u5355\uff1a","\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"\u201c\u5e94\u7528\u540d\u79f0\u201d\u968f\u610f\u586b\u5199\uff0c\u4f8b\u5982\u201c\u5212\u8bcd\u7ffb\u8bd1\u201d"}),"\n",(0,i.jsx)(n.li,{children:"\u201c\u63a5\u53e3\u9009\u62e9\u201d\u4e0d\u7528\u6539\u52a8"}),"\n",(0,i.jsx)(n.li,{children:"\u201c\u6587\u5b57\u8bc6\u522b\u5305\u540d\u201d\u9009\u62e9\u201c\u4e0d\u9700\u8981\u201d"}),"\n",(0,i.jsx)(n.li,{children:"\u201c\u5e94\u7528\u5f52\u5c5e\u201d\u9009\u62e9\u201c\u4e2a\u4eba\u201d"}),"\n",(0,i.jsx)(n.li,{children:"\u201c\u5e94\u7528\u63cf\u8ff0\u201d\u968f\u610f\u586b\u5199\uff0c\u4f8b\u5982\u201c\u81ea\u7528\u201d"}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.li,{children:"\u586b\u5199\u5b8c\u6bd5\u540e\uff0c\u70b9\u51fb\u201c\u7acb\u5373\u521b\u5efa\u201d\u6309\u94ae"}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["\u7531\u4e8e 2021 \u5e74 5 \u6708 26 \u65e5\u7684\u8c03\u6574\uff0c\u767e\u5ea6\u901a\u7528\u6587\u5b57\u8bc6\u522b\u8fd8\u9700\u8981\u81ea\u884c\u9886\u53d6\u514d\u8d39\u8d44\u6e90\u5305\u624d\u6709\u514d\u8d39\u989d\u5ea6\u3002\u64cd\u4f5c\u65b9\u5f0f\u53ef\u4ee5\u53c2\u8003\uff1a",(0,i.jsx)(n.a,{href:"https://cloud.baidu.com/doc/OCR/s/fk3h7xu7h#%E9%A2%86%E5%8F%96%E6%96%B9%E5%BC%8F",children:"\u5b98\u65b9\u6587\u6863"})]})}),"\n",(0,i.jsx)(n.h4,{id:"fill-in",children:"\u7b2c\u4e09\u6b65\uff1a\u83b7\u53d6 API Key \u548c Secret Key"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\u5e94\u7528\u521b\u5efa\u6210\u529f\u540e\uff0c\u8fdb\u5165",(0,i.jsx)(n.a,{href:"https://console.bce.baidu.com/ai/#/ai/ocr/app/list",children:"\u5e94\u7528\u5217\u8868"})]}),"\n",(0,i.jsx)(n.li,{children:"\u627e\u5230\u521a\u624d\u521b\u5efa\u7684\u540d\u4e3a\u201c\u5212\u8bcd\u7ffb\u8bd1\u201d\u7684\u5e94\u7528\uff0c\u4f1a\u770b\u5230\u6709\u4e24\u5217\u201cAPI Key\u201d\u548c\u201cSecret Key\u201d\uff0c\u5c06\u5b83\u4eec\u590d\u5236\u8fdb\u5212\u8bcd\u7ffb\u8bd1\u7684\u3010\u8bbe\u7f6e\u9875\u3011-\u3010\u670d\u52a1\u7533\u8bf7\u3011-\u3010\u767e\u5ea6\u901a\u7528\u6587\u5b57\u8bc6\u522b\uff08\u9ad8\u7cbe\u5ea6\u7248\uff09\u3011\u4e2d\uff08v7.6.0 \u4e4b\u524d\u7684\u7528\u6237\u586b\u8fdb\u201c\u8bbe\u7f6e\u201d - \u201c\u622a\u56fe\u7ffb\u8bd1\u201d - \u201d\u767e\u5ea6\u4e91\u6587\u5b57\u8bc6\u522b\u63a5\u53e3\u201c\u4e2d\uff09\u5373\u53ef\u3002\u6ce8\u610f\uff0c\u4e0d\u8981\u8bef\u5c06 \u201cAppID\u201d \u590d\u5236\u8fdb\u53bb\u4e86\u3002"}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"troubleshooting",children:"\u9519\u8bef\u6392\u67e5"}),"\n",(0,i.jsx)(n.p,{children:"\u4f60\u53ef\u4ee5\u70b9\u51fb\u4ee5\u4e0b\u94fe\u63a5\u67e5\u7
170b\u62a5\u9519\u7684\u5177\u4f53\u539f\u56e0\u3002"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.a,{href:"https://cloud.baidu.com/doc/OCR/s/dk3h7y5vr",children:"https://cloud.baidu.com/doc/OCR/s/dk3h7y5vr"})}),"\n",(0,i.jsx)(n.h3,{id:"\u5e38\u89c1\u95ee\u9898",children:"\u5e38\u89c1\u95ee\u9898"}),"\n",(0,i.jsx)(n.h4,{id:"\u586b\u5199\u5bc6\u94a5\u540e\u51fa\u73b0-cannot-read-property-reduce-of-undefined-\u7684\u62a5\u9519",children:"\u586b\u5199\u5bc6\u94a5\u540e\u51fa\u73b0 \u201cCannot read property 'reduce' of undefined\u201d \u7684\u62a5\u9519"}),"\n",(0,i.jsx)(n.p,{children:"\u53ef\u80fd\u7684\u539f\u56e0\uff1a"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"\u5bc6\u94a5\u586b\u9519\u4e86"}),"\n",(0,i.jsx)(n.li,{children:"\u5fd8\u8bb0\u9886\u53d6\u514d\u8d39\u8d44\u6e90\u5305\u4e86"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["\u5982\u679c\u786e\u8ba4\u5bc6\u94a5\u586b\u5199\u65e0\u8bef\u4e14\u9886\u53d6\u4e86\u514d\u8d39\u8d44\u6e90\u5305\u4e4b\u540e\u4ecd\u7136\u62a5\u9519\uff0c\u8bf7\u5c06\u95ee\u9898",(0,i.jsx)(n.a,{href:"/docs/issues",children:"\u53cd\u9988\u7ed9\u6211"}),"\u3002"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},2115:(e,n,t)=>{Object.defineProperty(n,"__esModule",{value:!0});var r,i=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),s=t(6540),o=(r=s)&&r.__esModule?r:{default:r};var l=function(e){function n(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,e),i(n,[{key:"render",value:function(){return o.default.createElement("div",{className:"adsbybaidu"},"TODO")}}]),n}(o.default.Component);n.default=l},8265:(e,n,t)=>{Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(n,t,r){return t&&e(n.prototype,t),r&&e(n,r),n}}(),i=o(t(6540)),s=o(t(5556));function o(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function n(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,n){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!n||"object"!=typeof n&&"function"!=typeof n?e:n}(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function, not "+typeof n);e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),n&&(Object.setPrototypeOf?Object.setPrototypeOf(e,n):e.__proto__=n)}(n,e),r(n,[{key:"componentDidMount",value:function(){window&&(window.adsbygoogle=window.adsbygoogle||[]).push({})}},{key:"render",value:function(){return i.default.createElement("ins",{className:this.props.className+" adsbygoogle",style:this.props.style,"data-ad-client":this.props.client,"data-ad-slot":this.props.slot,"data-ad-layout":this.props.layout,"data-ad-layout-key":this.props.layoutKey,"data-ad-format":this.props.format,"data-full-width-responsive":this.props.responsive})}}]),n}(i.default.Component);n.default=l,l.propTypes={className:s.default.string,style:s.default.object,client:s.default.string.isRequired,slot:s.default.string.isRequired,layout:s.default.string,layoutKey:s.default.string,format:s.default.string,responsive:s.default.string},l.defaultProps={className:"",style:{display:"block"},format:"auto",layout:"",layoutKey:"",responsive:"false"}},1176:(e,n,t)=>
1{var r=s(t(8265)),i=s(t(2115));function s(e){return e&&e.__esModule?e:{default:e}}var o={Google:r.default,Baidu:i.default};n.A=o},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>l});var r=t(6540);const i={},s=r.createContext(i);function o(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.