Info

この質問は閉じられています。 編集または回答するには再度開いてください。

View Images in many Axes using GUI

2 ビュー (過去 30 日間)
ahmed obaid
ahmed obaid 2016 年 3 月 30 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
dear users ..
i have a simple code to retrieve images using histogram .. i would like to view the result images in Axes from Axes1..to Axes5
my code portion as follow :
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

回答 (1 件)

Geoff Hayes
Geoff Hayes 2016 年 3 月 31 日
ahmed - what are you trying to display in each axes? Please map a variable to each axis. For example, if you wish to Imaged1 in axes1, you could (perhaps) do
imshow(Imaged1,'Parent',handles.axes1);
etc.
  3 件のコメント
Geoff Hayes
Geoff Hayes 2016 年 4 月 1 日
Please describe your loop as you have not shown how it would be implemented. Are your images stored in an array (cell or otherwise)? Given that your axes are named axes1, axes2, etc. I don't think using a loop to update each one is the best way to go (unless the handles to the axes are in an array too).
ahmed obaid
ahmed obaid 2016 年 4 月 1 日
Thanks for that .. i have been updated my original code sir...

この質問は閉じられています。

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by