A barcode registration consists of a square image consisting of parallel black lines and a series of white spaces. It…