본문 바로가기

OpenCV6

운동자세 판별 딥러닝 프로젝트 (OpenCV, Numpy, Pandas, TensorFlow) 프로젝트 상세 분석 및 설명  1. 데이터 준비 및 전처리코드 블록:root_dir = 'dataset/train'img_path_list = []possible_img_extension = ['.jpg', '.jpeg', '.JPG', '.bmp', '.png']for (root, dirs, files) in os.walk(root_dir): if len(files) > 0: for file_name in files: if os.path.splitext(file_name)[1] in possible_img_extension: img_path = root + '/' + file_name img_path = img_.. 2024. 8. 31.
운동자세 인식 프로젝트 사전 준비 및 공부 CNN은 이미지 인식 작업에 널리 사용되며 자세 인식을 비롯한 다양한 응용 분야에서 우수한 성능을 보여 왔다. ✔ 전처리 방식import cv2 import os # 운동 자세 이미지가 있는 디렉토리 경로 지정 image_dir = "/path/to/exercise/posture/images" # 디렉토리 내의 모든 이미지 파일에 대해 반복 for filename in os.listdir(image_dir): if filename.endswith(".jpg") or filename.endswith(".png"): # 필요에 따라 파일 확장자 조정 image_path = os.path.join(image_dir, filename) image = cv2.imread(image_path) # 이미지 로드 im.. 2023. 4. 9.
테서렉트 예제 ✔ 예제1 import cv2 img = cv2.imread('hat.png') cpy = img.copy() gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) _, thr = cv2.threshold(gray, 127, 255, cv2.THRESH_BINARY) contour, _ = cv2.findContours(thr, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE) print(contour) cnt = contour[1] cv2.drawContours(img, [cnt], -1, (255, 0, 0), 2) check = cv2.isContourConvex(cnt) if not check: hull = cv2.convexHull(cnt) cv2.. 2023. 3. 17.
테서렉트 설치(사전준비) 테서랙트란? 테서랙트는 다양한 운영 체제를 위한 광학 문자 인식 엔진이다. 이 소프트웨어는 Apache License, 버전 2.0, 에 따라 배포되는 무료 소프트웨어이며 2006년부터 Google에서 개발을 후원했다 ✔ 다운로드 주소 테서렉트 다운로드 http://github.com/UB-Mannhein/tesseart/wiki ✔ 설치 버전 2023-03-15일 기준 tesseract-ocr-w64-setup-5.3.0.20221222.exe (64 bit) resp. 다운로드 - 설치중 Additional script data 항목에서 'Hangul Script', 'Hangul vertical Script' 항목 체크 - Additonal language data 항목에서 'Korean' 항목 체.. 2023. 3. 16.