{"id":45859,"date":"2021-12-22T22:00:00","date_gmt":"2021-12-22T13:00:00","guid":{"rendered":"https:\/\/www.charlezz.com\/?p=45859"},"modified":"2021-12-22T23:21:12","modified_gmt":"2021-12-22T14:21:12","slug":"%ec%95%88%eb%93%9c%eb%a1%9c%ec%9d%b4%eb%93%9c%eb%a1%9c-%eb%b0%b0%ec%9a%b0%eb%8a%94-opencv-%eb%ac%b8%ec%84%9c%eb%aa%85%ed%95%a8-%ec%9d%b8%ec%8b%9d%ea%b8%b0-%eb%a7%8c%eb%93%a4%ea%b8%b0","status":"publish","type":"post","link":"https:\/\/charlezz.com\/?p=45859","title":{"rendered":"[\uc548\ub4dc\ub85c\uc774\ub4dc\ub85c \ubc30\uc6b0\ub294 OpenCV] \ubb38\uc11c(\uba85\ud568) \uc778\uc2dd\uae30 \ub9cc\ub4e4\uae30"},"content":{"rendered":"\n<p>Prerequisite : <a href=\"https:\/\/www.charlezz.com\/?p=45272\"><strong>\uc774\ubbf8\uc9c0\uc758 \uc774\uc9c4\ud654<\/strong><\/a>, <a href=\"https:\/\/www.charlezz.com\/?p=45375\">\uc724\uacfd\uc120 \uac80\ucd9c<\/a>, <a href=\"https:\/\/www.charlezz.com\/?p=45824\">\uc724\uacfd\uc120 \uadfc\uc0ac\ud654<\/a>, <a href=\"https:\/\/www.charlezz.com\/?p=45125\">\ud22c\uc2dc \ubcc0\ud658<\/a>, OCR<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\uac1c\uc694<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/www.charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-3-575x1024.png\" alt=\"\" class=\"wp-image-45860\" width=\"288\" height=\"512\" srcset=\"https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-3-575x1024.png 575w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-3-169x300.png 169w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-3-768x1367.png 768w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-3-863x1536.png 863w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-3-1150x2048.png 1150w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-3.png 1402w\" sizes=\"(max-width: 288px) 100vw, 288px\" \/><figcaption><em>\uad6c\uae00 \ud50c\ub808\uc774\uc2a4\ud1a0\uc5b4\uc758 CamScanner \uc2a4\ud06c\ub9b0\uc0f7<\/em><\/figcaption><\/figure>\n\n\n\n<p>\uc774\ubc88 \uc7a5\uc5d0\uc11c\ub294 \uac04\ub2e8\ud55c \ubb38\uc11c \uc778\uc2dd \uc571\uc744 \ub9cc\ub4e4\uc5b4\ubcf8\ub2e4. \ud604\uc7ac\uae4c\uc9c0 \uacf5\ubd80\ud55c \ub0b4\uc6a9\uc744 \uc798 \uc9dc\uc9d1\uae30 \ud558\uba74 \ub9cc\ub4e4 \uc218 \uc788\ub294 \ub0b4\uc6a9\uc774\ub2e4. \ud558\ub098\uc529 \ubd84\ud560 \uc815\ubcf5\uc744 \ud1b5\ud574 \ubaa9\ud45c\uc5d0 \uc811\uadfc\ud574\ubcf4\uc790.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Divide n Conquer<\/h2>\n\n\n\n<p>\uc704 \uadf8\ub9bc\uacfc \uac19\uc740 \uc571\uc744 \ub9cc\ub4e4\uae30 \uc704\ud574\uc11c\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uacfc\uc815\uc744 \uac70\uccd0\uc57c \ud55c\ub2e4.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"800\" height=\"800\" src=\"https:\/\/www.charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-doc-recognizer.jpg\" alt=\"\" class=\"wp-image-45861\" srcset=\"https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-doc-recognizer.jpg 800w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-doc-recognizer-300x300.jpg 300w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-doc-recognizer-150x150.jpg 150w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-doc-recognizer-768x768.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-video\"><video controls src=\"https:\/\/www.charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screencapture-1640144534853.mp4\"><\/video><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. \uc774\uc9c4\ud654<\/h2>\n\n\n\n<p>\uc774\uc9c4\ud654\ub97c \uc704\ud574\uc11c \uc6d0\ubcf8 \uc601\uc0c1\uc744 \uba3c\uc800 \ud751\ubc31\uc601\uc0c1\uc73c\ub85c \ubcc0\ud658\ud55c\ub2e4. \uadf8\ub7f0 \ub4a4 threshold \ud568\uc218\ub97c \uc0ac\uc6a9\ud558\uc5ec Otsu \uc774\uc9c4\ud654\ub97c \ub2e4\uc74c\uacfc \uac19\uc774 \uc801\uc6a9\ud560 \uc218 \uc788\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">val src:Mat = ... \/\/ \uc6d0\ubcf8\uc601\uc0c1 \n\n\/\/ \ud751\ubc31\uc601\uc0c1\uc73c\ub85c \uc804\ud658\nval graySrc = Mat()\nImgproc.cvtColor(src, graySrc, Imgproc.<em>COLOR_BGR2GRAY<\/em>)\n\n\/\/ \uc774\uc9c4\ud654\nval binarySrc = Mat()\nImgproc.threshold(graySrc, binarySrc, 0.0, 255.0, Imgproc.<em>THRESH_OTSU<\/em>)<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">2. \uc724\uacfd\uc120 \ucc3e\uae30<\/h2>\n\n\n\n<p>\uba3c\uc800 \uc724\uacfd\uc120\uc744 \uac80\ucd9c\ud558\uae30 \uc704\ud574 findContours \ud568\uc218\ub97c \ub2e4\uc74c\uacfc \uac19\uc774 \ud638\ucd9c \ud560 \uc218 \uc788\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ \uc724\uacfd\uc120 \ucc3e\uae30<br>val contours = ArrayList&lt;MatOfPoint&gt;()<br>val hierarchy = Mat()<br>Imgproc.findContours(<br>    binarySrc,<br>    contours,<br>    hierarchy,<br>    Imgproc.<em>RETR_EXTERNAL<\/em>,<br>    Imgproc.<em>CHAIN_APPROX_NONE<br><\/em>)<\/pre>\n\n\n\n<p>\ud558\uc9c0\ub9cc \uc724\uacfd\uc120\uc774 \uc5ec\ub7ec\uac1c \uac80\ucd9c\ub420 \uac00\ub2a5\uc131\uc774 \ub192\uc73c\ubbc0\ub85c, \uc6d0\ud558\ub294 \uc601\uc5ed\uc758 \uc724\uacfd\uc120\uc744 \ud544\ud130\ub9c1 \ud558\uae30 \uc704\ud574 \uba87\uac00\uc9c0 \uc870\uac74\ub4e4\uc744 \uc124\uc815\ud55c\ub2e4.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1) \uac00\uc7a5 \uba74\uc801\uc774 \ud070 \uc724\uacfd\uc120\u001c\uac80\ucd9c\ud558\uae30<\/h3>\n\n\n\n<p>\uc77c\ubc18\uc801\uc73c\ub85c \uac80\ucd9c\ud558\uace0\uc790 \ud558\ub294 \uac1d\uccb4(\ubb38\uc11c)\ub97c \uac00\uc7a5 \ud070 \ud53c\uc0ac\uccb4\ub85c \ub450\uae30 \ub54c\ubb38\uc5d0 \uac00\uc7a5 \ud070 \uba74\uc801\uc744 \uac16\ub294 \uc724\uacfd\uc120\uc744 \uac80\ucd9c\ud55c\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ \uac00\uc7a5 \uba74\uc801\uc774 \ud070 \uc724\uacfd\uc120 \ucc3e\uae30\nvar biggestContour: MatOfPoint? = null\nvar biggestContourArea: Double = 0.0\nfor (contour in contours) {\n    val area = Imgproc.contourArea(contour)\n    if (area &gt; biggestContourArea) {\n        biggestContour = contour\n        biggestContourArea = area\n    }\n}\n\nif (biggestContour == null) {\n    throw IllegalArgumentException(\"No Contour\")\n}\n\/\/ \ub108\ubb34 \uc791\uc544\ub3c4 \uc548\ub428\nif (biggestContourArea &lt; 400) {\n    throw IllegalArgumentException(\"too small\")\n}<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><meta charset=\"utf-8\">2) \uadfc\uc0ac\ud654\ud558\uae30<\/h3>\n\n\n\n<p>\uc724\uacfd\uc120 \uadfc\uc0ac\ud654\ub97c \ud1b5\ud574 \ub3c4\ud615\uc758 \uaf2d\uc9d3\uc810\uc744 \ubd84\uba85\ud558\uac8c \ud558\uc790.<\/p>\n\n\n\n<pre id=\"block-65c223e4-e4c9-46cf-9f28-1b2d9ba10c39\" class=\"wp-block-preformatted\">val candidate2f = MatOfPoint2f(*biggestContour.toArray())<br>val approxCandidate = MatOfPoint2f()<br>Imgproc.approxPolyDP(<br>    candidate2f,<br>    approxCandidate,<br>    Imgproc.arcLength(candidate2f, true) * 0.02,<br>    true<br>)<\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">3) \uc0ac\uac01\ud615\uc778\uc9c0 \ud310\ubcc4\ud558\uae30<\/h3>\n\n\n\n<p>\ubb38\uc11c\ub294 \uc77c\ubc18\uc801\uc73c\ub85c \uc0ac\uac01\ud615\uc774\ubbc0\ub85c \uadfc\uc0ac\ud654 \ud55c \uc724\uacfd\uc120\uc774 \uc0ac\uac01\ud615\uc778\uc9c0 \ud310\ubcc4\ud558\uc790.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ \uc0ac\uac01\ud615 \ud310\ubcc4\nif (approxCandidate.rows() != 4) {\n    throw java.lang.IllegalArgumentException(\"It's not rectangle\")\n}\n\n\/\/ \ucee8\ubca1\uc2a4(\ubcfc\ub85d\ud55c \ub3c4\ud615)\uc778\uc9c0 \ud310\ubcc4\nif (!Imgproc.isContourConvex(MatOfPoint(*approxCandidate.toArray()))) {\n    throw java.lang.IllegalArgumentException(\"It's not convex\")\n}<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. \ud22c\uc2dc \ubcc0\ud658<\/h2>\n\n\n\n<p>\ud22c\uc2dc\ubcc0\ud658\uc740 OpenCV\uc5d0\uc11c \uc81c\uacf5\ud558\ub294 \ub450 \uac00\uc9c0 \ud568\uc218\uc758 \uc870\ud569\uc744 \ud1b5\ud574 \uc27d\uac8c \uad6c\ud604\ud560 \uc218 \uc788\ub2e4. <\/p>\n\n\n\n<ul><li>getPerspectiveTransform: \uc6d0\ubcf8 \uc601\uc0c1\uc758 \uc815\uc810\uacfc \uacb0\uacfc \uc601\uc0c1\uc5d0 \uc801\uc808\ud788 \ub300\uc751\ub418\ub294 \uc815\uc810 \uc785\ub825\uc744 \ud1b5\ud574 \ud22c\uc2dc\ubcc0\ud658 \ub9e4\ud2b8\ub9ad\uc2a4\ub97c \uc5bb\ub294\ub2e4.<\/li><li>warpPerspective: getPerspectiveTransform\ud638\ucd9c\ub85c \uc5bb\uc740 \ub9e4\ud2b8\ub9ad\uc2a4\ub97c \uc785\ub825\uc73c\ub85c \ud558\uc5ec \uc6d0\ubcf8\uc774\ubbf8\uc9c0\ub97c \ubcc0\ud658\ud55c\ub2e4.<\/li><\/ul>\n\n\n\n<p>\uc774\uc804\uacfc\uc815\uc744 \ud1b5\ud574 \uc6d0\ubcf8 \uc601\uc0c1\uc5d0\uc11c \uc0ac\uac01\ud615\uc758 \uaf2d\uc9d3\uc810 4\uac1c\ub97c \uc5bb\uc5c8\ub2e4. \ud3b8\uc758\ub97c \uc704\ud574 \uc774 \uaf2d\uc9d3\uc810\ub4e4\uc744 \uc88c\ud45c\uc0c1 <strong>\uc88c\uc0c1\ub2e8<\/strong>\ubd80\ud130 <strong>\ubc18\uc2dc\uacc4\ubc29\ud5a5 \uc21c<\/strong> \ubc30\uc5f4\ub85c \uba3c\uc800 \uc815\ub82c\ud55c\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ \uc88c\uc0c1\ub2e8\ubd80\ud130 \uc2dc\uacc4 \ubc18\ub300 \ubc29\ud5a5\uc73c\ub85c \uc815\uc810\uc744 \uc815\ub82c\ud55c\ub2e4.\nval points = <em>arrayListOf<\/em>(\n    Point(approxCandidate.get(0, 0)[0], approxCandidate.get(0, 0)[1]),\n    Point(approxCandidate.get(1, 0)[0], approxCandidate.get(1, 0)[1]),\n    Point(approxCandidate.get(2, 0)[0], approxCandidate.get(2, 0)[1]),\n    Point(approxCandidate.get(3, 0)[0], approxCandidate.get(3, 0)[1]),\n)\npoints.<em>sortBy <\/em><strong>{ it<\/strong>.x <strong>} <\/strong>\/\/ x\uc88c\ud45c \uae30\uc900\uc73c\ub85c \uba3c\uc800 \uc815\ub82c\n\nif (points[0].y &gt; points[1].y) {\n    val temp = points[0]\n    points[0] = points[1]\n    points[1] = temp\n}\n\nif (points[2].y &lt; points[3].y) {\n    val temp = points[2]\n    points[2] = points[3]\n    points[3] = temp\n}\n\/\/ \uc6d0\ubcf8 \uc601\uc0c1 \ub0b4 \uc815\uc810\ub4e4 \nval srcQuad = MatOfPoint2f().<em>apply <\/em><strong>{ <\/strong>fromList(points) <strong>}<\/strong><\/pre>\n\n\n\n<p>\ubcc0\ud658 \ud560 \uacb0\uacfc \uc601\uc0c1\uc740 \ubb38\uc11c(\uc0ac\uac01\ud615)\ub9cc \ud3ec\ud568\ud558\ub294 \uc601\uc0c1\uc774\uc5ec\uc57c \ud558\ubbc0\ub85c \ubb38\uc11c\uc758 \ube44\uc728(=\uac00\ub85c\/\uc138\ub85c)\uc744 \uc54c\uc544\uc57c \ud55c\ub2e4. \uc815\ud655\ud55c \ube44\uc728\uc740 \uad6c\ud558\uae30 \ud798\ub4e4\uae30 \ub54c\ubb38\uc5d0 \uc6d0\ubcf8\uc601\uc0c1\uc5d0\uc11c \uac00\uc7a5 \uae34 \uac00\ub85c\uae38\uc774\uc640 \uac00\uc7a5 \uae34 \uc138\ub85c\uae38\uc774\ub97c \uae30\uc900\uc73c\ub85c \ube44\uc728\uc744 \uad6c\ud574\ubcf8\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/\/ \uc0ac\uac01\ud615 \uaf2d\uc9d3\uc810 \uc815\ubcf4\ub85c \uc0ac\uac01\ud615 \ucd5c\ub300 \uc0ac\uc774\uc988 \uad6c\ud558\uae30\n\/\/ \ud3c9\uba74\uc0c1 \ub450 \uc810 \uc0ac\uc774\uc758 \uac70\ub9ac\ub294 \uc9c1\uac01\uc0bc\uac01\ud615\uc758 \ube57\ubcc0\uae38\uc774 \uad6c\ud558\uae30\uc640 \ub3d9\uc77c\nprivate fun calculateMaxWidthHeight(\n    tl:Point,\n    tr:Point,\n    br:Point,\n    bl:Point,\n):Size{\n    \/\/ Calculate width\n    val widthA = <em>sqrt<\/em>((tl.x - tr.x) * (tl.x - tr.x) + (tl.y - tr.y) * (tl.y - tr.y))\n    val widthB = <em>sqrt<\/em>((bl.x - br.x) * (bl.x - br.x) + (bl.y - br.y) * (bl.y - br.y))\n    val maxWidth = <em>max<\/em>(widthA, widthB)\n    \/\/ Calculate height\n    val heightA = <em>sqrt<\/em>((tl.x - bl.x) * (tl.x - bl.x) + (tl.y - bl.y) * (tl.y - bl.y))\n    val heightB = <em>sqrt<\/em>((tr.x - br.x) * (tr.x - br.x) + (tr.y - br.y) * (tr.y - br.y))\n    val maxHeight = <em>max<\/em>(heightA, heightB)\n    return Size(maxWidth, maxHeight)\n}<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">val maxSize = calculateMaxWidthHeight(\n    tl = points[0],\n    bl = points[1],\n    br = points[2],\n    tr = points[3]\n)\nval dw = maxSize.width\nval dh = dw * maxSize.height\/maxSize.width\nval dstQuad = MatOfPoint2f(\n    Point(0.0, 0.0),\n    Point(0.0, dh),\n    Point(dw, dh),\n    Point(dw, 0.0)\n)\n\/\/ \ud22c\uc2dc\ubcc0\ud658 \ub9e4\ud2b8\ub9ad\uc2a4 \uad6c\ud558\uae30\nval perspectiveTransform = Imgproc.getPerspectiveTransform(srcQuad, dstQuad)\n\n\/\/ \ud22c\uc2dc\ubcc0\ud658 \ub41c \uacb0\uacfc \uc601\uc0c1 \uc5bb\uae30\nval dst = Mat()\nImgproc.warpPerspective(src, dst, perspectiveTransform, Size(dw, dh))<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">4. OCR \uad6c\ud604 (Tesseract)<\/h2>\n\n\n\n<p>\uad11\ud559 \ubb38\uc790 \uc778\uc2dd(OCR;Optical Character Recognition)\uc744 \uad6c\ud604\ud558\uae30 \uc704\ud574 Tesseract\ub77c\ub294 \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud55c\ub2e4. Tesseract\ub294 1985\ub144~1994\ub144 \ub3d9\uc548 HP(Hewlett-Packard)\uc5d0\uc11c \uac1c\ubc1c\ud558\uace0, 2005\ub144\ub3c4\uc5d0 \uc624\ud508\uc18c\uc2a4\ub85c \uc804\ud658\ud588\ub2e4. 2006\ub144\ubd80\ud130\ub294 \uad6c\uae00\uc5d0\uc11c \uad00\ub9ac\ud558\ub294 \ub77c\uc774\ube0c\ub7ec\ub9ac\ub85c 2018\ub144\ub3c4\uc5d0 4.0 \ubc84\uc804\uc774 \ub9b4\ub9ac\uc988 \ub418\uace0 LSTM \uae30\ubc18 OCR \uc5d4\uc9c4 \ubc0f \ubaa8\ub378\uc774 \ucd94\uac00\ub418\uc5c8\uc73c\uba70, \ud604\uc7ac 100\uac1c \uc774\uc0c1\uc758 \uc5b8\uc5b4 \ub370\uc774\ud130\ub97c \uc81c\uacf5\ud55c\ub2e4.<\/p>\n\n\n\n<p>\uc5ec\uae30\uc11c\ub294 \ucd5c\uc2e0\ubc84\uc804\uc758 Tesseract\ub97c \ud3ec\ud305\ud558\uc5ec \uc548\ub4dc\ub85c\uc774\ub4dc\uc6a9 \ub77c\uc774\ube0c\ub7ec\ub9ac\ub85c \uad6c\ud604\ud55c <a href=\"https:\/\/github.com\/adaptech-cz\/Tesseract4Android\">Tesseract4Android<\/a>\ub97c \uc0ac\uc6a9\ud55c\ub2e4.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">class LanguagePack @Inject constructor(<br>    @ApplicationContext private val context: Context<br>) {<br>    companion object {<br>        private const val ENG = \"eng.traineddata\"<br>        private const val KOR = \"kor.traineddata\"<br><br>        fun getDir(context:Context):File{<br>            return File(context.<em>filesDir<\/em>, \"tesserect\")<br>        }<br>    }<br><br>    fun initialize() {<br>        <em>with<\/em>(<br>            getDir(context)<br>        ) <strong>{<br><\/strong><strong><br><\/strong><strong>            <\/strong>val subdir = File(this, \"tessdata\")<br>            val engFile = File(subdir, ENG)<br>            val korFile = File(subdir, KOR)<br>            if (exists() &amp;&amp; subdir.exists() &amp;&amp; engFile.exists() &amp;&amp; korFile.exists()) {<br>                return@with<br>            }<br>            <em>deleteRecursively<\/em>()<br>            mkdir()<br>            subdir.mkdir()<br>            engFile.<em>copyFrom<\/em>(context.<em>assets<\/em>.open(ENG))<br>            korFile.<em>copyFrom<\/em>(context.<em>assets<\/em>.open(KOR))<br><br>        <strong>}<br><\/strong><strong>    <\/strong>}<br>}<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">fun printOCRResult(context:Context, src:Mat){\n    <em>with<\/em>(TessBaseAPI())<strong>{\n        <\/strong>init(LanguagePack.getDir(context).<em>absolutePath<\/em>, \"eng+kor\")\n        val dst = Mat()\n        Imgproc.cvtColor(src, dst, Imgproc.<em>COLOR_BGR2RGB<\/em>)\n        val bitmap = Bitmap.createBitmap(dst.cols(), dst.rows(), Bitmap.Config.<em>ARGB_8888<\/em>)\n        Utils.matToBitmap(dst, bitmap)\n        setImage(bitmap)\n        Log.e(\"NameCardProcessor\",\"utF8Text :\\n$<em>utF8Text<\/em>\")\n    <strong>}\n<\/strong>}<\/pre>\n\n\n\n<p>\ub85c\uadf8\ucea3\uc73c\ub85c tesseract\ub85c \uc778\uc2dd\ud55c \ubb38\uc790 \ud655\uc778\ud558\uae30<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"227\" src=\"https:\/\/www.charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-8-1024x227.png\" alt=\"\" class=\"wp-image-45862\" srcset=\"https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-8-1024x227.png 1024w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-8-300x66.png 300w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-8-768x170.png 768w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-8-1536x340.png 1536w, https:\/\/charlezz.com\/wordpress\/wp-content\/uploads\/2021\/12\/www.charlezz.com-opencv-screenshot-8-2048x453.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Prerequisite : \uc774\ubbf8\uc9c0\uc758 \uc774\uc9c4\ud654, \uc724\uacfd\uc120 \uac80\ucd9c, \uc724\uacfd\uc120 \uadfc\uc0ac\ud654, \ud22c\uc2dc \ubcc0\ud658, OCR \uac1c\uc694 \uc774\ubc88 \uc7a5\uc5d0\uc11c\ub294 \uac04\ub2e8\ud55c \ubb38\uc11c \uc778\uc2dd \uc571\uc744 \ub9cc\ub4e4\uc5b4\ubcf8\ub2e4. \ud604\uc7ac\uae4c\uc9c0 \uacf5\ubd80\ud55c \ub0b4\uc6a9\uc744 \uc798 \uc9dc\uc9d1\uae30 \ud558\uba74 \ub9cc\ub4e4 \uc218 \uc788\ub294 \ub0b4\uc6a9\uc774\ub2e4. \ud558\ub098\uc529 \ubd84\ud560 \uc815\ubcf5\uc744 \ud1b5\ud574 \ubaa9\ud45c\uc5d0 \uc811\uadfc\ud574\ubcf4\uc790. Divide n Conquer \uc704 \uadf8\ub9bc\uacfc \uac19\uc740 \uc571\uc744 \ub9cc\ub4e4\uae30 \uc704\ud574\uc11c\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uacfc\uc815\uc744 \uac70\uccd0\uc57c \ud55c\ub2e4. 1. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[27],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/45859"}],"collection":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=45859"}],"version-history":[{"count":2,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/45859\/revisions"}],"predecessor-version":[{"id":45866,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/45859\/revisions\/45866"}],"wp:attachment":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=45859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=45859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=45859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}