Custom multiple point color function. \n * Source values are copies, so they can be changed inside the function without affecting the original image. \n * Data will be set only if the returned value is non zero. * \verbatim func(src_value1_plane0: number, src_value1_plane1: number, ..., src_value2_plane0: number, src_value2_plane1: number, ... , params1, param2, ..., x: number, y: number) -> dst_value_plane0: number, dst_value_plane1: number, ... [in Lua 5] \endverbatim * In Lua, the source images data and the params table are unpacked. * Also each color plane is passed as a separate value, instead of inside an array. * And the returned value contains only the target values to update, or nil (also no return value) to leave target intact. * \ingroup point
Custom multiple point function. \n * Source values are copies, so they can be changed inside the function without affecting the original image. \n * Data will be set only if the returned value is non zero. * \verbatim func(src_value1: number, src_value2: number, ... , params1, param2, ..., x: number, y: number, d: number) -> dst_value: number [in Lua 5] \endverbatim * In Lua, the source images data and the params table are unpacked. * And the returned value contains only the target values to update, or nil (also no return value) to leave target intact. * \ingroup point
Render Conditional Funtion. * \verbatim render_cond_func(x: number, y: number, d: number, params: table) -> value: number, cond: boolean [in Lua 5] \endverbatim * \ingroup render
Render Funtion. * \verbatim render_func(x: number, y: number, d: number, params: table) -> value: number [in Lua 5] \endverbatim * \ingroup render
Custom unary point color function. \n * Data will be set only if the returned value is non zero. * \verbatim func(src_value_plane0: number, src_value_plane1: number, ... , params1, param2, ..., x: number, y: number) -> dst_value_plane0: number, dst_value_plane1: number, ... [in Lua 5] \endverbatim * In Lua, the params table is unpacked. * Also each color plane is passed as a separate value, instead of inside an array. * And the returned value contains only the target values to update, or nil (also no return value) to leave target intact. * \ingroup point
Custom unary point function. \n * Data will be set only if the returned value is non zero. * \verbatim func(src_value: number, params1, param2, ..., x: number, y: number, d: number) -> dst_value: number [in Lua 5] \endverbatim * In Lua, the params table is unpacked. * And the returned value contains only the target values to update, or nil (also no return value) to leave target intact. * \ingroup point
Binary Arithmetic Operations. \n * Divide may lead to math exceptions. * \ingroup arithm
Logical Operations. * \ingroup logic
Tone Gamut Operations. * \ingroup tonegamut
Tone Gamut Flags. * Combine with imToneGamut values with bitwise or (|). * \ingroup tonegamut
Unary Arithmetic Operations. \n * (#) Inverse and log may lead to math exceptions. * \ingroup arithm
Applies the abnormal pixel correction as described in the article. (Since 3.8) \n * Images must be IM_GRAY. Source and Target must have the same datatype, and complex is not supported. \n * image_abnormal is optional, can be NULL. If not NULL, must be IM_BINARY and * it will store the abnormal pixels distribution. \n * Can be done in-place. \n * threshold_percent is the percentage of the height that must have abnormal pixels candidates. \n * threshold_consecutive is the minimum number of consecutive abnormal pixels candidates to be considered an abnormal range. * (usually the longest vertical ground feature in pixels)\n * \par * Based on "Detection and Correction of Abnormal Pixels in Hyperion Images" * from T. Han, D. G. Goodenough, A. Dyk, and J. Love * * \verbatim im.AbnormalHyperionCorrection(src_image: imImage, dst_image: imImage, threshold_consecutive, threshold_percent: number[, image_abnormal: imImage]) [in Lua 5] \endverbatim * \verbatim im.AbnormalHyperionCorrectionNew(src_image: imImage, threshold_consecutive, threshold_percent: number[, image_abnormal: imImage]) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup remotesens
Apply a binary arithmetic operation with a constant value. \n * Can be done in-place, images must match color space and size. \n * Target image can be several types depending on source: \n * \li any integer -> any integer or real * \li real -> real * \li complex -> complex * The constant value is type casted to an appropriate type before the operation. \n * If source is complex, target complex must be the same data type (imcfloat-imcfloat or imcdouble-imcdouble only). \n * If target is byte, then the result is cropped to 0-255. * * \verbatim im.ProcessArithmeticConstOp(src_image: imImage, src_const: number, dst_image: imImage, op: number) [in Lua 5] \endverbatim * \verbatim im.ProcessArithmeticConstOpNew(image: imImage, src_const: number, op: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup arithm
Apply a binary arithmetic operation. \n * Can be done in-place, images must match color space and size. \n * Source images must match, target image can be several types depending on source: \n * \li any integer -> any integer+ or real * \li real -> real * \li complex -> complex * One exception is that you can use src1=complex src2=real resulting dst=complex. \n * If source is complex, target complex must be the same data type (imcfloat-imcfloat or imcdouble-imcdouble only). \n * If target is integer then it must have equal or more precision than the source. \n * If target is byte, then the result is cropped to 0-255. * Alpha channel is not included. * * \verbatim im.ProcessArithmeticOp(src_image1: imImage, src_image2: imImage, dst_image: imImage, op: number) [in Lua 5] \endverbatim * \verbatim im.ProcessArithmeticOpNew(image1: imImage, image2: imImage, op: number) -> new_image: imImage [in Lua 5] \endverbatim * The New function will create a new image of the same type of the source images. * \ingroup arithm
Calculates the auto-covariance of an image with the mean of a set of images. \n * Images must match. Returns zero if the counter aborted. \n * Target is IM_FLOAT, except if source is IM_DOUBLE. * Returns zero if the counter aborted. * * \verbatim im.ProcessAutoCovariance(src_image: imImage, mean_image: imImage, dst_image: imImage) -> counter: boolean [in Lua 5] \endverbatim * \verbatim im.ProcessAutoCovarianceNew(src_image: imImage, mean_image: imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim * \ingroup arithm
Apply a bit mask. \n * The same as imProcessBitwiseOp but the second image is replaced by a fixed mask. \n * Images must have data type IM_BYTE. It is valid only for AND, OR and XOR. Can be done in-place. * * \verbatim im.ProcessBitMask(src_image: imImage, dst_image: imImage, mask: string, op: number) [in Lua 5] \endverbatim * \verbatim im.ProcessBitMaskNew(src_image: imImage, mask: string, op: number) -> new_image: imImage [in Lua 5] \endverbatim * In Lua, mask is a string with 0s and 1s, for example: "11001111". * \ingroup logic
Extract or Reset a bit plane. For ex: 000X0000 or XXX0XXXX (plane=3).\n * Images must have data type IM_BYTE. Can be done in-place. * * \verbatim im.ProcessBitPlane(src_image: imImage, dst_image: imImage, plane: number, do_reset: boolean) [in Lua 5] \endverbatim * \verbatim im.ProcessBitPlaneNew(src_image: imImage, plane: number, do_reset: boolean) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup logic
Apply a logical NOT operation.\n * Images must have data type integer. Can be done in-place. * * \verbatim im.ProcessBitwiseNot(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessBitwiseNotNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup logic
Apply a logical operation.\n * Images must have data type integer. Can be done in-place. * * \verbatim im.ProcessBitwiseOp(src_image1: imImage, src_image2: imImage, dst_image: imImage, op: number) [in Lua 5] \endverbatim * \verbatim im.ProcessBitwiseOpNew(src_image1: imImage, src_image2: imImage, op: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup logic
Blend two images using an alpha channel = [a * alpha + b * (1 - alpha)]. \n * Can be done in-place, images must match. \n * alpha_image must have the same data type except for complex images that must be real, * and color_space must be IM_GRAY. * Maximum alpha values are based in \ref imColorMax. Minimum is always 0. * \verbatim im.ProcessBlend(src_image1: imImage, src_image2: imImage, alpha_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessBlendNew(image1: imImage, image2: imImage, alpha_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup arithm
Blend two images using an alpha value = [a * alpha + b * (1 - alpha)]. \n * Can be done in-place, images must match. \n * alpha value must be in the interval [0.0 - 1.0]. * * \verbatim im.ProcessBlendConst(src_image1: imImage, src_image2: imImage, dst_image: imImage, alpha: number) [in Lua 5] \endverbatim * \verbatim im.ProcessBlendConstNew(image1: imImage, image2: imImage, alpha: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup arithm
Calculates an automatic gamma factor. \n * gamma=log((mean-min)/(max-min))/log(0.5); * Usefull for \ref imProcessToneGamut when using IM_GAMUT_POW. * * \verbatim im.ProcessCalcAutoGamma(image: imImage) -> gamma: number [in Lua 5] \endverbatim * \ingroup tonegamut
Compose two images that have an alpha channel using the OVER operator. \n * Can be done in-place, images must match. \n * Maximum alpha values are baed in \ref imColorMax. Minimum is always 0. * \verbatim im.ProcessCompose(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessComposeNew(image1: imImage, image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup arithm
Same as \ref imConvertColorSpace. * But returns zero if the counter aborted. * * \verbatim im.ProcessConvertColorSpace(src_image: imImage, dst_image: imImage) -> error: number [in Lua 5] \endverbatim * \verbatim im.ProcessConvertColorSpaceNew(image: imImage, color_space: number, has_alpha: boolean) -> error: number, new_image: imImage [in Lua 5] \endverbatim * \ingroup procconvert
Same as \ref imConvertDataType. * But returns zero if the counter aborted. * * \verbatim im.ProcessConvertDataType(src_image: imImage, dst_image: imImage, cpx2real: number, gamma: number, absolute: boolean, cast_mode: number) -> error: number [in Lua 5] \endverbatim * \verbatim im.ProcessConvertDataTypeNew(image: imImage, data_type: number, cpx2real: number, gamma: number, absolute: boolean, cast_mode: number) -> error: number, new_image: imImage [in Lua 5] \endverbatim * \ingroup procconvert
Same as \ref imConvertToBitmap. * But returns zero if the counter aborted. * * \verbatim im.ProcessConvertToBitmap(src_image: imImage, dst_image: imImage, cpx2real: number, gamma: number, absolute: boolean, cast_mode: number) -> error: number [in Lua 5] \endverbatim * \verbatim im.ProcessConvertToBitmapNew(image: imImage, color_space: number, has_alpha: boolean, cpx2real: number, gamma: number, absolute: boolean, cast_mode: number) -> error: number, new_image: imImage [in Lua 5] \endverbatim * \ingroup procconvert
Apply a dithering on each image channel by using a difusion error method. \n * It can be applied on any IM_BYTE images. It will "threshold" each channel indivudually, so * source and target must be of the same depth. * Not using OpenMP when enabled. * * \verbatim im.ProcessDifusionErrThreshold(src_image: imImage, dst_image: imImage, level: number) [in Lua 5] \endverbatim * \verbatim im.ProcessDifusionErrThresholdNew(src_image: imImage, level: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup threshold
Directly converts integer and real data types into IM_BYTE images. \n * This can also be done using \ref imConvertDataType with IM_CAST_DIRECT flag. * * \verbatim im.ProcessDirectConv(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessDirectConvNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup tonegamut
Performs an histogram equalization. \n * Images must be (IM_BYTE, IM_SHORT or IM_USHORT)/(IM_RGB or IM_GRAY). Can be done in-place. * * \verbatim im.ProcessEqualizeHistogram(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessEqualizeHistogramNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup histo
Performs an histogram expansion based on a percentage of the number of pixels. \n * Percentage is used to obtain the amount of pixels of the lowest level and the highest level, relative to the total of pixels. * The histogram is used an each level is summed while the result is less than the obtained amount from 0 (for the lowest level) and from the last level (for the highest). * If it is zero, then only empty counts of the histogram will be considered. \n * Images must be (IM_BYTE, IM_SHORT or IM_USHORT)/(IM_RGB or IM_GRAY). Can be done in-place. \n * To expand the gamut without using the histogram, by just specifying the lowest and highest levels * use the \ref IM_GAMUT_EXPAND tone gamut operation (\ref imProcessToneGamut). * * \verbatim im.ProcessExpandHistogram(src_image: imImage, dst_image: imImage, percent: number) [in Lua 5] \endverbatim * \verbatim im.ProcessExpandHistogramNew(src_image: imImage, percent: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup histo
Estimates hysteresis low and high threshold levels. \n * Image data type can be IM_BYTE, IM_SHORT or IM_USHORT. \n * Usefull for \ref imProcessHysteresisThreshold. * * \verbatim im.ProcessHysteresisThresEstimate(image: imImage) -> low_level: number, high_level: number [in Lua 5] \endverbatim * \ingroup threshold
Apply a threshold by the Hysteresis method. \n * Hysteresis thersholding of edge pixels. Starting at pixels with a * value greater than the HIGH threshold, trace a connected sequence * of pixels that have a value greater than the LOW threhsold. \n * complex is not supported. Can be done in-place for IM_BYTE source. \n * Note: could not find the original source code author name. * * \verbatim im.ProcessHysteresisThreshold(src_image: imImage, dst_image: imImage, low_thres: number, high_thres: number) [in Lua 5] \endverbatim * \verbatim im.ProcessHysteresisThresholdNew(src_image: imImage, low_thres: number, high_thres: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup threshold
Estimates Local Max threshold level for images. * Image can be IM_BYTE, IM_SHORT or IM_USHORT. \n * * \verbatim im.ProcessLocalMaxThresEstimate(image: imImage) -> level: number [in Lua 5] \endverbatim * \ingroup threshold
Merges two images as the real and imaginary parts of a complex image, \n * or as magnitude and phase parts (polar = 1). \n * Source images must be real, target image must be complex. * * \verbatim im.ProcessMergeComplex(src_image1: imImage, src_image2: imImage, dst_image: imImage, polar: boolean) [in Lua 5] \endverbatim * \verbatim im.ProcessMergeComplexNew(image1: imImage, image2: imImage, polar: boolean) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup arithm
Merges separate components into a multicomponent image, including alpha.\n * Source images must be IM_GRAY. Size and data types must be all the same.\n * The number of source images must match the depth of the target image, including alpha. * * \verbatim im.ProcessMergeComponents(src_image_list: table of imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessMergeComponentsNew(src_image_list: table of imImage) -> dst_image: imImage [in Lua 5] \endverbatim * \ingroup colorproc
Merge HSI planes into a RGB image. \n * Source images must be IM_GRAY/IM_FLOAT. Target image can be IM_RGB/IM_BYTE or IM_RGB/IM_FLOAT only. \n * Source and target must have the same size. See \ref hsi for a definition of the color conversion. * * \verbatim im.ProcessMergeHSI(h_image: imImage, s_image: imImage, i_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessMergeHSINew(h_image: imImage, s_image: imImage, i_image: imImage) -> dst_image: imImage [in Lua 5] \endverbatim * \ingroup colorproc
Calculates the threshold level for manual threshold using (max-min)/2. \n * Returns the used level. \n * Source color space must be IM_GRAY, and target color space must be IM_BINARY. * complex is not supported. Can be done in-place for IM_BYTE source. \n * * \verbatim im.ProcessMinMaxThreshold(src_image: imImage, dst_image: imImage) -> level: number [in Lua 5] \endverbatim * \verbatim im.ProcessMinMaxThresholdNew(src_image: imImage) -> level: number, new_image: imImage [in Lua 5] \endverbatim * \ingroup threshold
Apply an multiple point color operation using a custom function. * One pixel from each source affects the same pixel on target. \n * All source images must match in size, depth and data type. * Can be done in-place, source and target must match size, depth can be different. * Data type can be different between sources and target, but complex is not supported. \n * op_name is used only by the counter and can be NULL. * Returns zero if the counter aborted. * * \verbatim im.ProcessMultiPointColorOp(src_image: table of imImage, dst_image: imImage, func: function, params: table, [op_name: string]) -> counter: boolean [in Lua 5] \endverbatim * \verbatim im.ProcessMultiPointColorOpNew(src_image: table of imImage, func: function, params: table, [op_name: string]) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim * In Lua, the params table is passed to the function by using the Lua stack, * so its table can contain any type of objects, but they all must be unnamed. * \ingroup point
Apply an multiple point operation using a custom function. * One pixel from each source affects the same pixel on target. \n * All source images must match in size, depth and data type. * Can be done in-place, source and target must match size and depth. * Data type can be different between sources and target, but complex is not supported. \n * op_name is used only by the counter and can be NULL. * Returns zero if the counter aborted. * * \verbatim im.ProcessMultiPointOp(src_image: table of imImage, dst_image: imImage, func: function, params: table, [op_name: string]) -> counter: boolean [in Lua 5] \endverbatim * \verbatim im.ProcessMultiPointOpNew(src_image: table of imImage, func: function, params: table, [op_name: string]) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim * In Lua, the params table is passed to the function by using the Lua stack, * so its table can contain any type of objects, but they all must be unnamed. * \ingroup point
Calculates the mean of multiple images. \n * Images must match size and type. * * \verbatim im.ProcessMultipleMean(src_image_list: table of imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessMultipleMeanNew(src_image_list: table of imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup arithm
Calculates the median of multiple images. \n * Images must match size and type. Complex is not supported.\n * Uses \ref imProcessMultiPointOp internally. * * \verbatim im.ProcessMultipleMedian(src_image_list: table of imImage, dst_image: imImage) -> counter: boolean [in Lua 5] \endverbatim * \verbatim im.ProcessMultipleMedianNew(src_image_list: table of imImage) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim * \ingroup arithm
Calculates the standard deviation of multiple images. \n * Images must match size and type. Use \ref imProcessMultipleMean to calculate the mean_image. * * \verbatim im.ProcessMultipleStdDev(src_image_list: table of imImage, mean_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessMultipleStdDevNew(src_image_list: table of imImage, mean_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup arithm
Multiplies the conjugate of one complex image with another complex image. \n * Images must match size. Conj(img1) * img2 \n * Can be done in-place. * * \verbatim im.ProcessMultiplyConj(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessMultiplyConjNew(src_image1: imImage, src_image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup arithm
A negative effect. Uses \ref imProcessToneGamut with IM_GAMUT_INVERT for non MAP images. \n * Supports all color spaces and all data types except complex. \n * Can be done in-place. * * \verbatim im.ProcessNegative(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessNegativeNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup tonegamut
Calculates the Normalized Difference Ratio. \n * Uses the formula NormDiffRatio = (a-b)/(a+b), \n * The result image has [-1,1] interval. \n * Images must be IM_GRAY, and the target image must be IM_FLOAT, except if source is IM_DOUBLE. * * \verbatim im.ProcessNormDiffRatio(image1: imImage, image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessNormDiffRatioNew(image1: imImage, image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup remotesens
Normalize the color components by their sum. Example: c1 = c1/(c1+c2+c3). \n * It will not change the alpha channel if any. * Target is IM_FLOAT, except if source is IM_DOUBLE. * * \verbatim im.ProcessNormalizeComponents(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessNormalizeComponentsNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup colorproc
Calculates the threshold level for manual threshold using the Otsu approach. \n * Image can be IM_BYTE, IM_SHORT or IM_USHORT. \n * Source color space must be IM_GRAY, and target color space must be IM_BINARY. * Returns the used level. \n * Original implementation by Flavio Szenberg. * * \verbatim im.ProcessOtsuThreshold(src_image: imImage, dst_image: imImage) -> level: number [in Lua 5] \endverbatim * \verbatim im.ProcessOtsuThresholdNew(src_image: imImage) -> level: number, new_image: imImage [in Lua 5] \endverbatim * \ingroup threshold
Calculates the threshold level for manual threshold using a percentage of pixels * that should stay bellow the threshold. \n * Image data type can be IM_BYTE, IM_SHORT or IM_USHORT. \n * Source color space must be IM_GRAY, and target color space must be IM_BINARY. * Returns the used level. * * \verbatim im.ProcessPercentThreshold(src_image: imImage, dst_image: imImage, percent: number) -> level: number [in Lua 5] \endverbatim * \verbatim im.ProcessPercentThresholdNew(src_image: imImage, percent: number) -> level: number, new_image: imImage [in Lua 5] \endverbatim * \ingroup threshold
Generates a zoom in effect averaging colors inside a square region. \n * Operates only on IM_BYTE images. * * \verbatim im.ProcessPixelate(src_image: imImage, dst_image: imImage, box_size: number) [in Lua 5] \endverbatim * \verbatim im.ProcessPixelateNew(src_image: imImage, box_size: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup effects
A simple Posterize effect. It reduces the number of colors in the image eliminating * less significant bit planes. Can have 1 to 7 levels. See \ref imProcessBitMask. \n * Images must have data type IM_BYTE. * * \verbatim im.ProcessPosterize(src_image: imImage, dst_image: imImage, level: number) [in Lua 5] \endverbatim * \verbatim im.ProcessPosterizeNew(src_image: imImage, level: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup effects
Quantizes a gray scale image in less that 256 grays using uniform quantization. \n * Both images should be IM_BYTE/IM_GRAY, the target can be IM_MAP. Can be done in-place. \n * The result is in the 0-255 range, except when target is IM_MAP that is in the 0-(grays-1) range. * * \verbatim im.ProcessQuantizeGrayUniform(src_image: imImage, dst_image: imImage, grays: number) [in Lua 5] \endverbatim * \verbatim im.ProcessQuantizeGrayUniformNew(src_image: imImage, grays: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup quantize
Converts a RGB image to a MAP image using uniform quantization * with an optional 8x8 ordered dither. The RGB image must have data type IM_BYTE. * * \verbatim im.ProcessQuantizeRGBUniform(src_image: imImage, dst_image: imImage, do_dither: boolean) [in Lua 5] \endverbatim * \verbatim im.ProcessQuantizeRGBUniformNew(src_image: imImage, do_dither: boolean) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup quantize
Render gaussian noise on existing data. Can be done in-place. * * \verbatim im.ProcessRenderAddGaussianNoise(src_image: imImage, dst_image: imImage, mean: number, stddev: number) -> counter: boolean [in Lua 5] \endverbatim * \verbatim im.ProcessRenderAddGaussianNoiseNew(src_image: imImage, mean: number, stddev: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim * \ingroup render
Render speckle noise on existing data. Can be done in-place. * * \verbatim im.ProcessRenderAddSpeckleNoise(src_image: imImage, dst_image: imImage, percent: number) -> counter: boolean [in Lua 5] \endverbatim * \verbatim im.ProcessRenderAddSpeckleNoiseNew(src_image: imImage, percent: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim * \ingroup render
Render uniform noise on existing data. Can be done in-place. * * \verbatim im.ProcessRenderAddUniformNoise(src_image: imImage, dst_image: imImage, mean: number, stddev: number) -> counter: boolean [in Lua 5] \endverbatim * \verbatim im.ProcessRenderAddUniformNoiseNew(src_image: imImage, mean: number, stddev: number) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim * \ingroup render
Render a centered box. * * \verbatim im.ProcessRenderBox(image: imImage, box_width: number, box_height: number) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render a centered chessboard. * * \verbatim im.ProcessRenderChessboard(image: imImage, x_space: number, y_space: number) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render a synthetic image using a conditional render function. \n * Data will be rendered only if the condional parameter is true. \n * Returns zero if the counter aborted. * * \verbatim im.ProcessRenderCondOp(image: imImage, render_cond_func: function, render_name: string, params: table) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render a centered cone. * * \verbatim im.ProcessRenderCone(image: imImage, radius: number) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render a constant. The number of values must match the depth of the image. * * \verbatim im.ProcessRenderConstant(image: imImage, value: table of number) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render a centered cosine. * * \verbatim im.ProcessRenderCosine(image: imImage, x_period: number, y_period: number) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render a color flood fill. \n * Image must the IM_RGB color space. replace_color must have 3 components. * * \verbatim im.ProcessRenderFloodFill(image: imImage, start_x, start_y: number, replace_color: table of 3 numbers, tolerance: number) [in Lua 5] \endverbatim * \ingroup render
Render a centered gaussian. * * \verbatim im.ProcessRenderGaussian(image: imImage, stddev: number) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render a centered grid. * * \verbatim im.ProcessRenderGrid(image: imImage, x_space: number, y_space: number) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render the laplacian of a centered gaussian. * * \verbatim im.ProcessRenderLapOfGaussian(image: imImage, stddev: number) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render a synthetic image using a render function. \n * plus will make the render be added to the current image data, * or else all data will be replaced. All the render functions use this or the conditional function. \n * Returns zero if the counter aborted. * * \verbatim im.ProcessRenderOp(image: imImage, render_func: function, render_name: string, params: table, plus: boolean) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render a ramp. Direction can be vertical (1) or horizontal (0). * * \verbatim im.ProcessRenderRamp(image: imImage, start: number, end: number, vert_dir: boolean) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render random noise. * * \verbatim im.ProcessRenderRandomNoise(image: imImage) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render a centered sinc. * * \verbatim im.ProcessRenderSinc(image: imImage, x_period: number, y_period: number) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render a centered tent. * * \verbatim im.ProcessRenderTent(image: imImage, tent_width: number, tent_height: number) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Render a centered wheel. * * \verbatim im.ProcessRenderWheel(image: imImage, internal_radius: number, external_radius: number) -> counter: boolean [in Lua 5] \endverbatim * \ingroup render
Replaces the source color by the target color. \n * The color will be type casted to the image data type. \n * The colors must have the same number of components of the images. \n * Supports all color spaces and all data types except complex. * * \verbatim im.ProcessReplaceColor(src_image: imImage, dst_image: imImage, src_color: table of numbers, dst_color: table of numbers) [in Lua 5] \endverbatim * \verbatim im.ProcessReplaceColorNew(src_image: imImage, src_color: table of numbers, dst_color: table of numbers) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup colorproc
Sets the alpha channel in target where the given color occours in source, * elsewhere alpha remains untouched. \n * The color must have the same number of components of the source image. \n * If target does not have an alpha channel, then its plane=0 is used. \n * Supports all color spaces for source and all data types except complex. * Images must have the same size. * * \verbatim im.ProcessSetAlphaColor(src_image: imImage, dst_image: imImage, src_color: table of numbers, dst_alpha: number) [in Lua 5] \endverbatim * \ingroup colorproc
Apply a shift using HSI coordinates. \n * Supports all data types except complex. \n * Can be done in-place. * * \verbatim im.ProcessShiftHSI(src_image: imImage, dst_image: imImage, h_shift, s_shift, i_shift: number) [in Lua 5] \endverbatim * \verbatim im.ProcessShiftHSI(src_image: imImage, h_shift, s_shift, i_shift: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup tonegamut
Apply a manual threshold using an interval. \n * threshold = start_level <= a <= end_level ? 1: 0 \n * Normal value is 1 but another common value is 255. \n * Source color space must be IM_GRAY, and target color space must be IM_BINARY. * complex is not supported. Can be done in-place for IM_BYTE source. \n * * \verbatim im.ProcessSliceThreshold(src_image: imImage, dst_image: imImage, start_level: number, end_level: number) [in Lua 5] \endverbatim * \verbatim im.ProcessSliceThresholdNew(src_image: imImage, start_level: number, end_level: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup threshold
Split a complex image into two images with real and imaginary parts \n * or magnitude and phase parts (polar). \n * Source image must be complex, target images must be real. * * \verbatim im.ProcessSplitComplex(src_image: imImage, dst_image1: imImage, dst_image2: imImage, polar: boolean) [in Lua 5] \endverbatim * \verbatim im.ProcessSplitComplexNew(image: imImage, polar: boolean) -> dst_image1: imImage, dst_image2: imImage [in Lua 5] \endverbatim * \ingroup arithm
Split a multicomponent image into separate components, including alpha.\n * Target images must be IM_GRAY. Size and data types must be all the same.\n * The number of target images must match the depth of the source image, including alpha. * * \verbatim im.ProcessSplitComponents(src_image: imImage, dst_image_list: table of imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessSplitComponentsNew(src_image: imImage) -> dst_image_list: table of imImage [in Lua 5] \endverbatim * \ingroup colorproc
Split a RGB image into HSI planes. \n * Source image can be IM_RGB/IM_BYTE or IM_RGB/IM_FLOAT only. Target images are all IM_GRAY/IM_FLOAT. \n * Source images must normalized to 0-1 if type is IM_FLOAT (\ref imProcessToneGamut can be used). * See \ref hsi for a definition of the color conversion.\n * Source and target must have the same size. * * \verbatim im.ProcessSplitHSI(src_image: imImage, h_image: imImage, s_image: imImage, i_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessSplitHSINew(src_image: imImage) -> h_image: imImage, s_image: imImage, i_image: imImage [in Lua 5] \endverbatim * \ingroup colorproc
Split a RGB image into luma and chroma. \n * Chroma is calculated as R-Y,G-Y,B-Y. Source image must be IM_RGB/IM_BYTE. \n * luma image is IM_GRAY/IM_BYTE and chroma is IM_RGB/IM_BYTE. \n * Source and target must have the same size. * * \verbatim im.ProcessSplitYChroma(src_image: imImage, y_image: imImage, chroma_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessSplitYChromaNew(src_image: imImage) -> y_image: imImage, chroma_image: imImage [in Lua 5] \endverbatim * \ingroup colorproc
Apply a manual threshold. \n * threshold = a <= level ? 0: value \n * Normal value is 1 but another common value is 255. Can be done in-place for IM_BYTE source. \n * Source color space must be IM_GRAY, and target color space must be IM_BINARY. * complex is not supported. \n * * \verbatim im.ProcessThreshold(src_image: imImage, dst_image: imImage, level: number, value: number) [in Lua 5] \endverbatim * \verbatim im.ProcessThresholdNew(src_image: imImage, level: number, value: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup threshold
Apply a threshold by the difference of two images. \n * threshold = a1 <= a2 ? 0: 1 \n * Source color space must be IM_GRAY, and target color space must be IM_BINARY. * complex is not supported. Can be done in-place for IM_BYTE source. \n * * \verbatim im.ProcessThresholdByDiff(src_image1: imImage, src_image2: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessThresholdByDiffNew(src_image1: imImage, src_image2: imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup threshold
Apply a gamut operation with arguments. \n * Supports all data types except complex. \n * For IM_GAMUT_NORMALIZE when min > 0 and max < 1, it will just do a copy. \n * IM_BYTE images have min=0 and max=255 always. \n * To control min and max values use the IM_GAMUT_MINMAX flag. * Can be done in-place. When there is no extra parameters, params can use NULL. * * \verbatim im.ProcessToneGamut(src_image: imImage, dst_image: imImage, op: number, params: table of number) [in Lua 5] \endverbatim * \verbatim im.ProcessToneGamutNew(src_image: imImage, op: number, params: table of number) -> new_image: imImage [in Lua 5] \endverbatim * See also \ref imageenhance. * \ingroup tonegamut
Apply an arithmetic unary operation. \n * Can be done in-place, images must match color space and size. \n * Target image can be several types depending on source: \n * \li any integer -> any integer or real * \li real -> real * \li complex -> complex * If source is complex, target complex must be the same data type (imcfloat-imcfloat or imcdouble-imcdouble only). \n * If target is byte, then the result is cropped to 0-255. * * \verbatim im.ProcessUnArithmeticOp(src_image: imImage, dst_image: imImage, op: number) [in Lua 5] \endverbatim * \verbatim im.ProcessUnArithmeticOpNew(image: imImage, op: number) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup arithm
Converts from (0-1) to (0-255), crop out of bounds values. \n * Source image must be real, and target image must be IM_BYTE. * * \verbatim im.ProcessUnNormalize(src_image: imImage, dst_image: imImage) [in Lua 5] \endverbatim * \verbatim im.ProcessUnNormalizeNew(src_image: imImage) -> new_image: imImage [in Lua 5] \endverbatim * \ingroup tonegamut
Apply an unary point color operation using a custom function. * One pixel from the source affects the same pixel on target. \n * Can be done in-place, images must match size, depth can be different. * Data type can be different, but complex is not supported. \n * op_name is used only by the counter and can be NULL. * Returns zero if the counter aborted. * * \verbatim im.ProcessUnaryPointColorOp(src_image: imImage, dst_image: imImage, func: function, params: table, [op_name: string]) -> counter: boolean [in Lua 5] \endverbatim * \verbatim im.ProcessUnaryPointColorOpNew(image: imImage, func: function, params: table, [op_name: string]) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim * In Lua, the params table is passed to the function by using the Lua stack, * so its table can contain any type of objects, but they all must be unnamed. * \ingroup point
Apply an unary point operation using a custom function. * One pixel from the source affects the same pixel on target. \n * Can be done in-place, images must match size and depth. * Data type can be different, but complex is not supported. \n * op_name is used only by the counter and can be NULL. * Returns zero if the counter aborted. * * \verbatim im.ProcessUnaryPointOp(src_image: imImage, dst_image: imImage, func: function, params: table, [op_name: string]) -> counter: boolean [in Lua 5] \endverbatim * \verbatim im.ProcessUnaryPointOpNew(image: imImage, func: function, params: table, [op_name: string]) -> counter: boolean, new_image: imImage [in Lua 5] \endverbatim * In Lua, the params table is passed to the function by using the Lua stack, * so its table can contain any type of objects, but they all must be unnamed. * \ingroup point
Calculates the threshold level for manual threshold using an uniform error approach. \n * Supports only IM_BYTE images. * Extracted from XITE, Copyright 1991, Blab, UiO \n * http://www.ifi.uio.no/~blab/Software/Xite/ \verbatim Reference: S. M. Dunn & D. Harwood & L. S. Davis: "Local Estimation of the Uniform Error Threshold" IEEE Trans. on PAMI, Vol PAMI-6, No 6, Nov 1984. Comments: It only works well on images whith large objects.
\file \brief Image Processing - Point Operations
See Copyright Notice in im_lib.d