フィルターのクリア

How to visualize gradient data using arrows.

9 ビュー (過去 30 日間)
Fego Etese
Fego Etese 2020 年 4 月 26 日
コメント済み: Ameer Hamza 2020 年 4 月 30 日
I need help with the quiver function. I want to visualize the magnitude and angle data i have gotten from a block processing, with arrows in each block just like the (b) image below. Please how can i do that?
  2 件のコメント
Ameer Hamza
Ameer Hamza 2020 年 4 月 26 日
Can you share the information about the arrows directions in a .mat file?
Fego Etese
Fego Etese 2020 年 4 月 26 日
I have attached the matab files and my matlab workspace. I am using the gray image to get the orientation.
I am getting the average magnitude and direction for each block of size 16 x 16 and after getting these in the OrientationEstimation file with the variables coherence and angle, i will like to draw the arrows in the direction of the angle with the length as the coherence value in each block.

サインインしてコメントする。

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 4 月 26 日
編集済み: Ameer Hamza 2020 年 4 月 26 日
According to the coherence and angle variable you shared. You can make the quiver plot using this
dX = coherence.*cosd(angle);
dY = coherence.*sind(angle);
x = 1:size(dX,2);
y = 1:size(dX,1);
[X, Y] = meshgrid(x, y);
quiver(X,Y,dX,dY);
axis tight
But it does not look like the image you shared. Are you sure that the formula used to calculate coherence and angle is correctly implemented?
  28 件のコメント
Fego Etese
Fego Etese 2020 年 4 月 30 日
Oh, I understand. Thank you so much. I'll try to look into it more. Maybe raise a new question about it. When I'm done with understanding and implementing it I'll come back to sort out the quiver issue.
I really appreciuate your time.
Thanks
Ameer Hamza
Ameer Hamza 2020 年 4 月 30 日
Yes, that will be good. You are likely to get an answer on this issue from someone else. You can then comment here again when this issue is resolved.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by