Cross-section measurement of charged-Pion photoproduction from hydrogen and deuterium