⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ll_sharp.c

📁 image processing including fourier,wavelet,segmentation etc.
💻 C
字号:
/*----------------------------- MegaWave Module -----------------------------*//* mwcommand   name = {ll_sharp};   version = {"1.4"};   author = {"Pascal Monasse, Frederic Guichard"};   function = {"Sharpen an image (select some of the parallel level lines)"};   usage = {     'p': [percent_area=20]-> pPercentIncreaseArea [1,1000] "% area change to glue parent and child (default: 20)",     image_in -> pFloatImageInput  "Input fimage",     image_out <- pFloatImageOutput "Output fimage"     }; */ /*---------------------------------------------------------------------- v1.2: Flist adaptation in remove_gradation (L.Moisan) v1.3: upgrade for new kernel (L.Moisan) v1.4: fixed size problem (L.Moisan)----------------------------------------------------------------------*/#include "mw.h" extern void flst();extern void flst_reconstruct(); /* An elementary shape is a shape having a child of a different type. To keep consistency    between the tree and the associated image, it is forbidden to remove such a shape. This    function detects if pShape is an elementary shape, and if the answer is positive, mark    the shape to be its own gradation. */ void keep_elementary_shape(pShape) Shape pShape; {   Shape pChild;      /* If one of the sons is of different type, the object has only one shape */   for(pChild = mw_get_first_child_shape(pShape); pChild != NULL; pChild = mw_get_next_sibling_shape(pChild))     if(pChild->inferior_type != pShape->inferior_type)       break;    if(pChild != NULL)     pShape->data = (char*)1; }  /* Find the gradation containg pShape, remove it but keep only one representative shape of    the gradation.    A gradation is defined to be a family of shapes such that:    One shape S and its child C are in the same gradation iff:    - C is the only child of S;    - C and S have the same type;    - the areas of C and S do not differ by a factor greater than fFactorIncreaseArea;    - C is not an elementary shape.    It is not hard to see that this relation induces a partition of the family of shapes, each    class of the partition is then called a gradation.    The representative shape of the gradation is the shape of the gradation with smallest L

⌨️ 快捷键说明

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