?? ll_sharp.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 + -