title: convert affine format of keypoints (shape of keypoints: [N, 6]) to conventional SIFT format (shape of keypoints: [N, 4])
body: <p>I have a question about convert affine format (shape of keypoints: [N, 6] which is axis 6 is x, y, A11, A12, A21, A22 respectively).</p>
  <p>to</p>
  <p>conventional SIFT format (shape of keypoints: [N, 4] and 4 is x, y, scale, angle respectively).</p>
  <p>any help would be appreciated.</p>
  <p><strong>UPDATE:</strong>
  semi code that I've found:</p>
  <pre><code>def derive_scale_ori(aff_mat):
    scale = np.sqrt(np.linalg.det(aff_mat))
    rot_mat = aff_mat/scale
    ori = np.arctan2(rot_mat[1, 1], rot_mat[0, 0])
    return scale, or
  </code></pre>
  <p>where aff_mat is: [[A11, A12],
  [A21, A22]]</p>
  <p>Are return values correct?</p>