MATLAB 视觉库形状函数
MATLAB 2011 计算机视觉演示工具箱中的车道偏离系统具有以下功能。
hShapeIns1 = vision.ShapeInserter( ...
'Shape', 'Polygons', ...
'Fill', true, ...
'FillColor', 'Custom', ...
'CustomFillColor', [1 0 0], ...
'Antialiasing', false, ...
'Opacity', 1);
hShapIns1 对象用于在霍夫线内绘制多边形并捕获道路区域。如果你看到vision.ShapeInserter函数的matlab产品帮助,可以插入的形状是多边形、矩形和直线。
我的问题是我想使用上面的代码插入一条与霍夫线平行的线。但是当我用“线”替换“多边形”时,它不起作用。我怎样才能实现这个目标?
The Lane departure system in MATLAB 2011 demos for Computer Vision toolbox has the following function.
hShapeIns1 = vision.ShapeInserter( ...
'Shape', 'Polygons', ...
'Fill', true, ...
'FillColor', 'Custom', ...
'CustomFillColor', [1 0 0], ...
'Antialiasing', false, ...
'Opacity', 1);
The hShapIns1 object is used to draw a polygon within the Hough lines and captures the road area. If you see the matlab product help for vision.ShapeInserter function, the shapes that can be inserted are polygons, rectangles and lines.
My problem is that I want to insert a line parallel to the Hough lines, using the above code. But when I replace 'Polygons' with 'Lines' it doesn't work. How can I achieve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通过“它不起作用”,我假设您没有在视频上看到任何可见的效果。这是因为该演示中还有另一个 ShapeInserter 对象 hShapeIns2,它在其上以不同的颜色绘制相同的线条。如果移除该物体,您将能够在车道标记上看到黑线。
By "it doesn't work", I assume that you are not seeing any visible effects on the video. This is because there is another ShapeInserter object hShapeIns2 in that demo which is drawing the same lines on top of this in different color. If you remove that object you will be able to see dark lines over the lane markers.