how to check if (x,y) coordinates fall within another (x,y) coordinate
Show older comments
i have the x,y,w,h --> [x position, y position ,width and height] of the two black boxes and the red boxes inside the black boxes (5 in one box and 3 in the other)

say i have the (x,y,w,h) of black boxes in matrix named black_boundingbox (dimension = 2x4) and
that of red in matrix named red_boundingbox (8x4)
based on a condition, only one blackbox gets selected
eg, if box 1 is selected based on my condition, i want to get all the coordinates of the 5 red boxes
how can i select only the 5 red boxes in black box 1, how can i check it based on coordinates because some of the red boxes are outside the black box, but i need those also, how can i do that
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!