I added a trick, To know what is the height of a full heart, I place 2 images points on the heart outline. One for the empty position, one for the full position. I then calculated the height between them and use it as a min/max for the height of the blood mask.
You just have to replace theses image points and calculate the difference between imagepointX instead of imagepointY... Well send the capx if you don't succeed