Storing the output of "imhist" and apply bhattacharyya distance?

1 回表示 (過去 30 日間)
Sameema Tariq
Sameema Tariq 2020 年 1 月 27 日
How can I store the output of imhist function in any variable. I have used the variable "infoH" for this purpose, but i cannot obtain required results. I want to get "imhist" output of each video frame. How can I do it?
Secondly, I have to calculate bhattacharyya distance. For this purpose, I have to pass these variable "infoH" (having information of each frame in form of histogram) through this function
vid=VideoReader('xylophone.mp4');
infoH = cell([],1) ;
for numFrames = 1:vid.NumberOfFrames
thisframe = read(vid);
infoH{numFrames}=imhist(thisframe);
if numFrames>1 && numFrames<vid.NumberOfFrames
a1=imhist(infoH{1});a2=imhist(infoH{numFrames});
d(numFrames)=bhattacharyya(a1,a2);
end
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by