Change getpts to circle cursor.
이전 댓글 표시
I am looking to change the cursor to a circle when using the getpts function. I am manualy digitizing a video frame by frame of a ball traveling across the frame.
답변 (1개)
Kiran Felix Robert
2020년 10월 9일
Hi Tom,
You can use the drawpoint function from the Image Processing Toolbox, ROI-Based Processing to have a circular marker on the image. The following code snippet gives you an example for a still image, you can loop it for every frame
I = imread('cameraman.tif');
imshow(I);
ptsx = []; % Final vector for x position
ptsy = []; % Final Vector for y position
for i = 1:4 % To save 4 points
roi = drawpoint('Color','r','SelectedColor','none');
ptx = roi.Position(1);
pty = roi.Position(2);
ptsx = [ptsx ptx];
ptsy = [ptsy pty];
end
Kiran Felix Robert
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!