フィルターのクリア

how to change angle of line in image

1 回表示 (過去 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