I want to identify things in an image by 'drawing' a rectangle round them. E.g. to select a face in a crowd.开发者_StackOverflow中文版 A sign in a street etc.
How to use the mouse events to a) mousedown to start select area Grow a 'rectangle' to follow the mouse movements. b) mouseup to end selection. Retrieve the xy, xy of the box for use in further processing. I'd like x and y values of the rectangle to be relative to the img element with id value 'image' if that's possible please.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论