recalculer l'NRJ partout

This commit is contained in:
François Colin de Verdière 2025-04-04 12:13:04 +02:00
parent 673933137d
commit 0f6c0a1bdb
2 changed files with 2 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

After

Width:  |  Height:  |  Size: 301 KiB

View File

@ -292,8 +292,8 @@ void recompute_energy_along_seam(std::vector<unsigned char> carved_img,
j_offset++) { j_offset++) {
int x = vertical ? (i0 + i_offset) : j0 + j_offset; int x = vertical ? (i0 + i_offset) : j0 + j_offset;
int y = vertical ? j0 + j_offset : (i0 + i_offset); int y = vertical ? j0 + j_offset : (i0 + i_offset);
if (((0 < (i0 + i_offset)) && ((i0 + i_offset) < dim_large - 1)) && if (((0 <= (i0 + i_offset)) && ((i0 + i_offset) < dim_large - 1)) &&
(((0 < j0 + j_offset) && (j0 + j_offset < dim_long)))) { (((0 <= j0 + j_offset) && (j0 + j_offset < dim_long)))) {
compute_energy_for_pixel(carved_img, newWidth, newHeight, x, y, compute_energy_for_pixel(carved_img, newWidth, newHeight, x, y,
nbChannels, nbColorChannels, nbChannels, nbColorChannels,
output_energy[width * y + x]); output_energy[width * y + x]);