A general class of coded aperture masks with certain perfect decoding properties are described. These masks are flexible in design in terms both of their shape and openness ratio. © 1984 Optical Society of America.