Coming from numerical algorithms, I find it difficult to test my image processing codes. The reason is that
- I apply many heuristics that work on the images I consider but nothing proves that they will work on images I will use later
- although I separate the workflow to small logical chunks, some of them are easy to be tested as they are purely numerical by nature, the core of the algorithms are heuristic (see the previous point)
- I cannot find an automated way of assessing an algorithm (e.g. segmentation) without checking the result by the naked eyes.
- tests would be indicative for concrete, real-world images, that would run for a long time. This does not fit the philosophy of tests that run quickly.
Lacking tests, I
- feel guilty of not being able to prove that a method works, which is crucial in research
- have constant anxiety that the next refactoring or feature addition will mess up the existing code
It it matters, I use Python with the scientific stack (numpy, scipy, etc.) and scikit-image. I rely on these well-established libraries to make sure I do not introduce unnecessary bugs.
Those of you who are proficient in developing complex image processing codes, what advice can you give me so that I can ensure about the validity of my approach?