18DIP Lab 5
18DIP Lab 5
• AND
• OR
• XOR
• NOT
Also, Bitwise operations helps in image masking. Image creation can be enabled with the
help of these operations. These operations can be helpful in enhancing the properties of the
input images.
NOTE:
Parameters:
• Source1: First Input Image array(Single-channel, 8-bit or floating-point)
• Source2: Second Input Image array(Single-channel, 8-bit or floating-point)
• Destination: Output array (Similar to the dimensions and type of Input image array)
• Mask: Operation mask, Input / output 8-bit single-channel mask
Input Code:
Output:
II. OR Operation Between two Images:
Syntax:
Parameters:
• Source1: First Input Image array(Single-channel, 8-bit or floating-point)
• Source2: Second Input Image array(Single-channel, 8-bit or floating-point)
• Destination: Output array (Similar to the dimensions and type of Input image array)
• Mask: Operation mask, Input / output 8-bit single-channel mask
Input Code:
Output:
Input Code:
Output:
Parameters:
• Source: Input Image array(Single-channel, 8-bit or floating-point)
• Destination: Output array (Similar to the dimensions and type of Input image array)
• Mask: Operation mask, Input / output 8-bit single-channel mask
Input Code:
Output:
Conclusion: