Confuse About How to CROP IMAGE AND REMOVING OF LIGHT
古いコメントを表示
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 件のコメント
Ryan
2012 年 6 月 6 日
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
2012 年 6 月 6 日
Ryan
2012 年 6 月 6 日
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
2012 年 6 月 6 日
採用された回答
その他の回答 (1 件)
Walter Roberson
2012 年 6 月 6 日
0 投票
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 件のコメント
KURNIAWAN
2012 年 6 月 6 日
Walter Roberson
2012 年 6 月 6 日
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
2012 年 6 月 9 日
カテゴリ
ヘルプ センター および File Exchange で Convert Image Type についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!