cvhciKIT / sloth

Sloth is a tool for labeling image and video data for computer vision research.
Other
611 stars 198 forks source link

Polygonshape #137

Open dimatura opened 7 years ago

dimatura commented 7 years ago

When using many polygons, specially non-convex and tightly packed polygons, the selection mechanism essentially becomes useless - it might as well select polygons at random, and I often find myself cycling through all polygons with tab to get the one I want. It seems this is because the selection mechanism uses the bounding box, which tend to overlap greatly in this situation. Overriding the shape() method of polygon seems to greatly improve the accuracy of selection. However, I should note that I have no knowledge of Qt, so there might be a better way. My googling didn't find anything else obviously better.

One issue that still needs to be addressed is that it becomes impossible to select polygons buried under another one. This was still often the case before this modification. I'm thinking that clicking with a modifier key like shift could cycle between the polygons under the cursor, similar to how Inkscape does it. I could have a look at implementing this if there's interest.