실시간 영상 대신 촬영한 영상 불러오는 코드. 가로세로줄 뜸
import cv2 import numpy as np cap = cv2.VideoCapture("Rack.mp4") while True: ret, frame = cap.read() if ret is False: break roi = frame[100: 795, 537: 1416] rows, cols, _ = roi.shape gray_roi = cv2.cvtColor(roi, cv2.COLOR_BGR2GRAY) gray_roi = cv2.GaussianBlur(gray_roi, (7, 7), 0) _, threshold = cv2.threshold(gray_roi, 5, 255, cv2.THRESH_BINARY_INV) _, contours, _ = cv2.findContours(threshold, cv..
2021. 1. 19.
Eye motion tracking – Opencv 3 with Python 라즈베리파이
라즈베리파이4에 OpenCV 3.4.3 설치 후 python3으로 라즈베리파이4에서 실행 했을 때 잘 됨. import cv2 import numpy as np cap = cv2.VideoCapture(0) while True: ret, frame = cap.read() roi = frame[269: 795, 537: 1416] rows, cols, _ = roi.shape gray_roi = cv2.cvtColor(roi, cv2.COLOR_BGR2GRAY) gray_roi = cv2.GaussianBlur(gray_roi, (7,7), 0) _, threshold = cv2.threshold(gray_roi, 5, 255, cv2.THRESH_BINARY_INV) _, contours, _ = cv2..
2021. 1. 16.
코드
sample // LCD를 쉽게 제어하기 위한 라이브러리를 추가합니다. #include #include #include #include "DHT.h" #include "module.h" // 0x3F I2C 주소를 가지고 있는 16x2 LCD객체를 생성합니다.(I2C 주소는 LCD에 맞게 수정해야 합니다.) LiquidCrystal_I2C lcd(0x27, 20, 4); DHT dht(2, DHT22); Adafruit_NeoPixel strip = Adafruit_NeoPixel(8, 8, NEO_GRB + NEO_KHZ800); unsigned char rcv[8] = {0,}; unsigned int arr[6] = {0,}; //순서대로 온도, 습도, EC, 미세먼지, CO₂,조도 센서 void ..
2020. 11. 18.
voltage regulator 7805CT
Part Number : 7805CT, MC7805CT, LM7805CT Function : 1A, 5V, Voltage regulator Package : TO 220 type, D2PAK, type Manufactures : ON Semiconductor, Fairchild 7805CT voltage regulator is monolithic integrated circuits designed as fixed−voltage regulators for a wide variety of applications including local, on−card regulation. These regulators employ internal current limiting, thermal shutdown, and s..
2020. 11. 17.