Daily test owl 3 and owl2

I have finished up my project this morning and pushed every last change i made and every test besides test owl_2 and test owl_3 still keep failing. Ive debugged my programm with carve_debug very strictly and dont understand why these tests dont work


Check that the tested commit is the one you expect.

You can also write more tests on your own (unit tests as well as integration tests).
Especially in this project, you see whether the results “looks” right.

Try to carve the tower image to half its size or a quarter and check if the seams look good.
But also do more formal tests.

this is what owl.ppm looks like after 100 iterations with carve_debug

is this right?

At first glance this looks correct.
But the owl is not very well suited for horizontal seam carving (lots of vertical noise and less horizontal noise).

Try images like the one from the project description (or landscapes in general) to better see the effect:

Also note, this test does not prove correctness it only shows you how cool seam carving is and whether your program goes in the right direction.

how exactly am i supposed to use these images in the virtual machine?
when i download them i have to convert them from jpg to ppm first but any online tools give me an unreadable mess

You can use the seam carving plugin/GUI or you could convert them outside/inside the VM using ImageMagick’s convert command or GIMP.

But you have to remove the second line in a text editor (the one starting with #) as the image parser does not support comments in the ppm file.

For gimp: Select ASCII when exporting the ppm file.
For imagemagick: call convert [Img.png] -compress none -set comment \"\" [Img.ppm].
For both: Check that there is no comment / remove the comment.

This is the result for carve_opt -n 200

Note that the produced image might be correct, and even be correctly displayed, and you might simply fail the test because you print the picture wrongly when saving to file. The PPM format is not that rigidly specified, and different image viewers might be more lenient than the daily tests. For example, the image viewer might simply not care about the difference between whitespace and newlines, while our tests might.

this is carve_debug -n 20 for owl2.ppm
as far as i can see everything is in line with the given pictures in the data ref folder
no whitespace after each last number in a row or any of the above and a single newline after the last number

1 Like

ive just checked my emails and ive gotten a new daily test
now however the owl 2 and owl 3 test dont fail anymore but min energy wide 2 fails now with the comment " unit test failed"

I’m having the same issue, i.e. I’m only failing owl_2 and owl_3. As suggested I double-checked that I’m saving the image in the right format (white spaces / new lines) but this didn’t resolve the issue. Is there any other hint on what to look into?

@Oliver Was the last image that you posted (the output of carve_debug -n 20 for owl2.ppm) the result of the implementation which passed owl_2 and owl_3? Because my pixel values are different, so maybe this is something I would look into…

Update: Problem solved, I simply confused w0 and w at some point and got the result in the image mentioned above.