{"id":260963,"date":"2015-07-08T17:09:02","date_gmt":"2015-07-08T13:09:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=260963"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=260963","title":{"rendered":"\u0414\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenCV \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 Android Studio"},"content":{"rendered":"<p>     \t<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a2f\/648\/337\/a2f6483378be482bba70129df6f52c59.png\"\/>  <\/p>\n<h3>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438! \u0412\u0441\u0435\u043c \u0434\u0430\u0432\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u0441\u0451 \u0447\u0430\u0449\u0435 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0443\u044e\u0442\u0441\u044f \u043c\u043e\u0449\u043d\u044b\u043c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435\u043c. \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u043e\u0432 \u043f\u043e\u0447\u0442\u0438 \u0441\u0440\u0430\u0432\u043d\u044f\u043b\u0438\u0441\u044c \u0441 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0430\u043c\u0438, \u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0443\u0445\u043e\u0434\u044f\u0442 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043b\u0430\u043d. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0443\u0436\u0435 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0448\u044c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b \u0438\u043b\u0438 \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u044b \u0431\u0435\u0437 \u0432\u043d\u0443\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0432\u0440\u043e\u0434\u0435 Android, iOS \u0438\u043b\u0438 Windows, \u0430 \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u0441\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u044e\u0442 \u0442\u0435 \u0438\u043b\u0438 \u0438\u043d\u044b\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u0432\u0440\u043e\u0434\u0435 \u0444\u043e\u0442\u043e\u043a\u0430\u043c\u0435\u0440\u044b. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f OpenCV \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f Android. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u0438\u043c\u0435\u043b\u0430 \u0431\u044b \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0439 \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043e\u0434\u043d\u0430\u043a\u043e \u0432\u0441\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u043d\u0435\u0439 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f Android Studio, \u043d\u043e\u0432\u043e\u0439 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0442 Google. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f OpenCV \u0432 Android \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f OpenCV Manager. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u043b\u0430\u043d \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430:<\/p>\n<ol>\n<li>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 OpenCV SDK \u0434\u043b\u044f Android<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 OpenCV \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 Android Studio<\/li>\n<li>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f OpenCV \u0434\u043b\u044f Android<\/li>\n<\/ol>\n<p>  \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0442\u0435\u0440\u044f\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043d\u0430\u0447\u043d\u0451\u043c \u0440\u0430\u0431\u043e\u0442\u0443.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h3>1. \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 OpenCV SDK \u0434\u043b\u044f Android<\/h3>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c OpenCV \u0432 \u0441\u0432\u043e\u0438\u0445 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u0445, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 SDK. \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u043c \u0441\u0430\u0439\u0442\u0435 <a href=\"http:\/\/opencv.org\/\">opencv.org<\/a>. \u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/c09\/875\/c2b\/c09875c2be214790a69e2fb064fe32d1.png\"\/><\/p>\n<p>  \u0412 \u0430\u0440\u0445\u0438\u0432 OpenCV SDK \u0434\u043b\u044f Android \u0432\u0445\u043e\u0434\u044f\u0442 \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043c\u0438\u043a\u0440\u043e\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043e\u0432, \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f Java, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 <b>Java Native Interface (JNI)<\/b> \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438\u0437 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u043e-\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u043a\u043e\u0434\u044b \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0438 \u0444\u0430\u0439\u043b\u044b .apk \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 OpenCV Manager. \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u044f OpenCV \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 Android Studio.<\/p>\n<h3>2. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 OpenCV \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 Android Studio<\/h3>\n<p>  \u0418\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0434\u0443\u043b\u044f OpenCV \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 Android Studio \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0442\u0440\u0443\u0434\u0430. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043c\u0435\u043d\u044e <i>File -&gt; New -&gt; Import Module&#8230;<\/i> \u0438 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u0443\u0442\u044c <i>sdk\/java<\/i> \u0438\u0437 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0430\u0440\u0445\u0438\u0432\u0430 SDK. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043e\u043a\u043d\u043e \u043c\u0430\u0441\u0442\u0435\u0440\u0430 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043f\u0443\u0442\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0438 \u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0438\u043c\u0435\u043d\u0438 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/72b\/8ac\/5f5\/72b8ac5f55354c72b1ebd0657a898e5d.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 \u043c\u043e\u0434\u0443\u043b\u044f \u0432 \u0435\u0433\u043e build.gradle \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b <i>compileSdkVersion<\/i>, <i>buildToolsVersion<\/i>, <i>minSdkVersion<\/i> \u0438 <i>targetSdkVersion<\/i>, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0438 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u043b\u0438 \u0441 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438 \u0438\u0437 \u043c\u043e\u0434\u0443\u043b\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u043e\u0434\u0443\u043b\u044c OpenCV \u0431\u044b\u043b \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d, \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043a \u043c\u043e\u0434\u0443\u043b\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043c\u0435\u043d\u044e <i>File -&gt; Project Structure&#8230;<\/i> \u0438 \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044f <i>app<\/i> \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442 <i>opencv<\/i>. \u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043e\u043a\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/18b\/491\/339\/18b491339f5b486d997f7a3fd329f4a6.png\"\/><\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u0447\u0442\u043e \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u2014 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0434\u0432\u043e\u0438\u0447\u043d\u044b\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenCV \u0432 \u043f\u0440\u043e\u0435\u043a\u0442, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u043e\u043d\u0438 \u0431\u044b\u043b\u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u044b \u0432 .apk \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043f\u043a\u0443 <i>sdk\/native\/libs<\/i> \u0438\u0437 OpenCV SDK \u0432 \u043f\u0430\u043f\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043f\u043e \u043f\u0443\u0442\u0438 <i>app\/src\/main<\/i>. \u0417\u0430\u0442\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u043f\u0430\u043f\u043a\u0443 <i><b>libs<\/b><\/i> \u0432 <u><i><b>jniLibs<\/b><\/i><\/u>. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0443\u043f\u0430\u043a\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenCV (\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 <i>.a<\/i>) \u0432 .apk \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438\u0445 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435. \u0412 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0432\u0448\u0435\u0439\u0441\u044f \u043f\u0430\u043f\u043a\u0435 <i>jniLibs<\/i> \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u044b \u043c\u043e\u0436\u043d\u043e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0430\u0439\u043b\u044b \u0441 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u043c <i>.so<\/i>. \u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u0430 \u043f\u043e\u043b\u0443\u0447\u0438\u0432\u0448\u0430\u044f\u0441\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0430\u043f\u043e\u043a \u0432 \u041f\u0440\u043e\u0432\u043e\u0434\u043d\u0438\u043a\u0435 Windows:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/224\/9d6\/c0a\/2249d6c0a6bf4512bbd85f8ccc4ba68d.png\"\/><\/p>\n<h3>3. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f OpenCV \u0434\u043b\u044f Android<\/h3>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 OpenCV, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0441 \u043a\u0430\u043c\u0435\u0440\u044b. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b:<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">MainActivity.java<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"java\">package com.androidcv;  import android.app.Activity; import android.os.Bundle; import android.view.SurfaceView; import android.view.WindowManager;  import org.opencv.android.CameraBridgeViewBase; import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame; import org.opencv.android.CameraBridgeViewBase.CvCameraViewListener2; import org.opencv.android.OpenCVLoader; import org.opencv.core.Mat;   public class MainActivity extends Activity implements CvCameraViewListener2 {     private CameraBridgeViewBase mOpenCvCameraView;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);         setContentView(R.layout.activity_main);         mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.view);         mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);         mOpenCvCameraView.setCvCameraViewListener(this);     }      @Override     public void onPause()     {         super.onPause();         if (mOpenCvCameraView != null)             mOpenCvCameraView.disableView();     }      @Override     public void onResume()     {         super.onResume();         OpenCVLoader.initDebug();         mOpenCvCameraView.enableView();     }      public void onDestroy() {         super.onDestroy();         if (mOpenCvCameraView != null)             mOpenCvCameraView.disableView();     }      public void onCameraViewStarted(int width, int height) {     }      public void onCameraViewStopped() {     }      public Mat onCameraFrame(CvCameraViewFrame inputFrame) {         return inputFrame.rgba();     } } <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">activity_main.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;FrameLayout xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot;     xmlns:opencv=&quot;http:\/\/schemas.android.com\/apk\/res-auto&quot;     android:layout_width=&quot;match_parent&quot;     android:layout_height=&quot;match_parent&quot;&gt;      &lt;org.opencv.android.JavaCameraView         android:layout_width=&quot;fill_parent&quot;         android:layout_height=&quot;fill_parent&quot;         android:visibility=&quot;gone&quot;         android:id=&quot;@+id\/view&quot;         opencv:camera_id=&quot;any&quot; \/&gt;  &lt;\/FrameLayout&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">AndroidManifest.xml<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"xml\">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;manifest xmlns:android=&quot;http:\/\/schemas.android.com\/apk\/res\/android&quot; package=&quot;com.androidcv&quot; &gt;      &lt;supports-screens android:resizeable=&quot;true&quot;         android:smallScreens=&quot;true&quot;         android:normalScreens=&quot;true&quot;         android:largeScreens=&quot;true&quot;         android:anyDensity=&quot;true&quot; \/&gt;      &lt;uses-permission android:name=&quot;android.permission.CAMERA&quot;\/&gt;      &lt;uses-feature android:name=&quot;android.hardware.camera&quot; android:required=&quot;false&quot;\/&gt;     &lt;uses-feature android:name=&quot;android.hardware.camera.autofocus&quot; android:required=&quot;false&quot;\/&gt;     &lt;uses-feature android:name=&quot;android.hardware.camera.front&quot; android:required=&quot;false&quot;\/&gt;     &lt;uses-feature android:name=&quot;android.hardware.camera.front.autofocus&quot; android:required=&quot;false&quot;\/&gt;      &lt;application         android:allowBackup=&quot;true&quot;         android:icon=&quot;@mipmap\/ic_launcher&quot;         android:label=&quot;@string\/app_name&quot;         android:theme=&quot;@android:style\/Theme.NoTitleBar.Fullscreen&quot; &gt;         &lt;activity             android:name=&quot;.MainActivity&quot;             android:label=&quot;@string\/app_name&quot;             android:screenOrientation=&quot;landscape&quot;             android:configChanges=&quot;keyboardHidden|orientation&quot;&gt;             &lt;intent-filter&gt;                 &lt;action android:name=&quot;android.intent.action.MAIN&quot; \/&gt;                 &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot; \/&gt;             &lt;\/intent-filter&gt;         &lt;\/activity&gt;     &lt;\/application&gt;  &lt;\/manifest&gt; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  \u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/dc5\/960\/fe4\/dc5960fe4f694e739b64734c652f9582.png\"\/><\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0447\u0442\u043e \u0445\u043e\u0442\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a OpenCV \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u043d\u044b\u043c, \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043f\u0440\u0435\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043e\u0442\u043b\u0430\u0434\u043a\u0438. \u041f\u0440\u0438 \u0432\u044b\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 Google Play, \u043b\u0443\u0447\u0448\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c OpenCV Manager.     \t<\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/262089\/\"> http:\/\/habrahabr.ru\/post\/262089\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>     \t<img decoding=\"async\" src=\"https:\/\/habrastorage.org\/files\/a2f\/648\/337\/a2f6483378be482bba70129df6f52c59.png\"\/>  <\/p>\n<h3>\u0412\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u0414\u043e\u0431\u0440\u044b\u0439 \u0434\u0435\u043d\u044c, \u0443\u0432\u0430\u0436\u0430\u0435\u043c\u044b\u0435 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u0438! \u0412\u0441\u0435\u043c \u0434\u0430\u0432\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e, \u0447\u0442\u043e \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u0441\u0451 \u0447\u0430\u0449\u0435 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0442\u0443\u044e\u0442\u0441\u044f \u043c\u043e\u0449\u043d\u044b\u043c \u0430\u043f\u043f\u0430\u0440\u0430\u0442\u043d\u044b\u043c \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u0435\u043c. \u041f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u043e\u0432 \u043f\u043e\u0447\u0442\u0438 \u0441\u0440\u0430\u0432\u043d\u044f\u043b\u0438\u0441\u044c \u0441 \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0430\u043c\u0438, \u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0439 \u043d\u0435\u0445\u0432\u0430\u0442\u043a\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 \u0443\u0445\u043e\u0434\u044f\u0442 \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u043b\u0430\u043d. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0443\u0436\u0435 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0448\u044c \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b \u0438\u043b\u0438 \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u044b \u0431\u0435\u0437 \u0432\u043d\u0443\u0448\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u043e\u0439 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b \u0432\u0440\u043e\u0434\u0435 Android, iOS \u0438\u043b\u0438 Windows, \u0430 \u043a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e, \u0432\u0441\u0435 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u044e\u0442 \u0442\u0435 \u0438\u043b\u0438 \u0438\u043d\u044b\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u0432\u0440\u043e\u0434\u0435 \u0444\u043e\u0442\u043e\u043a\u0430\u043c\u0435\u0440\u044b. \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u043d\u043e\u0433\u043e \u0437\u0440\u0435\u043d\u0438\u044f OpenCV \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f Android. \u0412\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f \u043d\u0435 \u0438\u043c\u0435\u043b\u0430 \u0431\u044b \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0439 \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u043e\u0434\u043d\u0430\u043a\u043e \u0432\u0441\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u0432 \u043d\u0435\u0439 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f Android Studio, \u043d\u043e\u0432\u043e\u0439 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043e\u0442 Google. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435, \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f OpenCV \u0432 Android \u0431\u0435\u0437 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f OpenCV Manager. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043f\u043b\u0430\u043d \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430:<\/p>\n<ol>\n<li>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 OpenCV SDK \u0434\u043b\u044f Android<\/li>\n<li>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 OpenCV \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 Android Studio<\/li>\n<li>\u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f OpenCV \u0434\u043b\u044f Android<\/li>\n<\/ol>\n<p>  \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0442\u0435\u0440\u044f\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0438 \u043d\u0430\u0447\u043d\u0451\u043c \u0440\u0430\u0431\u043e\u0442\u0443.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-260963","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/260963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=260963"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/260963\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=260963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=260963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=260963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}