Function iaislesseq

namespace:morph
page:iaislesseq

Synopse

Verify if one image is less or equal another (is beneath)

  • boo = iaislesseq(f1, f2, MSG=NULL)
    • boo: Boolean
    • f1: Image
    • f2: Image
    • MSG: String
1. from numpy import *
2. 
3. def iaislesseq(f1, f2, MSG=None):
4. 
5. 
6.     bool = min(ravel(f1<=f2))
7. 
8. 
9.     return bool

Description

iaislesseq compares the images f1 and f2 and returns true (1), if f1(x) <=  f2(x), for every pixel x, and false (0), otherwise.

Examples

Example 1

1. from ia870 import iaislesseq
2. 
3. 
4. f1 = uint8([0, 1, 2, 3])
5. f2 = uint8([9, 5, 3, 3])
6. print iaislesseq(f1,f2)
7. print iaislesseq(f2,f1)
8. print iaislesseq(f1,f1)
True
False
True

Equation

Algorithm

function g = iaislesseq_equ(f1,f2)
g = all(all(f1<=f2));