mirror of
https://github.com/wassname/scikit-image.git
synced 2026-08-11 11:25:30 +08:00
r is confusing, use ab instead
This commit is contained in:
@@ -320,11 +320,11 @@ def get_dH2(lab1, lab2):
|
|||||||
dH = sqrt(term)
|
dH = sqrt(term)
|
||||||
|
|
||||||
However, this has poor roundoff properties when a or b is dominant.
|
However, this has poor roundoff properties when a or b is dominant.
|
||||||
Instead, r is a vector with elements a and b. The same dH term can be
|
Instead, ab is a vector with elements a and b. The same dH term can be
|
||||||
re-written as:
|
re-written as:
|
||||||
|r1-r2|**2 - (|r1| - |r2|)**2
|
|ab1-ab2|**2 - (|ab1| - |ab2|)**2
|
||||||
and then simplified to:
|
and then simplified to:
|
||||||
2*|r1|*|r2| - 2*dot(r1, r2)
|
2*|ab1|*|ab2| - 2*dot(ab1, ab2)
|
||||||
"""
|
"""
|
||||||
lab1 = np.asarray(lab1)
|
lab1 = np.asarray(lab1)
|
||||||
lab2 = np.asarray(lab2)
|
lab2 = np.asarray(lab2)
|
||||||
|
|||||||
Reference in New Issue
Block a user