What is the difference between drawrectange and rectangle?

7 ビュー (過去 30 日間)
Adrian Lee
Adrian Lee 2021 年 4 月 25 日
編集済み: DGM 2021 年 4 月 26 日
i have been using drawrectangle
but i recently found out that there is a function called rectangle which is almost the same
what is the difference between drawrectangle and rectangle?

採用された回答

DGM
DGM 2021 年 4 月 25 日
編集済み: DGM 2021 年 4 月 25 日
To my understanding, rectangle() is an older function which serves to draw rectangular or rounded rectangular graphical objects. The goal is to create an image element in a figure, just like line().
On the other hand, drawrectangle() allows the creation of objects of class Rectangle. The goal is to define a rectangular ROI, more like an object-oriented evolution of getrect() than what I'd call a "drawing" tool. drawrectangle() is also a much newer (R2018x, I think?) tool.
  2 件のコメント
Scott MacKenzie
Scott MacKenzie 2021 年 4 月 26 日
Hmmm, I'm a bit curious about this myself. I use rectangle all the time, but not drawrectangle. It just tried
>> doc drawrectangle
and got "no results". I'm guessing drawrectangle is not part of MATLAB, but is part of some other MathWorks product.
DGM
DGM 2021 年 4 月 26 日
編集済み: DGM 2021 年 4 月 26 日
Yeah, drawrectangle is a relatively new addition to the imuitools portion of Image Processing Toolbox.

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by