How to extract the content between the vertical lines drawn in an image?
2 views (last 30 days)
Show older comments
Hello, I have drawn the vertical lines and i want to extract the contents in between them.I have uploaded the code and the image also. Please help me with the code.

0 Comments
Accepted Answer
Walter Roberson
on 22 Dec 2015
fullsegments = floor(columns/spacing);
partialsegment = columns - fullsegments * spacing;
segmentwidths = spacing * ones(1,fullsegments);
if partialsegment > 0
segmentwidths(end+1) = partialsegment;
end
segments = mat2cell(BinaryImage, rows, segmentwidths);
Now segments{1}, segments{2} and so on will be the portions between where the lines would be. If the spacing did not exactly divide the number of columns then the segments{end} will be width less than spacing.
10 Comments
Meghashree G
on 11 Jan 2016
i tried this,
imcrop(binaryImage,[value 3 2 40]);
but im not getting exactly sir.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!