An Algorithm For The Detection Of Handguns In Terahertz Images