Determination unit 32 narrows the writing lines with which non-writing lines 22b23 and 22b25 have the correlation to one based on the determination result of the correlation between each of non-writing lines 22b23 and 22b25 and each of writing lines 22a1 and 22a2. Determination unit 32 determines that the writing line having the higher correlation with non-writing lines 22b23 and 22b25 is the writing line with which non-writing lines 22b23 and 22b25 have the correlation. For example, determination unit 32 may compare a total number of the sum of pixels having the correlation between non-writing line 22b23 and writing line 22a1 and the sum of pixels having the correlation between non-writing line 22b25 and writing line 22a2 to a total number of the sum of pixels having the correlation between non-writing line 22b23 and writing line 22a2 and the sum of pixels having the correlation between non-writing line 22b25 and writing line 22a1, and determine that the writing line and non-writing lines 22b23 and 22b25 having the larger total number of pixels have the correlation.