1. An image processing apparatus, comprising: a two-dimensional matrix barcode detecting unit configured to detect a two-dimensional matrix barcode if an image of image data includes the two-dimensional matrix barcode; a broken matrix barcode detecting unit configured to determine whether a broken two-dimensional matrix barcode exists in the image or not when the two-dimensional matrix barcode detecting unit does not detect the two-dimensional matrix barcode but detects at least one position detection pattern, wherein the broken matrix barcode detecting unit is further configured to determine whether the broken two-dimensional matrix barcode exists in the image or not on the basis of a pattern in a predetermined position adjacent to the detected position detection pattern; an adjacent information searching unit configured to search for version information in the predetermined position; and a two-dimensional matrix barcode decoding unit configured to decode a two-dimensional matrix barcode; wherein the broken matrix barcode detecting unit is further configured (a) to estimate a position of a remaining position detection pattern on the basis of the version information if the version information is detected by the adjacent information searching unit, (b) to cause the two-dimensional matrix barcode decoding unit to try to decode a two-dimensional matrix barcode on the basis of the positions of the detected position detection pattern and the remaining position detection pattern, and (c) to determine that the broken matrix barcode exists in the image if the decode succeeds to a predetermined stage.