No matter what I do in App Designer, the image doesn't update.
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!