-
Notifications
You must be signed in to change notification settings - Fork 0
/
makeBorderOwnership.py
executable file
·54 lines (31 loc) · 1.24 KB
/
makeBorderOwnership.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from makePyramid import makePyramid
from edgeEvenPyramid import edgeEvenPyramid
from edgeOddPyramid import edgeOddPyramid
from makeComplexEdge import makeComplexEdge
from gaborPyramid import gaborPyramid
from seperatePyr import seperatePyr
from normCSPyr2 import normCSPyr2
from csPyramid import csPyramid
from borderPyramid import borderPyramid
from sumPyr import sumPyr
def makeBorderOwnership(img,params):
# I =
b1Pyr = []
for m in range(len(img)):
# print('\nAssigning Border Ownership on ')
for sub in range(len(img[m]['subtype'])):
map = img[m]['subtype'][sub]['data']
imPyr = makePyramid(map, params)
EPyr = edgeEvenPyramid(imPyr, params)
OPyr = edgeOddPyramid(imPyr, params)
cPyr = makeComplexEdge(EPyr,OPyr)
if(m==2):
csPyr = gaborPyramid(imPyr,img[m]['subtype'][sub]['ori'],params)
else:
csPyr = csPyramid(imPyr,params)
csPyrL, csPyrD = seperatePyr(csPyr,m)
csPyrL, csPyrD = normCSPyr2(csPyrL,csPyrD,m)
bPyr1_1,bPyr1_2 = borderPyramid(csPyrL, csPyrD, cPyr, params)
b1Pyr = sumPyr(bPyr1_1, bPyr1_2)
return EPyr
# return b1Pyr, b2Pyr