emgu.cv裡有三個常用的影像金字塔(重采樣,每一級倍數2)函數:
1) BuildPyramid(int maxLevel) 建立多級影像金字塔
C#例子:Int maxLevel;
Image<Gray,byte> [] imgs = img.BuildPyramid(maxLevel);
2) PyrDown() 向下(粗)重采樣
C#例子:Image<Gray,byte> imgd = img.PyrDown();
3) PyrUp() 向上(細)重采樣
C#例子:Image<Gray,byte> imgu = img.PyrUp();
詳情如下:
1) Image(TColor, TDepth).BuildPyramidMethod
Compute the image pyramid
Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.2.1777 (2.4.2.1777)
Collapse imageSyntax
Syntax(C#)
public Image<TColor, TDepth>[]BuildPyramid(int maxLevel)
Parameters
maxLevel
Type: System.Int32
The number of level's for the pyramid;Level 0 referes to the current image, level n is computed by calling thePyrDown() function on level n-1
ReturnValue
The image pyramid in Image []
Link
http://www.emgu.com/wiki/files/2.4.2/document/html/0f10eb26-3f55-849c-b62b-1d7a5e8116d3.htm
2) Image<TColor, TDepth>.PyrDownMethod
Performs downsampling step of Gaussianpyramid decomposition. First it convolves this image with the specified filterand then downsamples the image by rejecting even rows and columns.
Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll)Version: 2.0.1.0 (2.0.1.0)
Syntax(C#)
public Image<TColor, TDepth>PyrDown()
ReturnValue
The downsampled image
Link
http://www.emgu.com/wiki/files/2.0.1.0/html/2aaf7083-20e0-2de3-fc78-c361e4c6a211.htm
3) Image<TColor, TDepth>.PyrUpMethod
Namespace: Emgu.CV
Assembly: Emgu.CV (inEmgu.CV.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax(C#)
public Image<TColor,TDepth> PyrUp()
ReturnValue
The upsampled image
Link
http://www.emgu.com/wiki/files/2.0.0.0/html/54e08a6f-3842-543b-125f-ae3d52392fe0.htm