I have an image consisting of black and white pixels. I'd like to mostly reserve the shape of the original image, but for my purposes I need the black pixels to be orthogonally connected.
I have tried searching the problem up, and learned that the problem is NP-hard. Therefore, I'm expecting a heuristic that will run in reasonable time for a ~2000x2000 image.