What is the primary function of AEC in radiographic imaging?