How i can determine the direction of the pixel??

조회 수: 2 (최근 30일)
sassi nizar
sassi nizar 2015년 10월 25일
댓글: sassi nizar 2015년 10월 25일
I am using lucas & kanade method to calculate the optical flow, I need that to classify the pixels into right,left,up and down.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 10월 25일
Look at whether abs(delta_x) > abs(delta_y) to determine whether you are dealing with left/right or with up/down . Then within each group, look at the sign of the controlling change to determine which of the two directions it is.
  댓글 수: 1
sassi nizar
sassi nizar 2015년 10월 25일
I have the two derivatives matrix fx and fy, i can use the tan inverse (fy/fx), and this give me a value in 0-360... my problem, how i can classify this value to right,left,up or down. exactly now what i need it is the inetrval how i can i define it.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by