From 62783aee16f96fe5e513fb230b8efddaa02981df Mon Sep 17 00:00:00 2001 From: scuri Date: Thu, 1 Oct 2009 02:56:38 +0000 Subject: 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. --- include/im_process_loc.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'include/im_process_loc.h') 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 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 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 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) } -- cgit v1.2.3