How to delete every second pixel of each row from a photo?
显示 更早的评论
Hi everyone,
I need to write a program which will take a photo as a input and then I want to delete every second pixel of each row from a photo.
How can i do this? Thank you very much.
regards
ferdows
采纳的回答
更多回答(2 个)
Rushikesh Tade
2014-9-13
编辑:Rushikesh Tade
2014-9-13
Try following code:
function output_image=alternate_rows(input_image)
output_image=[];
for i=1:size(input_image,1)
output_image=[output_image input_image(i,1:2:size(input_image,2))]
end
Adam
2014-9-13
nCols = size( photo, 2 );
photo = photo( :, 1:2:nCols );
类别
在 帮助中心 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!