How can I calculate directional vector of a line connecting two points?
조회 수: 27 (최근 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!