Black dots at Column w

When I carve an image, black dots appear at the border of the black area. The left part of the image is also not carved. My first thought would be an error at min_energy_column. However, this function should actually be correct as I implemented it. Perhaps someone has had the same problems and can tell me how to solve them?
out.ppm (561.3 KB)

Hi, I had the same problem. To fix it I made sure that my code chooses the right pixels in calculate_energy if the pixels have the same energy.

For me this looks like some problem with the use of the (current) width w which controls where black pixels should form and which part of the image should be considered for seamcarving. Not sure though, could also be something totally different.