The universe , with large-scale homogeneity , is locally inhomogeneous , clustering into stars , galaxies and larger structures . Such property is described by the smoothness parameter \alpha which is defined as the proportion of matter in the form of intergalactic medium . If we take consideration of the inhomogeneities in small scale , there should be modifications of the cosmological distances compared to a homogenous model . Dyer and Roeder developed a second-order ordinary differential equation ( D-R equation ) that describes the angular diameter distance-redshift relation for inhomogeneous cosmological models . Furthermore , we may obtain the D-R equation for observational H ( z ) data ( OHD ) . The density-parameter \Omega _ { M } , the state of dark energy \omega , and the smoothness-parameter \alpha are constrained by a set of OHD in a spatially flat \Lambda CDM universe as well as a spatially flat XCDM universe . By using of \chi ^ { 2 } minimization method we get \alpha = 0.81 ^ { +0.19 } _ { -0.20 } and \Omega _ { M } = 0.32 ^ { +0.12 } _ { -0.06 } at 1 \sigma confidence level . If we assume a Gaussian prior of \Omega _ { M } = 0.26 \pm 0.1 , we get \alpha = 0.93 ^ { +0.07 } _ { -0.19 } and \Omega _ { M } = 0.31 ^ { +0.06 } _ { -0.05 } . For XCDM model , \alpha is constrained to \alpha \geq 0.80 but \omega is weakly constrained around -1 , where \omega describes the equation of the state of the dark energy ( p _ { X } = \omega \rho _ { X } ) . We conclude that OHD constrains the smoothness parameter more effectively than the data of SNe Ia and compact radio sources .