'잡동사니'에 해당되는 글 13315건

  1. 2024.03.04 입학식
  2. 2024.03.03 유난히 힘든 하루
  3. 2024.03.02 생일 파티 part 2 + 웹캠지름
  4. 2024.03.01 생일 파티 part 1
  5. 2024.02.29 소득공제 공부 ㅠ
  6. 2024.02.29 systemd 지연된 시작
  7. 2024.02.28 cv2.ximgproc 없을 경우
  8. 2024.02.28 cv2.stereoBM + WLS
  9. 2024.02.28 matplotlib animation
  10. 2024.02.27 pip 패키지 관리

입학식이라서 갔는데 항상 그렇지만(?)

교장/교감 훈화말씀은 핵노잼 -_ㅠ

게임이라면 skip 누르라고 만든 튜토리얼이라는 느낌마저 든다.

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

병원, 이발  (0) 2024.03.16
지름  (0) 2024.03.10
유난히 힘든 하루  (0) 2024.03.03
생일 파티 part 2 + 웹캠지름  (0) 2024.03.02
생일 파티 part 1  (0) 2024.03.01
Posted by 구차니

개 두마리 씻기고

세차하고

빨래개고, 설겆이하고, 밥하고, 빨래하고

팔이 아릴 정도로 고생을 한 기분..

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

지름  (0) 2024.03.10
입학식  (0) 2024.03.04
생일 파티 part 2 + 웹캠지름  (0) 2024.03.02
생일 파티 part 1  (0) 2024.03.01
주말이 짧다  (0) 2024.02.25
Posted by 구차니

딸래미 생일 2번째!

오리고기는 언제나 맛있다!

 

강건너가서 조이트론 HD20 지르고 옴

잘 켜지면 좋겠네.. 귀찮..

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

입학식  (0) 2024.03.04
유난히 힘든 하루  (0) 2024.03.03
생일 파티 part 1  (0) 2024.03.01
주말이 짧다  (0) 2024.02.25
으윽 비가 온다.  (0) 2024.02.18
Posted by 구차니

어우.. 빡세다

내일도 한번 더 해줘야 하다니.

'개소리 왈왈 > 육아관련 주저리' 카테고리의 다른 글

유난히 힘든 하루  (0) 2024.03.03
생일 파티 part 2 + 웹캠지름  (0) 2024.03.02
주말이 짧다  (0) 2024.02.25
으윽 비가 온다.  (0) 2024.02.18
피곤모드  (0) 2024.02.12
Posted by 구차니

이제와서 하다니 흑흑

 

 

소득공제 - 인적공제, 카드, 현금영수증 (총 급여액 깍기)

세액공제 - 보험, 의료, 교육 (산출 세액 깍기)

[링크 : https://www.kakaobank.com/bank-story/12]

'개소리 왈왈 > 직딩의 비애' 카테고리의 다른 글

지하철 연...착?  (0) 2024.04.17
ㄹ미ㅏㄴ어리ㅏㅁㄴ어리ㅏㄴㅁ어리ㅏ  (0) 2024.03.06
소득공제?  (0) 2024.02.13
으아아아아아  (0) 2024.01.24
개 피곤  (0) 2024.01.12
Posted by 구차니
Linux2024. 2. 29. 11:54

 

[Service]
ExecStartPre=/bin/sleep 30

[링크 : https://stackoverflow.com/questions/43001223/]

'Linux' 카테고리의 다른 글

Block SCSI generic (bsg) driver  (0) 2024.04.16
lsusb -v 로 본 장치(HID MT, mouse)  (0) 2024.03.08
btrfs fsck  (0) 2024.02.13
리눅스 파일 시스템 캐싱  (0) 2024.01.09
multitail / tail  (2) 2023.10.18
Posted by 구차니

contrib 패키지를 설치해주면 해결!

오늘자 기준으로 한 63MB 정도 된다. 꽤나 큰 편 인 듯

$ python3 depth.py 
Traceback (most recent call last):
  File "/home/minimonk/src/DisparityMapfromStereoPair/depth.py", line 17, in <module>
    right_matcher = cv.ximgproc.createRightMatcher(left_matcher);
AttributeError: module 'cv2' has no attribute 'ximgproc'

$ pip install opencv-contrib-python

[링크 : https://stackoverflow.com/questions/57427233/module-cv2-cv2-has-no-attribute-ximgproc]

'Programming > python(파이썬)' 카테고리의 다른 글

docker를 이용하여 python 에서 opencv 돌리기  (0) 2024.05.08
python thread event  (0) 2024.03.05
cv2.stereoBM + WLS  (0) 2024.02.28
matplotlib animation  (0) 2024.02.28
pip 패키지 관리  (0) 2024.02.27
Posted by 구차니

matplotlib을 3d로 그려보는 것 까지 통합완료. 이제 SGBM만 해보면 될 듯

WLS 필터 미적용 WLS 필터 적용

 

 

import numpy as np
import cv2 as cv
from matplotlib import pyplot as plt
imgL = cv.imread('tsukuba_l.png', cv.IMREAD_GRAYSCALE)
imgR = cv.imread('tsukuba_r.png', cv.IMREAD_GRAYSCALE)
max_disparity=16
stereo = cv.StereoBM_create(max_disparity, blockSize=15)
disparity = stereo.compute(imgL,imgR)

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

# X, Y 좌표 생성
height, width = imgL.shape
x = np.arange(0, width, 1)
y = np.arange(0, height, 1)
x, y = np.meshgrid(x, y)

# 깊이 맵을 사용하여 Z 좌표 생성
z = disparity

# 3D 그래프에 표시
ax.plot_surface(x, y, z, cmap='viridis')

plt.show()

# WLS 필터 적용
right_matcher = cv.ximgproc.createRightMatcher(stereo);
left_disp = stereo.compute(imgL, imgR);
right_disp = right_matcher.compute(imgR, imgL);

# Now create DisparityWLSFilter
wls_filter = cv.ximgproc.createDisparityWLSFilter(stereo);

sigma = 1.5
lmbda = 8000.0

wls_filter.setLambda(lmbda);
wls_filter.setSigmaColor(sigma);
filtered_disp = wls_filter.filter(left_disp, imgL, disparity_map_right=right_disp);

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')

z = filtered_disp

# 3D 그래프에 표시
ax.plot_surface(x, y, z, cmap='viridis')

plt.show()

 

'Programming > python(파이썬)' 카테고리의 다른 글

python thread event  (0) 2024.03.05
cv2.ximgproc 없을 경우  (0) 2024.02.28
matplotlib animation  (0) 2024.02.28
pip 패키지 관리  (0) 2024.02.27
pyhthon numpy 생략없이 출력  (0) 2024.02.26
Posted by 구차니

 

 

[링크 : https://matplotlib.org/stable/api/animation_api.html]

 

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation

fig, ax = plt.subplots()
xdata, ydata = [], []
ln, = plt.plot([], [], 'ro')

def init():
    ax.set_xlim(0, 2*np.pi)
    ax.set_ylim(-1, 1)
    return ln,

def update(frame):
    xdata.append(frame)
    ydata.append(np.sin(frame))
    ln.set_data(xdata, ydata)
    return ln,

ani = FuncAnimation(fig, update, frames=np.linspace(0, 2*np.pi, 128),
                    init_func=init, blit=True)
plt.show()

[링크 : https://pythonprogramming.net/python-matplotlib-live-updating-graphs/]

[링크 : https://stackoverflow.com/questions/11874767/how-do-i-plot-in-real-time-in-a-while-loop]

 

+ 2024.03.14

import cv2
import matplotlib.pyplot as plt

def grab_frame(cap):
    ret,frame = cap.read()
    return cv2.cvtColor(frame,cv2.COLOR_BGR2RGB)

#Initiate the two cameras
cap1 = cv2.VideoCapture(0)
cap2 = cv2.VideoCapture(1)

#create two subplots
ax1 = plt.subplot(1,2,1)
ax2 = plt.subplot(1,2,2)

#create two image plots
im1 = ax1.imshow(grab_frame(cap1))
im2 = ax2.imshow(grab_frame(cap2))

plt.ion()

while True:
    im1.set_data(grab_frame(cap1))
    im2.set_data(grab_frame(cap2))
    plt.pause(0.2)

plt.ioff() # due to infinite loop, this gets never called.
plt.show()

[링크 : https://stackoverflow.com/questions/44598124/update-frame-in-matplotlib-with-live-camera-preview]

 

matplotlib.pyplot.ion()[source]
Enable interactive mode.

See pyplot.isinteractive for more details.

See also

ioff
Disable interactive mode.

isinteractive
Whether interactive mode is enabled.

show
Show all figures (and maybe block).

pause
Show all figures, and block for a time.

[링크 : https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.ion.html]

'Programming > python(파이썬)' 카테고리의 다른 글

cv2.ximgproc 없을 경우  (0) 2024.02.28
cv2.stereoBM + WLS  (0) 2024.02.28
pip 패키지 관리  (0) 2024.02.27
pyhthon numpy 생략없이 출력  (0) 2024.02.26
matplotlib grayscale image to 3d graph  (0) 2024.02.22
Posted by 구차니

pip도 아래 명령들을 이용하면 현재 패키지 버전들을 저정하고, 필요한 버전들을 설치할 수 있다.

python 프로젝트들이 나중에 버전이 꼬여서 난리나는거 보면

필수적인데 왜 다들 안쓸까..

 

pip list
pip freeze > requirements.txt

[링크 : https://intelloper.tistory.com/53]

 

pip install -r requirements.txt

[링크 : https://itholic.github.io/python-requirements/]

'Programming > python(파이썬)' 카테고리의 다른 글

cv2.stereoBM + WLS  (0) 2024.02.28
matplotlib animation  (0) 2024.02.28
pyhthon numpy 생략없이 출력  (0) 2024.02.26
matplotlib grayscale image to 3d graph  (0) 2024.02.22
python tcp 서버 예제  (0) 2024.01.22
Posted by 구차니