Remove Rows/columns of a rgb Image
5 次查看(过去 30 天)
显示 更早的评论
Hello ,
I have a rgb image 512x512 pixels. I want to remove it's rows or columns pixels. How can I do that in matlab? Any help please :)
Thanks
0 个评论
回答(1 个)
Ameer Hamza
2020-10-10
Something like this
img; % 3D RGB image array
c = []; % list of columns to delete
r = []; % list of rows to delete
img(r,c,:) = []
2 个评论
Ameer Hamza
2020-10-10
This line delete the rows specified in vector 'r', and columns specified in vector 'c' from variable img. [] tells MATLAB to delete those lines.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!