how to permute matrix here?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi.. I have an image 128x128pixels. then it is divided into 8x8 block. so that we get 16 subblocks. each 8x8 block, i would like to permute position(1,1) of matrix 8x8 from one subblock to another subblock with same position (1,1). do you know how to solve this problem? i don't know about permutation here. Thank you
댓글 수: 0
답변 (1개)
Image Analyst
2013년 3월 31일
I don't even know what that means. Can you explain better and give an example? Can you also explain why you want to do this?
Otherwise, the only thing I can suggest is to get the row and column of each pixel in each block that you wish to swap and do the usual swap code:
savedPixelValue = grayImage(row1, column1);
grayImage(row1, column1) = grayImage(row2, column2);
grayImage(row2, column2) = savedPixelValue;
댓글 수: 4
Image Analyst
2013년 3월 31일
So why can't you adapt my code as follows:
row1 = 1;
column1 = 1;
savedPixelValue = b1(row1, column1);
b1(row1, column1) = b2(row2, column2);
b2(row2, column2) = savedPixelValue;
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Converters에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!