我如何生成八个不同的形状从一组指定的变量使用MATLAB图像处理。

26次浏览(最近30天)
Yashlin Naidoo
Yashlin Naidoo 2015年4月28日
评论: 图像分析 2021年6月7日
我如何生成八个不同的形状从一组指定的变量使用MATLAB图像处理。
Myshape生成器算法应该能够生成以下形状:圆形(以像素为半径)2。正方形(输入一条边的长度,以像素为单位。相邻边必须分别平行于图像的两个边界)3。三角形(输入底角的长度,以像素为单位,两个底角都以度数为单位。底边与柱跨相关联,柱跨平行于顶边,三角形顶点必须位于底边以上的一点)4。矩形(输入两个相邻边的长度,以像素为单位)。出于显示目的,较小的值与行跨度相关联,较大的值与列跨度相关联。相邻边必须分别平行于图像的两个边界)5。五边形(输入一条边的长度,以像素为单位。 The base is associated with column span, which is parallel to the top border, and the apex of pentagon must be located at a point above the base line) 6. Hexagon (Input length of 1 side in pixels. At least 2 sides must be parallel to the top and bottom borders of the image) 7. Ellipse (Input length of semi-minor (rows) and semi-major (columns) axes in pixels. For display purposes the semi-minor axis is associated with the row span, and must be parallel to the left and right borders of the image, and the semi-major axis is associated with column span, and must be parallel to the top and bottom borders of the image) 8. Octagon (Input length of 1 side in pixels. At least two sides must be parallel to the top and bottom borders of the image) In addition to the input specifications described above, a colour must be attributed to every shape i.e. every shape must have an R, G and B value associated with it. The final product/algorithm must output 2 separate images: 1. A binary (black and white) image with all the shapes in black and background in white. (50%) a. Each shape must be located centrally within 8 square boxes of equal size (as shown below).
请协助这个问题。

接受答案

图像分析
图像分析 2015年4月28日
这和你之前问的问题一样,我也回答了 在这里 .我认为这是一个很好的答案,Yashlin,你为什么不呢?
18岁的评论
图像分析
图像分析 2021年6月7日
@Haytham Ali. ,您注意到帮助文档中的示例了吗?你试过吗?如果不是你想要的,那就更详细地解释你想要什么。

登录评论。

更多答案(0)

社区宝藏狩猎

找到Matlab Central中的宝藏,并发现社区如何帮助您!

开始狩猎!

翻译的