Common Vision Blox 15.0
Arithmetic

Common Vision Blox Foundation Package Tool


C-Style

C++

 .Net API (C#, VB, F#) 

Python
 Arithmetic   Cvb::Foundation::Arithmetic   cvb.foundation 

Introduction

Common Vision Blox Arithmetic is a function library used to apply arithmetic and logical operators to images.
A number of functions are available for this purpose, all of which are fully compatible with the Common Vision Blox image format.

Arithmetic or logical operators are applied to images for the purpose of image calibration and image masking.
Differences in images can also be made visible by means of image subtraction.
It is thus clear that there is a wide range of applications for this, both in industry and medicine (e.g. subtraction angiography).

The functions operate with an 8-bit or 16-bit channel of input images, providing new output images, which can also have an image depth of 8-16 bits.
As well as addition, subtraction, multiplication, division, AND, OR and XOR operations on two images, the images can also be combined by means of a user-defined 256*256 LUT (look-up table). Functions which can be used to reduce or extend the bit depth of an input image or transform an input image via LUT are also available.<

Various methods of image access are supported to ensure the greatest possible degree of flexibility.
Both rapid linear image access and flexible VPAT access are implemented.
You can find details on VPAT in the documentation for the Common Vision Blox Image Manager.

 

Arithmetic is classified as a Common Vision Blox tool because its functions are provided in a DLL, thus providing optimum flexibility when integrating the functions in other applications.
Its classification as a tool does not imply any restrictions in terms of quality or functions, but is merely intended as a guide as to the type of programming required.

Feature Overview

Image Processing Tool to apply arithmetic and logical operators to images

  • Available as DLL and ActiveX Control
  • Addition, Subtraction of two input images
  • Logical operations of two input images (AND, OR and XOR operations)
  • Multiplication and division of two input images
  • Combining two images by means of a user-defined 256x256 LUT (look-up table)
  • Applying a user-defined 256x256 LUT (look-up table) to one image
  • Multiplication and division of one input images with a factor
  • Supports up to 16 bit per Plane
  • Functions for reduction of 16 bit images
  • Support of dedicated image planes (mulitichannel images)
  • Focused on providing high processing speed
  • Is available as part of the CVB Foundation Package

Sample program code

A brief example is provided below in form of an excerpt from the Visual Basic tutorial program VCAriDemo > cvbTutorials.

  • Two images are loaded and then subtracted using the AriLog8to8 function.
  • The output image is displayed.
#include "iCVCImg.h"
#include "iArithmetic.h"
// Loading of two images for image operations
m_InImage1.LoadImageByDialog ();
m_InImage2.LoadImageByDialog ();
//Function call for image substraction
m_Mode = 2;
m_Offset = 0;
m_Error = 0;
Result = AriLog8to8((IMG)m_InImage1.GetImage(), 0, //Plane 0 of Input Image 1
(IMG)m_InImage2.GetImage(), 0, //Plane 0 of Input Image 2
m_Mode, //One of the CVBARI_LOG_MODE operations (addition, substraction,AND,OR,XOR)
m_Offset //Constant added to output image for additions and substractions
OutImage);
// Display result and release output image (refer Image Manager)
m_Disp.SetImage(reinterpret_cast<intptr_t>(OutImage));
ReleaseImage(OutImage);
m_Error = Result;