recalculer l'NRJ partout
This commit is contained in:
parent
673933137d
commit
0f6c0a1bdb
BIN
imgs/castle.jpeg
BIN
imgs/castle.jpeg
Binary file not shown.
Before Width: | Height: | Size: 1.6 MiB After Width: | Height: | Size: 301 KiB |
@ -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]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user