vImageHistogramCalculation_ARGB8888 exclude pixels with alpha 0

I am using vImageHistogramCalculation_ARGB8888 and vImageHistogramSpecification_ARGB8888 to match the luminance of a source image to a reference image. When doing histogram calculation, I want to exclude the pixels with zero alpha in the source image out from calculation. But the these functions seem to treat transparent pixels as black pixels, these pixels fall into the histogram bins, interfering with the final result.


How can I setup the calculation to ignore these pixels?