[CE] Introduction of WSL
·
Programming
Windows Subsystem for Linux : Linux용 Windows 하위 시스템.Windows OS를 사용하는 사용자 및 개발자가GNU/Linux용 Software 혹은 개발툴을 사용해야 하는 경우, (opensource의 강력함 때문에 linux를 사용해야하는 경우가 많다)기존에는 다음과 같은 방법을 사용함.Virtual Machine S/W를 이용하여 Host의 Windows OS에서 가상 GNU/Linux 장비를 생성하고 이를 이용. (이 경우, 모든 HW를 virtualization 하므로 overhead가 큼.)Dual Booting을 통해, 한 장비에 Windows OS와 GNU/Linux를 설치. (각 OS를 사용하려면 다시 부팅시켜야 함. 정말 귀찮다)GNU/Linux 에뮬레이..
[DIP] Image Format (summary)
·
Programming/DIP
Digital Image 들의 대표적인 encoding 방식들은 다음과 같음:더보기encoding 과 decoding에 대한 일반적 정의:https://dsaint31.me/mkdocs_site/CE/ch01/code_for_character/#code-encoding BMECodes for Characters Code 란 특정 형태의 information을 다른 방법으로 표현하는 규칙 또는 해당 규칙으로 표현된 결과물 을 가르킴. 문자를 나타내기 위한 code는 인간이 사용하는 문자 를 일종의 기호 또dsaint31.me BMP (Bitmap):비트맵(bitmap) 방식. extension(확장자)가 bmp임.압축도 가능하나 주로 압축되지 않는 방식으로 많이 사용됨 (1998년 Windows2.0과 함..
openCV : cv2.waitKey bug
·
Programming
아래 글은 WSL2에서 WSLg의 버전이 낮을 경우 발생함. WSL에서의 2022.10 당시 위의 문제를 해결한 상태임. 다음 글 참조. https://bme808.blogspot.com/2022/10/cv2waitkey-wsl.html cv2.waitkey 가 wsl에서 잘 안동작하던 문제 해결. 결론부터 애기하면, wslg version이 낮아서 발생한 문제였음. WSLg 버전이 1.0.45 로 업그레이드하면 해당 에러는 해결됨. 설치를 위해선 Windows Subsystem for Linux Preview 설치(MS store... bme808.blogspot.com 업그레이드를 할 수 없는 경우라면 다음을 참고(근원적인 해결이 아닌 순간적인 모면책에 불과함). WSL2에서 openCV를 이용한 간..
[DIP] Deconvolution: Richardson-Lucy deconvolution algorithm
·
Programming/DIP
Deconvolution : Richardson-Lucy deconvolution algorithmImage Restoration의 대표적인 예이기도 함. Blurring을 결정하는 PSF (blur kenel이라고도 불림)가 알려진 경우 사용되는 non-blind deblurring algorithm의 대표적 기법.The algorithm is based on a PSF (Point Spread Function), where PSF is described as the impulse response of the optical system.The blurred image is sharpened through a number of iterations, which needs to be hand-tuned.단점..
[NumPy] Fancy Indexing & Combined Indexing
·
Programming/DIP
IndexingNumPy에서 indexing은 4+1 가지 방식을 따름.scalar를 이용한 indexing ( simple indexing ) : array[0]slicingboolean mask : array[array > 1]fancy indexing : vectorized indexing. index들을 element로 가지는 array를 넘겨줌.combined indexing : 앞서 4가지가 조합된 indexingfancy indexing의 경우, PyTorch 에서는 Tensor-based Indexing 또는 Advanced Indexing이라고도 불림. scalar를 이용한 indexing과 slicing, boolean mask를 이용한 indexing은 다음 글을 참고: https:/..
[DIP] OpenCV : Region of Interest (ROI) : Callback으로 구현.
·
Programming/DIP
cv2.selectROI가 아닌 이벤트 핸들러(MouseCallback)를 이용한 구현임.x button (or close button)을 지원하기 위한 구현을 추가.x 키를 누를 경우, roi를 보여주는 창만 닫히도록 처리함.esc 키를 누를 경우, 프로그램 종료.import cv2import numpy as npis_dragging = Falsex0,y0 = -1,-1w0,h0 = -1,-1red = (0,0,255)exit_roi = Falseimport osd_path = os.path.dirname(__file__)f_path = os.path.join(d_path,"lena.png")def onMouse(event, x, y, flags, param): global is_dragging ..