According to various embodiments, the present disclosure provides a collimator for medical imaging. The collimator includes a perforated plate with a top surface and a bottom surface and holes distributed on the perforated plate. The holes are arranged in a plurality of groups. The plurality of groups forms a first coded aperture pattern and the holes in each of the plurality of groups form a second coded aperture pattern.