Mineral quantification by digital image analysis: I. Proposal of a semi-automatic method