How to crop automatically the center region of an image?
Show older comments
sir, i need to automatically crop the center region of the image. The images are the scanned X-ray images of welded joints.So as we know the welded portion will be almost at the center. so i need to crop that region only. i think i cannot use imcrop because the image size will be different for images and so cannot give a particular center value(coordinates).i am thinking of 2 methods. one is to find the centroid of the image and giving to crop specifying some ,say 100 pixels to both sides and the second using contrast ,by checking the contrast from both top and bottom of image and where there is sudden change eliminate the scanned part. But i dont know how this should be done. Can u suggest me how to do like this or any other method to do this?
Answers (1)
Image Analyst
on 10 May 2013
0 votes
See my image segmentation tutorial: http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862 where I find objects in the image and crop them according to their bounding box.

Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!