diff options
author | scuri <scuri> | 2009-10-01 02:56:38 +0000 |
---|---|---|
committer | scuri <scuri> | 2009-10-01 02:56:38 +0000 |
commit | 62783aee16f96fe5e513fb230b8efddaa02981df (patch) | |
tree | 9dc512b0c758025c5cddba9709420f1bf9058675 /include/im_process_loc.h | |
parent | 9a5e93213e08601a58725f44035ac622fb68e849 (diff) |
New: functions imProcessUnsharp and imProcessSharp.
Changed: now imProcessUnArithmeticOp, imProcessArithmeticConstOp and imProcessArithmeticOp willl crop the result to 0-255 if destiny has data type byte.
Changed: removed IM_UN_INC operation from imProcessUnArithmeticOp. It was not an unary operation. Can simply be done in place by imProcessArithmeticOp and IM_BIN_ADD.
Diffstat (limited to 'include/im_process_loc.h')
-rw-r--r-- | include/im_process_loc.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/im_process_loc.h b/include/im_process_loc.h index 9c0531b..44e8281 100644 --- a/include/im_process_loc.h +++ b/include/im_process_loc.h @@ -569,6 +569,35 @@ int imGaussianStdDev2KernelSize(float stddev); * \ingroup convolve */ float imGaussianKernelSize2StdDev(int kernel_size); +/** Edge enhancement using Unsharp mask. stddev control the gaussian filter, + * amount controls how much the edges will enhance the image (0<amount<1), and + * threshold controls which edges will be considered, it compares to twice of the absolute size of the edge. + * Although very similar to \ref imProcessSharp, produces better results. + * + * \verbatim im.ProcessUnsharp(src_image: imImage, dst_image: imImage, stddev: number, amount: number, threshold: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessUnsharpNew(image: imImage, stddev: number, amount: number, threshold: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessUnsharp(const imImage* src_image, imImage* dst_image, float stddev, float amount, float threshold); + +/** Edge enhancement using Laplacian8 mask. + * amount controls how much the edges will enhance the image (0<amount<1), and + * threshold controls which edges will be considered, it compares to twice of the absolute size of the edge. + * + * \verbatim im.ProcessSharp(src_image: imImage, dst_image: imImage, amount: number, threshold: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessSharpNew(image: imImage, amount: number, threshold: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessSharp(const imImage* src_image, imImage* dst_image, float amount, float threshold); + +/** Edge enhancement using a given kernel. + * If kernel has all positive values, then the unsharp technique is used, else sharp is used. + * amount controls how much the edges will enhance the image (0<amount<1), and + * threshold controls which edges will be considered, it compares to twice of the absolute size of the edge. + * + * \verbatim im.ProcessSharp(src_image: imImage, dst_image: imImage, amount: number, threshold: number) [in Lua 5] \endverbatim + * \verbatim im.ProcessSharpNew(image: imImage, amount: number, threshold: number) -> new_image: imImage [in Lua 5] \endverbatim + * \ingroup convolve */ +int imProcessSharpKernel(const imImage* src_image, const imImage* kernel, imImage* dst_image, float amount, float threshold); + #if defined(__cplusplus) } |