フィルターのクリア

how to save a vector coming from a function, into a matrix?

1 回表示 (過去 30 日間)
Rida
Rida 2014 年 4 月 13 日
コメント済み: Rida 2014 年 4 月 13 日
My basic code is :
clc
close all
%%%%%%%%Read an Image + convert into grayscale
fileNames=dir(fullfile('D:\Project\HSV\New Folder\*.bmp')) ;
for k= 1:length(fileNames)
img_rgb = imread(['D:\Project\HSV\New Folder\' fileNames(k).name]);
my_vector = quant_hist (img_rgb);
end
where the fucntion quant_hist is returning me a vector of size[256x1] , in images I am having 3 images , so I want my_vector to be of size [256x3] but it stores only the ast iteration value.

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 4 月 13 日
編集済み: Azzi Abdelmalek 2014 年 4 月 13 日
fileNames=dir(fullfile('D:\Project\HSV\New Folder\*.bmp')) ;
my_vector=zeros(256,3);
for k= 1:length(fileNames)
img_rgb = imread(['D:\Project\HSV\New Folder\' fileNames(k).name]);
my_vector(:,k) = quant_hist (img_rgb);
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Identification についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by