stright line in one column or raw
1视图(last 30 days)
Show older comments
could any one help me ?
if i have a line as figure shown with pexils which does not exixt in one line (raw or column ) how can i make this line completely stright ? what code i hav to write ?
0 Comments
Accepted Answer
Image Analyst
on 14 Mar 2015
Just get the coordinates
[rows, columns] = find(grayImage < 128);
然后find the max and min:
row1 = min(rows);
row2 = max(rows);
% Find average column
meanColumn = int32(mean(columns));
然后draw the line
grayImage(row1:row2, meanColumn) = 0;
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!