'Zxing not scanning certain Data Matrix codes

Hi I am able to read some 2d datamatrix barcode images downloaded from internet using Zxing library but not able to read images taken from my high resolution colored camera images. Now I am converting them into black and white images but still images are not readable. Can someone suggest me where I am doing wrong? I have attached some images here. Please help.

image 1image 2image 3

Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source