How to manipulate lines in a figure using a mouse
1 回表示 (過去 30 日間)
古いコメントを表示
I have a line that is detecting an edge of a grayscale image in the form of two row vectors of length almost 2000. I overlay this line on the image, and want to manually adjust certain points with my mouse for a better fit. Currently, I am using ginput() to obtain the x,y position of my mouse when I click, find the corresponding index on my two vectors, define three points (a few indices before and after the point I clicked on), and am using splice() on these three points to create a new line. This, however, only creates a spike at the location where the mouse click was. I would rather it slowly smooth up from a predefined distance (or sensitivity) away from where I clicked.
In the attached image, the purple line is the edge detected. The blue asterisk is where I clicked, and the orange segment is the splice of three points: The ends of the orange line and the blue asterisk. How can I make this orange line fit more of a smooth curve?
Thanks!
0 件のコメント
回答 (1 件)
Richa Gupta
2015 年 7 月 16 日
Hi Morris,
It looks like the image that you attached did not come through. Also, can you describe what your “splice” function does because I was not able to find this function in the MATLAB built-in functions list. It would be easier for the community to help if you can provide the image and the description of the 'splice' function.
Richa
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!