how to separate the image given below

回答 (2 件)

Image Analyst
Image Analyst 2015 年 3 月 12 日

0 投票

How about
upperLeft = grayImage(1:rows/2, 1:columns/2);
and so on?

4 件のコメント

tina jain
tina jain 2015 年 3 月 12 日
Undefined function 'grayImage' for input arguments of type 'double'
this is the error
Image Analyst
Image Analyst 2015 年 3 月 12 日
編集済み: Image Analyst 2015 年 3 月 12 日
tina, what did you call your image variable? grayImage was just an example - you were supposed to replace it with actual variables.
[rows, columns, numberOfColorChannels] = size(whateverYourImageIsCalled);
r1 = int32(rows/2);
c1 = int32(columns/2);
r2 = r1+1;
c2 = c1+1;
upperLeft = whateverYourImageIsCalled(1:r1, 1:c1);
upperRight = whateverYourImageIsCalled(1:r1, c2:end);
lowerLeft = whateverYourImageIsCalled(r2:end, 1:c1);
lowerRight = whateverYourImageIsCalled(r2:end, c2:end);
tina jain
tina jain 2015 年 3 月 12 日
ok i got it. Let me try this
tina jain
tina jain 2015 年 3 月 12 日
its working. thanks a ton.

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

Dimitri
Dimitri 2015 年 3 月 12 日
編集済み: Dimitri 2015 年 3 月 12 日

0 投票

カテゴリ

タグ

質問済み:

2015 年 3 月 12 日

編集済み:

2015 年 3 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by