Skip to content

Instantly share code, notes, and snippets.

View insung3511's full-sized avatar
๐Ÿช–
On army

๋ฐ•์ธ์„ฑ (InSung Bahk) insung3511

๐Ÿช–
On army
View GitHub Profile
@composite
composite / jumin.js
Last active December 20, 2023 09:22
์ฃผ๋ฏผ๋“ฑ๋ก๋ฒˆํ˜ธ ์ƒ์„ฑ๊ธฐ (์ฃผ๋ฏผ๋ฒˆํ˜ธ ๋กœ์ง ๋“ค์–ด๊ฐ€๋Š” ์–‘์‹ ํ…Œ์ŠคํŠธ์šฉ. ๊ฐœ๋ฐœ ์™ธ ๋ชฉ์  ์‚ฌ์šฉ ๊ธˆ์ง€, ์ด ํ”„๋กœ๊ทธ๋žจ ์‚ฌ์šฉ์— ๋Œ€ํ•œ ๋ฒ•์  ์ฑ…์ž„ ์ผ์ฒด ์—†์Œ.)
/**
* ์ฃผ๋ฏผ๋ฒˆํ˜ธ ์ƒ์„ฑ๊ธฐ
* ์‚ฌ์šฉ์˜ˆ) jumin()
* jumin({year:1990, month:3, day: 12, loop: 10}); //1990๋…„ 3์›” 12์ผ์ƒ 10๊ฐœ ์ฃผ๋ฏผ๋ฒˆํ˜ธ ์ƒ์„ฑ.
* ํ™•์ธ์˜ˆ) jumin.verify(ํ™•์ธํ•  ์ฃผ๋ฏผ๋ฒˆํ˜ธ) ํ™•์ธํ•  ์ฃผ๋ฏผ๋ฒˆํ˜ธ๋Š” - ์žˆ์–ด๋„ ์—†์–ด๋„ ๋ฌด๊ด€. 13์ž๋ฆฌ๋งŒ ๋งž์ถ”๋ฉด ๋จ.
* @param {object} options ์˜ต์…˜
* year: ๋…„๋„, ๋นˆ ๊ฐ’์œผ๋ฉด ๋žœ๋ค
* month: ์›”, ๋นˆ ๊ฐ’์ด๋ฉด ๋žœ๋ค
* day: ์ผ, ๋นˆ ๊ฐ’์ด๋ฉด ๋žœ๋ค
* loop: ์ƒ์„ฑ๊ฐœ์ˆ˜, ๋นˆ ๊ฐ’์ด๋ฉด 1๊ฐœ ์ƒ์„ฑ.
@lanius
lanius / reconstruct.py
Last active December 13, 2023 00:59
3D reconstruction from stereo images in Python
# -*- coding: utf-8 -*-
import argparse
import cv2
import numpy as np
def calc_disparity(left_image, right_image):
window_size = 3
import cv2
import time
hog = cv2.HOGDescriptor()
hog.setSVMDetector(cv2.HOGDescriptor_getDefaultPeopleDetector())
cap = cv2.VideoCapture("/path/to/test/video")
while True:
r, frame = cap.read()
if r:
start_time = time.time()