How do you use inpolygon?
显示 更早的评论
I am trying to learn how to use this function. I have a photo of two buttons, and have acquired the bounding boxes for those buttons with their coordinates. The coordinates are saved in two matrices, one for x (Xcoordinates) and one for y (Ycoordinates).
Now I want the image to open and have the user click on one of the buttons using the inpolygon function. If the user clicks outside the bounding boxes, nothing is displayed, but if they click inside one of the buttons, information pertaining to that button is displayed.
I've defined xv to be Xcoordinates and yv to be Ycoordinates, for the inpolygon function, but I am not sure how the function works and how to implement for this thing I want to do.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Display Image 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!