분류 전체보기
-
opencv의 interpolation option, INTER_LINEAR / INTER_AREA 차이영상처리 2024. 2. 26. 20:18
image를 해상도 변환하는 과정에서 interpolation option을 설정해줄 수 있다. 그 중, INTER_LINEAR 옵션과 INTER_AREA 옵션이 의미가 비슷하여 헷갈리기 쉽다. import cv2 img=cv2.imread('inputs/20240222_190925.jpg') img_interlinear=cv2.resize(img,(300,400),interpolation=cv2.INTER_LINEAR) img_interarea=cv2.resize(img,(300,400),interpolation=cv2.INTER_AREA) cv2.imwrite('interlinear.jpg',img_interlinear) cv2.imwrite('interarea.jpg',img_interarea) c..
-
야경 사진 노이즈 제거영상처리/3D computer vision 2024. 2. 22. 23:26
야경 사진을 여러장 찍어서 denoising하는 코드를 만들었다. 1. 먼저 여러장의 사진을 최대한 같은 위치에서 찍었다. 2. ORB feature를 이용, 영상간 homography 변환을 추출, warping을 수행한다. 3. warping 된 영상을 유사도 기반으로 weight를 주어 합친다. import torch import cv2 import numpy as np import os In [ ]: ref_img=cv2.imread('20240222_190925.jpg') h=ref_img.shape[0] w=ref_img.shape[1] In [ ]: orb = cv2.ORB_create() bf = cv2.BFMatcher(cv2.NORM_HAMMING, crossCheck=True) In ..
-
numpy array slicing이 원본 크기를 넘어 섰을 때python 기초 2024. 1. 1. 00:11
numpy array를 slicing하는 데, 원본 크기보다 더 큰 범위를 slicing하여도 원데이터를 벗어나지 않는 크기로 slicing을 한다는 것을 알았다. 아래와 같이 array를 만들고 위치를 slicing하면 해당 위치의 값이 나온다. import numpy as np a=np.array([[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,32,33,34,35,36,37,38,39,40]]) print(a[1:4,3:5]) 아래와 같이 해당 위치의 sub array가 나오게 된다. [[14 15] [24 25] [34 35]] 이 때, slicing하는 범위가 기존 array..
-
pillow-simd install 에러python 기초 2023. 12. 18. 22:53
Pillow-SIMD 설치시 에러가 해결되지 않을때 아래의 경로에서 whl 파일을 바로 받아서 설치하니 해결 되었다. https://www.lfd.uci.edu/~gohlke/pythonlibs/#pillow-simd Archived: Python Extension Packages for Windows - Christoph Gohlke Archived: Python Extension Packages for Windows - Christoph Gohlke by Christoph Gohlke. Updated on 26 June 2022 at 07:27 UTC. This page provides 32 and 64-bit Windows binaries of many scientific open-source ex..
-
Handheld Multi-Frame Super-Resolution (2019)영상처리/3D computer vision 2023. 11. 23. 21:36
multi-frame super resolution 기술을 mobile phone에 이용한 기술에 대한 연구이다. 사용자의 손떨림에 의해, 핸드폰 카메라의 영상이 추가적인 sampling이 되며 이를 이용해 demosaic + Noise Reduction + Super resolution을 수행한다. .위와 같은 구조로 구동된다. - Local gradients와 Kernels은 Edge conservation을 위해 사용된다. (gradient가 큰 방향으로는 kernel의 크기를 줄임) - Alignment Vectors (optical flow)와 local statistics (영상의 local deviation 대비 frame간 color 차이) 를 통해 해당 optical flow의 신뢰도 기..
-
cupy util import errorpython 기초 2023. 11. 14. 21:51
opensource를 돌리는 과정에서 "No module named 'cupy.util' " 와 같은 에러가 발생했다. 아래를 참조해보면, cupy 버전이 바뀌면서 생긴 문제같다. cupy._util로 해당 코드를 바꾸면 동작한다고 한다. https://stackoverflow.com/questions/66421447/chainer-no-module-named-cupy-util Chainer: No module named 'cupy.util'` I am getting desperate with Chainer because I'm not able to use it with GPU for about a week now. The error I am getting: RuntimeError: CUDA enviro..