MATLAB: Orientation of connected component in a binary image

binary imageimage processingImage Processing Toolboxlicence plate detectionorientation

hi friends can some one help me in finding orientation of each connected component in a binary image. To be more clear in the above image how to calculate that how much each white region is inclined? Basically i am working in number plate detection. I am able to locate number plate but some times number plate is locating but in parts. So depending on difference between angle of inclination of two connected regions i want to combine that particular two regions.
Thanks

Best Answer

Call regionprops(), asking it to return 'Orientation'. See my image segmentation tutorial if you need help.