Terafly: A THz image-processing-based architecture for semi-automatic industrial inspection and measurement