[mmcmp] [Up] [mmneg] Relations

mmis
Verify if a relationship among images is true or false.

Synopsis

function y = mmis ( f1 , oper , f2 , oper1 , f3 )

Input

f1 Image Gray-scale (uint8 or uint16) or binary image
oper String

relationship from: '==', '~=', '<','<=', '>', '>=', 'binary', 'gray'.

f2 Image Gray-scale (uint8 or uint16) or binary image

Default: NULL

oper1 String

Default: NULL

relationship from: '==', '~=', '<','<=', '>', '>='.

f3 Image Gray-scale (uint8 or uint16) or binary image

Default: NULL

Output

y Double

Bool value: 0 or 1

Description

Verify if the property or relatioship between images is true or false. The result is true if the relationship is true for all the pixels in the image, and false otherwise. (Obs: This function replaces mmis equal, mmis lesseq, mmis binary).

Examples

fbin=mmbinary([0 1]);
Warning: converting image from double to int32
f1=uint8([1 2 3]);
f2=uint8([2 2 3]);
f3=uint8([2 3 4]);
mmis(fbin,'binary')
ans =
     1
mmis(f1,'gray')
ans =
     1
mmis(f1,'==',f2)
ans =
     0
mmis(f1,'<',f3)
ans =
     1
mmis(f1,'<=',f2)
ans =
     1
mmis(f1,'<=',f2,'<=',f3)
ans =
     1

See also

mmcmp Compare two images pixelwisely.
mmfreedom Control automatic data type conversion.
mmbinary Convert a gray-scale image into a binary image
mmgray Convert a binary image into a gray-scale image.
[mmcmp] [Up] [mmneg]