두 개의 축에 두 개의 이미지가있는 예제 GUI 코드를 첨부하고 ginput을 사용하여 시드 포인트를 선택하면 어느 축에서나 선택할 수 있습니다. Is 어쨌든, 특정 축시드 포인트를 선택하기 위해 현재 축으로 제한하는 방법
% --- Executes on button press in open.
function open_Callback(hObject, eventdata, handles)
% hObject handle to open (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global img1;
global img2;
img1 = imread('peppers.png');
img2 = imread('rice.png');
axes(handles.axes1);
imshow(img1,[]);
axes(handles.axes2);
imshow(img2,[]);
% --- Executes on button press in seedpointSelect.
function seedpointSelect_Callback(hObject, eventdata, handles)
% hObject handle to seedpointSelect (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global img1;
global img2;
global x;
global y;
axes(handles.axes1);
imshow(img1,[]);
[y,x] = ginput(handles.axes1);
y = round(y); x = round(x);
set(handles.xcord,'String',num2str(x));
set(handles.ycord,'String',num2str(y));
특정 축에 ginput 제한에 어떤 도움을
감사합니다, Gopi