{"id":8719,"date":"2020-09-30T16:44:47","date_gmt":"2020-09-30T13:14:47","guid":{"rendered":"https:\/\/shahaab-co.ir\/mag\/?p=8719"},"modified":"2020-12-08T14:44:58","modified_gmt":"2020-12-08T11:14:58","slug":"machine-learning-in-opencv-chapter-5","status":"publish","type":"post","link":"https:\/\/shahaab-co.com\/mag\/edu\/ml\/machine-learning-in-opencv-chapter-5\/","title":{"rendered":"\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646 \u062f\u0631 OpenCV : \u062c\u0644\u0633\u0647 \u067e\u0646\u062c\u0645"},"content":{"rendered":"<p style=\"text-align: justify;\">\u062f\u0631 \u0627\u062f\u0627\u0645\u0647 \u0622\u0645\u0648\u0632\u0634 \u0647\u0627\u06cc \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646 \u062f\u0631 OpenCV\u060c \u0628\u0647 \u0628\u062d\u062b <a href=\"https:\/\/shahaab-co.ir\/mag\/edu\/support-vector-machine-part1-theory\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u0645\u0627\u0634\u06cc\u0646 \u0647\u0627\u06cc \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 (Support Vector Machine )<\/a> \u0645\u06cc \u067e\u0631\u062f\u0627\u0632\u06cc\u0645. SVM \u00a0\u06cc\u06a9\u06cc \u0627\u0632 \u0631\u0648\u0634 \u0647\u0627 \u0648 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0647\u0627\u06cc \u0628\u0633\u06cc\u0627\u0631 \u0645\u062a\u062f\u0627\u0648\u0644 \u062f\u0631 \u062d\u0648\u0632\u0647 \u062f\u0633\u062a\u0647 \u0628\u0646\u062f\u06cc \u062f\u0627\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u0627\u06cc\u0646 \u062f\u0633\u062a\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0645\u0648\u0644\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u062e\u0637\u06cc \u0627\u0633\u062a.<\/p>\n<p style=\"text-align: justify;\">\u0628\u0647 \u0637\u0648\u0631 \u06a9\u0644\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646 \u06af\u0641\u062a \u06a9\u0647 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0645\u0627\u0634\u06cc\u0646 \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u062f\u0631 \u0627\u0628\u062a\u062f\u0627 \u0628\u0631\u0627\u06cc \u0633\u0627\u062e\u062a \u06a9\u0644\u0627\u0633 \u0628\u0646\u062f\u06cc \u0647\u0627\u06cc \u0628\u0627\u06cc\u0646\u0631\u06cc \u0627\u06cc\u062c\u0627\u062f \u0634\u062f. \u0633\u067e\u0633 \u0628\u0647 \u0639\u0646\u0648\u0627\u0646 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645\u06cc \u0628\u0631\u0627\u06cc \u0645\u0633\u0627\u0626\u0644 \u062e\u0648\u0634\u0647 \u0628\u0646\u062f\u06cc \u0648 \u0631\u06af\u0631\u0627\u0633\u06cc\u0648\u0646 \u06af\u0633\u062a\u0631\u0634 \u067e\u06cc\u062f\u0627 \u06a9\u0631\u062f. SVM \u00a0\u06cc\u06a9 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u062c\u0632\u0626\u06cc \u0628\u0631\u0627\u06cc \u0631\u0648\u0634 \u0647\u0627\u06cc \u0628\u0631\u0627\u0633\u0627\u0633 \u06a9\u0631\u0646\u0644 (\u0647\u0633\u062a\u0647) \u0627\u0633\u062a \u06a9\u0647 \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u0628\u0631\u062f\u0627\u0631\u06cc \u0631\u0627 \u0628\u0647 \u0641\u0636\u0627\u0647\u0627\u06cc \u0628\u0627 \u0627\u0628\u0639\u0627\u062f \u0628\u0627\u0644\u0627\u062a\u0631 \u0646\u06af\u0627\u0634\u062a \u0645\u06cc \u06a9\u0646\u062f \u0648 \u0627\u06cc\u0646 \u0639\u0645\u0644 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u0639\u0645\u0644\u06a9\u0631\u062f \u06a9\u0631\u0646\u0644\u00a0 \u0648 \u0633\u0627\u062e\u062a \u06cc\u06a9 \u062a\u0627\u0628\u0639 \u0628\u0647\u06cc\u0646\u0647 \u062e\u0637\u06cc \u062f\u0631\u0627\u06cc\u0646 \u0641\u0636\u0627 \u06cc\u0627 \u0641\u0636\u0627\u06cc\u06cc \u062c\u0646\u062f \u0628\u0639\u062f\u06cc \u06a9\u0647 \u0645\u062a\u0646\u0627\u0633\u0628 \u0628\u0627 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0622\u0645\u0648\u0632\u0634\u06cc \u0627\u0633\u062a\u060c \u0635\u0648\u0631\u062a \u0645\u06cc \u06af\u06cc\u0631\u062f.<\/p>\n<p style=\"text-align: justify;\">\u0644\u0627\u0632\u0645 \u0628\u0647 \u0630\u06a9\u0631 \u0627\u0633\u062a \u06a9\u0647 \u062f\u0631 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0647\u0627\u06cc \u0645\u0627\u0634\u06cc\u0646 \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646\u060c \u06a9\u0631\u0646\u0644 \u0628\u0647 \u0635\u0631\u0627\u062d\u062a \u062a\u0639\u0631\u06cc\u0641 \u0646\u0634\u062f\u0647 \u0627\u0633\u062a. \u062f\u0631 \u0639\u0648\u0636 \u0641\u0636\u0627\u06cc \u0645\u0627\u0628\u06cc\u0646 \u062f\u0648 \u0646\u0642\u0637\u0647 \u062f\u0631 \u0641\u0636\u0627\u0647\u0627\u06cc \u062c\u0646\u062f \u0628\u0639\u062f\u06cc \u0646\u06cc\u0627\u0632 \u0628\u0647 \u062a\u0639\u0631\u06cc\u0641 \u06a9\u0631\u0646\u0644 \u062f\u0627\u0631\u062f. \u0631\u0627\u0647 \u062d\u0644 \u0647\u0627\u06cc \u0627\u06cc\u062c\u0627\u062f \u0634\u062f\u0647 \u062a\u0648\u0633\u0637 \u0627\u06cc\u0646 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0628\u0647\u06cc\u0646\u0647 \u0647\u0633\u062a\u0646\u062f. \u0628\u0631\u062f\u0627\u0631\u0647\u0627\u06cc \u0648\u06cc\u0698\u06af\u06cc \u06a9\u0647 \u0628\u0647 \u0627\u0628\u0631 \u0635\u0641\u062d\u0647 \u0646\u0632\u062f\u06cc\u06a9 \u062a\u0631 \u0647\u0633\u062a\u0646\u062f\u060c \u0628\u0631\u062f\u0627\u0631\u0647\u0627\u06cc \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 ( Support Vector ) \u0646\u0627\u0645\u06cc\u062f\u0647 \u0645\u06cc \u0634\u0648\u0646\u062f \u0628\u0647 \u0627\u06cc\u0646 \u0645\u0639\u0646\u0627 \u06a9\u0647 \u0645\u0648\u0642\u0639\u06cc\u062a \u0628\u0631\u062f\u0627\u0631\u0647\u0627 \u0628\u0631 \u0639\u0645\u0644\u06a9\u0631\u062f \u062a\u0635\u0645\u06cc\u0645 \u06af\u06cc\u0631\u06cc \u062a\u0627\u062b\u06cc\u0631\u06cc \u0646\u062e\u0648\u0627\u0647\u062f \u062f\u0627\u0634\u062a.<\/p>\n<p style=\"text-align: justify;\">\u067e\u06cc\u06a9\u0631\u0628\u0646\u062f\u06cc \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0645\u0627\u0634\u06cc\u0646 \u0647\u0627\u06cc \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u062f\u0631 OpenCV \u0646\u06cc\u0632 \u0628\u0631\u0627\u0633\u0627\u0633 \u0627\u0635\u0648\u0644 \u0637\u0628\u0642\u0647 \u0628\u0646\u062f\u06cc \u062f\u0627\u062f\u0647 \u0647\u0627 \u0642\u0631\u0627\u0631 \u06af\u0631\u0641\u062a\u0647 \u0627\u0633\u062a. \u0646\u0645\u0648\u062f\u0627\u0631 \u0648\u0631\u0627\u062b\u062a \u0628\u0631\u0627\u06cc cv::ml::svm \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0627\u0633\u062a:<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"106\" height=\"136\" src=\"https:\/\/shahaab-co.ir\/mag\/wp-content\/uploads\/2020\/09\/\u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645-svm-\u062f\u0631-Opencv.png\" alt=\"\u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 svm \u062f\u0631 Opencv\" class=\"wp-image-8745\" title=\"\"><\/figure><\/div>\n\n\n<p style=\"text-align: justify;\">\u0646\u0648\u0639 \u062f\u0627\u062f\u0647 \u0647\u0627\u06cc \u0639\u0645\u0648\u0645\u06cc \u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0628\u0647 \u0634\u06a9\u0644 \u0632\u06cc\u0631 \u062e\u0648\u0627\u0647\u0646\u062f \u0628\u0648\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\">enum  \tKernelTypes {\n  CUSTOM =-1,\n  LINEAR =0,\n  POLY =1,\n  RBF =2,\n  SIGMOID =3,\n  CHI2 =4,\n  INTER =5\n}<\/pre>\n<h3 style=\"text-align: justify;\"><strong>\u06a9\u0631\u0646\u0644 \u0647\u0627\u06cc \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0645\u0627\u0634\u06cc\u0646 \u0647\u0627\u06cc \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 :<\/strong><\/h3>\n<p style=\"text-align: justify;\">\u062f\u0631 \u0634\u06a9\u0644 \u062f\u0648 \u0628\u0639\u062f\u06cc \u0632\u06cc\u0631 \u06a9\u0631\u0646\u0644 \u0647\u0627\u06cc \u0645\u062e\u062a\u0644\u0641 \u0628\u0631\u0627\u06cc \u0686\u0647\u0627\u0631 \u06a9\u0644\u0627\u0633 \u0628\u0627\u0647\u0645 \u0645\u0642\u0627\u06cc\u0633\u0647 \u0634\u062f\u0647 \u0627\u0646\u062f. \u0647\u0631 \u0686\u0647\u0627\u0631 \u06a9\u0644\u0627\u0633 SVM::C_SVC &nbsp;\u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 auto_train \u0622\u0645\u0648\u0632\u0634 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0646\u062f (\u0628\u0631\u0627\u06cc \u0647\u0631 \u06a9\u0644\u0627\u0633). \u0627\u0631\u0632\u06cc\u0627\u0628\u06cc \u0647\u0627 \u0628\u0631 \u0631\u0648\u06cc \u0633\u0647 \u06a9\u0631\u0646\u0644 \u0645\u062e\u062a\u0644\u0641 ( SVM::CHI2 , SVM::INTER , SVM::RBF ) \u0627\u0646\u062c\u0627\u0645 \u06af\u0631\u0641\u062a\u0647 \u0627\u0633\u062a. \u0631\u0646\u06af \u0647\u0627\u060c \u06a9\u0644\u0627\u0633 \u0647\u0627\u06cc \u0628\u0627 \u0627\u0645\u062a\u06cc\u0627\u0632 \u0645\u0627\u06a9\u0632\u06cc\u0645\u0645 \u0631\u0627 \u062a\u0631\u0633\u06cc\u0645 \u0645\u06cc \u06a9\u0646\u0646\u062f. \u0631\u0646\u06af \u0647\u0627\u06cc \u062f\u0631\u062e\u0634\u0627\u0646 \u0628\u0647 \u0645\u0639\u0646\u0627\u06cc \u0627\u0645\u062a\u06cc\u0627\u0632 \u0645\u0627\u06a9\u0632\u06cc\u0645\u0645 \u0628\u0627\u0644\u0627\u062a\u0631 \u0627\u0632 \u0635\u0641\u0631 \u0648 \u0631\u0646\u06af \u0647\u0627\u06cc \u062a\u06cc\u0631\u0647 \u0628\u0647 \u0645\u0639\u0646\u0627\u06cc \u0627\u0645\u062a\u06cc\u0627\u0632\u0627\u062a \u0645\u0627\u06a9\u0632\u06cc\u0645\u0645 \u06a9\u0645\u062a\u0631 \u0627\u0632 \u0635\u0641\u0631 \u0647\u0633\u062a\u0646\u062f.<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"640\" height=\"480\" src=\"https:\/\/shahaab-co.ir\/mag\/wp-content\/uploads\/2020\/09\/\u0645\u0642\u0627\u06cc\u0633\u0647-\u0627\u0646\u0648\u0627\u0639-SVM-\u062f\u0631-Opencv.png\" alt=\"\u0645\u0642\u0627\u06cc\u0633\u0647 \u0627\u0646\u0648\u0627\u0639 SVM \u062f\u0631 Opencv\" class=\"wp-image-8747\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/09\/\u0645\u0642\u0627\u06cc\u0633\u0647-\u0627\u0646\u0648\u0627\u0639-SVM-\u062f\u0631-Opencv.png 640w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/09\/\u0645\u0642\u0627\u06cc\u0633\u0647-\u0627\u0646\u0648\u0627\u0639-SVM-\u062f\u0631-Opencv-300x225.png 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/figure><\/div>\n\n\n\n<figure class=\"wp-block-table is-style-regular\"><table><thead><tr><th>\u067e\u0627\u0631\u0627\u0645\u062a\u0631 \u0647\u0627<\/th><th><\/th><\/tr><\/thead><tbody><tr><td>CUSTOM&nbsp;<\/td><td>\u062f\u0631 \u0635\u0648\u0631\u062a\u06cc \u06a9\u0647 \u06a9\u0631\u0646\u0644 \u0633\u0641\u0627\u0631\u0634\u06cc \u062a\u0646\u0638\u06cc\u0645 \u0634\u062f\u0647 \u0628\u0627\u0634\u062f\u060c \u062a\u0648\u0633\u0637 SVM::getKernelType \u0628\u0631\u06af\u0634\u062a \u062f\u0627\u062f\u0647 \u0645\u06cc \u0634\u0648\u062f<\/td><\/tr><tr><td>LINEAR<\/td><td>\u06a9\u0631\u0646\u0644 \u062e\u0637\u06cc. \u0646\u06af\u0627\u0634\u062a\u06cc \u0627\u0646\u062c\u0627\u0645 \u0646\u0645\u06cc \u0634\u0648\u062f\u060c \u062c\u062f\u0627\u0633\u0627\u0632\u06cc \u06cc\u0627 \u0631\u06af\u0631\u0633\u06cc\u0648\u0646 \u062f\u0631 \u0641\u0636\u0627\u06cc \u0648\u06cc\u0698\u06af\u06cc \u0647\u0627\u06cc \u0627\u0635\u0644\u06cc \u0627\u0646\u062c\u0627\u0645 \u0645\u06cc \u0634\u0648\u062f. \u0633\u0631\u06cc\u0639 \u062a\u0631\u06cc\u0646 \u062d\u0627\u0644\u062a \u0627\u0633\u062a. K(x<sub>i<\/sub>,x<sub>j<\/sub>)=x<sup>T<\/sup><sub>i<\/sub>x<sub>j<\/sub><\/td><\/tr><tr><td>POLY&nbsp;<\/td><td>\u06a9\u0631\u0646\u0644 \u0686\u0646\u062f \u062c\u0645\u0644\u0647 \u0627\u06cc : K(x<sub>i<\/sub>,x<sub>j<\/sub>)=(\u03b3x<sup>T<\/sup><sub>i<\/sub>x<sub>j<\/sub>+coef0)<sup>degree<\/sup>,\u03b3&gt;0<\/td><\/tr><tr><td>RBF&nbsp;<\/td><td>\u062a\u0627\u0628\u0639 \u067e\u0627\u06cc\u0647 \u0634\u0639\u0627\u0639\u06cc \u060c \u062f\u0631 \u0628\u06cc\u0634\u062a\u0631 \u0645\u0648\u0627\u0631\u062f \u06af\u0632\u06cc\u0646\u0647 \u062e\u0648\u0628\u06cc \u0627\u0633\u062a. K(x<sub>i<\/sub>,x<sub>j<\/sub>)=e<sup>\u2212\u03b3||xi\u2212xj||2<\/sup>,\u03b3&gt;0<\/td><\/tr><tr><td>SIGMOID<\/td><td>\u06a9\u0631\u0646\u0644 \u0633\u06cc\u06af\u0645\u0648\u0626\u06cc\u062f : (K(x<sub>i<\/sub>,x<sub>j<\/sub>)=tanh(\u03b3x<sup>T<\/sup><sub>i<\/sub>x<sub>j<\/sub>+coef0<\/td><\/tr><tr><td>CHI2&nbsp;<\/td><td>\u06a9\u0631\u0646\u0644 Chi2 \u0646\u0645\u0627\u06cc\u06cc \u060c \u0645\u0634\u0627\u0628\u0647 \u06a9\u0631\u0646\u0644 RBF \u0627\u0633\u062a : K(x<sub>i<\/sub>,x<sub>j<\/sub>)=e<sup>\u2212\u03b3\u03c7\u06f2(xi,xj)<\/sup>,\u03c7<sup>\u06f2<\/sup>(x<sub>i<\/sub>,x<sub>j<\/sub>)=(x<sub>i<\/sub>\u2212x<sub>j<\/sub>)<sup>2<\/sup>\/(x<sub>i<\/sub>+x<sub>j<\/sub>),\u03b3&gt;0<\/td><\/tr><tr><td>INTER&nbsp;<\/td><td>\u06a9\u0631\u0646\u0644 \u062a\u0642\u0627\u0637\u0639 \u0647\u06cc\u0633\u062a\u0648\u06af\u0631\u0627\u0645. \u06cc\u06a9 \u06a9\u0631\u0646\u0644 \u0633\u0631\u06cc\u0639 \u0627\u0633\u062a. K(x<sub>i<\/sub>,x<sub>j<\/sub>)=min(x<sub>i<\/sub>,x<sub>j<\/sub>)<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n<p style=\"text-align: justify;\">\u0646\u0645\u0648\u062f\u0627\u0631 \u0648\u0631\u0627\u062b\u062a \u0628\u0631\u0627\u06cc cv::ml::statmodel&nbsp; \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u0627\u0633\u062a:<\/p>\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"366\" height=\"528\" src=\"https:\/\/shahaab-co.ir\/mag\/wp-content\/uploads\/2020\/09\/\u0646\u0645\u0648\u062f\u0627\u0631-\u0648\u0631\u0627\u062b\u062a-Statmodel.png\" alt=\"\u0646\u0645\u0648\u062f\u0627\u0631 \u0648\u0631\u0627\u062b\u062a Statmodel\" class=\"wp-image-8750\" title=\"\" srcset=\"https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/09\/\u0646\u0645\u0648\u062f\u0627\u0631-\u0648\u0631\u0627\u062b\u062a-Statmodel.png 366w, https:\/\/shahaab-co.com\/mag\/wp-content\/uploads\/2020\/09\/\u0646\u0645\u0648\u062f\u0627\u0631-\u0648\u0631\u0627\u062b\u062a-Statmodel-208x300.png 208w\" sizes=\"(max-width: 366px) 100vw, 366px\" \/><\/figure><\/div>\n\n\n<p style=\"text-align: justify;\">\u062a\u0648\u0627\u0628\u0639 \u0639\u0636\u0648\u0639\u0645\u0648\u0645\u06cc \u062f\u0631 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0645\u0627\u0634\u06cc\u0646 \u0647\u0627\u06cc \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0628\u0647 \u0635\u0648\u0631\u062a \u0632\u06cc\u0631 \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc \u0634\u0648\u0646\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\" data-enlighter-linenumbers=\"false\">virtual double \tgetC () const =0\n \nvirtual cv::Mat \tgetClassWeights () const =0\n \nvirtual double \tgetCoef0 () const =0\n \nvirtual double \tgetDecisionFunction (int i, OutputArray alpha, OutputArray svidx) const =0\n \t\u0646\u062a\u06cc\u062c\u0647 \u062a\u0627\u0628\u0639 \u062a\u0635\u0645\u06cc\u0645 \u0631\u0627 \u0628\u0631\u0645\u06cc \u06af\u0631\u062f\u0627\u0646\u062f\n \nvirtual double \tgetDegree () const =0\n \nvirtual double \tgetGamma () const =0\n \nvirtual int \tgetKernelType () const =0\n \nvirtual double \tgetNu () const =0\n \nvirtual double \tgetP () const =0\n \nvirtual Mat \tgetSupportVectors () const =0\n \t\u062a\u0645\u0627\u0645 \u0628\u0631\u062f\u0627\u0631 \u0647\u0627\u06cc \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0631\u0627 \u0628\u0631\u0645\u06cc \u06af\u0631\u062f\u0627\u0646\u062f\n \nvirtual cv::TermCriteria \tgetTermCriteria () const =0\n \nvirtual int \tgetType () const =0\n \nMat \tgetUncompressedSupportVectors () const\n \t\u062a\u0645\u0627\u0645 \u0628\u0631\u062f\u0627\u0631 \u0647\u0627\u06cc \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0641\u0634\u0631\u062f\u0647 \u0646\u0634\u062f\u0647 \u062f\u0631 svm \u062e\u0637\u06cc \u0631\u0627 \u0628\u0631\u0645\u06cc \u06af\u0631\u062f\u0627\u0646\u062f\n \nvirtual void \tsetC (double val)=0\n \nvirtual void \tsetClassWeights (const cv::Mat &amp;val)=0\n \nvirtual void \tsetCoef0 (double val)=0\n \nvirtual void \tsetCustomKernel (const Ptr&lt; Kernel &gt; &amp;_kernel)=0\n \nvirtual void \tsetDegree (double val)=0\n \nvirtual void \tsetGamma (double val)=0\n \nvirtual void \tsetKernel (int kernelType)=0\n \nvirtual void \tsetNu (double val)=0\n \nvirtual void \tsetP (double val)=0\n \nvirtual void \tsetTermCriteria (const cv::TermCriteria &amp;val)=0\n \nvirtual void \tsetType (int val)=0\n \nvirtual bool \ttrainAuto (const Ptr&lt; TrainData &gt; &amp;data, int kFold=10, ParamGrid Cgrid=getDefaultGrid(C), ParamGrid gammaGrid=getDefaultGrid(GAMMA), ParamGrid pGrid=getDefaultGrid(P), ParamGrid nuGrid=getDefaultGrid(NU), ParamGrid coeffGrid=getDefaultGrid(COEF), ParamGrid degreeGrid=getDefaultGrid(DEGREE), bool balanced=false)=0\n \t\u0628\u0627 \u067e\u0627\u0631\u0645\u062a\u0631\u0647\u0627\u06cc \u0628\u0647\u06cc\u0646\u0647 \u0634\u062f\u0647\u060c \u06cc\u06a9 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0645\u0627\u0634\u06cc\u0646 \u0647\u0627\u06cc \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0631\u0627 \u0645\u0648\u0631\u062f \u0622\u0645\u0648\u0632\u0634 \u0642\u0631\u0627\u0631 \u0645\u06cc \u062f\u0647\u062f.\n \nbool \ttrainAuto (InputArray samples, int layout, InputArray responses, int kFold=10, Ptr&lt; ParamGrid &gt; Cgrid=SVM::getDefaultGridPtr(SVM::C), Ptr&lt; ParamGrid &gt; gammaGrid=SVM::getDefaultGridPtr(SVM::GAMMA), Ptr&lt; ParamGrid &gt; pGrid=SVM::getDefaultGridPtr(SVM::P), Ptr&lt; ParamGrid &gt; nuGrid=SVM::getDefaultGridPtr(SVM::NU), Ptr&lt; ParamGrid &gt; coeffGrid=SVM::getDefaultGridPtr(SVM::COEF), Ptr&lt; ParamGrid &gt; degreeGrid=SVM::getDefaultGridPtr(SVM::DEGREE), bool balanced=false)\n \t\u0628\u0627 \u067e\u0627\u0631\u0645\u062a\u0631\u0647\u0627\u06cc \u0628\u0647\u06cc\u0646\u0647 \u0634\u062f\u0647\u060c \u06cc\u06a9 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0645\u0627\u0634\u06cc\u0646 \u0647\u0627\u06cc \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0631\u0627 \u0645\u0648\u0631\u062f \u0622\u0645\u0648\u0632\u0634 \u0642\u0631\u0627\u0631 \u0645\u06cc \u062f\u0647\u062f\n<\/pre>\n<p style=\"text-align: justify;\">\u062f\u0631 \u0627\u06cc\u0646 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645\u060c \u062a\u0648\u0627\u0628\u0639 \u0639\u0636\u0648 \u0639\u0645\u0648\u0645\u06cc \u0627\u0633\u062a\u0627\u062a\u06cc\u06a9 \u0628\u0647 \u0627\u06cc\u0646 \u0635\u0648\u0631\u062a \u062a\u0639\u0631\u06cc\u0641 \u0645\u06cc \u0634\u0648\u0646\u062f:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"cpp\" data-enlighter-linenumbers=\"false\">static Ptr&lt; SVM &gt; \tcreate ()\n \nstatic ParamGrid \tgetDefaultGrid (int param_id)\n \t\u06cc\u06a9 \u06af\u0631\u06cc\u062f \u0628\u0631\u0627\u06cc \u067e\u0627\u0631\u0627\u0645\u062a\u0631\u0647\u0627\u06cc \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u062a\u0639\u06cc\u06cc\u0646 \u0645\u06cc \u06a9\u0646\u062f\n \nstatic Ptr&lt; ParamGrid &gt; \tgetDefaultGridPtr (int param_id)\n \t\u06cc\u06a9 \u06af\u0631\u06cc\u062f \u0628\u0631\u0627\u06cc \u067e\u0627\u0631\u0627\u0645\u062a\u0631\u0647\u0627\u06cc \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u062a\u0639\u06cc\u06cc\u0646 \u0645\u06cc \u06a9\u0646\u062f\n \nstatic Ptr&lt; SVM &gt; \tload (const String &amp;filepath)\n \t\u06cc\u06a9 \u0633\u0631\u06cc \u0627\u0632 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0647\u0627\u06cc \u0645\u0627\u0634\u06cc\u0646 \u0647\u0627\u06cc \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0631\u0627 \u0627\u0632 \u0641\u0627\u06cc\u0644 \u0627\u0633\u062a\u062e\u0631\u0627\u062c \u0648 \u0627\u06cc\u062c\u0627\u062f \u0645\u06cc \u06a9\u0646\u062f <\/pre>\n<p style=\"text-align: justify;\">\u06a9\u062f \u0646\u0645\u0627\u06cc\u0634 \u062f\u0647\u0646\u062f\u0647 \u067e\u06cc\u0634\u0628\u06cc\u0646\u06cc \u0628\u0631\u0627\u06cc \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0645\u0627\u0634\u06cc\u0646 \u0647\u0627\u06cc \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646:<\/p>\n<p style=\"text-align: justify;\">\u0628\u0631\u0627\u06cc \u0627\u06cc\u0646 \u062d\u0627\u0644\u062a \u0628\u0627\u06cc\u062f \u0627\u0632 \u06a9\u062f StatModel::predict(samples, results, flags) \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u06a9\u0646\u06cc\u0645. \u062f\u0631 \u0645\u0633\u0627\u0626\u0644 \u0631\u06af\u0631\u0627\u0633\u06cc\u0648\u0646 \u0646\u06cc\u0632 \u0628\u0631\u0627\u06cc \u0628\u0647 \u062f\u0633\u062a \u0622\u0648\u0631\u062f\u0646 \u067e\u0627\u0633\u062e \u0647\u0627\u06cc \u0627\u0648\u0644\u06cc\u0647 \u0627\u0632 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0645\u0627\u0634\u06cc\u0646 \u0647\u0627\u06cc \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 \u0628\u0627\u06cc\u062f \u0627\u0632 flags=StatModel::RAW_OUTPUT \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0634\u0648\u062f.<\/p>\n<h4><strong>\u0628\u06cc\u0634\u062a\u0631 \u0628\u062e\u0648\u0627\u0646\u06cc\u062f :&nbsp;<\/strong><\/h4>\n\n\n<div class=\"wp-block-group has-vivid-green-cyan-color has-text-color\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<ul class=\"wp-block-yoast-seo-related-links\"><li><a href=\"https:\/\/shahaab-co.ir\/mag\/edu\/support-vector-machine-part1-theory\/\" target=\"_blank\" rel=\"noopener\">\u0645\u0627\u0634\u06cc\u0646 \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 ( SVM ) &#8211; \u0628\u062e\u0634 \u0627\u0648\u0644 : \u0646\u0638\u0631\u06cc\u0647<\/a><\/li><li><a href=\"https:\/\/shahaab-co.ir\/mag\/edu\/ml\/machine-learning-algorithms\/\" target=\"_blank\" rel=\"noopener\">\u06f1\u06f1 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0628\u0631\u062a\u0631 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646 \u0645\u0648\u0631\u062f \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0645\u062a\u062e\u0635\u0635\u06cc\u0646 \u062f\u0627\u062f\u0647<\/a><\/li><li><a href=\"https:\/\/shahaab-co.ir\/mag\/edu\/ml\/machine-learning-tutorial-introduction\/\" target=\"_blank\" rel=\"noopener\">\u062e\u0648\u062f\u0622\u0645\u0648\u0632 \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646 &#8211; \u0645\u0641\u0627\u0647\u06cc\u0645 \u0627\u0633\u0627\u0633\u06cc<\/a><\/li><li><a href=\"https:\/\/shahaab-co.ir\/mag\/news\/ai\/facebook-artificial-intelligence-robots-shut-down\/\" target=\"_blank\" rel=\"noopener\">\u0631\u0628\u0627\u062a \u0647\u0627\u06cc \u0647\u0648\u0634 \u0645\u0635\u0646\u0648\u0639\u06cc \u0641\u06cc\u0633\u0628\u0648\u06a9 \u0628\u0639\u062f \u0627\u0632 \u0627\u06cc\u0646\u06a9\u0647 \u0628\u0627 \u06cc\u06a9\u062f\u06cc\u06af\u0631 \u062f\u0631 \u0632\u0628\u0627\u0646 \u062e\u0648\u062f\u0634\u0627\u0646 \u0634\u0631\u0648\u0639 \u0628\u0647 \u0635\u062d\u0628\u062a \u06a9\u0631\u062f\u0646\u062f\u060c \u062e\u0627\u0645\u0648\u0634 \u0634\u062f\u0646\u062f!<\/a><\/li><li><a href=\"https:\/\/shahaab-co.ir\/mag\/edu\/machine-vision\/histogram-of-oriented-gradients-2\/\" target=\"_blank\" rel=\"noopener\">\u0647\u06cc\u0633\u062a\u0648\u06af\u0631\u0627\u0645 \u0634\u06cc\u0628 \u0647\u0627\u06cc \u062c\u0647\u062a \u062f\u0627\u0631 (\u0628\u062e\u0634 \u062f\u0648\u0645)<\/a><\/li><\/ul>\n<\/div><\/div>\n\n\n<div class=\"kk-star-ratings kksr-auto kksr-align-right kksr-valign-bottom\"\n    data-payload='{&quot;align&quot;:&quot;right&quot;,&quot;id&quot;:&quot;8719&quot;,&quot;slug&quot;:&quot;default&quot;,&quot;valign&quot;:&quot;bottom&quot;,&quot;ignore&quot;:&quot;&quot;,&quot;reference&quot;:&quot;auto&quot;,&quot;class&quot;:&quot;&quot;,&quot;count&quot;:&quot;0&quot;,&quot;legendonly&quot;:&quot;&quot;,&quot;readonly&quot;:&quot;&quot;,&quot;score&quot;:&quot;0&quot;,&quot;starsonly&quot;:&quot;&quot;,&quot;best&quot;:&quot;5&quot;,&quot;gap&quot;:&quot;5&quot;,&quot;greet&quot;:&quot;\u0627\u0645\u062a\u06cc\u0627\u0632 \u062f\u0647\u06cc\u062f!&quot;,&quot;legend&quot;:&quot;0\\\/5 - (0 \u0627\u0645\u062a\u06cc\u0627\u0632)&quot;,&quot;size&quot;:&quot;24&quot;,&quot;title&quot;:&quot;\u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646 \u062f\u0631 OpenCV : \u062c\u0644\u0633\u0647 \u067e\u0646\u062c\u0645&quot;,&quot;width&quot;:&quot;0&quot;,&quot;_legend&quot;:&quot;{score}\\\/{best} - ({count} \u0627\u0645\u062a\u06cc\u0627\u0632)&quot;,&quot;font_factor&quot;:&quot;1.25&quot;}'>\n            \n<div class=\"kksr-stars\">\n    \n<div class=\"kksr-stars-inactive\">\n            <div class=\"kksr-star\" data-star=\"1\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"2\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"3\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"4\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" data-star=\"5\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n    \n<div class=\"kksr-stars-active\" style=\"width: 0px;\">\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n            <div class=\"kksr-star\" style=\"padding-left: 5px\">\n            \n\n<div class=\"kksr-icon\" style=\"width: 24px; height: 24px;\"><\/div>\n        <\/div>\n    <\/div>\n<\/div>\n                \n\n<div class=\"kksr-legend\" style=\"font-size: 19.2px;\">\n            <span class=\"kksr-muted\">\u0627\u0645\u062a\u06cc\u0627\u0632 \u062f\u0647\u06cc\u062f!<\/span>\n    <\/div>\n    <\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u062f\u0631 \u0627\u062f\u0627\u0645\u0647 \u0622\u0645\u0648\u0632\u0634 \u0647\u0627\u06cc \u06cc\u0627\u062f\u06af\u06cc\u0631\u06cc \u0645\u0627\u0634\u06cc\u0646 \u062f\u0631 OpenCV\u060c \u0628\u0647 \u0628\u062d\u062b \u0645\u0627\u0634\u06cc\u0646 \u0647\u0627\u06cc \u0628\u0631\u062f\u0627\u0631 \u067e\u0634\u062a\u06cc\u0628\u0627\u0646 (Support Vector Machine ) \u0645\u06cc \u067e\u0631\u062f\u0627\u0632\u06cc\u0645. SVM \u00a0\u06cc\u06a9\u06cc \u0627\u0632 \u0631\u0648\u0634 \u0647\u0627 \u0648 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0647\u0627\u06cc \u0628\u0633\u06cc\u0627\u0631 \u0645\u062a\u062f\u0627\u0648\u0644 \u062f\u0631 \u062d\u0648\u0632\u0647 \u062f\u0633\u062a\u0647 \u0628\u0646\u062f\u06cc \u062f\u0627\u062f\u0647 \u0627\u0633\u062a \u06a9\u0647 \u0627\u06cc\u0646 \u062f\u0633\u062a\u0647 \u0628\u0646\u062f\u06cc \u0645\u0639\u0645\u0648\u0644\u0627 \u0628\u0647 \u0635\u0648\u0631\u062a \u062e\u0637\u06cc \u0627\u0633\u062a. \u0628\u0647 \u0637\u0648\u0631 \u06a9\u0644\u06cc \u0645\u06cc \u062a\u0648\u0627\u0646 \u06af\u0641\u062a \u06a9\u0647 \u0627\u0644\u06af\u0648\u0631\u06cc\u062a\u0645 \u0645\u0627\u0634\u06cc\u0646 \u0628\u0631\u062f\u0627\u0631 &hellip;<\/p>\n","protected":false},"author":19,"featured_media":8791,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","footnotes":""},"categories":[195,18],"tags":[119,84,147,126],"class_list":["post-8719","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-ml","category-edu","tag-opencv","tag-84","tag-147","tag-126"],"_links":{"self":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/8719","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/comments?post=8719"}],"version-history":[{"count":0,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/posts\/8719\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/media\/8791"}],"wp:attachment":[{"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/media?parent=8719"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/categories?post=8719"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/shahaab-co.com\/mag\/wp-json\/wp\/v2\/tags?post=8719"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}