how to repalce a matrix

hi i have a image of 256*256 matrix,and other image2 of 8*8 matrix,now i want to remove 8*8 matrix from 256*256matrix replace image2 8*8 into 256*256 matrix,and wen i call that image the repalced image must be indicated by rounding box

3 件のコメント

Jan
Jan 2011 年 11 月 21 日
What does this mean: "replace image2 8*8 into 256*256 matrix"? And how can you "call that image"? What does "indicating" mean? And finally, what is the actual question?
Pat
Pat 2011 年 11 月 21 日
I have a image 1 256*256 ,secong image 8*8matrix,now i want to remove,8*8matrix from 256*256 and replace by image 2 of 8*8 matrix
Jan
Jan 2011 年 11 月 21 日
"rounding box" == "bounding box"?

サインインしてコメントする。

 採用された回答

Amith Kamath
Amith Kamath 2011 年 11 月 21 日

0 投票

I wonder what the purpose of this is, but here goes:
Image1 = imread('rice.png'); % conveniently is 256x256.
Image2 = uint8(zeros(8,8)); %Artificial image 2.
Image3 = Image1; Image3(1:8,1:8) = Image2; %change the indices 1:8 to wherever you want to put the Image2 in Image1;
You could add the bounding box, if that's what you mean, by manually adding rows and columns of black pixels around your Image2. Image2(1,:) = ones(size(Image2(1,:))); and so on for all the borders. Does this work?

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

質問済み:

Pat
2011 年 11 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by