when I run the test for the min path of owl, there is a timout error, but for small1 and small2 everything works just fine.
The correct input for the w in calculate_energy is img->w, right?
Or has anyone an idea what else might be the problem?
nvmd, I’m just too stupid to read
Just for clarification also for others
You don’t need to pass
img->w as argument to
calculate_energy, since this is understood as
w0 and always contains the original image width. We work with
w, when it comes to executing “n steps” of the algorithm
This becomes more clear, if we read the parameter discription:
wis the width up to (excluding) which column in the image the energy should be calculated. (…)
Hope that answers the question ^^