How to rotate a line using Matlab?
이전 댓글 표시
Suppose I have an image I and a line h1. Using Matlab, I can draw the line (or segment) like this (in red) :
h1 = plot( [l1 l1],[20 100], 'r');
Now I want to rotate the image I with an angle of 45°. So I used imrotate like this:
IR = imrotate(I,45);
Now, I want to rotate the line, how to do that using Matlab ?
PS: I found the function rotate. I am trying this, but it is not working !
rotate(h1,[1 1],45);
채택된 답변
추가 답변 (1개)
Habtamu Tesfaw
2021년 3월 12일
편집: Habtamu Tesfaw
2021년 3월 12일
0 개 추천
here is a simple package that can do the job '
https://www.mathworks.com/matlabcentral/fileexchange/88748-lrotate?s_tid=srchtitle
카테고리
도움말 센터 및 File Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!