Selecting submatrices at random given a set of constraints
Show older comments
New to programming here and I really have no idea how to approach this.
My problem: I have a bunch of images that are annotated with rectangular bounding boxes and want to pick other rectangular bounding boxes at random that do not overlap with the bounding boxes I already have. So basically I have a matrix M and a predefined subset X of submatrices of M and I want to generate new submatrices with random positions that do not overlap with X but can overlap with each other; the generated submatrices should be about the same size as the submatrices in X and contained in matrix M.
In the example above, the boxes in that image represent X, positive exambles of soccer balls; I want to generate an equal number of boxes of the same size that do not enclose soccer balls, to represent negative examples of soccer balls.
Any direction is appreciated.
Accepted Answer
More Answers (0)
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!