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!