|
|
|
@ -8,6 +8,7 @@ namespace OpenCV |
|
|
|
|
IplImage gray; |
|
|
|
|
IplImage inversion; |
|
|
|
|
IplImage bin; |
|
|
|
|
IplImage blur; |
|
|
|
|
|
|
|
|
|
public IplImage GrayScale(IplImage src) |
|
|
|
|
{ |
|
|
|
@ -30,6 +31,13 @@ namespace OpenCV |
|
|
|
|
return bin; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public IplImage Blur(IplImage src) |
|
|
|
|
{ |
|
|
|
|
blur = new IplImage(src.Size, BitDepth.U8, 3); |
|
|
|
|
Cv.Smooth(src, blur, SmoothType.Blur, 9); // param1은 홀수, 중간 픽셀 선택을 위함 |
|
|
|
|
return blur; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public void Dispose() |
|
|
|
|
{ |
|
|
|
|
if (gray != null) |
|
|
|
@ -38,6 +46,8 @@ namespace OpenCV |
|
|
|
|
Cv.ReleaseImage(inversion); |
|
|
|
|
if (bin != null) |
|
|
|
|
Cv.ReleaseImage(bin); |
|
|
|
|
if (blur != null) |
|
|
|
|
Cv.ReleaseImage(blur); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|