High-order statistical properties of wavefield had been proven to have great influences in the realm of optics. For example, the speckle pattern induced by multi-interference of a coherent light source could be utilized to reconstruct the speckle flowgraphy either in ocular or cerebral blood flow. Such speckle pattern could also be used in depth estimation or optical positioning system. Recently, Kondakci et al. proposed a far-field lensless identification system based on measuring the complex coherence factor (the second-order phenomenon of light) of the field scattering off an obstructive object, which developed another possibility in optical imaging. However, their measurement was based on digital micro-mirror device, which restricted the flexibility of such optical system. Therefore, in this work, we designed an optical system to dynamically measure the complex coherence factor of a Schell-model and quasi-homogeneous beam via spatial light modulator. By analyzing the pixelated structure in theoretically and numerically, it was found that the fill factor of spatial light modulator would not affect the second-order characteristics of incident field even if its first-order characteristics were different. Our experimental results showed this system indeed had a good performance in the measurement of complex coherence factor. We believe the proposed optical system can help the lensless identification. Moreover, this system can be further improved by replacing the reflective-type spatial light modulator with transmitted-type, which will significantly increase the flexibility of optical instrument and will definitely have a great impact on other optical technologies.