{"id":213417,"date":"2014-02-21T12:55:03","date_gmt":"2014-02-21T08:55:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=213417"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=213417","title":{"rendered":"<span class=\"post_title\">\u0423\u043c\u043d\u044b\u0439 \u0432\u0438\u0434\u0435\u043e\u043f\u043b\u0435\u0435\u0440 \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u0436\u0435\u0441\u0442\u043e\u0432<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0438 \u0436\u0435\u0441\u0442\u043e\u0432. \u042f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0432\u043e\u0434\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0412 YouTube \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u043e\u043b\u0438\u043a\u043e\u0432 \u043f\u0440\u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432, \u0432 \u0445\u0430\u0431\u0440\u0435 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435, \u0442\u0430\u043a \u0432\u043e\u0442, \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451, \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0438 \u043d\u0443\u0436\u043d\u043e\u0435. \u042f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043f\u043b\u0435\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0436\u0435\u0441\u0442\u0430\u043c\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0430\u043c \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u043d\u044e\u0441\u044c \u0432\u0437\u044f\u0442\u044c\u0441\u044f \u0437\u0430 \u043c\u044b\u0448\u043a\u0443, \u043d\u0430\u0439\u0442\u0438 \u044d\u0442\u043e\u0442 \u043f\u043e\u043b\u0437\u0443\u043d\u043e\u043a \u0438 \u043f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u0442\u044c \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u0432\u043f\u0435\u0440\u0451\u0434 \u0438\u043b\u0438 \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u043d\u0430\u0437\u0430\u0434, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0441\u043c\u043e\u0442\u0440\u044e \u0444\u0438\u043b\u044c\u043c\u044b \u043d\u0430 \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 (\u0442\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0430\u0434). <\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c, \u0440\u0435\u0447\u044c \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u0436\u0435\u0441\u0442\u043e\u0432, \u0430 \u043e \u0432\u0438\u0434\u0435\u043e\u043f\u043b\u0435\u0435\u0440\u0435 \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0430\u0436\u0443 \u0432 \u043e\u0431\u0449\u0435\u043c.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e \u043c\u044b \u0445\u043e\u0442\u0438\u043c?<\/h4>\n<p>  \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0436\u0435\u0441\u0442\u043e\u0432:  <\/p>\n<ol>\n<li>\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u043a\u0430 \u0432\u043f\u0435\u0440\u0451\u0434\/\u043d\u0430\u0437\u0430\u0434 <\/li>\n<li>\u041f\u0430\u0443\u0437\u0430\/\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c<\/li>\n<li>\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c\/\u0443\u0431\u0430\u0432\u0438\u0442\u044c \u0437\u0432\u0443\u043a<\/li>\n<li>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f\/\u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0434\u043e\u0440\u043e\u0436\u043a\u0430.<\/li>\n<\/ol>\n<p>  \u0421\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0436\u0435\u0441\u0442\u0430\u043c:  <\/p>\n<ol>\n<li>\u0414\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0441\u043b\u0435\u0432\u0430 \u043d\u0430\u043f\u0440\u0430\u0432\u043e\/\u0441\u043f\u0440\u0430\u0432\u0430 \u043d\u0430\u043b\u0435\u0432\u043e<\/li>\n<li>\u0414\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 \u0446\u0435\u043d\u0442\u0440\u0430 \u0432\u0432\u0435\u0440\u0445-\u043d\u0430\u043f\u0440\u0430\u0432\u043e<\/li>\n<li>\u0414\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0441\u043d\u0438\u0437\u0443 \u0432\u0432\u0435\u0440\u0445\/\u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437<\/li>\n<li>\u0414\u0432\u0438\u0436\u0435\u043d\u0438\u0435 \u0438\u0437 \u0446\u0435\u043d\u0442\u0440\u0430 \u0432\u043d\u0438\u0437-\u0432\u043f\u0440\u0430\u0432\u043e\/\u0441 \u0446\u0435\u043d\u0442\u0440\u0430 \u0432\u043d\u0438\u0437-\u0432\u043b\u0435\u0432\u043e<\/li>\n<\/ol>\n<p>  \u041d\u0430\u0431\u043b\u044e\u0434\u0430\u0442\u044c \u0436\u0435\u0441\u0442\u044b \u0431\u0443\u0434\u0435\u043c \u0447\u0435\u0440\u0435\u0437 \u0432\u0435\u0431-\u043a\u0430\u043c\u0435\u0440\u0443. \u0423 \u043c\u0435\u043d\u044f \u043d\u0430 \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0435 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u043a\u0430\u043c\u0435\u0440\u0430 0,3 \u043c\u043f. \u041e\u043d\u0430 \u0441\u043b\u0430\u0431\u0435\u043d\u044c\u043a\u0430\u044f, \u043d\u043e \u043f\u0440\u0438 \u0445\u043e\u0440\u043e\u0448\u0435\u043c \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u0438, \u0435\u0435 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0442\u0430\u043a\u0438\u0445 \u0446\u0435\u043b\u0435\u0439. \u041d\u043e \u044f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u044e\u044e USB \u0432\u0435\u0440 \u043a\u0430\u043c\u0435\u0440\u0443. \u0416\u0435\u0441\u0442\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c \u043e\u0434\u043d\u043e\u0446\u0432\u0435\u0442\u043d\u043e\u0439 \u043f\u0430\u043b\u043e\u0447\u043a\u043e\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u0435\u0433\u043e \u0438\u0437 \u0444\u043e\u043d\u0430 \u043f\u0443\u0442\u0451\u043c \u0444\u0438\u043b\u044c\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u043e \u0446\u0432\u0435\u0442\u0443. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430 \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u044d\u0442\u043e \u043d\u0435 \u0441\u0430\u043c\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043c\u0435\u0442, \u043d\u043e \u044f \u0445\u043e\u0442\u0435\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0430\u043a\u0446\u0435\u043d\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0438 \u0436\u0435\u0441\u0442\u0430 (\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f), \u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u0430 \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435.<\/p>\n<h4>\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b<\/h4>\n<p>  \u042f \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Qt framework 5.2, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438. \u0414\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043f\u043e\u0442\u043e\u043a\u0430 \u0432\u0438\u0434\u0435\u043e \u0438\u0437 \u0432\u0435\u0431-\u043a\u0430\u043c\u0435\u0440\u044b \u0431\u0443\u0434\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c OpenCV 4.6. GUI \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 QML, \u0430 \u0431\u043b\u043e\u043a \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0430 \u0421++. <\/p>\n<p>  \u041e\u0431\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0441 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c, \u043e\u0431\u0430 \u043a\u0440\u043e\u0441\u0441\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b. \u042f \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u043f\u043b\u0435\u0435\u0440 \u043f\u043e\u0434 \u043b\u0438\u043d\u0443\u043a\u0441, \u043d\u043e \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u0438 \u043d\u0430 \u043b\u044e\u0431\u0443\u044e \u0434\u0440\u0443\u0433\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443, \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c OpenCV \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 Qt \u043f\u043e\u0434 \u043d\u0443\u0436\u043d\u0443\u044e \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 \u0438 \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u043b\u0435\u0435\u0440. \u042f \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043f\u0435\u0440\u0435\u043d\u0435\u0441\u0442\u0438 \u043f\u043b\u0435\u0435\u0440 \u043d\u0430 \u0412\u0438\u043d\u0434\u043e\u0432\u0441, \u043d\u043e \u0443 \u043c\u0435\u043d\u044f \u043d\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c OpenCV \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 Qt \u043f\u043e\u0434 \u043d\u0435\u0433\u043e. \u041a\u0442\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u0442 \u0438 \u0443 \u043a\u043e\u0433\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0441\u044f, \u043f\u0440\u043e\u0441\u044c\u0431\u0430 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u043c\u0430\u043d\u0443\u0430\u043b\u043e\u043c \u0438\u043b\u0438 \u0431\u0438\u043d\u0430\u0440\u043d\u0438\u043a\u0430\u043c\u0438.<\/p>\n<h4>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u043b\u0435\u0435\u0440\u0430<\/h4>\n<p>  \u041d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435 \u043d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u043b\u0435\u0435\u0440\u0430. \u041f\u043b\u0435\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0434\u0432\u0443\u0445 \u043f\u043e\u0442\u043e\u043a\u0430\u0445. \u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f GUI \u0438 \u0432\u0438\u0434\u0435\u043e\u043f\u043b\u0435\u0435\u0440. \u0412 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a \u0432\u044b\u043d\u0435\u0441\u0435\u043d \u0431\u043b\u043e\u043a \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u0434\u0432\u0438\u0441\u0430\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u0438 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u0435\u043e. \u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0430 QML, \u043b\u043e\u0433\u0438\u043a\u0443 \u043f\u043b\u0435\u0435\u0440\u0430 \u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u043d\u0430 JS, \u0430 \u0431\u043b\u043e\u043a \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043d\u0430 C++ (\u0432\u0441\u0435\u043c \u044f\u0441\u043d\u043e, \u043f\u043e\u0447\u0435\u043c\u0443). \u041f\u043b\u0435\u0435\u0440 \u00ab\u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f\u00bb \u0441 \u0431\u043b\u043e\u043a\u043e\u043c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u0438\u0433\u043d\u0430\u043b\u043e\u0432 \u0438 \u0441\u043b\u043e\u0442\u043e\u0432. \u041e\u0431\u0451\u0440\u0442\u043a\u0443 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u044f \u0441\u0434\u0435\u043b\u0430\u043b \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0431\u043b\u0435\u0433\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 2 \u043f\u043e\u0442\u043e\u043a\u0430. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u043e\u0431\u0451\u0440\u0442\u043a\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043f\u043e\u0442\u043e\u043a\u0435(\u0442.\u0435 \u043d\u0435 \u0442\u0430\u043a, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u043d\u0430 \u0440\u0438\u0441\u0443\u043d\u043a\u0435). \u041e\u0431\u0451\u0440\u0442\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043a\u043b\u0430\u0441\u0441\u0430 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0435\u0433\u043e \u0432 \u043d\u043e\u0432\u044b\u0439, \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u043e\u0442\u043e\u043a. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043e \u043f\u043b\u0435\u0435\u0440\u0435 \u0432\u0441\u0435, \u0434\u0430\u043b\u044c\u0448\u0435 \u0431\u0443\u0434\u0443 \u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0438 \u0438 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043a\u043e\u0434.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/d25\/08e\/6d6\/d2508e6d6e955d5ed07962d4907e7075.png\"\/><\/p>\n<h4>\u0420\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435<\/h4>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c, \u0431\u0443\u0434\u0435\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043a\u0430\u0434\u0440\u044b \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0442\u0435\u043e\u0440\u0438\u0438 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439. \u0411\u0443\u0434\u0435\u043c \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0434\u0432\u0430\u0434\u0446\u0430\u0442\u044c \u043a\u0430\u0434\u0440\u043e\u0432 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443(\u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0435\u0431 \u043a\u0430\u043c\u0435\u0440\u0430 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442). \u041e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0435\u043c \u043f\u043e \u0434\u0435\u0441\u044f\u0442\u044c \u043a\u0430\u0434\u0440\u043e\u0432.<\/p>\n<p>  \u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c:  <\/p>\n<ol>\n<li>\u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u0430\u0434\u0440 \u0441 \u0432\u0435\u0431 \u043a\u0430\u043c\u0435\u0440\u044b \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 \u0444\u0438\u043b\u044c\u0442\u0440;<\/li>\n<li> \u0444\u0438\u043b\u044c\u0442\u0440 \u043d\u0430\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0433\u0434\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0451\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448 \u0432 \u0432\u0438\u0434\u0435 \u0431\u0435\u043b\u043e\u0433\u043e \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u0438\u043a\u0430 \u043d\u0430 \u0447\u0451\u0440\u043d\u043e\u043c \u0444\u043e\u043d\u0435;<\/li>\n<li>\u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u0433\u0434\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u044b \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448\u0430. \u0412\u0435\u0440\u0445\u043d\u044f\u044f \u0432\u0435\u0440\u0448\u0438\u043d\u0430 \u0437\u0430\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u0432 \u043c\u0430\u0441\u0441\u0438\u0432.<\/li>\n<li>\u0435\u0441\u043b\u0438 \u043c\u0430\u0441\u0441\u0438\u0432 \u0434\u043e\u0441\u0442\u0438\u0433 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0432 10 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u0442\u043e \u044d\u0442\u043e\u0442 \u043c\u0430\u0441\u0441\u0438\u0432 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u0433\u0434\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0430\u043d\u0430\u043b\u0438\u0437 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440 \u0447\u0438\u0441\u0435\u043b \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432.<\/li>\n<li>\u0435\u0441\u043b\u0438 \u0430\u043d\u0430\u043b\u0438\u0437 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043b \u043a\u0430\u043a\u0443\u044e-\u043d\u0438\u0431\u0443\u0434\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443, \u0442\u043e \u044d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435\u043e\u043f\u043b\u0435\u0435\u0440.<\/li>\n<\/ol>\n<p>  \u041f\u0440\u0438\u0432\u0435\u0434\u0443 \u0442\u043e\u043b\u044c\u043a\u043e 3 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0441\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 \u043a\u0430\u043c\u0435\u0440\u043e\u0439, \u0435\u0441\u043b\u0438 \u0436\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043e:<\/p>\n<pre><code class=\"cpp\">void MotionDetector::observCam() {     m_cap &gt;&gt; m_frame;\t\/\/ \u043f\u043e\u0447\u0443\u0447\u0430\u0435\u043c \u043a\u0430\u0434\u0440 \u0441 \u043a\u0430\u043c\u0435\u0440\u044b     filterIm();\t\t\/\/ \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435     detectStick();\t\/\/ \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u043c, \u0438 \u0438\u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043b\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443     drawStick(m_binIm); \/\/ \u0440\u0438\u0441\u0443\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043d\u044b\u0439 \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448     showIms();\t\t\/\/ \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043d\u044b\u0439 \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448 } <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"cpp\">void MotionDetector::detectStick() {     m_contours.clear();     cv::findContours(m_binIm.clone(), m_contours, cv::RETR_EXTERNAL, cv::CHAIN_APPROX_SIMPLE);     if (m_contours.empty())         return;     bool stickFound = false;     for(int i = 0; i &lt; m_contours.size(); ++i)     {         \/\/ \u0435\u0441\u043b\u0438 \u043e\u0431\u044a\u0435\u043a\u0442 \u043e\u0447\u0435\u043d\u044c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0439, \u0442\u043e \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0435\u0433\u043e         if(cv::contourArea(m_contours[i]) &lt; m_arAtThreshold)             continue;         \/\/ \u043d\u0430\u0445\u043e\u0434\u0438\u043c \u043a\u043e\u043d\u0446\u044b \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448\u0430         m_stickRect = cv::minAreaRect(m_contours[i]);         cv::Point2f vertices[4];         cv::Point top;         cv::Point bottom;         m_stickRect.points(vertices);         if (lineLength(vertices[0], vertices[1]) &gt; lineLength(vertices[1], vertices[2])){             top = cv::Point((vertices[1].x + vertices[2].x) \/ 2., (vertices[1].y + vertices[2].y) \/ 2.);             bottom = cv::Point((vertices[0].x + vertices[3].x) \/ 2., (vertices[0].y + vertices[3].y) \/ 2.);         } else{             top = cv::Point((vertices[0].x + vertices[1].x) \/ 2., (vertices[0].y + vertices[1].y) \/ 2.);             bottom = cv::Point((vertices[2].x + vertices[3].x) \/ 2., (vertices[2].y + vertices[3].y) \/ 2.);         }         if (top.y &gt; bottom.y)             qSwap(top, bottom);         m_stick.setTop(top);         m_stick.setBottom(bottom);         stickFound = true;     }     \/\/ \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435     switch (m_state){     case ST_OBSERVING:         if (!stickFound){             m_state = ST_WAITING;             m_pointSeries.clear();             break;         }         m_pointSeries.append(QPair&lt;double, double&gt;(m_stick.top().x, m_stick.top().y));         if (m_pointSeries.size() &gt;= 10){             m_actionPack = m_pSeriesAnaliser.analize(m_pointSeries);             if (!m_actionPack.isEmpty()){                 emit sendAction(m_actionPack);             }             m_pointSeries.clear();         }         break;     case ST_WAITING:         m_state = ST_OBSERVING;         break;     } } <\/code><\/pre>\n<p>  \u041f\u0440\u043e \u043c\u0435\u0442\u043e\u0434 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"http:\/\/www.testent.ru\/publ\/studenty\/vysshaja_matematika\/linejnaja_regressija_ispolzovanie_metoda_naimenshikh_kvadratov_mnk\/35-1-0-1149\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u0421\u0435\u0439\u0447\u0430\u0441 \u0436\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u0435\u0451 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u044f. \u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0440\u044f\u0434\u0430.<\/p>\n<pre><code class=\"cpp\">bool SeriesAnaliser::linerCheck(const QVector&lt;QPair&lt;double, double&gt; &gt; &source) {     int count = source.size();     \/\/ \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 2 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0430\u0441\u0441\u0438\u0432\u0430, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043d\u044f\u0442\u043d\u0435\u0435 \u0431\u044b\u043b\u043e.     QVector&lt;double&gt; x(count);     QVector&lt;double&gt; y(count);     for (int i = 0; i &lt; count; ++i){         x[i] = source[i].first;         y[i] = source[i].second;     }     double zX, zY, zX2, zXY;    \/\/ z - \u043e\u0431\u043d\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u043a\u0430 \u0441\u0443\u043c\u043c\u044b. zX - \u0441\u0443\u043c\u043c\u0430 x-\u043e\u0432 \u0438 \u0442.\u0434.     QVector&lt;double&gt; yT(count);     \/\/ \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445     zX = 0;     for (int i = 0; i &lt; count; ++i)         zX += x[i];     zY = 0;     for (int i = 0; i &lt; count; ++i)         zY += y[i];     zX2 = 0;     for (int i = 0; i &lt; count; ++i)         zX2 += x[i] * x[i];     zXY = 0;     for (int i = 0; i &lt; count; ++i)         zXY += x[i] * y[i];     \/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u0442\u043e\u0432 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f     double a = (count * zXY - zX * zY) \/ (count * zX2 - zX * zX);     double b = (zX2 * zY - zX * zXY) \/ (count * zX2 - zX * zX);     \/\/ \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0442\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e y     for (int i = 0; i &lt; count; ++i)         yT[i] = x[i] * a + b;     double dif = 0;     for (int i = 0; i &lt; count; ++i){         dif += qAbs(yT[i] - y[i]);     }     if (a == 0)         a = 10; #ifdef QT_DEBUG     qDebug() &lt;&lt; QString(&quot;%1x+%2&quot;).arg(a).arg(b);     qDebug() &lt;&lt; dif; #endif     \/\/ \u0435\u0441\u043b\u0438 \u0430 &gt; vBorder, \u0442\u043e \u044d\u0442\u043e, \u0441\u043e\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u043d\u0438\u044f     \/\/ \u0435\u0441\u043b\u0438 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 epsilan, \u0442\u043e \u044d\u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435     \/\/ \u0435\u0441\u043b\u0438 oblMovMin &lt; a &lt; oblMovMax, \u0442\u043e \u044d\u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043a\u043e\u0441\u0430\u044f \u043b\u0438\u043d\u0438\u044f     \/\/ \u0435\u0441\u043b\u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 0.6, \u0442\u043e \u044d\u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0434\u0432\u0438\u0436\u0435\u0438\u0435     \/\/ \u0435\u0441\u043b\u0438 a &lt; horMov, \u0442\u043e \u044d\u0442\u043e, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0435.     int vBorder = 3;     int epsilan = 50;     double oblMovMin = 0.5;     double oblMovMax = 1.5;     double horMov = 0.2;     \/\/ \u0415\u0441\u043b\u0438 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u0430\u044f, \u0442\u043e \u0432\u044b\u0445\u043e\u0434     if (qAbs(a) &lt; vBorder && dif &gt; epsilan)         return false;     \/\/ \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438     double msInFrame = 1000 \/ s_fps;     double dTime = msInFrame * count;   \/\/ ms     double dDistance;                   \/\/ px     double speed = 0;  \/*px per ser*\/     if (qAbs(a) &lt; vBorder)         dDistance = x[count - 1] - x[0];            \/\/ \u0435\u0441\u043b\u0438 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u043b\u0438\u043d\u0438\u044f     else         dDistance = y[count -1] - y[0];     speed = dDistance \/ dTime; \/\/px per     \/\/ \u0435\u0441\u043b\u0438 \u043f\u0430\u043b\u043e\u0447\u043a\u0430 \u043d\u0435 \u0434\u0432\u0438\u0433\u0430\u0435\u0442\u0441\u044f, \u0432\u044b\u0445\u043e\u0434     if (qSqrt(qPow(x[0] - x[count - 1], 2) + qPow(y[0] - y[count - 1], 2)) &lt; 15){         return false;     }     \/\/ \u0440\u0435\u0437\u043a\u0438\u0435 \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435.     if (speed &gt; 0.6)         return false;     \/\/ \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u0430\u043a\u0435\u0442\u0430     if (qAbs(a) &gt; oblMovMin && qAbs(a) &lt; oblMovMax){         \/\/ \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435         if (a &lt; 0){             \/\/ \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0434\u043e\u0440\u043e\u0436\u043a\u0430             s_actionPack = &quot;next&quot;;         } else{             if (speed &lt; 0)                 s_actionPack = &quot;play&quot;;             else                 \/\/ \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0430\u044f \u0434\u043e\u0440\u043e\u0436\u043a\u0430                 s_actionPack = &quot;previous&quot;;         }     } else         if (qAbs(a) &lt; horMov)         {             s_actionPack = QString(&quot;rewind %1&quot;).arg(speed * -30000);         } else             if (qAbs(a) &gt; vBorder){                 s_actionPack = QString(&quot;volume %1&quot;).arg(speed * -1);             } else                 return false;     return true; } <\/code><\/pre>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043e\u0442\u0440\u044b\u0432\u043e\u043a \u043a\u043e\u0434\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d\u043d\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435(\u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0432\u0438\u0434\u0435\u043e\u043f\u043b\u0435\u0435\u0440\u0430):<\/p>\n<pre><code class=\"javascript\"> function executeComand(comand){     var comandList = comand.split(' ');     console.log(comand);     switch (comandList[0]) {     case &quot;next&quot;:         nextMedia();         break;     case &quot;previous&quot;:         previousMedia();         break;     case &quot;play&quot;:         playMedia();         break;     case &quot;rewind&quot;:         mediaPlayer.seek(mediaPlayer.position + Number(comandList[1]));         break;     case &quot;volume&quot;:         mediaPlayer.volume += Number(comandList[1]);         break;     default:         break;     } } <\/code><\/pre>\n<p>  \u0414\u0430, \u0447\u0443\u0442\u044c \u043d\u0435 \u0437\u0430\u0431\u044b\u043b, \u043a\u0430\u0440\u0430\u043d\u0434\u0430\u0448 \u0442\u043e \u0443 \u043d\u0430\u0441 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0437 \u0444\u043e\u043d\u0430 \u043f\u043e \u0446\u0432\u0435\u0442\u0443, \u0430 \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u043a\u0430\u043a-\u0442\u043e \u0433\u0434\u0435-\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c. \u042f \u0440\u0435\u0448\u0438\u043b \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/b80\/b49\/ce2\/b80b49ce20a7ac07d6e45f4570ef2aa3.png\"\/><\/p>\n<p>  \u0422.\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043e\u0442\u0440\u0435\u0433\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0446\u0432\u0435\u0442 \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u043e\u0441\u0432\u044f\u0449\u0435\u043d\u0438\u0438, \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0446\u0432\u0435\u0442 \u0432 \u043c\u0435\u043d\u044e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0442\u043e\u043c \u043c\u043e\u0433\u043b\u0438 \u0443\u0436\u0435 \u0441\u0440\u0430\u0437\u0443 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u0435\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438.<\/p>\n<p>  \u0412\u043e\u0442 \u0442\u0430\u043a\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c:<br \/>  <iframe loading=\"lazy\" width=\"560\" height=\"349\" src=\"\/\/www.youtube.com\/embed\/U5v1AchAM0o?wmode=opaque\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<h4>\u0412\u044b\u0432\u043e\u0434<\/h4>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0438\u0434\u0435\u043e\u043f\u043b\u0435\u0435\u0440 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0436\u0435\u0441\u0442\u044b. \u041f\u043e-\u043c\u043e\u0435\u043c\u0443, \u0441\u0430\u043c\u043e\u0439 \u0443\u0434\u0430\u0447\u043d\u043e\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0432\u0435\u0449\u044c\u044e \u0432 \u043f\u043b\u0435\u0435\u0440\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0435\u0440\u0435\u043c\u043e\u0442\u043a\u0430 \u043d\u0430\u0437\u0430\u0434\/\u0432\u043f\u0435\u0440\u0451\u0434 \u0436\u0435\u0441\u0442\u0430\u043c\u0438. \u0418 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0438 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e. \u0425\u043e\u0442\u044c \u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0444\u0438\u043b\u044c\u043c\u0430 \u0436\u0435\u0441\u0442\u043e\u0432\u043e\u0435 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c, \u043d\u043e \u043f\u043e\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0438\u0441\u043a\u0430\u0442\u044c \u043c\u044b\u0448\u043a\u0443, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u0442\u044c \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u043d\u0430\u0437\u0430\u0434.<\/p>\n<p>  P.S: \u041a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0432\u043e\u0442 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 <a href=\"https:\/\/github.com\/nicktrandafil\/SmartVP.git\">SmartVP<\/a>.<br \/>  P.P.S: \u041f\u0435\u0440\u0435\u043f\u043e\u0440\u043e\u0431\u043e\u0432\u0430\u043b \u043c\u043d\u043e\u0433\u043e \u0446\u0432\u0435\u0442\u043e\u0432, \u0441\u0430\u043c\u044b\u043c \u0445\u043e\u0440\u043e\u0448\u0438\u043c(\u0443\u0441\u0442\u043e\u0439\u0447\u0438\u0432\u044b\u043c \u043a \u0431\u044b\u0441\u0442\u0440\u044b\u043c \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f\u043c) \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043e\u0440\u0430\u043d\u0436\u0435\u0432\u044b\u0439. \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/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\/213417\/\"> http:\/\/habrahabr.ru\/post\/213417\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0435\u0447\u044c \u043f\u043e\u0439\u0434\u0451\u0442 \u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0438 \u0436\u0435\u0441\u0442\u043e\u0432. \u042f \u0441\u0447\u0438\u0442\u0430\u044e, \u0447\u0442\u043e \u044d\u0442\u0430 \u0442\u0435\u043c\u0430 \u043d\u0430 \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0438\u0439 \u0434\u0435\u043d\u044c \u043e\u0447\u0435\u043d\u044c \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0430, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u0432\u043e\u0434\u0430 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u0435\u043d \u0434\u043b\u044f \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0412 YouTube \u043c\u043e\u0436\u043d\u043e \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0440\u043e\u043b\u0438\u043a\u043e\u0432 \u043f\u0440\u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u0432, \u0432 \u0445\u0430\u0431\u0440\u0435 \u0442\u043e\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u0438 \u043f\u043e \u044d\u0442\u043e\u0439 \u0442\u0435\u043c\u0435, \u0442\u0430\u043a \u0432\u043e\u0442, \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0441\u0432\u043e\u0451, \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0435 \u0438 \u043d\u0443\u0436\u043d\u043e\u0435. \u042f \u0440\u0435\u0448\u0438\u043b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043f\u043b\u0435\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0436\u0435\u0441\u0442\u0430\u043c\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0441\u0430\u043c \u0438\u043d\u043e\u0433\u0434\u0430 \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u043d\u044e\u0441\u044c \u0432\u0437\u044f\u0442\u044c\u0441\u044f \u0437\u0430 \u043c\u044b\u0448\u043a\u0443, \u043d\u0430\u0439\u0442\u0438 \u044d\u0442\u043e\u0442 \u043f\u043e\u043b\u0437\u0443\u043d\u043e\u043a \u0438 \u043f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u0442\u044c \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u0432\u043f\u0435\u0440\u0451\u0434 \u0438\u043b\u0438 \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u043d\u0430\u0437\u0430\u0434, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e, \u043a\u043e\u0433\u0434\u0430 \u0441\u043c\u043e\u0442\u0440\u044e \u0444\u0438\u043b\u044c\u043c\u044b \u043d\u0430 \u0438\u043d\u043e\u0441\u0442\u0440\u0430\u043d\u043d\u043e\u043c \u044f\u0437\u044b\u043a\u0435 (\u0442\u0430\u043c \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0437\u0430\u0434). <\/p>\n<p>  \u0412 \u0441\u0442\u0430\u0442\u044c\u0435, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c, \u0440\u0435\u0447\u044c \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u0435 \u0436\u0435\u0441\u0442\u043e\u0432, \u0430 \u043e \u0432\u0438\u0434\u0435\u043e\u043f\u043b\u0435\u0435\u0440\u0435 \u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u043a\u0430\u0436\u0443 \u0432 \u043e\u0431\u0449\u0435\u043c.  <\/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-213417","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/213417","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=213417"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/213417\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=213417"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=213417"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=213417"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}