Describe the bug
Clean up and improve code for pixel queue method as described in the comment here:
For clarity, it may be good to clean up a bit the pixel queue implementation. Maybe adding some comments to refer back to the algorithm described in https://doi.org/10.1016/j.patrec.2006.10.010
Also, I would replace the hand-crafted heaps by a standard use of a std::priority_queue: https://en.cppreference.com/w/cpp/container/priority_queue