BERD is a noniterative method. Tsang and Poon14 demonstrated its potential for generation of phase-only holograms. The same principle can be used for the generation of a binary hologram. The principle of the method is to scan each individual pixel of the hologram and to put it at the desired value. For instance, a pixel can be put to zero if the original value is negative, and to one otherwise. The difference with the threshold approach is that after each change, the error between the original and the new values is computed and diffused to the neighboring pixels that have not yet been processed. The update of the pixel to a value leads to an error . When a line of pixels is scanned from left to right, the diffusion of error is performed as follows to the surrounding pixels: Display Formula
(1)The constants to are weighting coefficients set, respectively, to , , , and in accordance with the previous studies related to BERD. It was reported that the performance of the method was greatly improved when the scanning direction alternated from left to right and from right to left between each pixel line. Note that when the scan direction is from right to left, Eq. (1) should be slightly modified to diffuse the error in the other direction. BERD procedure is illustrated in Fig. 3. Since error is diffused to the neighboring pixels by scanning the hologram row by row, the first and last columns, as well as the last row, cannot be processed. A column of zeros and a line was, therefore, inserted at the left, the right, and the bottom of the hologram matrix for the application of the algorithm, and removed from the final binary hologram at the end of the procedure.