The increasing and widespread use of QR codes in everyday life has led to an increase in the activity of counterfeiting the QR code itself. Authentication of QR codes is not easy. For this reason, a proper QR code detection method needs to be given to the QR code image. However, the performance of QR code detection is highly dependent on the pre-processing method used. An appropriate pre-processing method is needed to be given to the QR code image so that the QR code becomes easier and faster to detect. This paper proposes the preparation of various pre-processing methods for a QR code dataset containing 1350 QR code photos so that they can be detected properly using Pyzbar. Several pre-processing methods are chosen to be performed in the experiment, which are: images gray scaling, conversion into RGB images, binarization through thresholding, gaussian blur combined with Otsu threshold, Otsu threshold only, a combination of the five methods, and a combination of the three best methods. This set of pre-processing methods improves detection performance using Pyzbar which allows QR code datasets to be rectified properly using a perspective transformation. The experimental results show that the proposed method produces a good percentage of detection results with the best value of 95%. All detected QR codes have been successfully rectified using perspective transformation and produced good alignment accuracy with the best value of 85,661%. The accuracy increases after being evaluated with one-pixel misalignment tolerance with the best value of 92.144%.