mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-04 23:21:07 +08:00
841da2b3f8
The enforce connectivity step of slic runs a BFS and puts the results in coord_list. This coord_list has room for max_size elements, which is easily overrun if there is a large connected element. This change limits the BFS to max_size, so that if a connected area is bigger than max_size, it will be split up instead of the program crashing.