-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcut.py
28 lines (18 loc) · 1.01 KB
/
cut.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
# arcsin_arg is calculating the argument value of arcsin() as given in equation 4 under Photo Collection Segmentation.
arcsin_arg = math.sqrt(
math.sin(del_delta / 2) ** 2 + (math.cos(lat2) * math.cos(lat1) * math.sin(del_lambda / 2) ** 2))
''' Function math.asin(x) Returns the arc sine of x, in radians.
Refer https://docs.python.org/2/library/math.html for more details.'''
phi_rad = 2 * math.asin(arcsin_arg) # Equation 4 -- page 136
# 6370Km is D i.e. radius of the Earth.
if phi_rad == 0 : # if phi_rad will be zero then log function will throw an error so changing to non-zero value.
phi_rad = 0.1
# Calculating the value of distance gaps :
distance_gap = math.log10(6370 * phi_rad) # Equation 3 second part
#print distance_gap
'''image_info_db[len(image_info_db) - 1] = ??
// gn
// if gn >
// push current set into list
// put currennt element into new set
'''