Quantification of sand structure and its evolution during shearing using image analysis