IM: Logical Arithmetic Operations

IM - An Imaging Tool

Logical Arithmetic Operations
[Image Processing]


Detailed Description

Logical binary math operations for images.
See im_process_pon.h


Enumerations

enum  imLogicOp { IM_BIT_AND, IM_BIT_OR, IM_BIT_XOR }

Functions

void imProcessBitwiseOp (const imImage *src_image1, const imImage *src_image2, imImage *dst_image, int op)
void imProcessBitwiseNot (const imImage *src_image, imImage *dst_image)
void imProcessBitMask (const imImage *src_image, imImage *dst_image, unsigned char mask, int op)
void imProcessBitPlane (const imImage *src_image, imImage *dst_image, int plane, int do_reset)

Enumeration Type Documentation

enum imLogicOp
 

Logical Operations.

Enumerator:
IM_BIT_AND  and = a & b
IM_BIT_OR  or = a | b
IM_BIT_XOR  xor = ~(a | b)
00292                {
00293   IM_BIT_AND,   /**< and  =   a & b   */
00294   IM_BIT_OR,    /**< or   =   a | b   */
00295   IM_BIT_XOR    /**< xor  = ~(a | b)  */
00296 };


Function Documentation

void imProcessBitwiseOp const imImage src_image1,
const imImage src_image2,
imImage dst_image,
int  op
 

Apply a logical operation.
Images must have data type IM_BYTE, IM_USHORT or IM_INT. Can be done in place.

im.ProcessBitwiseOp(src_image1: imImage, src_image2: imImage, dst_image: imImage, op: number) [in Lua 5] 
im.ProcessBitwiseOpNew(src_image1: imImage, src_image2: imImage, op: number) -> new_image: imImage [in Lua 5] 

void imProcessBitwiseNot const imImage src_image,
imImage dst_image
 

Apply a logical NOT operation.
Images must have data type IM_BYTE, IM_USHORT or IM_INT. Can be done in place.

im.ProcessBitwiseNot(src_image: imImage, dst_image: imImage) [in Lua 5] 
im.ProcessBitwiseNotNew(src_image: imImage) -> new_image: imImage [in Lua 5] 

void imProcessBitMask const imImage src_image,
imImage dst_image,
unsigned char  mask,
int  op
 

Apply a bit mask.
The same as imProcessBitwiseOp but the second image is replaced by a fixed mask.
Images must have data type IM_BYTE. It is valid only for AND, OR and XOR. Can be done in place.

im.ProcessBitMask(src_image: imImage, dst_image: imImage, mask: string, op: number) [in Lua 5] 
im.ProcessBitMaskNew(src_image: imImage, mask: string, op: number) -> new_image: imImage [in Lua 5] 
In Lua, mask is a string with 0s and 1s, for example: "11001111".

void imProcessBitPlane const imImage src_image,
imImage dst_image,
int  plane,
int  do_reset
 

Extract or Reset a bit plane. For ex: 000X0000 or XXX0XXXX (plane=3).
Images must have data type IM_BYTE. Can be done in place.

im.ProcessBitPlane(src_image: imImage, dst_image: imImage, plane: number, do_reset: boolean) [in Lua 5] 
im.ProcessBitPlaneNew(src_image: imImage, plane: number, do_reset: boolean) -> new_image: imImage [in Lua 5]