Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication...

18
Extracting Barcodes from a Extracting Barcodes from a Camera-Shaken Image on Camera-Shaken Image on Camera Phones Camera Phones Graduate Institute of Communication Engineeri ng National Taiwan University Chung-Hua Chu, De-Nian Yang and Ming-Syan Che n 報報報 : M97G0225 報報報

Transcript of Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication...

Page 1: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

Extracting Barcodes from a Extracting Barcodes from a Camera-Shaken Image on Camera-Shaken Image on

Camera PhonesCamera Phones

Graduate Institute of Communication EngineeringNational Taiwan University

Chung-Hua Chu, De-Nian Yang and Ming-Syan Chen

報告者 : M97G0225 黃庭筠

Page 2: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

OUTLINEOUTLINE

• INTRODUCTION

• BARCODE EXTRACTION ALGORITHM

• EXPERIMENTAL RESULTS

• CONCLUSION

Page 3: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

INTRODUCTIONINTRODUCTION

• problem is to extract and restore the barcode to improve the correctness of the recognition.

• Extracting Camera-Shaken Barcode (ECSB) algorithm for the problem

Page 4: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

BARCODE EXTRACTION BARCODE EXTRACTION ALGORITHMALGORITHM

Page 5: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

Barcode area extractionBarcode area extraction

ECSB first uses Edge Detection to detect the rough barcode area as depicted.

Then, ECSB dilates the edge-detected image with two directions (i.e., vertical and horizontal) such that we can obtain the precise barcode area as shown.

Page 6: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

Barcode RestorationBarcode Restoration

Use a large constant c to approximate an unknown parameter SNR (Signal to Noise Ratio), where c is larger than or equal to the height of the distorted image.

Page 7: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

Barcode RestorationBarcode Restoration

Page 8: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

Barcode RestorationBarcode Restoration

g(i, j) = f(i, j) * h(i, j) + n(i, j)

g(i, j) : presented by a linear system of a convolution

f (i, j) : denotes the original image

n(i, j) : defined as a Gaussian white noise with zero mean

h(i, j) : (PSF) can be viewed as the filter caused by the

shake

Page 9: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

Barcode RestorationBarcode Restoration

N : denotes the length of the camera motion

Θ: denotes the direction of the camera motion

Page 10: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

Camera-Shaken Direction and Camera-Shaken Direction and Length EstimationLength Estimation

• estimate the camera-shaken direction Θ :

1. first transform the camera-shaken image to a

Cepstrum-domain image C (i, j)

C (i, j) : Inverse Fourier transform of log(1 + G (i, j) )

G (i, j) : is the Fourier transform of g (i, j)

2. use Hough transform to find out the camera-shaken

direction Θ in C (i, j)

Page 11: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

Camera-Shaken Direction and Camera-Shaken Direction and Length EstimationLength Estimation

• camera-shaken length N :

1. calculate the average of all pixels in C' (i, j)

2. Finally, we calculate the first zero crossing where the

camera-shaken length N

Page 12: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

Camera-Shaken Direction and Camera-Shaken Direction and Length EstimationLength Estimation

Page 13: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

Camera Shake RestorationCamera Shake Restoration

Use Wiener filter to determine the solution F (i, j)

Sf : power spectrum of the original image

Sn : power spectrum of the noise

H (i, j) : frequency domain of h (i , j)

H*(i, j) : complex conjugate of H (i, j)

∣ H (i, j) ^2 : H*(i, j) H(i, j)∣

Page 14: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

EXPERIMENTAL RESULTSEXPERIMENTAL RESULTS

Page 15: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

EXPERIMENTAL RESULTSEXPERIMENTAL RESULTS

• Tag Richardson Lucy method (TRL) :

Uses tag-based identification to extract QR code,

and then Richardson Lucy method (RL) to restore

the extracted QR code.

Page 16: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

EXPERIMENTAL RESULTSEXPERIMENTAL RESULTS

• root mean-square error (RMSE)

H : height of f (i, j)

W : width of f (i, j)

Page 17: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

EXPERIMENTAL RESULTSEXPERIMENTAL RESULTS

Page 18: Extracting Barcodes from a Camera-Shaken Image on Camera Phones Graduate Institute of Communication Engineering National Taiwan University Chung-Hua Chu,

CONCLUSIONCONCLUSION

• In this paper, we proposed an efficient algorithm to extract the 2D barcodes in a camera-shaken image.

• The experimental results have showed that our approach is not only of smaller running time but of higher accuracy of the barcode recognition in a mobile information environment.