App designer Edit field, position
5 次查看(过去 30 天)
显示 更早的评论
thisFrame = read(vid, framesToRead(h));
pos1=app.CTRLVEditField.Value
str = strrep(pos1, '[', ''); % Odstranění závorek
str = strrep(str, ']', '');
values= split(str, ','); % Rozdělení řetězce podle čárky
pos = str2double(pos1) % Převod na čísla
cr=imcrop(thisFrame,pos);
Hello, I work in App designer, where I put into Edit filed the area I would like to crop in this type [1 2 3 4], but in the position cr=imcrop ... the matlab says
Input number 2, RECT, is expected to contain 4 elements.
validateRectangle(spatial_rect,2);
images.internal.crop.parseInputsOverTwo(varargin{:});
How can I solve this problem. Thank you.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
Find more on Develop Apps Using App Designer in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!