How to skew the line which is in the image?

i have this slant line to appear straight!how do i achieve this? Please help me.Thank you

 Risposta accettata

Image Analyst
Image Analyst il 19 Dic 2015
See my attached demo where I use the radon transform to find the mean angle of an image by looking for the maximum projection value and then use imrotate() to rotate the image.

6 Commenti

Thank you for the reply sir.
This is the output i'm getting.I can see that image itself is rotated which i don't need.I want the line which is slant to be rotated.How do i achieve that sir?
Then just take all the dark pixels and fit them to a line and get the angle of the line and call imrotate to reverse the angle. See attached m-file.
Thank you so much sir :)
Looks like it would be a part of a larger script that should work. My Crystal Ball Toolbox trial expired so I can no longer see your code or error messages or images. Read this.
Dear Sir it works fine when the number of the text line is only one but failed when the number of text lines is more than one!!!what can i do to handle it?
Extract one line at a time and then do it.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by