In the modern world, we need high-resolution images for many applications, but the resolution of the imaging system can be degraded due to many factors, mainly the optical and geometrical components. The resolution limit for the optical system is set by diffraction, called diffractive superresolution. The resolutions of the imaging system are reduced not only by the optical components, but also by the geometrical components, which we call charge couple devices (CCDs). A CCD is an array of infinitesimal pixels (photodetectors). The resolution limit set for the imaging system due to the shape, size, and pitch of the sampling pixels (i.e., the distance between the centers of the consecutive sampling points) is called gometric superresolution. We are trying to overcome resolution limitations put on the imaging system by the CCD. With this technique we consider an infinitesimal delta function for the pixels of the CCD and an optical rectangular mask in which each pair (line/mm) has a specific width to make the optical rectangular mask more practical. Here we consider a 4-f optical imaging system; the spectrum of the input object falls on the optical rectangular mask, which is located at the back focal plane, and an inverse Fourier transform provides the image of the input object at the CCD plane. This image is sampled by the infinitesimal point pixels of the CCD and the Fourier transform gives the multiple spectrum of the input object overlapped to half of the next spectrum on either side. Then the overlapped spectrum is multiplied with the decoding optical rectangular mask (the same as encoding optical rectangular mask) that makes the overlapping effect disappear, and a train of completely separated spectrums is obtained; filtering gives a single spectrum matched to the spectrum of the original input object.