1. A method of retrieving information comprised in a barcode comprising: detecting whether or not the barcode is present in a first image, the first image being acquired by an image-acquiring device, having a first image quality and capturing a first region, wherein the detecting step is iterated continuously, and wherein the detecting step comprises sliding a window having a first window size over the first image, wherein the first window size is smaller than the first region, generating YUV-histograms—luma and chrominance histograms—for one or more window positions, and evaluating, for one or more window positions, the corresponding YUV histograms to determine if the barcode is present at the window position: acquiring by the image-acquiring device, when it is detected that the barcode is present, a second image having a second image quality and capturing a second region, wherein the second image quality is higher than the first image quality, and wherein the second region at least partly overlaps the first region; and decoding the barcode based on the second image to retrieve the information.