A data processing apparatus for performing a census transformation, for an optical flow, on an image pixel matrix, comprising: a first comparator configured to compare first input data with second input data, and to provide one when the first input data is larger than the second input data and zero when the first input data is equal to or smaller than the second input data as a first comparison result, the first input data representing a difference (DIFF) generated by subtracting, from a value of a first image pixel that a center pixel in the image pixel matrix, a value of a second image pixel that is one of surrounding and neighboring pixels of the center pixel, the second input data representing a predetermined threshold value (ε); a data generator (3; 6) configured to generate data that is one of a 1's complement and a 2's complement (~ε) of the second input data (ε); a second comparator configured to compare the first input data (DIFF) with the data (~ε) generated by the data generator (3; 6), and to provide one when the first input data (DIFF) is larger than the data (~ε) generated by the data generator (3; 6) and zero when the first input data (DIFF) is equal to or smaller than the data (~ε) generated by the data generator (3; 6) as a second comparison result; a data initializer configured as a bit shifter to initialize third input data that is census data by shifting each bit of the third input data to the left by two bits; and an adder configured to add the first comparison result and the second comparison result to the third input data initialized in advance by the data initializer, and to provide added current output data, as the next third input data, to an input of the data initializer, a first bit and a second bit of the current output data representing a census signature value (CENSUS). a first comparator configured to compare first input data with second input data, and to provide one when the first input data is larger than the second input data and zero when the first input data is equal to or smaller than the second input data as a first comparison result, the first input data representing a difference (DIFF) generated by subtracting, from a value of a first image pixel that a center pixel in the image pixel matrix, a value of a second image pixel that is one of surrounding and neighboring pixels of the center pixel, the second input data representing a predetermined threshold value (ε); a data generator (3; 6) configured to generate data that is one of a 1's complement and a 2's complement (~ε) of the second input data (ε); a second comparator configured to compare the first input data (DIFF) with the data (~ε) generated by the data generator (3; 6), and to provide one when the first input data (DIFF) is larger than the data (~ε) generated by the data generator (3; 6) and zero when the first input data (DIFF) is equal to or smaller than the data (~ε) generated by the data generator (3; 6) as a second comparison result; a data initializer configured as a bit shifter to initialize third input data that is census data by shifting each bit of the third input data to the left by two bits; and an adder configured to add the first comparison result and the second comparison result to the third input data initialized in advance by the data initializer, and to provide added current output data, as the next third input data, to an input of the data initializer, a first bit and a second bit of the current output data representing a census signature value (CENSUS).