일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- boj
- 알고리즘
- 알고리듬
- Data Structure
- 구현
- BFS
- hash table
- Bruth Force
- Python
- DFS
- JavaScript
- Priority Queue
- django
- 코딩테스트
- programmers
- 코테
- Algorithm
- gpdb
- 모의SW역량테스트
- GitHub
- SWEA
- CSV
- SQL
- spring boot
- aws
- 시뮬레이션
- Linked list
- Trie
- Back tracking
- Vue.js
- Today
- Total
목록Dev./Python (15)
hotamul의 개발 이야기
>>> number = 123 >>> number 123 >>> del number >>> number Traceback (most recent call last): File "", line 1, in NameError: name 'number' is not defined Python에서 del keyword를 사용하면 위와 같이 number은 더 이상 사용할 수 없게 된다. number에 접근하려고 하면 더 이상 해당 변수가 없기 때문에 NameError가 발생한다. 하지만 del은 객체를 제거하는 것이 아니라 변수와 같은 reference를 제거하는 것이 주요 목표이다. 다음 이상한 예시를 확인해 보자. >>> class MyClass: ... def __del__(self): ... print("M..

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 ..
보호되어 있는 글입니다.
보호되어 있는 글입니다.
보호되어 있는 글입니다.
보호되어 있는 글입니다.
보호되어 있는 글입니다.
보호되어 있는 글입니다.