Change getpts to circle cursor.
3 views (last 30 days)
Show older comments
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.
0 Comments
Answers (1)
Kiran Felix Robert
on 9 Oct 2020
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
0 Comments
See Also
Categories
Find more on Import, Export, and Conversion 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!