フィルターのクリア

anyone help me please to crop the image into 8 bloks, 4 rows and 2 columns

2 ビュー (過去 30 日間)
bay rem
bay rem 2016 年 2 月 29 日
編集済み: Andrei Bobrov 2016 年 3 月 3 日
here there is the code i used where x is the original Image
bbox1=x(1:size(x,1)/4,1:size(x,2)/2,:);
var1=var(double(bbox1))
%%2
bbox2=x(size(x,1)/4+1:size(x,1)/2,1:size(x,2)/2,:);
var2=var(double(bbox2))
%%3
bbox3=x(size(x,1)/2:size(x,1)/3,1:size(x,2)/2,:);
var3=var(double(bbox3))
%%4
bbox4=x((size(x,1)/3)+1:size(x,1),1:size(x,2)/2,:);
var4=var(double(bbox4))
%%5
bbox5=x(1:size(x,1)/4,size(x,2)/2+1:size(x,2),:);
figure(6);imshow(bbox5)
%%6
bbox6=x(size(x,1)/4:size(x,1)/2,size(x,2)/2+1:size(x,2),:);
figure(7);imshow(bbox6)
%%7
bbox7=x(size(x,1)/2+1:(size(x,1))/3,size(x,2)/2+1:size(x,2),:);
figure(8);imshow(bbox7)
%%8
bbox8=x((size(x,1))/3+1:size(x,1),size(x,2)/2+1:size(x,2),:);
figure(9);imshow(bbox8)

回答 (1 件)

Andrei Bobrov
Andrei Bobrov 2016 年 2 月 29 日
[m,n,k] = size(x);
out = mat2cell(x,m/4*ones(4,1),n/2*[1,1],k);
  2 件のコメント
bay rem
bay rem 2016 年 2 月 29 日
and how cna i crop the images?
Andrei Bobrov
Andrei Bobrov 2016 年 3 月 1 日
編集済み: Andrei Bobrov 2016 年 3 月 3 日
out{1,1}.. out{4,2} - your images

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

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by