Info
此问题已关闭。 请重新打开它进行编辑或回答。
how to get the xy oordinate of each pixel making up the white line?
1 次查看(过去 30 天)
显示 更早的评论
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/171430/image.png)
I made a planar robot's dynamic model on simulink, now, how do I make it follow the pattern that I provide. In this case, the white line is my visual input to the system, where, the xy coordinate values of each pixel is to be fed as input continuously to make the robot move accordingly.
0 个评论
回答(1 个)
Matt J
2018-3-21
编辑:Matt J
2018-3-21
the xy coordinate values of each pixel is to be fed as input continuously to make the robot move accordingly.
That's probably not exactly what you want, if the robot is to interpret the path as an ideal line. The imaged representation of the line is not ideal, since it is actually a white bar with some thickness. You really want to consider the pixels forming the medial line of the white bar.
If you have the Image Processing Toolbox, you can extract that as follows,
[x,y]=bwmorph(yourImage,'skel',inf);
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!