You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've found an issue that happens when I want to double an image's size. I had no problem finding the bug:
In SeamCarver.seams_insertion, there is a loop which chooses the seams to insert by removing them from a copy of the image, storing in a list, and adding them in to the output. But self.delete_seam(seam_idx) crashes when it comes to the last column. It happens when num_pixel >= self.in_height.
I thought maybe when the image is small enough (how small, I don't know) it could just feed the list with its first seams in a cycle. Or it could proceed to add seams and go back to add the remaining columns.
The text was updated successfully, but these errors were encountered:
I've found an issue that happens when I want to double an image's size. I had no problem finding the bug:
In
SeamCarver.seams_insertion
, there is a loop which chooses the seams to insert by removing them from a copy of the image, storing in a list, and adding them in to the output. Butself.delete_seam(seam_idx)
crashes when it comes to the last column. It happens whennum_pixel >= self.in_height
.for dummy in range(num_pixel): energy_map = self.calc_energy_map() energy_map[np.where(self.mask[:, :] > 0)] *= self.constant cumulative_map = self.cumulative_map_backward(energy_map) seam_idx = self.find_seam(cumulative_map) seams_record.append(seam_idx) self.delete_seam(seam_idx) self.delete_seam_on_mask(seam_idx)
I thought maybe when the image is small enough (how small, I don't know) it could just feed the list with its first seams in a cycle. Or it could proceed to add seams and go back to add the remaining columns.
The text was updated successfully, but these errors were encountered: