flst_reconstruct.c

来自「image processing including fourier,wavel」· C语言 代码 · 共 38 行

C
38 行
字号
/*---------------------------- MegaWave Module ----------------------------*/ /* mwcommand   name = {flst_reconstruct};   version = {"1.0"};   author = {"Pascal Monasse, Frederic Guichard"};   function = {"Reconstruct an image from its Fast Level Sets Transform"};   usage = {     tree -> pTree "Input tree of shapes",     image <- pFloatImageOutput  "Output fimage"     }; */ #include "mw.h"  void flst_reconstruct(pTree, pFloatImageOutput) Shapes pTree; Fimage pFloatImageOutput; {   int i;   float* pOutputPixel;   Shape* ppShapeOfPixel;   Shape pShape;    if(! mw_change_fimage(pFloatImageOutput, pTree->nrow, pTree->ncol))     mwerror(FATAL, 1, "flst_reconstruct --> impossible to allocate the output image\n");      pOutputPixel = pFloatImageOutput->gray;   ppShapeOfPixel = pTree->smallest_shape;   for(i = pTree->nrow*pTree->ncol-1; i >= 0; i--)     {       pShape = *ppShapeOfPixel++;       while(pShape->removed) 	pShape = pShape->parent;       *pOutputPixel++ = pShape->value;     } } 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?