Patent attributes
A barcode recognition method is applicable to a data processing apparatus. According to the barcode recognition method, after the data processing apparatus is turned on, a control module loads and initializes a barcode recognition program from a data storage device, and then switches the barcode recognition program to background execution. The control module continuously monitors whether a trigger event occurs to the data processing apparatus. When the trigger event occurs, the control module switches the barcode recognition program to foreground execution. When the barcode recognition program is in foreground execution, an image capture module captures at least one image frame, for the control module to recognize. The control module derives barcode information, so as to obtain a recognition result. After the control module outputs the recognition result to other application programs by simulating keystrokes, the control module switches the barcode recognition program to background execution.