[mmcmp] [Up] [mmneg] Relations

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

Synopsis

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

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

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

Default: Null

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])
f1=uint8([1, 2, 3])
f2=uint8([2, 2, 3])
f3=uint8([2, 3, 4])
mmis(fbin,'binary')
1.0
mmis(f1,'gray')
True
mmis(f1,'==',f2)
0.0
mmis(f1,'<',f3)
1.0
mmis(f1,'<=',f2)
1.0
mmis(f1,'<=',f2,'<=',f3)
            
1.0

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]