1. 문제 배경 및 기존 방식의 한계

1.1 3D 인체 모델링의 필요성

  • 컴퓨터 비전컴퓨터 그래픽스 분야에서는 3D 사람 모델이 매우 중요한 역할을 함.
    • 예: 애니메이션, 동작 분석(Motion Capture), 가상 피팅(Virtual Try-On), AR/VR 등.
  • 목표: 실제 사람들의 **다양한 체형(Shape)**과 다양한 자세(Pose) 변화를 하나의 통합 모델로 표현하고자 함.

1.2 기존 모델의 문제점

  • SCAPE(Anguelov et al. 2005) 등 과거 모델은 사람 표면 변형을 표현할 수 있지만,
    • 구현 복잡도와 계산 비용이 큼.
    • Pose 변화, Shape 변화가 비선형적으로 뒤섞여서 처리하기 번거로움.
  • Blend Shape 기반 모델들도 존재하지만, 정확한 체형·자세 분리를 효율적으로 구현하기가 쉽지 않음.

2. SMPL의 핵심 개념

SMPL(Skinned Multi-Person Linear model)은 **Linear Blend Skinning(LBS)**을 기반으로,

  • (1) Shape 파라미터 β\beta: 사람마다 다른 체형(Height, Body proportions 등)을 표현
  • (2) Pose 파라미터 θ\theta: 관절 회전(각도)으로 인한 신체 표면 변형을 표현
    이 두 가지를 선형(linear) 형태로 융합하여, 다양한 사람의 자세 + 체형을 하나의 일관된 메시(Mesh)로 재현.

2.1 모델 정의

SMPL은 **단일 메쉬(Topology가 고정된 약 6890개 버텍스)**를 사용:

  1. Template Mesh T\mathbf{T}
    • 기준자세(예: A-포즈나 T-포즈)에 있는 중립형(중성 자세)의 사람 메쉬.
    • 버텍스 개수 N=6890N = 6890이며, 삼각형 패치(면) 연결 구조는 고정.
  2. Shape Blend Shapes
    • 체형 파라미터 β\beta (보통 10~20차원 사용)에 따라 메쉬가 변형되는 선형 모델.
    • Tshape(β)  =  T  +  ∑i=1∣β∣βi Si \mathbf{T}_{\text{shape}}(\beta) \;=\; \mathbf{T} \;+\; \sum_{i=1}^{|\beta|} \beta_i \,\mathbf{S}_i 여기서 Si\mathbf{S}_iShape Blend Shape(각 체형 주성분)에 해당하는 (3N)(3N)-차원 벡터.
  3. Pose Blend Shapes
    • Pose 파라미터 θ\theta (보통 3*(Joint수) = 72차원 등)를 통해 관절 회전에 의한 세부적인 근육·체표 변형을 선형 보정.
    • Δpose(θ)  =  ∑j=1KBj Rj(θ) \Delta_{\text{pose}}(\theta) \;=\; \sum_{j=1}^{K} B_j \,R_j(\theta)
      • KK: 관절 개수.
      • BjB_j: 관절 jj에 대응하는 Pose Blend Shape.
      • Rj(θ)R_j(\theta): 관절 jj 회전에 따른 어떤 사전 정의된 함수(회전 행렬에서 유도되는 특징 벡터 등).
    • 이를 통해, 팔을 굽힐 때 특정 근육 부위가 튀어나오는 등 미세한 Pose 기반 변형을 단순화된 선형 결합으로 모델링.
  4. Linear Blend Skinning (LBS)
    • 각 버텍스를 여러 관절에 가중치(Skinning weight)로 매핑하고, 관절 회전에 따라 해당 버텍스가 선형적으로 따라가도록 함.
    • 최종적으로 vi\mathbf{v}_i번째 버텍스는 vi(β,θ)=∑j=1Kwij Gj(θ)(Tshape(β)i+Δpose(θ)i) \mathbf{v}_i(\beta, \theta) = \sum_{j=1}^{K} w_{ij} \,G_j(\theta) \left(\mathbf{T}_{\text{shape}}(\beta)_i + \Delta_{\text{pose}}(\theta)_i\right)
      • wijw_{ij}: 버텍스 ii가 관절 jj에 할당되는 스키닝 가중치(모두 합하면 1).
      • Gj(θ)G_j(\theta): 관절 jj의 전역 변환(회전 + 위치) 행렬.

결과적으로 SMPL은,

SMPL(β,θ)  =  LBS ⁣(T,β,θ,S,B,W)\text{SMPL}(\beta, \theta) \;=\; \text{LBS}\!\bigl(\mathbf{T}, \beta, \theta, \mathbf{S}, \mathbf{B}, \mathbf{W}\bigr)

형태로 사람이 취할 수 있는 다양 형태/자세를 선형 블렌딩으로 표현한다.


3. 학습 데이터와 파라미터 추정 과정

3.1 데이터 확보

  • 주로 3D 스캐너(예: CAESAR 데이터 등)로부터 수백~수천 명 이상의 전신 스캔을 취득.
  • 각 스캔은 다른 사람, 다른 자세를 포함.

3.2 Template 정렬(Non-rigid Registration)

  • 모든 스캔 데이터를 **동일한 위상(topology)**의 템플릿 메쉬와 정합(Registration)해야 함.
    • 보통 non-rigid ICP(Iterative Closest Point)나 특수 소프트웨어(Fitting pipeline) 사용.
    • 스캔 마다 표면 점 위치가 다르지만, 궁극적으로 동일한 N=6890N=6890 버텍스 인덱스에 맵핑되도록 함.

3.3 Shape Blend Shapes 추출

  • 각기 다른 사람들(다른 체형)을 중립 자세로 노멀라이즈한 뒤, 평균 모델 T\mathbf{T}에서 편차를 PCA 등으로 분해해 Shape Basis(Si\mathbf{S}_i)를 학습.
  • 예: S1\mathbf{S}_1은 “키가 커지는” 주성분, S2\mathbf{S}_2는 “몸통이 두꺼워지는” 주성분 등.

3.4 Pose Blend Shapes 추출

  • 서로 다른 자세를 취한 데이터에서, 단순 LBS만으로 보정되지 않는 추가 표면 변형을 관절 회전에 대한 “블렌드 셰이프”로 학습.
  • 관절 θ\theta 별로 잔차(Residual)를 모아 선형회귀나 주성분 분석으로 Bj\mathbf{B}_j를 구함.

3.5 Skinning Weights(W\mathbf{W})

  • 버텍스-관절 간 가중치는 일반적으로 거리 기반 초기화 후, 최적화/학습을 통해 세부 조정.
  • 합이 1이 되도록 정규화.

4. 모델의 장점과 특성

  1. 통합적(Shape + Pose) 파라메트릭 모델
    • β\beta체형, θ\theta자세로 구분되어 직관적.
    • 비선형 복잡도를 줄이고, 선형 결합 구조로 계산 간소화.
  2. 학습 및 렌더링 효율
    • LBS(Linear Blend Skinning) 메커니즘을 따르므로, 그래픽 엔진 등과 쉽게 통합 가능.
    • 기존 SCAPE 모델보다 파이프라인 간단, 계산량도 적은 편.
  3. 다양한 응용
    • 컴퓨터 비전: 2D 이미지에서 θ,β\theta, \beta를 추정해 3D 재구성.
    • 그래픽스: 게임·영화에서 간단히 모션 캡처 데이터(θ\theta) + 개별 사용자 체형(β\beta) 적용.
  4. 표준화된 메쉬(Topology)
    • 모든 사람·모든 자세에 대해 동일한 버텍스 인덱스를 공유해, 픽셀 단위 대응이나 Texure 매핑 등이 용이.

5. 실험 및 성능 평가

5.1 SCAPE 등 비교

  • SMPL은 SCAPE 대비
    • 학습 과정: SCAPE의 비선형 Deformation Model 대비, SMPL은 Linearity를 강하게 활용 → 학습 안정성, 구현 단순성 향상.
    • 재현력: 논문에서 다양한 체형·자세 샘플링 결과, SMPL이 유사하거나 더 나은 품질을 달성.

5.2 Quantitative Metrics

  • 논문에서는 3D 스캔에 대한 재구성 에러(RMSE of vertex positions), 관절 회전 예측 에러 등을 보고.
  • SMPL이 많은 케이스에서 낮은 재구성 에러를 나타냄.

6. 한계 및 후속 연구 방향

  1. 극단적인 체형: 예를 들어, 임산부, 몸이 매우 뚱뚱하거나 매우 마른 경우, PCA 기반 Shape Basis가 잘 커버하지 못할 수 있음(추가 주성분 필요).
  2. 근육 수축/이완 표현: Pose Blend Shapes가 선형 결합이긴 하나, 실제 인체의 근육/지방 움직임을 완전히 재현하기엔 제한.
  3. Face/Hand/Foot 세분화: SMPL 기본 모델은 얼굴/손가락/발가락의 디테일이 낮음. 후속 연구(SMPL-X, SMPL+H 등)에서 세분화 모델을 제안.
  4. 동적 변화(Soft-tissue Dynamics): 달릴 때 살이 흔들리는 등 동적 물리 효과는 SMPL이 직접적으로 모델링하지 않음(추가 물리 시뮬레이션 필요).

7. 결론 및 의의

SMPL은 “인체의 Shape(체형)과 Pose(자세)를 분리하여 선형적으로 표현”하는 강력하면서도 간단한 3D 파라메트릭 모델이다.

  • 영상 처리·AI 관점에서, 2D 관찰(예: 이미지, 비디오)로부터 β\betaθ\theta를 역추정(Inverse Rendering)하면, 사람의 3D 구조를 효율적으로 복원 가능.
  • 그래픽스 관점에서도, Linear Blend Skinning 구조가 GPU에서 쉽게 렌더링·애니메이션 가능하다는 실용적 장점.

SMPL은 이후 확장 모델들(SMPL-X, STAR, VPoser 등)의 기반을 마련했고, 오늘날의 3D Human Modeling 연구에서 사실상의 표준(De-facto standard) 역할을 하고 있다.

  • 예) DensePose, HMR(Human Mesh Recovery), VIBE, SPIN 등과 결합해 2D 영상에서 직접 β,θ\beta, \theta를 예측하는 시도가 활발함.

참고 문헌

Supervised Learning

In supervised learning, we are given a data set and already know what our correct output should look like, having the idea that there is a relationship between the input and the output.

Supervised learning problems are categorized into "regression" and "classification" problems. In a regression problem, we are trying to predict results within a continuous output, meaning that we are trying to map input variables to some continuous function. In a classification problem, we are instead trying to predict results in a discrete output. In other words, we are trying to map input variables into discrete categories.

Example 1:

Given data about the size of houses on the real estate market, try to predict their price. Price as a function of size is a continuous output, so this is a regression problem.

We could turn this example into a classification problem by instead making our output about whether the house "sells for more or less than the asking price." Here we are classifying the houses based on price into two discrete categories.

Example 2:

(a) Regression - Given a picture of a person, we have to predict their age on the basis of the given picture

(b) Classification - Given a patient with a tumor, we have to predict whether the tumor is malignant or benign.

Arthur Samuel의 머신러닝 정의

- 최초의 머신러닝 기반 체커게임을 만든 사람.

  • 컴퓨터가 명시적(explicit) 프로그램 없이도 스스로 학습할 수 있는 것.

 

Tom Michell의 머신러닝 정의

- Carnegi Mellon 대학교 교수

  • 학습과제(well-posed learning problem) 중심으로 정의
  • 프로그램이 일정 수준의 작업 성능(P)을 가지고 작업(T)을 수행한다고 했을 때 경험(E)이 증가함에 따라 작업(T)를 수행하는 성능(P)이 향상될 때 이 프로그램이 경험(E)으로부터 학습(learn)을 했다고 표현함.

 

원인

해당 에러코드의 해결책은 ML.NET 이미지 분류 튜토리얼 코드에만 한정된다.

다른 해결책은 이 링크를 참조하면 좋다. (https://creon.tistory.com/540)

 

Microsoft.ML.TensorFlow.Redist 패키지가 설치되지 않아서 발생한 문제.


해결책

 

  1. 도구 > Nuget 패키지 관리자 > 솔루션용 Nuget 패키기 관리... 클릭
  2. 찾아보기 탭에서 Microsoft.ML.TensorFlow.Redist 검색
  3. 최신버전 설치

 

 

원인

Microsoft.ML.TensorFlow 패키지가 설치되지 않아서 발생한 문제.


해결책

 

  1. 도구 > Nuget 패키지 관리자 > 솔루션용 Nuget 패키기 관리... 클릭
  2. 찾아보기 탭에서 Microsoft.ML.TensorFlow 검색
  3. 최신버전 설치

 

Error 문장

원인

Microsoft.ML.ImageAnalytics 패키지가 설치되지 않아서 발생한 문제.


해결책

  1. 도구 > Nuget 패키지 관리자 > 솔루션용 Nuget 패키기 관리... 클릭
  2. 찾아보기 탭에서 Microsoft.ML.ImageAnalytics 검색
  3. 최신버전 설치

참조

https://blog.hompus.nl/2020/06/11/unable-to-find-an-entry-point-named-ortgetapibase-in-dll-onnxruntime-with-microsoft-ml-onnxtransformer-1-5-0/

Accord.NET framework은 171가지의 이미지 필터링을 제공하고 있으며 그 목록은 다음과 같다. 


ClassDescription
Public classAdaptiveSmoothing
Adaptive Smoothing - noise removal with edges preserving.
Public classAdd
Add fillter - add pixel values of two images.
Public classAdditiveNoise
Additive noise filter.
Public classApplyMask
Apply mask to the specified image.
Public classBackwardQuadrilateralTransformation
Performs backward quadrilateral transformation into an area in destination image.
Public classBaseFilter
Base class for filters, which produce new image of the same size as a result of image processing.
Public classBaseFilter2
Base class for filters, which operate with two images of the same size and format and produce new image as a result.
Public classBaseInPlaceFilter
Base class for filters, which may be applied directly to the source image.
Public classBaseInPlaceFilter2
Base class for filters, which operate with two images of the same size and format and may be applied directly to the source image.
Public classBaseInPlacePartialFilter
Base class for filters, which may be applied directly to the source image or its part.
Public classBaseResizeFilter
Base class for image resizing filters.
Public classBaseRotateFilter
Base class for image rotation filters.
Public classBaseTransformationFilter
Base class for filters, which may produce new image of different size as a result of image processing.
Public classBaseUsingCopyPartialFilter
Base class for filters, which require source image backup to make them applicable to source image (or its part) directly.
Public classBayerDithering
Ordered dithering using Bayer matrix.
Public classBayerFilter
Generic Bayer fileter image processing routine.
Public classBayerFilterOptimized
Optimized Bayer fileter image processing routine.
Public classBilateralSmoothing
Bilateral filter implementation - edge preserving smoothing and noise reduction that uses chromatic and spatial factors.
Public classCode exampleBinaryDilation3x3
Binary dilation operator from Mathematical Morphology with 3x3 structuring element.
Public classBinaryErosion3x3
Binary erosion operator from Mathematical Morphology with 3x3 structuring element.
Public classCode exampleBinaryWatershed
Watershed filter.
Public classCode exampleBlend
Linear Gradient Blending filter.
Public classBlobsFiltering
Blobs filtering by size.
Public classBlur
Blur filter.
Public classBottomHat
Bottop-hat operator from Mathematical Morphology.
Public classBradleyLocalThresholding
Adaptive thresholding using the internal image.
Public classBrightnessCorrection
Brightness adjusting in RGB color space.
Public classBurkesDithering
Dithering using Burkes error diffusion.
Public classCannyEdgeDetector
Canny edge detector.
Public classCanvasCrop
Fill areas outiside of specified region.
Public classCanvasFill
Fill areas iniside of the specified region.
Public classCanvasMove
Move canvas to the specified point.
Public classChannelFiltering
Channels filters.
Public classClosing
Closing operator from Mathematical Morphology.
Public classColorFiltering
Color filtering.
Public classColorRemapping
Color remapping.
Public classCombineChannel
Combine channel filter.
Public classCompassConvolution
Compass convolution filter.
Public classConcatenate
Concatenation filter.
Public classConnectedComponentsLabeling
Connected components labeling.
Public classConservativeSmoothing
Conservative smoothing.
Public classContrastCorrection
Contrast adjusting in RGB color space.
Public classContrastStretch
Contrast stretching filter.
Public classConvolution
Convolution filter.
Public classCornersMarker
Filter to mark (highlight) corners of objects.
Public classCrop
Crop an image.
Public classDifference
Difference filter - get the difference between overlay and source images.
Public classDifferenceEdgeDetector
Difference edge detector.
Public classCode exampleDifferenceOfGaussians
Difference of Gaussians filter.
Public classDilation
dilation operator from Mathematical Morphology.
Public classDilation3x3
dilation operator from Mathematical Morphology with 3x3 structuring element.
Public classCode exampleDistanceTransform
Distance transform filter.
Public classDivide
Divide filter - divide pixel values of two images.
Public classEdges
Simple edge detector.
Public classErosion
Erosion operator from Mathematical Morphology.
Public classErosion3x3
Erosion operator from Mathematical Morphology with 3x3 structuring element.
Public classErrorDiffusionDithering
Base class for error diffusion dithering.
Public classErrorDiffusionToAdjacentNeighbors
Base class for error diffusion dithering, where error is diffused to adjacent neighbor pixels.
Public classEuclideanColorFiltering
Euclidean color filtering.
Public classCode exampleExponential
Exponential filter.
Public classExtractBiggestBlob
Extract the biggest blob from image.
Public classExtractChannel
Extract RGB channel from image.
Public classExtractNormalizedRGBChannel
Extract normalized RGB channel from color image.
Public classFastBoxBlur
Fast Box Blur filter.
Public classFastGuidedFilter
Fast Guided Filter (non-commercial).
Public classCode exampleFastVariance
Fast Variance filter.
Public classFeaturesMarker
Filter to mark (highlight) feature points in a image.
Public classFillHoles
Fill holes in objects in binary image.
Public classFilterIterator
Filter iterator.
Public classFiltersSequence
Filters' collection to apply to an image in sequence.
Public classFlatFieldCorrection
Flat field correction filter.
Public classFloydSteinbergDithering
Dithering using Floyd-Steinberg error diffusion.
Public classCode exampleGaborFilter
Gabor filter.
Public classGammaCorrection
Gamma correction filter.
Public classGaussianBlur
Gaussian blur filter.
Public classGaussianSharpen
Gaussian sharpen filter.
Public classGrayscale
Base class for image grayscaling.
Public classGrayscale.CommonAlgorithms
Set of predefined common grayscaling algorithms, which have already initialized grayscaling coefficients.
Public classGrayscaleBT709Obsolete.
Grayscale image using BT709 algorithm.
Public classGrayscaleRMYObsolete.
Grayscale image using R-Y algorithm.
Public classGrayscaleToRGB
Convert grayscale image to RGB.
Public classGrayscaleYObsolete.
Grayscale image using Y algorithm.
Public classCode exampleGrayWorld
Gray World filter for color normalization.
Public classHighBoost
High boost filter.
Public classHistogramEqualization
Histogram equalization filter.
Public classHitAndMiss
Hit-And-Miss operator from Mathematical Morphology.
Public classHomogenityEdgeDetector
Homogenity edge detector.
Public classHorizontalRunLengthSmoothing
Horizontal run length smoothing algorithm.
Public classHSLFiltering
Color filtering in HSL color space.
Public classHSLLinear
Luminance and saturation linear correction.
Public classHueModifier
Hue modifier.
Public classImageWarp
Image warp effect filter.
Public classIntersect
Intersect filter - get MIN of pixels in two images.
Public classInvert
Invert image.
Public classIterativeThreshold
Iterative threshold search and binarization.
Public classJarvisJudiceNinkeDithering
Dithering using Jarvis, Judice and Ninke error diffusion.
Public classJitter
Jitter filter.
Public classCode exampleKirschEdgeDetector
Kirsch's Edge Detector
Public classCode exampleKuwahara
Kuwahara filter.
Public classLevelsLinear
Linear correction of RGB channels.
Public classLevelsLinear16bpp
Linear correction of RGB channels for images, which have 16 bpp planes (16 bit gray images or 48/64 bit colour images).
Public classLineMarker
Filter to mark (highlight) lines in a image.
Public classCode exampleLogarithm
Log filter.
Public classMaskedFilter
Apply filter according to the specified mask.
Public classMean
Mean filter.
Public classMedian
Median filter.
Public classMerge
Merge filter - get MAX of pixels in two images.
Public classMirror
Mirroring filter.
Public classMorph
Morph filter.
Public classMoveTowards
Move towards filter.
Public classMultiply
Multiply filter - multiply pixel values of two images.
Public classCode exampleNiblackThreshold
Niblack Threshold.
Public classOilPainting
Oil painting filter.
Public classOpening
Opening operator from Mathematical Morphology.
Public classOrderedDithering
Binarization with thresholds matrix.
Public classOtsuThreshold
Otsu thresholding.
Public classPairsMarker
Filter to mark (highlight) pairs of points in a image.
Public classPixellate
Pixellate filter.
Public classPointedColorFloodFill
Flood filling with specified color starting from specified point.
Public classPointedMeanFloodFill
Flood filling with mean color starting from specified point.
Public classCode examplePointsMarker
Filter to mark (highlight) points in a image.
Public classQuadrilateralTransformation
Performs quadrilateral transformation of an area in a given source image.
Public classQuadrilateralTransformationBilinearObsolete.
Performs quadrilateral transformation using bilinear algorithm for interpolation.
Public classQuadrilateralTransformationNearestNeighborObsolete.
Performs quadrilateral transformation using nearest neighbor algorithm for interpolation.
Public classRectanglesMarker
Filter to mark (highlight) rectangles in a image.
Public classRectification
Rectification filter for projective transformation.
Public classReplaceChannel
Replace RGB channel of color imgae.
Public classResizeBicubic
Resize image using bicubic interpolation algorithm.
Public classResizeBilinear
Resize image using bilinear interpolation algorithm.
Public classResizeNearestNeighbor
Resize image using nearest neighbor algorithm.
Public classRGChromacity
RG Chromaticity.
Public classCode exampleRobinsonEdgeDetector
Robinson's Edge Detector
Public classRotateBicubic
Rotate image using bicubic interpolation.
Public classRotateBilinear
Rotate image using bilinear interpolation.
Public classRotateChannels
Rotate RGB channels.
Public classRotateNearestNeighbor
Rotate image using nearest neighbor algorithm.
Public classSaltAndPepperNoise
Salt and pepper noise.
Public classSaturationCorrection
Saturation adjusting in HSL color space.
Public classCode exampleSauvolaThreshold
Sauvola Threshold.
Public classSepia
Sepia filter - old brown photo.
Public classSharpen
Sharpen filter
Public classShrink
Shrink an image by removing specified color from its boundaries.
Public classSierraDithering
Dithering using Sierra error diffusion.
Public classSimplePosterization
Simple posterization of an image.
Public classSimpleQuadrilateralTransformation
Performs quadrilateral transformation of an area in the source image.
Public classSimpleSkeletonization
Simple skeletonization filter.
Public classSISThreshold
Threshold using Simple Image Statistics (SIS).
Public classSobelEdgeDetector
Sobel edge detector.
Public classStereoAnaglyph
Stereo anaglyph filter.
Public classStuckiDithering
Dithering using Stucki error diffusion.
Public classSubtract
Subtract filter - subtract pixel values of two images.
Public classTexturedFilter
Textured filter - filter an image using texture.
Public classTexturedMerge
Merge two images using factors from texture.
Public classTexturer
Texturer filter.
Public classThreshold
Threshold binarization.
Public classThresholdedDifference
Calculate difference between two images and threshold it.
Public classThresholdedEuclideanDifference
Calculate Euclidean difference between two images and threshold it.
Public classThresholdWithCarry
Threshold binarization with error carry.
Public classTopHat
Top-hat operator from Mathematical Morphology.
Public classTransformFromPolar
Transform polar image into rectangle.
Public classTransformToPolar
Transform rectangle image into circle (to polar coordinates).
Public classCode exampleVariance
Variance filter.
Public classVerticalRunLengthSmoothing
Vertical run length smoothing algorithm.
Public classWaterWave
Simple water wave effect filter.
Public classCode exampleWaveletTransform
Wavelet transform filter.
Public classCode exampleWhitePatch
White Patch filter for color normalization.
Public classCode exampleWolfJolionThreshold
Wolf Jolion Threshold.
Public classYCbCrExtractChannel
Extract YCbCr channel from image.
Public classYCbCrFiltering
Color filtering in YCbCr color space.
Public classYCbCrLinear
Linear correction of YCbCr channels.
Public classYCbCrReplaceChannel
Replace channel of YCbCr color space.
Public classZhangSuenSkeletonization
Zhang-Suen skeletonization filter.


이 필터들은 .NET Standard 2.0  .NET Core 2.0 에 완벽하게 호환 제공되고 있다.

이 필터들을 사용하기 위해서는 단순히

using Accord.Imaging.Filters;

을 네임스페이스 위에 삽입하여 사용하면 된다.


예제코드(가우시안 블러 사용 예제)

using System;
using System.Drawing;

using Accord.Imaging.Filters;
using Accord.DataSets;

					
public class Program
{
    public static void Main()
    {
        TestImages t = new TestImages();
        Bitmap baboon = t.GetImage("baboon.bmp");
		
        // We can create a new Gaussian Blur:
        GaussianBlur blur = new GaussianBlur();
        
        // Now we can either apply it to the image, creating a
        // new resulting image to hold the output of the filter:
        Bitmap result = blur.Apply(baboon);
        
        // Or we can apply the operation in place,
        // overwriting the original image:
        blur.ApplyInPlace(baboon);
    }
}



Accord.NET은 C#으로만 작성된 .NET framework로써 선형 대수학, 수치 최적화, 통계학, 머신러닝, 인공 신경망, 신호 및 영상처리 등을 처리할 수 있으며  Gnu Lesser Public License 을 따른다.

설치는 다음과 같다.

Visual Studio의 프로젝트를 시작한 후 NuGet Package를 열고 아래 인스톨 명령을 실행한다.

    PM> Install-Package Accord.MachineLearning
    PM> Install-Package Accord.Controls

설치가 완료되면 이제 Accord.NET을 쓸 준비가 된 것이다.


예제코드

using Accord.Controls;
using Accord.MachineLearning.VectorMachines.Learning;
using Accord.Math.Optimization.Losses;
using Accord.Statistics;
using Accord.Statistics.Kernels;
using System;

namespace GettingStarted
{
    class Program
    {
        [MTAThread]
        static void Main(string[] args)
        {
            double[][] inputs =
            {
                /* 1.*/ new double[] { 0, 0 },
                /* 2.*/ new double[] { 1, 0 }, 
                /* 3.*/ new double[] { 0, 1 }, 
                /* 4.*/ new double[] { 1, 1 },
            };

            int[] outputs =
            { 
                /* 1. 0 xor 0 = 0: */ 0,
                /* 2. 1 xor 0 = 1: */ 1,
                /* 3. 0 xor 1 = 1: */ 1,
                /* 4. 1 xor 1 = 0: */ 0,
            };

            // Create the learning algorithm with the chosen kernel
            var smo = new SequentialMinimalOptimization<Gaussian>()
            {
                Complexity = 100 // Create a hard-margin SVM 
            };

            // Use the algorithm to learn the svm
            var svm = smo.Learn(inputs, outputs);

            // Compute the machine's answers for the given inputs
            bool[] prediction = svm.Decide(inputs);

            // Compute the classification error between the expected 
            // values and the values actually predicted by the machine:
            double error = new AccuracyLoss(outputs).Loss(prediction);

            Console.WriteLine("Error: " + error);

            // Show results on screen 
            ScatterplotBox.Show("Training data", inputs, outputs);
            ScatterplotBox.Show("SVM results", inputs, prediction.ToZeroOne());

            Console.ReadKey();
        }
    }
}



+ Recent posts