cv.cornerSubPix : 코너 검출 정확도 향상
·
Programming/DIP
OpenCV 라이브러리에서 제공하는 cornerSubPix는 코너 검출의 정확도를 높이기 위해 사용되는 함수임.이 함수는 초기 검출된 코너 위치를 서브픽셀 수준으로 정밀하게 조정하기 위해 사용됨.Function Signaturecv.cornerSubPix( image, # 입력 이미지 (그레이스케일) corners, # 초기 코너 위치들 (numpy array) winSize, # 윈도우 크기 (width, height) zeroZone, # 제외할 중심 영역 크기 (width, height) criteria # 종료 조건 (type, max_iter, epsilon))cornerSubPix 함수는 다음과 같은 인..
[ML] Feature Scaling
·
Programming/ML
Feature ScalingML에서 feature scaling이란 다음을 의미함.input data의 각 feature들의 값이 일정한 범위(a consistent range)나 표준화된 척도(standardized scale)로 변환하는 과정. Feature Scaling은 ML에서모든 feature가 동등하게 training에 기여하도록 보장해주고,raw scale에 상관없이 model이 실제 각 feature가 결과에 미치는 영향력을 제대로 학습하도록 도와줌.Featuer Scaling을 하지 않을 경우,일부 큰 scale을 가지는 features가 모델의 결과에 지나치게 큰 영향력을 가지게 되어편향된 모델로 학습되는 문제점을 가짐.feature에 대한 정의 가 헷갈린다면 다음 접은 글을 확인할 ..
[Statistics] coefficient of determination (결정계수 ~ R squared)
·
Programming/ML
Coefficient of Determination데이터에 대한 현재 regression 모델의 성능(or 적합도)를 평가함 ▷ 1에 가까울수록 좋은 모델임: [0,1]통계 (linear model)에서 사용되는 경우에는 최소값이 0이 보장되나,ML등에서 regression model의 성능 평가에서는 음수도 나올 수 있음(non-linear model인 경우)ML 등에서 regression model이 얼마나 정확하게 data에 fitting 되었는지를 나타냄 (mean만을 사용하는 모델 대비).mean만을 사용하는 단순한 모델 대비 얼마나 우수한지를 Linear model 을 사용하는 Regression Analysis 에서 중요하게 다루는 지표.Squared Correlaton Coefficient..
[DIP] functional plot and image plot.
·
Programming/DIP
functional plot and image plot.Functional plot $f(x,y)$라는  function으로 image를 모델링할 수 있음.2개의 독립변수 $x,y$의 함수로 볼 경우, 3D graphics로 그릴 수 있음.2개의 독립변수에 의해  intensity 또는 brightness가 결정됨.(color 의 경우엔 dependent variable이 여러개로 vector라고 볼 수 있음) 다음은 matplotlib 로 functinal plot 을 수행하는 code snippet 임.from scipy import datasetsimport cv2import numpy as npimport matplotlib.pyplot as pltimg = datasets.face()img_gr..
[ML] Gradient Descent Method: 경사하강법
·
Programming
Gradient Descent Method (경사하강법) : 1. 정의 및 수식Steepest Gradient Descent Method로도 불리는Gradient Descent Method(경사하강법)는 여러 Optimization 방법 중 가장 많이 사용되는 방법들 중 하나임.training set $X$와 현재 $t$에서의 모델의 parameters $\boldsymbol{\omega}_t$의Loss function $L(\boldsymbol{\omega}, X)$에서모델의 parameters $\boldsymbol{\omega}$에 대한 Gradient vector $\nabla_{\boldsymbol{\omega}} L(\boldsymbol{\omega}_t,X)$를 구하고,이 Gradient..
[DIP] Image Quality 관련 정량화 지표들: Resolution, Contrast, SNR
·
Programming/DIP
Image Quality 관련 정량화 지표들: 다음은 Image Restoration등에서 사용되는 Image Quality를 나타내는 정량적 지표들에 대한 간략한 소개임.(image acquisition에 사용된 장비의 성능의 비교에도 사용됨) 참고로 이 문서에서 다룬 지표들과 달리 ideal image가 존재하는 경우엔 해당 ideal image와의 비교를 통해 얼마나 차이가 나는지를 정량화하는 경우도 있음. 이들 지표들에 대해선 다음 URL를 참고.https://dsaint31.me/mkdocs_site/DIP/cv2/etc/dip_metrics/ BME228Metrics for Image Quality Image restoration의 경우, image degradation의 원인을 modelin..