How to resize binary matrix

If there is a n x m binary matix with multiple blobs, how do I resize the blobs while still remaining a n x m matrix and such that every individual resized blob's center is at the same pixel location of its previous original sized blob's center?

8 件のコメント

Walter Roberson
Walter Roberson 2019 年 12 月 12 日
What should change about the blobs? What must stay the same?
Ronald Smith
Ronald Smith 2019 年 12 月 12 日
編集済み: Ronald Smith 2019 年 12 月 12 日
stay the same:
-The general shape of each blob -The center of each individual blob in terms of pixel location (so if you put both matrixes on top of each other, all blobs would be in the same position and have the same shape but be either larger or smaller) -the size of the overall matrix (m x n)
What should change:
The overall size of all blob with the option of enlarging or shrinking them
Walter Roberson
Walter Roberson 2019 年 12 月 12 日
When they are to be enlarged or shrunk, then by how much?
Ronald Smith
Ronald Smith 2019 年 12 月 12 日
By a factor inputted by the user (so the code can be used with varied factors to enlarge or shrink)
Walter Roberson
Walter Roberson 2019 年 12 月 12 日
What should be done if the enlargened blob would merge with another blob?
Ronald Smith
Ronald Smith 2019 年 12 月 12 日
I believe that should be okay. Would you be able to show 2 versions, one where they just merge, and one where it would give a warning and automatically change that resize factor to the nearest value which doesn’t result in merging, also informing the user of the changed value?
Walter Roberson
Walter Roberson 2019 年 12 月 12 日
figuring out the maximum expansion before merging would happen is a bit complicated -- unless, that is, you are willing to restrict so you would stop expanding as soon as the first merger would happen, with each blob growing by the same rate; the complicated part would be if each blob was to grow independently as much as possible without merging.
Ronald Smith
Ronald Smith 2019 年 12 月 12 日
Oh no I would actually want all of them to grow or shrink at the same rate at all times either way

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeResizing and Reshaping Matrices についてさらに検索

タグ

質問済み:

2019 年 12 月 12 日

コメント済み:

2019 年 12 月 12 日

Community Treasure Hunt

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

Start Hunting!

Translated by