Image Operation Functions

This palette contains vis for arithmetical and logical image data operation functions..

Note: An vi icon with yellow background means they work on color images. With gray background means they only work on single channel image. With half yellow and half gray background means they work on both color and single channel image. Others vi icon background are for either examples or high level vis. For controls descriptions, you need to go to the vi in LabVIEW, use help (ctrl+H) and move mouse over the controls to see them.

IVision_ConvertScaleAbs.vi

Can work on multi-channel images. This function stores absolute values of the conversion results:

B(I)=abs(A(I)*scale + (shift,shift,...))

The function supports only destination images of 8u (8-bit unsigned integers) type, in other depth one may use IVision_convertScale.vi plus IVision_AbsDifference.vi

Connector Pane

IVision_ConvertScaleAbs.vi


IVision_ConvertScale.vi

The function has several different purposes and thus has several synonyms. It copies one array to another with optional scaling, which is performed first, and/or optional type conversion, performed after:

B(I)=A(I)*scale + (shift,shift,...)

All the channels of multi-channel image are processed independently.

The type conversion is done with rounding and saturation, that is if a result of scaling + conversion can not be represented exactly by a value of destination image element type, it is set to the nearest representable value on the real axis.

Connector Pane

IVision_ConvertScale.vi


IVision_Compare.vi

The function compares the corresponding elements of two images and fills the destination image:

C(I)=A(I) op B(I),

where op is '=', '>', '>=', '<', '<=' or '!='.

C(I) is set to 0xff (all '1'-bits) if the particular relation between the elements is true and 0 otherwise. All the images must have the same type, except the destination, and the same size (or ROI size)

Connector Pane

IVision_Compare.vi


IVision_CompareWithScalar.vi

The function compares the corresponding elements of image and scalar and fills the destination image:

C(I)=A(I) op S,

where op is '=', '>', '>=', '<', '<=' or '!='.

C(I) is set to 0xff (all '1'-bits) if the particular relation between the elements is true and 0 otherwise. All the images must have the same size (or ROI size)

Connector Pane

IVision_CompareWithScalar.vi


IVision_InRangeWithScalar.vi

The function does the range check for every element of the input image:

C(I)=SL0 <= A(I)0 < SU0

for a single-channel image,

C(I)=SL1 <= A(I)1 < SU1 &&

SL2 <= A(I)2 < SU2&&SL3<=A(I)3<SU3

for color image etc.

C(I) is set to 0xff (all '1'-bits) if A(I) is within the range and 0 otherwise. All the images must have the same size (or ROI size)

Connector Pane

IVision_InRangeWithScalar.vi


IVision_InRange.vi

The function does the range check for every element of the input image:

C(I)=L(I)0 <= A(I)0 < U(I)0

for single-channel image,

C(I)=L(I)1<= A(I)1 < U(I)1 &&

L(I)2<= A(I)2 < U(I)2&&L(I)3 <= A(I)3< U(I)3

for color image.

C(I) is set to 0xff (all '1'-bits) if A(I) is within the range and 0 otherwise. All the images must have the same type, except the destination, and the same size (or ROI size)

Connector Pane

IVision_InRange.vi


IVision_RepeatSource.vi

Repeat the source image, that means it stores a tiled image of source to destination image. so the destination image should be bigger than source one.

Connector Pane

IVision_RepeatSource.vi


IVision_Subtraction.vi

The function subtracts one image from another one:

C(I)=A(I)-B(I) if mask(I)!=0

All the images must have the same type, except the mask, and the same size (or ROI size)

Connector Pane

IVision_Subtraction.vi


IVision_SubtractionScalar.vi

The function subtracts every element of source image from a scalar:

C(I)=S-A(I) if mask(I)!=0

All images must have the same type, except the mask, and the same size (or ROI size)

Connector Pane

IVision_SubtractionScalar.vi


IVision_AbsDifferenceWithScalar.vi

The function calculates absolute difference between image and scalar.

C(I)c = abs(A(I)c - Sc).

All the images must have the same data type and the same size (or ROI size).

Connector Pane

IVision_AbsDifferenceWithScalar.vi


IVision_AbsDifference.vi

The function calculates absolute difference between two images.

C(I)c = abs(A(I)c - B(I)c).

All the images must have the same data type and the same size (or ROI size). Can work on muti-channel images.

Connector Pane

IVision_AbsDifference.vi


IVision_Add.vi

This vi adds image1 and image2 and save in destination image.

C(I)=A(I)+B(I) if mask(I)!=0

All the images must have the same type, except the mask, and the same size (or ROI size)

Connector Pane

IVision_Add.vi


IVision_AddScalar.vi

This vi adds scalar to every element in the source image and stores the result in destination image.

If A is source image, S is scalar, C is destination image, then

C(I)=A(I)+S if mask(I)!=0

All the images must have the same type, except the mask, and the same size (or ROI size)

Connector Pane

IVision_AddScalar.vi


IVision_Min.vi

The function calculates per-element minimum of two images:

C(I)=min(A(I),B(I))

All the images must have a single channel, the same data type and the same size (or ROI size).

Connector Pane

IVision_Min.vi


IVision_MinWithScalar.vi

The function calculates minimum of image and scalar:(but right now has bug, it works like maxwithscalar, have to wait for OpenCV to fix the bug).

C(I)=min(A(I), S)

All the images must have a single channel, the same data type and the same size (or ROI size).

Connector Pane

IVision_MinWithScalar.vi


IVision_Max.vi

The function calculates per-element maximum of two images:

C(I)=max(A(I), B(I))

All the images must have a single channel, the same data type and the same size (or ROI size).

Connector Pane

IVision_Max.vi


IVision_MaxWithScalar.vi

The function calculates per-element maximum of image and scalar:

C(I)=max(A(I), S)

All the images must have a single channel, the same data type and the same size (or ROI size).

Connector Pane

IVision_MaxWithScalar.vi


IVision_Mul.vi

The function calculates per-element product of two images:

C(I)=scale•A(I)•B(I)

All the images must have the same type, and the same size (or ROI size)

Connector Pane

IVision_Mul.vi


IVision_Division.vi

The function divides one image by another:

C(I)=scale•A(I)/B(I), if A!=NULL

All the images must have the same type, and the same size (or ROI size)

Connector Pane

IVision_Division.vi


IVision_Power.vi

The function raises every element of input image to p:

Y(I)=X(I)p, if p is integer

Y(I)=abs(X(I))p, otherwise

That is, for non-integer power exponent the absolute values of input image elements are used.

Connector Pane

IVision_Power.vi


IVision_Xor.vi

The function calculates per-element bit-wise logical conjunction of two images:

C(I)=A(I)^B(I) if mask(I)!=0

In the case of floating-point images their bit representations are used for the operation. All the images must have the same type, except the mask, and the same size

Connector Pane

IVision_Xor.vi


IVision_XorScalar.vi

The function calculates per-element bit-wise conjunction of image and scalar:

C(I)=A(I)^S if mask(I)!=0

Prior to the actual operation the scalar is converted to the same type as the image. In the case of floating-point image their bit representations are used for the operation. All the images must have the same type, except the mask, and the same size

Connector Pane

IVision_XorScalar.vi


IVision_Or.vi

The function calculates per-element bit-wise disjunction of two images:

C(I)=A(I)|B(I)

In the case of floating-point images their bit representations are used for the operation. All the images must have the same type, except the mask, and the same size

Connector Pane

IVision_Or.vi


IVision_OrScalar.vi

The function calculates per-element bit-wise disjunction of image and scalar:

C(I)=A(I)|S if mask(I)!=0

Prior to the actual operation the scalar is converted to the same type as the image. In the case of floating-point arrays their bit representations are used for the operation. All the images must have the same type, except the mask, and the same size

Connector Pane

IVision_OrScalar.vi


IVision_And.vi

The function calculates per-element bit-wise logical conjunction of two images:

C(I)=A(I)&B(I) if mask(I)!=0

In the case of floating-point images their bit representations are used for the operation. All the images must have the same type, except the mask, and the same size.

Connector Pane

IVision_And.vi


IVision_AndScalar.vi

The function calculates per-element bit-wise conjunction of image and scalar:

C(I)=A(I)&S if mask(I)!=0

Prior to the actual operation the scalar is converted to the same type as the image. In the case of floating-point image their bit representations are used for the operation. All the images must have the same type, except the mask, and the same size.

Connector Pane

IVision_AndScalar.vi


IVision_Not.vi

The function Not inverses every bit of every image element:

C(I)=~A(I)

Connector Pane

IVision_Not.vi