how to divide an image of 400x500pixels into 100 blocks each of size 40x50 pixels

조회 수: 1 (최근 30일)
how to divide an image of 400x500 pixels into 100 blocks each of size 40x50 pixels.and check each blocks for threshold value and turn whole block into white depending upon threshold value

채택된 답변

Image Analyst
Image Analyst 2016년 3월 6일
편집: Image Analyst 2016년 3월 6일
Two different ways are shown in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_split_an_image_into_non-overlapping_blocks.3F. Inside the loop, you can call graythresh() or some other threshold picking algorithm, and im2bw().
  댓글 수: 4
ramya sharma
ramya sharma 2016년 3월 11일
actually my question is how to recombine the image after dividing it into blocks
Image Analyst
Image Analyst 2016년 3월 11일
If you can, it might be best to just process it in place without chopping up into separate variables or cells. But if you must have different images, then you can stitch them together like this:
tallImage = [topImage; bottomImage];
wideImage = [leftImage, rightImage];
You'll need to change the images as you move along from blobk to block.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by