필터 지우기
필터 지우기

how to change angle of line in image

조회 수: 2 (최근 30일)
Sandhu
Sandhu 2012년 1월 4일
hi, i want to know " how to change the angle of a line in this image. here i have a line with -45 dig. http://imageshack.us/photo/my-images/209/line45dig.jpg/
i want to make this to straight line. i tried imrotate(img,45); http://imageshack.us/f/221/strightline.jpg/ but if i did this entire line is splitting into small lines. i want the same continuous line with out any gaps. due to this i am loosing original data. so, if you have any ideas please suggest me.
Thanks in advance.

답변 (1개)

Sean de Wolski
Sean de Wolski 2012년 1월 4일
Look at some of the interpolation options in:
doc imrotate
And perhaps try a different one.
You could also dilate the line before rotating it ( imdilate ) rotate it, and then skeletonize it after ( bwmorph with the skel option).
doc imdilate
doc bwmorph

Community Treasure Hunt

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

Start Hunting!

Translated by