0
$\begingroup$

How can I obtain average direction of the pattern shown in the figure below. It is the direction of the red arrow relative to the yellow (horizontal) line. Any ideas for an approach? I couldn't figure out a way to approach. This is a spatio-temporal image created from a video. Thank you.

Figure A

$\endgroup$
  • $\begingroup$ What is exactly your problem, what have been done so far? Please edit your post. $\endgroup$ – MimSaad Aug 7 '17 at 21:47
  • 1
    $\begingroup$ Found solution at stackoverflow.com/questions/45547038/… $\endgroup$ – TRiNE Aug 10 '17 at 15:10
  • 1
    $\begingroup$ glad to hear that, so please delete your post because it is considered duplicated now. $\endgroup$ – MimSaad Aug 10 '17 at 16:33
  • $\begingroup$ @MimSaad according to community standards it is not duplicate since "The duplicate question must exist on Signal Processing Stack Exchange" $\endgroup$ – TRiNE Aug 10 '17 at 16:38
  • 1
    $\begingroup$ you should be a lawyer ;) $\endgroup$ – MimSaad Aug 10 '17 at 17:10
0
$\begingroup$

Solution is using structure tensors

from skimage.feature import structure_tensor

Axx, Axy, Ayy = structure_tensor(gray_image, sigma=1)
tan2t = (2*Axy)/(Axx-Ayy)
t=np.arctan(tan2t)/2
data = t.ravel()

# find the mode of `data` array (can use histogram). it is the direction.

another question and answers from other community

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.