How can I calculate directional vector of a line connecting two points?
23 ビュー (過去 30 日間)
古いコメントを表示
The two points are pixel position of an image
0 件のコメント
回答 (1 件)
goerk
2016 年 5 月 19 日
Startpoint = [1 2];
Endpoint = [3 3];
direction = Endpoint - Startpoint;
direction_scaled = direction/norm(direction); % vector with length 1
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Image Filtering and Enhancement についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!