Images viewing through axes in matlab GUI
1 回表示 (過去 30 日間)
古いコメントを表示
i have a simple code to retrieve images using histogram .. i would like to view the result images that satisfy condition from Axes1..to Axes5 ..
srcFiles = dir(my directory);
for i = 1 : length(srcFiles)
filename = strcat(path,'\',srcFiles(i).name);
Imaged1= imread(filename);
Imaged2 = imread('D:\2','jpeg'); % Image 2
Imageg1 = rgb2gray(Imaged1);
Imageg2 = rgb2gray(Imaged2);
% Calculate the Normalized Histogram of Image 1 and Image 2
hn1 = imhist(Imageg1)./numel(Imageg1);
hn2 = imhist(Imageg2)./numel(Imageg2);
% Calculate the histogram error
y = sum((hn1 - hn2).^2);
if (y <= 0.005)
disp('not similar');
else
* _{{{ View Result Images from Axes2 .... Axes5. }}}_*
end
0 件のコメント
採用された回答
Walter Roberson
2016 年 4 月 2 日
Ahead of time:
axeslist = [Axes2, Axes3, Axes4, Axes5];
cur_ax_idx = 0;
Then in the code, when the condition is met,
if cur_ax_idx < length(axeslist)
cur_ax_idx = cur_ax_idx + 1;
cur_ax = axeslist(cur_ax_idx);
... now show the result on axes cur_ax
else
warning('you need more axes to display all of the results')
end
その他の回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!