display image with individual pixel size dimensions

조회 수: 2 (최근 30일)
browser
browser 2015년 4월 17일
댓글: Image Analyst 2015년 4월 21일
I currently have a 30x30 array with intensity values. I can plot this with colour intensity on a 30x30 grid using imagesc.
I also have a 30x30 cell array where each cell contains the x and y dimensions of the corresponding intensity value.
I want to create a colour intensity plot but to define the size of each 'square' using the cell array.
Is this possible?

채택된 답변

Image Analyst
Image Analyst 2015년 4월 17일
You'd have to loop over all cells and stitch them on one at a time, possibly enlarging the existing matrix before stitching. Of course if adjacent blocks have different sizes, then some "background" must show "underneath" the smaller one.
  댓글 수: 2
browser
browser 2015년 4월 21일
Thanks -
So I should loop over the cells and I guess assign each cell a start and end value for both x and y directions?
Then how do I plot it? imagesc wont work will it?
Image Analyst
Image Analyst 2015년 4월 21일
Just loop and stitch. Here's how to stitch
tallImage = [image1; image2];
wideImage = [image1, image2];
Just build it up horizontal bands first, then loop and stitch all the horizontal bands together.
You can use imshow() to "display" it, not "plot" it.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Modify Image Colors에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by