No matter what I do in App Designer, the image doesn't update.
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
As shown in the figure, No. 101 (purple arrow) is in the opposite direction to No. 102. At this time, 101.jpg, which was newly saved after correcting the direction (rightmost picture), has an arrow pointing upward. However, whether I turn my computer off and on, create a new folder, or delete all my photos and move them back, the arrow always points in the downward direction before editing. What could be the problem?
function BtnOpen1ButtonPushed(app, event)
[app.filename1, user_canceled] = imgetfile('InitialPath', app.ROOT_PATH );
if user_canceled == true, return; end
[app.ROOT_PATH, name, ext] = fileparts(app.filename1);
app.Fn1.Value = app.filename1;
app.img1 = imread( app.filename1 );
image(app.UIAxes1, app.img1)
axis(app.UIAxes1, 'tight')
app.UIAxes1.Title.String = name;
nLen = length(name);
fmtspec = sprintf('%%0%dd', nLen);
name2 = sprintf(fmtspec, str2double(name) + 1 );
app.filename2 = fullfile( app.ROOT_PATH, strcat(name2, ext) );
app.img2 = imread( app.filename2 );
image(app.UIAxes2, app.img2)
axis(app.UIAxes2, 'tight')
app.UIAxes2.Title.String = name2;
end
The result window will display two arrows pointing upwards, respectively. (Like 101.jpg)
1 Commento
Risposte (0)
Vedere anche
Categorie
Scopri di più su Image Processing Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!