Confuse About How to CROP IMAGE AND REMOVING OF LIGHT
Show older comments
I Have thesis on my college,, and my lecturer reject my method about how to crop and removing of light on it,,
_____________________
% i wanna try with simply m-file 1st
i = imread ('picture1'); i =imread( 'picture2');
%how then ???
4 Comments
Ryan
on 6 Jun 2012
To clarify, are these the 3 things you are trying to do:
1. Remove the light reflections
2. Correct the image perspective (so the tile is a square not a warped rhombus or trapezoid)
3. Crop the image to eliminate the background
?
KURNIAWAN
on 6 Jun 2012
Ryan
on 6 Jun 2012
Others have already answered parts 1 and 3 for you in your previous questions. I don't think correcting the image perspective will be easy. Personally, I would use an image editing software such as Photoshop to correct the warping before processing. I believe the answer for correcting the distortion in MATLAB lies in the link that Walter Roberson shared.
Possibly something here could help: http://www.csse.uwa.edu.au/~pk/research/matlabfns/#projective
KURNIAWAN
on 6 Jun 2012
Accepted Answer
More Answers (1)
Walter Roberson
on 6 Jun 2012
0 votes
I have not used that myself so I do not know how difficult it will be for you to remove the bowing, but you should at the very least be able to do the rotation to align the bottom of the image with the y axis.
3 Comments
KURNIAWAN
on 6 Jun 2012
Walter Roberson
on 6 Jun 2012
The link I gave is not a tutorial: it is a reference page. The imtransform() routine is not just for rotation. Look at the Horizontal Shear example: any routine that can create horizontal shear can be used to remove existing horizontal shear in an object (your tile have some horizontal shear.)
We could give you code that would crop the image, leaving the largest possible rectangle that has no background in it. Your lecturer would not be happy about that solution. The word "warp" that is in that first image you post is requiring you to do more than just crop out the inconvenient parts: it is requiring you to transform the image so that its edges are fairly rectangular, without throwing away any of the foreground parts of the picture. You need to hold on to (some of) that black background while you do the image transformations, until you finally get the interesting part of the image all squared up; once it is squared up, you can crop away the extra background, not before.
KURNIAWAN
on 9 Jun 2012
Categories
Find more on Computer Vision with Simulink 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!