How do i split an image into 8x8 blocks using a function?
이전 댓글 표시
I need to split a 192x192 color image into blocks with 8x8 size. I also needed to split a grayscaled image same way which where i used this:
function x=cut(y)
for i=1:8:192
for j=1:8:192
x = y(i:i+7, j:j+7);
end
end
but i dont know how to do it with a color image.
답변 (1개)
David Hill
2020년 5월 28일
I assume you have the image processing toolbox. Look at Neighborhood and Block Processing.
blockproc()
col2im()
카테고리
도움말 센터 및 File Exchange에서 Neighborhood and Block Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!