Photon-counting mode CdTe two-dimension X-ray imaging device with energy distinction function was investigated. Two-dimension M-π-n CdTe detectors were fabricated on 0.5mm-thick single CdTe wafer by the excimer laser pattern doping technique. It is important that the imaging detector shows uniform performance in all pixels, so we measured energy spectra of the two-dimensional detector fabricated by the excimer laser pattern doping technique. The energy spectra about 4 keV of FWHM of 122 keV peak of Co-57 were obtained, and it was found that uniformity was high in all pixels. For investigating charge share problem, 2 x 2 structured patterned-dope detector with and without separation ditches were prepared and compared. Both sample showed almost same crosstalk carrier, about 3% calculated from Co-57 radioisotope energy spectrum above 50 keV regions. Only 0.05 % crosstalk counts was obtained from both samples by using narrow 6 KeV energy windows at 122 keV for estimation in energy distinction imaging with energy window. These results show that patterned n-type doping by metal mask and excimer laser technique is effective for pixel separation CdTe x-ray imaging device.