Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consulting for Q8 metric #12

Open
KSJhon opened this issue Apr 24, 2022 · 0 comments
Open

Consulting for Q8 metric #12

KSJhon opened this issue Apr 24, 2022 · 0 comments

Comments

@KSJhon
Copy link

KSJhon commented Apr 24, 2022

Dear!
Thank for your nice work.
I would like to use your metric.py module to assess Q2n index for WorldView3 imagery with 8 MS bands.
But I am not sure how to rewrite your Q4 function, specifically the following part:

def product(a, b):
    a = a.reshape(a.shape[0],1)
    b = b.reshape(b.shape[0],1)
    R = np.dot(a, b.transpose())
    r = np.zeros(4)
    r[0] = R[0, 0] - R[1, 1] - R[2, 2] - R[3, 3]
    r[1] = R[0, 1] + R[1, 0] + R[2, 3] - R[3, 2]
    r[2] = R[0, 2] - R[1, 3] + R[2, 0] + R[3, 1]
    r[3] = R[0, 3] + R[1, 2] - R[2, 1] + R[3, 0]
    return r

I apologize for taking your time and look forward to your reply.

Best regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant