일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- Vue.js
- hash table
- Algorithm
- SQL
- DFS
- spring boot
- boj
- JavaScript
- aws
- 구현
- SWEA
- 시뮬레이션
- 코테
- gpdb
- 모의SW역량테스트
- Trie
- Bruth Force
- Back tracking
- 코딩테스트
- Priority Queue
- Python
- 알고리즘
- django
- Linked list
- 알고리듬
- BFS
- CSV
- programmers
- GitHub
- Data Structure
- Today
- Total
목록opencv (3)
hotamul의 개발 이야기

Github - OpenCV에서 data/haarcascades/haarcascade_frontalface*.xml 이름의 파일들이 있는데 이 xml 파일을 복사/다운로드 해서 아래와 같이 얼굴 인식을 테스트 해볼 수 있다. 저는 haarcascade_frontalface_default.xml을 이용해서 진행했다. # detectMultiScale Signature cv.CascadeClassifier.detectMultiScale(image\[, scaleFactor\[, minNeighbors\[, flags\[, minSize\[, maxSize]]]]] -> objects 참고: OpenCV - CascadeClassifier detectMultiScale 메소드 인자인 scaleFactor와 m..
Interpolation Methods for resizing cv2.INTER_AREA: 주로 이미지 크기를 줄이는데 사용한다. cv2.INTER_CUBIC: 속도는 느리지만 Interpolation 성능이 좋다. cv2.INTER_LINEAR: 주로 이미지 크기를 늘리는데 사용하고 OpenCV의 default Interpolation method이다. 참고: OpenCV - InterpolationFlags Shrink & Enlarge Image $ pip install opencv-python-headless numpy import numpy as np import cv2 # loading image img = cv2.imread('./testimg.jpg') # shrinking ..
image 파일을 numpy.ndarray로 불러오는 방법은 3가지가 있다. OpenCV $ pip install opencv-python-headless import cv2 img_cv = cv2.imread('./testimg.jpg') print(img_cv) [[[ 21 48 92] [ 19 46 90] [ 16 42 88] ... [ 0 14 13] [ 0 11 10] [ 0 15 14]] [[ 17 44 88] ... OpenCV의 imread는 BGR (Blue, Green, Red) 순서의 numpy.ndarray를 리턴한다. matplotlib.image $ pip install matplotlib import matplotlib.image as matimg img_mat ..