필터 지우기
필터 지우기

Generate eight distinct shapes from a set of specified variables

조회 수: 1 (최근 30일)
Yashlin Naidoo
Yashlin Naidoo 2015년 4월 28일
편집: per isakson 2015년 4월 29일
To be able to generate eight distinct shapes from a set of specified variables using MATLAB image processing. Your shape generator algorithm should be able to generate the following shapes:
  1. &nbspCircle(Input radius in pixels)
  2. &nbspSquare(Input length of 1 side in pixels. Adjacent sides must be parallel to both borders of the image respectively)
  3. &nbspTriangle(Input length of base in pixels and both base angles in degrees. The base is associated with column span, which is parallel to the top border, and the apex of triangle must be located at a point above the base line)
  4. &nbspRectangle(Input length of 2 adjacent sides in pixels. For display purposes the smaller value is associated with the row span and the larger values is associated with the column span. Adjacent sides must be parallel to both borders of the image respectively)
  5. &nbspPentagon(Input length of 1 side in pixels. 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. &nbspHexagon(Input length of 1 side in pixels. At least 2 sides must be parallel to the top and bottom borders of the image)
  7. &nbspEllipse(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. &nbspOctagon(Input length of 1 side in pixels. At least two sides must be parallel to the top and bottom borders of the image)

채택된 답변

Image Analyst
Image Analyst 2015년 4월 28일
You can do all of those by varying the number of elements in theta in the 4th example in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_create_a_circle.3F

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by