An effective method for laboratory acoustic emission detection and location using template matching