YIFAN-888 / GRP_1

Version 1.0.2
2 stars 3 forks source link

これからのやること #15

Open wanghaibo325 opened 2 years ago

wanghaibo325 commented 2 years ago

二人OpenCVを勉強續きます。のごり二人はWindow実装の方法を試します。

YIFAN-888 commented 2 years ago

Pyinstallerでexe化の参考資料; https://www.youtube.com/watch?v=ZfTbvGh9vUw

shiodomeyuio commented 2 years ago

ドキュメントの走査と識別 step 1: 側の検索 step 2: 輪郭を読み込む step 3: 変換

def resize(image, width=None, height=None, inter=cv2.INTER_AREA): dim = None (h,w) = image.shape[:2] if width is None and height is None: return image if width is None: r = height / float(h) dim = (int(w * r). height) else: r = width / float(w) dim = (width, int(h * r)) resized = cv2.resize(image, dim, interpolation=inter) return resized

image = cv2.imread(args["image"])

ratio = image.shape[0] / 500.0 orig = image.copy()

image = resize(orig, height = 500)

gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) gray = cv2.GaussianBlur(gray,(5,5),0) edged = cv2.Canny(gray,75,200)

print(" STEP 1") cv2.imshow("Image",image) cv2.imshow("Edged",edged) cv2.waitKey(0) cv2.destroyAllWindows()

cnts = cv2.findContours(edged.copy(), cv2.RETR_LIST, cv2.CHAIN_APPROX_SIMPLE)[1] cnts = sorted(cnts, key = cv2.contourArea, reverse = True)[:5]

for c in cnts:

 peri = cv2.arcLength(c,  True)

 approx = cv2.approxPolyDP(c, 0.02 * peri, Ture)

 if  len(approx) == 4:
      screenCnt = approx
      break

print("STEP 2:輪郭をとる") cv2.drawContours(image, [screenCnt], -1, (0,255,0), 2) cv2.imshow("OutLine",image) cv2.waitKey(0) cv2.destroyAllWindows()

wanghaibo325 commented 2 years ago

開発概要   ●必要ものはpythoncharm ,svm , knn。 svm(サポートベクターマシンは、現在知られている手法の中でも認識性能が優れた学習モデルの一つである。サポートベ クターマシンが優れた認識性能を発揮することができる理由は、未学習データに対して高い識別性能を得るための工夫が あるためである。) knn(k近傍法は、インスタンスに基づく学習の一種であり、怠惰学習(英語: lazy learning) の一種である。) ●データ収集:まず私たち四人のジェスチャーを収集します。  ●OpenCV画像処理ー  ●特徴計算ー  ●データ集作るー  ●まとめ学習ー ●認識ー  ●GUI画面(コンピューターの画面上に表示されるウィンドウやアイコン、ボタン、プルダウンメニューなどを使い、マウスなどのポインティングデバイスで操作できるインターフェース。これに対して、文字によるコマンド入力方式のインターフェースは「CUI(Character User Interface)」と呼ばれる。現在のパソコンのインターフェースは、ほぼすべてGUIを採用している。)

shiodomeyuio commented 2 years ago

https://www.jb51.net/article/184759.html 参考資料

wanghaibo325 commented 2 years ago

https://www.bilibili.com/video/BV1Hs411w7ci?from=search&seid=13703465173405250799&spm_id_from=333.337.0.0 機械学習の学習動画