mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-14 11:18:06 +08:00
Merge pull request #1235 from vighneshbirodkar/blob_fix
Fix blob area overlap function warning Fixes #1233
This commit is contained in:
@@ -53,8 +53,14 @@ def _blob_overlap(blob1, blob2):
|
||||
if d <= abs(r1 - r2):
|
||||
return 1
|
||||
|
||||
acos1 = arccos((d ** 2 + r1 ** 2 - r2 ** 2) / (2 * d * r1))
|
||||
acos2 = arccos((d ** 2 + r2 ** 2 - r1 ** 2) / (2 * d * r2))
|
||||
ratio1 = (d ** 2 + r1 ** 2 - r2 ** 2) / (2 * d * r1)
|
||||
ratio1 = np.clip(ratio1, -1, 1)
|
||||
acos1 = arccos(ratio1)
|
||||
|
||||
ratio2 = (d ** 2 + r2 ** 2 - r1 ** 2) / (2 * d * r2)
|
||||
ratio2 = np.clip(ratio2, -1, 1)
|
||||
acos2 = arccos(ratio2)
|
||||
|
||||
a = -d + r2 + r1
|
||||
b = d - r2 + r1
|
||||
c = d + r2 - r1
|
||||
|
||||
Reference in New Issue
Block a user