1. A two-dimensional code extraction method comprising: inputting image data; scanning said input image data in a square block unit of M×N pixels (M and N are positive integers); detecting blocks that satisfy specific conditions from said scanned blocks; detecting a region comprising the neighboring and contiguous blocks among said detected blocks; and extracting said detected region as the two-dimensional code region.