Not sure about Test Result

Hey,

I’m a little lost with a test output.

image

I have a few thoughts on it, but I can’t understand where the error is and I can’t find a reference file for this test.

What is meant with the Term “energy at 3”. I think it’s referring to the pixel in (2,0) in the total_energy array. But when I look at small2.ppm, the total_energy at this field should not be zero. Or am I missing something?

Here for reference small2.ppm.

image

From what I am understanding 2*255^2 should be correct. Or is the test testing something else? Or is it not testing small2.ppm?

I’m passing the second energy test (energy_wide).

Thank you in advance!

Hi,

for your conveninece i took a screenshot of the test. You can find the tests in unit_tests.c.

grafik

I have not seen your code so I dont really know whats happening. I would imagine, however, that you run into problems because in the test w is equal to 3. You might want to make sure that you use the w correctly.

I hope this helps :smiley:

3 Likes

Hello,
if I remember correctly, the feedback (“energy at 3”) starts counting at 0 (you can easily check this my manipulating the first pixel energy on purpose). So for the 3x3 picture the feedback you got refers to the leftmost pixel of the middle row.