{"id":8085,"date":"2020-10-01T07:00:35","date_gmt":"2020-09-30T22:00:35","guid":{"rendered":"https:\/\/blog.capilano-fw.com\/?p=8085"},"modified":"2020-10-01T01:29:16","modified_gmt":"2020-09-30T16:29:16","slug":"%e3%80%90javascript%e3%80%91%e3%83%96%e3%83%a9%e3%82%a6%e3%82%b6%e3%81%a0%e3%81%91%e3%81%a7%e3%82%ab%e3%83%a1%e3%83%a9%e6%92%ae%e5%bd%b1%e3%81%97%e3%81%9f%e6%96%87%e5%ad%97%e3%82%92%e8%aa%ad%e3%81%bf","status":"publish","type":"post","link":"https:\/\/blog.capilano-fw.com\/?p=8085","title":{"rendered":"\u3010JavaScript\u3011\u30d6\u30e9\u30a6\u30b6\u3060\u3051\u3067\u30ab\u30e1\u30e9\u64ae\u5f71\u3057\u305f\u6587\u5b57\u3092\u8aad\u307f\u53d6\u308b\uff08OCR\uff09"},"content":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u306e\u3068\u3053\u308d<code>Laravel<\/code>\u306e\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f\u3053\u3068\u3082\u3042\u3063\u3066\u307b\u307c<code>Laravel<\/code>\u8a18\u4e8b\u3070\u304b\u308a\u3067\u3057\u305f\u304c\u3001\u3084\u306f\u308a\u958b\u767a\u8005\u3068\u3057\u3066\u300c\u6c17\u306b\u306a\u308b\u3053\u3068\u300d\u3082\u305f\u307e\u306b\u306f\u3084\u3063\u3066\u307f\u305f\u3044\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u300c<strong>\u3042\u308b\u9a5a\u304f\u6a5f\u80fd<\/strong>\u300d\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u5b9f\u88c5\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u6a5f\u80fd\u3068\u306f\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><strong style=\"font-size: 35px;\">OCR\uff08\u753b\u50cf\u304b\u3089\u6587\u5b57\u3092\u8aad\u307f\u53d6\u308b\uff09<\/strong><\/p>\n<p>\u6a5f\u80fd\u3067\u3059\u3002<\/p>\n<p>\u5b9f\u306f\u3001<code>OCR<\/code>\u306f\u6b21\u306e\u8a18\u4e8b\u3067\u7d39\u4ecb\u3092\u3057\u305f\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\ud83d\udcdd <a href=\"https:\/\/blog.capilano-fw.com\/?p=4892\">\u7121\u6599\u3067\u3067\u304d\u308b\uff01PHP\u3067\u753b\u50cf\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u3092\u8aad\u307f\u53d6\u308b\u65b9\u6cd5<\/a><\/p>\n<p>\u3057\u304b\u3057\u3001\u3053\u308c\u306fPHP\u304b\u3089\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u65b9\u6cd5\u306a\u306e\u3067\u3001\u30b5\u30fc\u30d0\u30fc\u304c\u5fc5\u9808\u3067\u3057\u305f\u3002<\/p>\n<p>\u3057\u304b\u3057\u3001\u3053\u306e\u9593\u3059\u3054\u3044\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u767a\u898b\u3057\u3066\u3057\u307e\u3063\u305f\u3093\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u540d\u3082\u3001\u300c<a href=\"https:\/\/github.com\/naptha\/tesseract.js#tesseractjs\" target=\"_blank\" rel=\"noopener noreferrer\">tesseract.js<\/a>\u300d\u3067\u3059\u3002<\/p>\n<p>\u306a\u3093\u3068\u3001\u3053\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u306f\u7d14\u7c8b\u306b\u30d6\u30e9\u30a6\u30b6\u306e<code>JavaScript<\/code>\u3060\u3051\u3067<code>OCR<\/code>\u3092\u5b9f\u73fe\u3059\u308b\u3068\u3044\u3046\u30b9\u30b0\u30ec\u30e2\u30ce\u306a\u3093\u3067\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u2757<\/p>\n<p>\u958b\u767a\u8005\u3068\u3057\u3066\u3001\u3069\u3046\u3057\u3066\u3082\u3084\u3063\u3066\u307f\u305f\u304f\u306a\u3063\u305f\u306e\u3067\u3001<strong>\u4eca\u56de\u306f\u9700\u8981\u306f\u5ea6\u5916\u8996\u3057\u3066<\/strong><code>tesseract.js<\/code>\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\uff08\u7b11\uff09<\/p>\n<p>\u305c\u3072\u300c\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u8aad\u307f\u7269\u300d\u7684\u306a\u611f\u3058\u3067\u8aad\u3093\u3067\u3044\u305f\u3060\u3051\u308b\u3068\u5b09\u3057\u3044\u3067\u3059\ud83d\ude0a\u2728<br \/>\n\uff08\u6700\u5f8c\u306b\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u4e00\u5f0f\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3088\uff09<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6066 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_23.png\" alt=\"\" width=\"370\" height=\"320\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_23.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/03\/no_23-300x259.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/>\u300c\u898b\u3064\u3051\u305f\u3068\u304d\u306f\u3001\u307e\u3055\u304b<br \/>\n\u30d6\u30e9\u30a6\u30b6\u3067OK\u3068\u306f\u601d\u3044\u307e\u305b\u3093\u3067\u3057\u305f\ud83d\udc4d\u300d<\/p>\n<p><strong>\u5b9f\u884c\u74b0\u5883\uff1a<\/strong> Google Chrome 85\u3001Vue 3\u3001Tailwind CSS<\/p>\n<h1>\u3084\u308a\u305f\u3044\u3053\u3068<\/h1>\n<p>\u4eca\u56de\u5b9f\u88c5\u3057\u305f\u3044\u5185\u5bb9\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u30ab\u30e1\u30e9\u306e\u6620\u50cf\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u8868\u793a<\/li>\n<li>\u597d\u304d\u306a\u3068\u3053\u308d\u3067\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u3068\u308b<\/li>\n<li>\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092OCR\u306b\u304b\u3051\u3066\u30c6\u30ad\u30b9\u30c8\u3092\u53d6\u5f97<\/li>\n<\/ul>\n<p>\u306a\u304a\u3001\u4eca\u56de\u306e\u76ee\u7684\u306f\u672c\u306b\u66f8\u304b\u308c\u3066\u3044\u308bISBN\u30b3\u30fc\u30c9\u306e\u53d6\u5f97\u3067\u3059\u3002<\/p>\n<p>\u2193\u2193\u2193\u3053\u3046\u3044\u3046\u3084\u3064\u3067\u3059\u306d\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8087\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_1.jpg\" alt=\"\" width=\"542\" height=\"74\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_1.jpg 542w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_1-300x41.jpg 300w\" sizes=\"auto, (max-width: 542px) 100vw, 542px\" \/><\/p>\n<p>\u307e\u305f\u3001\u4eca\u56de\u306f<code>Laravel 8.x<\/code>\u306e\u30ed\u30b0\u30a4\u30f3\u6a5f\u80fd\u3067\u63a1\u7528\u3055\u308c\u305f<code>Tailwind CSS<\/code>\u3068\u3001\u3053\u3061\u3089\u3082\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u30ea\u30ea\u30fc\u30b9\u306b\u306a\u3063\u305f<code>Vue 3<\/code>\u3067\u5b9f\u88c5\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u3067\u306f\u5b9f\u969b\u306b\u3084\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h1>HTML\u90e8\u5206\u3092\u3064\u304f\u308b<\/h1>\n<p>\u4eca\u56de\u306e\u30b3\u30fc\u30c9\u306f\u6bd4\u8f03\u7684\u77ed\u3044\u306e\u3067\u308f\u304b\u308a\u3084\u3059\u3044\u3088\u3046\u306b<code>HTML<\/code>\u3068<code>JavaScript<\/code>\u306b\u5206\u3051\u3066\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<pre>&lt;html&gt;\r\n&lt;head&gt;\r\n    <strong>&lt;!-- \u2462 viewport\u3092\u8ffd\u52a0\u3057\u3066\u30b9\u30de\u30db\u3067\u3082\u898b\u3084\u3059\u304f\u3059\u308b --&gt;<\/strong>\r\n<strong>    &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no\"&gt;<\/strong>\r\n<strong>    &lt;!-- \u2460 CDN\u3067CSS\u3092\u8aad\u307f\u8fbc\u307f --&gt;<\/strong>\r\n<strong>    &lt;link href=\"https:\/\/unpkg.com\/tailwindcss@^1.0\/dist\/tailwind.min.css\" rel=\"stylesheet\"&gt;<\/strong>\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n    &lt;div id=\"app\"&gt;\r\n        &lt;div ref=\"canvas-container\" style=\"width:100%;margin:0 auto;\"&gt;\r\n            &lt;canvas ref=\"canvas\"&gt;&lt;\/canvas&gt;\r\n        &lt;\/div&gt;\r\n        &lt;div class=\"text-center pt-3\"&gt;\r\n            <strong>&lt;!-- \u2461 Status \u306b\u3088\u3063\u3066\u8868\u793a\u30d6\u30ed\u30c3\u30af\u3092\u5207\u308a\u66ff\u3048\u308b --&gt;<\/strong>\r\n<strong>            &lt;!-- play\uff1a \u30ab\u30e1\u30e9\u306e\u6620\u50cf\u3092\u30ad\u30e3\u30f3\u30d0\u30b9\u306b\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u8868\u793a --&gt;<\/strong>\r\n<strong>            &lt;div v-if=\"status=='play'\"&gt;<\/strong>\r\n<strong>                &lt;button class=\"bg-blue-500 hover:bg-blue-700 text-white font-bold px-8 py-3 rounded\" @click=\"takeSnapshot\"&gt;<\/strong>\r\n<strong>                    \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u53d6\u308b<\/strong>\r\n<strong>                &lt;\/button&gt;<\/strong>\r\n<strong>            &lt;\/div&gt;<\/strong>\r\n<strong>            &lt;!-- pause\uff1a \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u64ae\u3063\u305f\u306e\u3067\u4e00\u6b21\u505c\u6b62 --&gt;<\/strong>\r\n<strong>            &lt;div v-if=\"status=='pause'\"&gt;<\/strong>\r\n<strong>                &lt;button class=\"bg-blue-500 hover:bg-blue-700 text-white font-bold px-8 py-3 mr-1 rounded\" @click=\"runOcr\"&gt;<\/strong>\r\n<strong>                    ISBN\u3092\u8aad\u307f\u53d6\u308b<\/strong>\r\n<strong>                &lt;\/button&gt;<\/strong>\r\n<strong>                &lt;button class=\"bg-transparent hover:bg-blue-500 text-blue-700 font-semibold hover:text-white py-2 px-4 ml-1 border border-blue-500 hover:border-transparent rounded\" @click=\"playVideo\"&gt;<\/strong>\r\n<strong>                    \u623b\u308b<\/strong>\r\n<strong>                &lt;\/button&gt;<\/strong>\r\n<strong>            &lt;\/div&gt;<\/strong>\r\n<strong>            &lt;!-- pause\uff1a \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092OCR\u306b\u304b\u3051\u3066\u30c6\u30ad\u30b9\u30c8\u3092\u53d6\u5f97 --&gt;<\/strong>\r\n<strong>            &lt;div v-if=\"status=='reading'\"&gt;<\/strong>\r\n<strong>                \u8aad\u307f\u53d6\u308a\u4e2d\u3067\u3059...<\/strong>\r\n<strong>            &lt;\/div&gt;<\/strong>\r\n        &lt;\/div&gt;\r\n    &lt;\/div&gt;\r\n    <strong>&lt;!-- \u2460 CDN\u3067JavaScript\u3092\u8aad\u307f\u8fbc\u307f --&gt;<\/strong>\r\n<strong>    &lt;script src=\"https:\/\/unpkg.com\/vue@3.0.0\/dist\/vue.global.prod.js\"&gt;&lt;\/script&gt;<\/strong>\r\n<strong>    &lt;script src='https:\/\/unpkg.com\/tesseract.js@v2.1.0\/dist\/tesseract.min.js'&gt;&lt;\/script&gt;<\/strong>\r\n    &lt;script&gt;\r\n\r\n        \/\/ \u3053\u3053\u306bJavaScript\r\n\r\n    &lt;\/script&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>\u3067\u306f\u756a\u53f7\u9806\u306bHTML\u3092\u3054\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<h2>\u2460 CDN\u3067JavaScript\u3092\u8aad\u307f\u8fbc\u307f<\/h2>\n<p>\u4eca\u56de\u306f\u524d\u8ff0\u3057\u307e\u3057\u305f\u3068\u304a\u308a\u4ee5\u4e0b\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3001\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/p>\n<ul>\n<li>Tailwind CSS<\/li>\n<li>Vue 3<\/li>\n<li>tesseract.js<\/li>\n<\/ul>\n<p>\u672c\u6765\u306f<code>npm<\/code>\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3001\u30d3\u30eb\u30c9\u3059\u308b\u306e\u3067\u3059\u304c\u4eca\u56de\u306f\u308f\u304b\u308a\u3084\u3059\u3044\u3088\u3046\u306b\u3059\u3079\u3066<code>CDN<\/code>\u3092\u4f7f\u3044\u307e\u3057\u305f\u3002\uff08<code>tesseract.js<\/code>\u306b\u3082<code>CDN<\/code>\u304c\u3042\u308b\u306e\u3067\u304a\u624b\u8efd\u306b\u3064\u304b\u3048\u307e\u3059\u306d\ud83d\udc4d\uff09<\/p>\n<p>\u203b\u306a\u304a\u3001\u73fe\u72b6\uff082020.9.30\uff09\u3001<code>Laravel 8.x<\/code>\u3067<code>Vue 3<\/code>\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u300c\u30b7\u30f3\u30b0\u30eb\u30fb\u30d5\u30a1\u30a4\u30eb\u30fb\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u300d\u30d3\u30eb\u30c9\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u300c<strong>Vue packages version mismatch<\/strong>\u300d\u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u51fa\u307e\u3059\u3002\u3053\u308c\u306f<a href=\"https:\/\/github.com\/JeffreyWay\/laravel-mix\/issues\/2481\">Laravel mix \u306e version 6 \u3067\u4fee\u6b63\u3055\u308c\u308b\u3088\u3046<\/a>\u3067\u3059\u3002<\/p>\n<h2>\u2461 Status \u306b\u3088\u3063\u3066\u8868\u793a\u30d6\u30ed\u30c3\u30af\u3092\u5207\u308a\u66ff\u3048\u308b<\/h2>\n<p>\u3053\u3053\u306f\u5909\u6570<code>status<\/code>\u306e\u5909\u5316\u3067\u8868\u793a\u5207\u308a\u66ff\u3048\u3092\u3059\u308b\u90e8\u5206\u3067\u3059\u3002<br \/>\n\u5909\u5316\u3059\u308b\u5185\u5bb9\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li>play: \u30ab\u30e1\u30e9\u306e\u6620\u50cf\u3092\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0\u3067\u8868\u793a<\/li>\n<li>pause: \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u3068\u3063\u305f\u6642\u3002\u30ab\u30e1\u30e9\u306f\u4e00\u6642\u505c\u6b62\u3057\u307e\u3059<\/li>\n<li>reading: \u53d6\u5f97\u3057\u305f\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u3092\u8aad\u307f\u53d6\u308a\u4e2d<\/li>\n<\/ul>\n<h2>\u2462 viewport\u3092\u8ffd\u52a0\u3057\u3066\u30b9\u30de\u30db\u3067\u3082\u898b\u3084\u3059\u304f\u3059\u308b<\/h2>\n<p>\u30ab\u30e1\u30e9\u306e\u89e3\u50cf\u5ea6\u304c\u3044\u3044\u65b9\u304c<code>OCR<\/code>\u306e\u7cbe\u5ea6\u3082\u3042\u304c\u308b\u306e\u3067\u3001\u30b9\u30de\u30db\u306e\u305f\u3081\u306b<code>viewport<\/code>\u3092\u8ffd\u52a0\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n<p>\u203b\u306a\u304f\u3066\u3082\u554f\u984c\u306a\u3044\u3067\u3059\u304c\u3001\u30dc\u30bf\u30f3\u304c\u3061\u3063\u3061\u3083\u304f\u306a\u3063\u3066\u3057\u307e\u3063\u3066\u64cd\u4f5c\u3057\u306b\u304f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h1>JavaScript\u90e8\u5206\u3092\u3064\u304f\u308b<\/h1>\n<p>\u7d9a\u3044\u3066<code>JavaScript<\/code>\u90e8\u5206\u3067\u3059\u3002<\/p>\n<pre>Vue.createApp({\r\n    data() {\r\n        return {\r\n            video: null,\r\n            canvas: null,\r\n            context: null,\r\n            dataUrl: '',\r\n            status: 'none'\r\n        }\r\n    },\r\n    methods: {\r\n        <strong>\/\/ \u2460 \u30ab\u30e1\u30e9\u3068\u30ad\u30e3\u30f3\u30d0\u30b9\u306e\u6e96\u5099<\/strong>\r\n        initialize() {\r\n\r\n            this.status = 'initialize';\r\n\r\n            <strong>navigator.mediaDevices.getUserMedia({<\/strong>\r\n<strong>                video: {<\/strong>\r\n<strong>                    facingMode: {<\/strong>\r\n<strong>                        ideal: 'environment'<\/strong>\r\n<strong>                    }<\/strong>\r\n<strong>                }<\/strong>\r\n<strong>            })<\/strong>\r\n<strong>            .then(stream =&gt; {<\/strong>\r\n\r\n<strong>                this.canvas = this.$refs.canvas;<\/strong>\r\n<strong>                this.context = this.canvas.getContext('2d');<\/strong>\r\n\r\n<strong>                this.video = document.createElement('video');<\/strong>\r\n<strong>                this.video.addEventListener('loadedmetadata', () =&gt; { \/\/ \u30e1\u30bf\u30c7\u30fc\u30bf\u304c\u53d6\u5f97\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3089\u5b9f\u884c<\/strong>\r\n\r\n<strong>                    const canvasContainer = this.$refs['canvas-container'];<\/strong>\r\n<strong>                    this.canvas.width = canvasContainer.offsetWidth;<\/strong>\r\n<strong>                    this.canvas.height = parseInt(this.canvas.width * this.video.videoHeight \/ this.video.videoWidth);<\/strong>\r\n<strong>                    this.render();<\/strong>\r\n\r\n<strong>                });<\/strong>\r\n<strong>                \/\/ iOS\u306e\u305f\u3081\u306b\u4ee5\u4e0b\uff13\u3064\u306e\u8a2d\u5b9a\u304c\u5fc5\u8981<\/strong>\r\n<strong>                this.video.setAttribute('autoplay', '');<\/strong>\r\n<strong>                this.video.setAttribute('muted', '');<\/strong>\r\n<strong>                this.video.setAttribute('playsinline', '');<\/strong>\r\n<strong>                this.video.srcObject = stream;<\/strong>\r\n<strong>                this.playVideo();<\/strong>\r\n\r\n<strong>            })<\/strong>\r\n<strong>            .catch(error =&gt; console.log(error));<\/strong>\r\n\r\n        },\r\n        render() {\r\n\r\n            if(this.video.readyState === this.video.HAVE_ENOUGH_DATA) {\r\n\r\n                this.context.drawImage(this.video, 0, 0, this.canvas.width, this.canvas.height);\r\n\r\n            }\r\n\r\n            requestAnimationFrame(this.render);\r\n\r\n        },\r\n        <strong>runOcr() { \/\/ \u2462 \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u3092\u62bd\u51fa<\/strong>\r\n\r\n<strong>            this.status = 'reading';<\/strong>\r\n\r\n<strong>            Tesseract.recognize(this.dataUrl, 'eng', {<\/strong>\r\n<strong>                logger: log =&gt; {<\/strong>\r\n\r\n<strong>                    console.log(log);<\/strong>\r\n\r\n<strong>                }<\/strong>\r\n<strong>            })<\/strong>\r\n<strong>            .then(result =&gt; {<\/strong>\r\n\r\n<strong>                alert(result.data.text);<\/strong>\r\n\r\n<strong>            })<\/strong>\r\n<strong>            .catch(error =&gt; console.log(error))<\/strong>\r\n<strong>            .finally(() =&gt; {<\/strong>\r\n\r\n<strong>                this.playVideo();<\/strong>\r\n\r\n<strong>            });<\/strong>\r\n\r\n<strong>        },<\/strong>\r\n        playVideo() {\r\n\r\n            this.video.play();\r\n            this.status = 'play';\r\n\r\n        },\r\n        pauseVideo() {\r\n\r\n            this.video.pause();\r\n            this.status = 'pause';\r\n\r\n        },\r\n        <strong>takeSnapshot() { \/\/ \u2461 \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u53d6\u308b\uff08\u30ab\u30e1\u30e9\u306f\u4e00\u6642\u505c\u6b62\uff09<\/strong>\r\n\r\n<strong>            \/\/ this.makeSound(); \/\/ \u97f3\u3092\u9cf4\u3089\u3059<\/strong>\r\n<strong>            this.pauseVideo();<\/strong>\r\n<strong>            this.dataUrl = this.canvas.toDataURL();<\/strong>\r\n\r\n<strong>        },<\/strong>\r\n<strong>        makeSound() { \/\/ \u2463 \u304a\u307e\u3051\uff1a\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u3068\u308b\u3068\u304d\u306b\u97f3\u3092\u306a\u3089\u3059<\/strong>\r\n\r\n            <strong>document.querySelectorAll('.notification-iframe').forEach(el =&gt; el.remove()); \/\/ \u5168\u3066\u306e\u901a\u77e5\u7528 iFrame \u3092\u524a\u9664<\/strong>\r\n\r\n<strong>            \/\/ sound\u30bf\u30b0\u306f\u4f7f\u308f\u305a iFrame \u3067\u76f4\u63a5\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u3078\u30a2\u30af\u30bb\u30b9\u3059\u308b<\/strong>\r\n<strong>            const iFrame = document.createElement('iframe');<\/strong>\r\n<strong>            iFrame.setAttribute('src', '\/audios\/insight.ogg');<\/strong>\r\n<strong>            iFrame.setAttribute('allow', 'autoplay');<\/strong>\r\n<strong>            iFrame.style.display = 'none';<\/strong>\r\n<strong>            iFrame.className = 'notification-iframe';<\/strong>\r\n<strong>            document.body.appendChild(iFrame);<\/strong>\r\n\r\n<strong>        }<\/strong>\r\n    },\r\n    mounted() {\r\n\r\n        this.initialize();\r\n\r\n    }\r\n}).mount('#app');<\/pre>\n<p>\u4eca\u56de\u306f\u3044\u3064\u3082\u3068\u9055\u3044\u3001\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u306e<code>Vue 3<\/code>\u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067\u3001\u4eca\u307e\u3067\u306e<code>Vue<\/code>\u30b3\u30fc\u30c9\u3068\u306f\u5c11\u3057\u9055\u3063\u3066\u3044\u307e\u3059\u3002<code>Vue 3<\/code>\u3067\u306e\u5909\u66f4\u70b9\u306f\u4ee5\u4e0b\u306eURL\u3092\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\ud83d\udcdd\u00a0<a href=\"https:\/\/blog.capilano-fw.com\/?p=6393\">Vue 3\u306e\u65b0\u3057\u3044\u6a5f\u80fd\u3068\u5909\u66f4\u70b9<\/a><\/p>\n<p>\u3067\u306f\u30b3\u30fc\u30c9\u306e\u5185\u5bb9\u3067\u3059\u3002<\/p>\n<h2>\u2460 \u30ab\u30e1\u30e9\u3068\u30ad\u30e3\u30f3\u30d0\u30b9\u306e\u6e96\u5099<\/h2>\n<p>\u307e\u305a<code>navigator.mediaDevices.getUserMedia()<\/code>\u3067PC\u3084\u30b9\u30de\u30db\u306b\u3064\u3044\u3066\u3044\u308b\u300c\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u300d\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n<p>\u26a0 <strong>\u3054\u6ce8\u610f\uff1a<\/strong> <code>Google Chrome<\/code>\u3067\u306f\u3001\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u306f<code>HTTPS<\/code>\u63a5\u7d9a\u304c\u5fc5\u9808\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u8d77\u52d5\u30e2\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u308c\u306fPC\u306e\u5834\u5408\u3001\u30d5\u30ed\u30f3\u30c8\u30ab\u30e1\u30e9\u3092\u4f7f\u3044\u3001\u30b9\u30de\u30db\u306e\u5834\u5408\u306f\u30d0\u30c3\u30af\u30ab\u30e1\u30e9\u3092\u4f7f\u3046\u3088\u3046\u306b\u3059\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<pre><strong>video: {<\/strong>\r\n<strong>    facingMode: {<\/strong>\r\n<strong>        ideal: 'environment'<\/strong>\r\n<strong>    }<\/strong>\r\n<strong>}<\/strong><\/pre>\n<p>\u305f\u3060\u3057\u3001\u3053\u3053\u306f\u74b0\u5883\u306b\u3088\u3063\u3066\u5909\u308f\u308b\u3068\u601d\u3044\u307e\u3059\u3002\u3082\u3057\u3046\u307e\u304f\u884c\u304b\u306a\u3044\u5834\u5408\u306f\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u306b\u5165\u308c\u66ff\u3048\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<pre><strong>video: true<\/strong><\/pre>\n<p>\u30ab\u30e1\u30e9\u304c\u8d77\u52d5\u3067\u304d\u305f\u3089\u3001\u6b21\u306f\u6620\u50cf\u3092\u8868\u793a\u3059\u308b<code>canvas<\/code>\u306e\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<p><code>Vue<\/code>\u306e<code>$refs<\/code>\u3092\u4f7f\u3063\u3066\u3001<code>&lt;canvas&gt; ... &lt;\/canvas&gt;<\/code>\u306e\u3059\u3050\u5916\u5074\u306b\u3042\u308b<code>&lt;div&gt; ... &lt;\/div&gt;<\/code>\u306b\u30a2\u30af\u30bb\u30b9\u3057\u3001<strong>\u305d\u306e\u6a2a\u5e45\u3068\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u306e\u7e26\u6a2a\u6bd4\u304b\u3089\u8868\u793a\u3059\u3079\u304d\u30b5\u30a4\u30ba\u3092\u5272\u308a\u51fa\u3057\u3066\u3044\u307e\u3059\u3002<\/strong><\/p>\n<p>\u30ad\u30e3\u30f3\u30d0\u30b9\u306e\u30b5\u30a4\u30ba\u5909\u66f4\u304c\u7d42\u308f\u3063\u305f\u3089\u3001<code>this.render()<\/code>\u3092\u547c\u3073\u51fa\u3057\u5b9f\u969b\u306b\u30ab\u30e1\u30e9\u306e\u6620\u50cf\u3092\u8868\u793a\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u4ee5\u4e0b\u306e\uff13\u884c\u306f<code>iPhone<\/code>\uff08Safari\uff09\u3067\u5b9f\u884c\u3059\u308b\u305f\u3081\u306b\u5fc5\u8981\u306a\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n<pre><strong>this.video.setAttribute('autoplay', '');<\/strong>\r\n<strong>this.video.setAttribute('muted', '');<\/strong>\r\n<strong>this.video.setAttribute('playsinline', '');<\/strong><\/pre>\n<h2>\u2461 \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u53d6\u308b<\/h2>\n<p>\u7d9a\u3044\u3066\u3001\u300c<strong>\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u53d6\u308b<\/strong>\u300d\u30dc\u30bf\u30f3\u304c\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u3068\u304d\u306b\u5b9f\u884c\u3055\u308c\u308b\u90e8\u5206\u3067\u3059\u3002<\/p>\n<p>\u30fb\u30fb\u30fb\u3068\u306f\u8a00\u3063\u3066\u3082\u3001\u3053\u3053\u3067\u306f\u30a6\u30a7\u30d6\u30ab\u30e1\u30e9\u3092\u6b62\u3081\u3001\u73fe\u5728\u8868\u793a\u3055\u308c\u3066\u3044\u308b\u753b\u50cf\u306e<code>dataURL<\/code>\u3092\u53d6\u5f97\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u3002\uff08\u97f3\u3092\u9cf4\u3089\u3059\u90e8\u5206\u306f\u5f8c\u3067\u3054\u7d39\u4ecb\u3057\u307e\u3059\uff09<\/p>\n<h2>\u2462 \u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u3092\u62bd\u51fa<\/h2>\n<p>\u3053\u3053\u304c\u4eca\u56de\u306e\u672c\u984c\u3001\u300c<code>OCR<\/code>\u3067\u753b\u50cf\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u3092\u62bd\u51fa\u3059\u308b\u90e8\u5206\u300d\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u5185\u5bb9\u3068\u3057\u3066\u306f\u3001\u4ee5\u4e0b\u306e\u90e8\u5206\u3067\u9014\u4e2d\u7d4c\u904e\u3092\u30ed\u30b0\u8868\u793a\u3057\u3001<\/p>\n<pre>logger: log =&gt; {\r\n\r\n    <strong>console.log(log);<\/strong>\r\n\r\n}<\/pre>\n<p>\u3055\u3089\u306b\u3001\u8aad\u307f\u53d6\u308a\u304c\u5b8c\u4e86\u3057\u305f\u3089<code>then()<\/code>\u5185\u3067<code>alert()<\/code>\u3092\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre>.then(result =&gt; {\r\n\r\n    <strong>alert(result.data.text);<\/strong>\r\n\r\n})<\/pre>\n<p>\u3053\u308c\u3067OCR\u6a5f\u80fd\u306f\u5b8c\u4e86\u3067\u3059\ud83d\ude0a\u2728<\/p>\n<h2>\u2463 \u304a\u307e\u3051\uff1a\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u3068\u308b\u3068\u304d\u306b\u97f3\u3092\u306a\u3089\u3059<\/h2>\n<p>\u6b63\u76f4\u306a\u3068\u3053\u308d\u3001\u3053\u306e\u90e8\u5206\u306f\u5fc5\u9808\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u3084\u306f\u308a\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u3068\u3063\u305f\u3068\u304d\u306b\u97f3\u304c\u9cf4\u3063\u305f\u65b9\u304c\u308f\u304b\u308a\u3084\u3059\u3044\u3060\u308d\u3046\u306a\u3068\u601d\u3044\u3001\u300c\u304a\u307e\u3051\u300d\u3068\u3057\u3066\u8ffd\u52a0\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u203b\u305f\u3060\u3057\u3001\u3044\u304d\u306a\u308a\u97f3\u304c\u306a\u308b\u3068\u8ff7\u60d1\u304b\u3068\u601d\u3063\u305f\u306e\u3067\u3001\u521d\u671f\u72b6\u614b\u3067\u306f\u7121\u52b9\u306b\u3057\u3066\u3044\u307e\u3059\u3002\u5229\u7528\u3059\u308b\u5834\u5408\u306f\u3001<code>takeSnapshot()<\/code>\u5185\u306b\u3042\u308b<code>this.makeSound();<\/code>\u306e\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3092\u89e3\u9664\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u4e2d\u8eab\u3068\u3057\u3066\u306f<code>iFrame<\/code>\u306b\u76f4\u63a5\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u3078\u30a2\u30af\u30bb\u30b9\u3055\u305b\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u306a\u305c\u3053\u306e\u5f62\u306b\u3057\u3066\u3044\u308b\u304b\u3068\u3044\u3046\u3068\u3001\u5b9f\u306f<code>&lt;audio&gt; ... &lt;\/audio&gt;<\/code>\u30bf\u30b0\u3092\u4f7f\u3046\u3068\u5fc5\u305a<strong>\u30af\u30ea\u30c3\u30af\u3057\u306a\u3044\u3068\u97f3\u3092\u9cf4\u3089\u305b\u306a\u3044\u3068\u3044\u3046\u5236\u7d04\u304c\u3042\u308b\u305f\u3081\u3067\u3059\u3002<\/strong><\/p>\n<p>\u4eca\u56de\u306e\u5834\u5408\u306f\u30af\u30ea\u30c3\u30af\u3092\u4f34\u3063\u3066\u3044\u308b\u306e\u3067\u554f\u984c\u306f\u306a\u3044\u3067\u3059\u304c\u3001\u3082\u3057\u975e\u540c\u671f\u3067\u5b9f\u88c5\u3059\u308b\u5834\u5408\u306f\u3046\u307e\u304f\u3044\u304b\u306a\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u307e\u3059\u306e\u3067\u3001\u3042\u3048\u3066<code>iFrame<\/code>\u306e\u5f62\u3067\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u4eca\u56de\u4f7f\u3063\u305f\u901a\u77e5\u97f3\u306f\u4ee5\u4e0b\u306eURL\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3055\u305b\u3066\u3044\u305f\u3060\u304d\u307e\u3057\u305f\u3002\uff08\u30d5\u30ea\u30fc\u3067\u3059\u304c\u3001\u30e9\u30a4\u30bb\u30f3\u30b9\u306f\u30af\u30ea\u30a8\u30a4\u30c6\u30a3\u30d6\u30fb\u30b3\u30e2\u30f3\u30ba\u3067\u3059\uff09<\/p>\n<p>\ud83d\udcdd\u00a0<a href=\"https:\/\/notificationsounds.com\" target=\"_blank\" rel=\"noopener noreferrer\">Notifications Sounds<\/a><\/p>\n<p>\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\ud83d\ude0a\u2728<\/p>\n<h1>\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b<\/h1>\n<p>\u4eca\u56de\u5b9f\u969b\u306b\u958b\u767a\u3057\u305f\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u4ee5\u4e0b\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u307e\u3059\u3002<\/p>\n<a  data-e-Disable-Page-Transition=\"true\" class=\"download-link\" title=\"\" href=\"https:\/\/blog.capilano-fw.com?download=8089&amp;tmstv=1777537969\" rel=\"nofollow\" id=\"download-link-8089\" data-redirect=\"false\" >\n\t\u30d6\u30e9\u30a6\u30b6\u3060\u3051\u3067\u30ab\u30e1\u30e9\u64ae\u5f71\u3057\u305f\u6587\u5b57\u3092\u8aad\u307f\u53d6\u308b<\/a>\n\n<p>\u203b\u305f\u3060\u3057\u3001<code>zip\u30d5\u30a1\u30a4\u30eb<\/code>\u306b\u542b\u307e\u308c\u3066\u3044\u308b\u97f3\u58f0\u30d5\u30a1\u30a4\u30eb\u306f<a href=\"https:\/\/notificationsounds.com\/sound-effects\/insight-578\">https:\/\/notificationsounds.com\/sound-effects\/insight-578<\/a> \u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u305f\u3082\u306e\u3067\u3001\u3053\u3061\u3089\u306e\u30e9\u30a4\u30bb\u30f3\u30b9\u306f\u30af\u30ea\u30a8\u30a4\u30c6\u30a3\u30d6\u30fb\u30b3\u30e2\u30f3\u30ba\u3067\u3059\u3002\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<\/p>\n<h1>\u30c6\u30b9\u30c8\u3057\u3066\u307f\u308b<\/h1>\n<p>\u3067\u306f\u3001\u5b9f\u969b\u306b\u30b9\u30de\u30db\u3068\u4f7f\u3063\u3066\u672c\u306b\u66f8\u304b\u308c\u3066\u3044\u308bISBN\u3092\u8aad\u307f\u53d6\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8093\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_2.png\" alt=\"\" width=\"640\" height=\"960\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_2.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_2-200x300.png 200w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u30b9\u30ca\u30c3\u30d7\u30b7\u30e7\u30c3\u30c8\u3092\u3068\u3063\u3066\u3001<code>OCR<\/code>\u3092\u5b9f\u884c\u3059\u308b\u3068\u30fb\u30fb\u30fb\u30fb\u30fb\u30fb<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8094\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_3.png\" alt=\"\" width=\"640\" height=\"910\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_3.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_3-211x300.png 211w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u306f\u3044\u2757<\/p>\n<p>\u3046\u307e\u304f<code>ISBN<\/code>\u304c\u53d6\u5f97\u3067\u304d\u307e\u3057\u305f\u3002\uff08\u305d\u306e\u4ed6\u306e\u90e8\u5206\u306f\u3001\u5fae\u5999\u306a\u3068\u3053\u308d\u3082\u3042\u308a\u307e\u3059\u304c\u30fb\u30fb\u30fb\uff09<\/p>\n<h1>\u3061\u306a\u307f\u306b\uff1a\u7cbe\u5ea6\u306b\u3064\u3044\u3066<\/h1>\n<p>\u3061\u306a\u307f\u306b\u3001\u3084\u306f\u308a\u4e00\u756a\u91cd\u8981\u306a\u306e\u306f\u300c<strong>\u3069\u308c\u3050\u3089\u3044\u306e\u7cbe\u5ea6\u3067\u6587\u5b57\u3092\u8aad\u307f\u53d6\u308c\u308b\u304b<\/strong>\u300d\u3060\u3068\u601d\u3044\u307e\u3059\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u753b\u50cf\u3092\u7528\u610f\u3057\u3066\u5b9f\u969b\u306b\u8aad\u307f\u53d6\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8097\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_5.png\" alt=\"\" width=\"640\" height=\"480\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_5.png 640w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_5-300x225.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/p>\n<p>\u7d50\u679c\u306f\u3053\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8096\" style=\"border: 3px solid #000;\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_4.png\" alt=\"\" width=\"443\" height=\"262\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_4.png 443w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2020\/09\/tesseract_js_4-300x177.png 300w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><\/p>\n<p><code>10px<\/code>\u3060\u3068\u5b8c\u5168\u306b\u30c0\u30e1\u3067\u4e00\u5207\u8aad\u307f\u53d6\u308a\u304c\u3067\u304d\u307e\u305b\u3093\u3002<br \/>\n<code>15px<\/code>\u306b\u306a\u308b\u3068\u3001\u4e00\u90e8\u8aad\u307f\u53d6\u308b\u3053\u3068\u306f\u3067\u304d\u3066\u3044\u307e\u3059\u304c\u3001\u3042\u307e\u308a\u7cbe\u5ea6\u304c\u9ad8\u3044\u3068\u306f\u3044\u3048\u307e\u305b\u3093\u3002<\/p>\n<p>\u305d\u308c\u3067\u3082<code>20px<\/code>\u4ee5\u4e0a\u306b\u306a\u308b\u3068\u6b63\u3057\u304f\u8a8d\u8b58\u3055\u308c\u3001\u3055\u3089\u306b\u5909\u306a\u6587\u5b57\u304c\u5165\u3063\u3066\u304f\u308b\u3053\u3068\u3082\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<p>\u307e\u305f\u3001\u3069\u3046\u3084\u3089\u30d0\u30fc\u30b3\u30fc\u30c9\u304c\u5199\u308a\u8fbc\u3093\u3067\u3057\u307e\u3046\u3068\u7cbe\u5ea6\u304c\u60aa\u304f\u306a\u308b\u3088\u3046\u3067\u3059\u306e\u3067\u3001\u3082\u3057\u5b9f\u969b\u306b\u4f7f\u3046\u5834\u5408\u306f\u3001\u30ab\u30e1\u30e9\u6620\u50cf\u306e\u4e2d\u306b\u6a2a\u9577\u306e\u8d64\u67a0\u3092\u8868\u793a\u3057\u3001\u305d\u306e\u4e2d\u306e\u753b\u50cf\u30c7\u30fc\u30bf\u3060\u3051\u3092<code>OCR<\/code>\u306b\u304b\u3051\u308b\u3001\u306a\u3069\u306e\u5de5\u592b\u304c\u5fc5\u8981\u306b\u306a\u3063\u3066\u304f\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u306a\u304a\u3001\u30b5\u30fc\u30d0\u30fc\u7248<code>tesseract<\/code>\u306e\u7cbe\u5ea6\u306f\u4ee5\u4e0b\u306eURL\u304b\u3089\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\ud83d\udcdd <a href=\"https:\/\/blog.capilano-fw.com\/?p=4892#i\">\u7121\u6599\u3067\u3067\u304d\u308b\uff01PHP\u3067\u753b\u50cf\u304b\u3089\u30c6\u30ad\u30b9\u30c8\u3092\u8aad\u307f\u53d6\u308b\u65b9\u6cd5<\/a><\/p>\n<h1>\u304a\u308f\u308a\u306b<\/h1>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4eca\u56de\u306f\u30d6\u30e9\u30a6\u30b6\u3060\u3051\u3067<code>OCR<\/code>\u3092\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u307e\u3067\u306f\u3001\u30b5\u30fc\u30d0\u30fc\u3078\u753b\u50cf\u3092\u9001\u4fe1\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u304b\u3063\u305f\u3053\u3068\u3092\u8003\u3048\u308b\u3068\u3001\u3068\u3066\u3082\u304a\u624b\u8efd\u306b\u306a\u3063\u305f\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<p>\u305f\u3060\u3001\u6c17\u306b\u306a\u308b\u90e8\u5206\u306f\u3084\u306f\u308a\u300c<strong>\u7cbe\u5ea6<\/strong>\u300d\u3068\u300c<strong>\u8aad\u307f\u53d6\u308a\u306e\u901f\u5ea6\u304c\u9045\u3044<\/strong>\u300d\u3068\u3044\u3046\u90e8\u5206\u3067\u3059\u3002\u30b5\u30fc\u30d0\u30fc\u5074\u306e<code>tesseract<\/code>\u306f\u305d\u308c\u307b\u3069\u3001\u300c\u3046\u30fc\u3093\u3001\u9045\u3044\u306a\u30fb\u30fb\u30fb\u300d\u3068\u611f\u3058\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u304c\u3001\u30d6\u30e9\u30a6\u30b6\u7248\u306f\u8aad\u307f\u53d6\u308b\u5185\u5bb9\u306b\u3088\u3063\u3066\u306f\u3042\u308b\u7a0b\u5ea6\u6642\u9593\u304c\u5fc5\u8981\u306b\u306a\u308b\u305f\u3081\u3001\u300c<strong>\u304a\u624b\u8efd<\/strong>\u300d\u3068\u300c<strong>\u5b9f\u884c\u901f\u5ea6<\/strong>\u300d\u306e\u3069\u3061\u3089\u3092\u512a\u5148\u3055\u305b\u308b\u304b\u8003\u3048\u308b\u5fc5\u8981\u304c\u3042\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u3068\u3082\u3042\u308c\u3001\u305d\u308c\u307b\u3069\u30b3\u30fc\u30c9\u3082\u8907\u96d1\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3057\u3001\u6c17\u8efd\u306b<code>OCR<\/code>\u3092\u4f7f\u3048\u308b\u306e\u3067\u305c\u3072\u7686\u3055\u3093\u3082\u4e00\u5ea6\u30c1\u30e3\u30ec\u30f3\u30b8\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<\/p>\n<p>\u3067\u306f\u3067\u306f\u301c\u2757<\/p>\n<p style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4445 aligncenter\" src=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png\" alt=\"\" width=\"370\" height=\"310\" srcset=\"https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2.png 370w, https:\/\/blog.capilano-fw.com\/wp-content\/uploads\/2019\/08\/no_2-300x251.png 300w\" sizes=\"auto, (max-width: 370px) 100vw, 370px\" \/>\u300c\u8da3\u5473\u306e\u30d4\u30a2\u30ce\u3067<br \/>\n\u30b3\u30fc\u30c9\u9032\u884c\u3092\u52c9\u5f37\u4e2d\u3067\u3059\ud83d\udc4d\u300d<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u3055\u3066\u3001\u3053\u306e\u3068\u3053\u308dLaravel\u306e\u65b0\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u305f\u3053\u3068\u3082\u3042\u3063\u3066\u307b\u307cLaravel\u8a18\u4e8b\u3070\u304b\u308a\u3067\u3057\u305f\u304c\u3001\u3084\u306f\u308a\u958b\u767a\u8005\u3068\u3057\u3066\u300c\u6c17\u306b\u306a\u308b\u3053\u3068\u300d\u3082\u305f\u307e\u306b\u306f\u3084 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/blog.capilano-fw.com\/?p=8085\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u3010JavaScript\u3011\u30d6\u30e9\u30a6\u30b6\u3060\u3051\u3067\u30ab\u30e1\u30e9\u64ae\u5f71\u3057\u305f\u6587\u5b57\u3092\u8aad\u307f\u53d6\u308b\uff08OCR\uff09&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":8100,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[183],"class_list":["post-8085","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","tag-ocr"],"_links":{"self":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/8085","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=8085"}],"version-history":[{"count":7,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/8085\/revisions"}],"predecessor-version":[{"id":8102,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/posts\/8085\/revisions\/8102"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=\/wp\/v2\/media\/8100"}],"wp:attachment":[{"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=8085"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=8085"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.capilano-fw.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=8085"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}