* @param nBarHalfWidth The width of the bar, divided by 2 and rounded down. The actual width is
* twice this width plus 1, centered on the center of the image.
* @return A Gray8Image that can be passed to InverseFilter to remove horizontal blur.
*/
public static Gray8Image horizBar(int nImageWidth, int nBarHalfWidth) {
Gray8Image imResult = new Gray8Image(nImageWidth, nImageWidth, Byte.MIN_VALUE);
byte bData[] = imResult.getData();
int nC = nImageWidth / 2;
int nArea = 2 * nBarHalfWidth + 1;
int nRow = nC * nImageWidth;
for (int j = -nBarHalfWidth; j <= nBarHalfWidth; j++) {
bData[nRow + nC + j] = (byte) (Byte.MAX_VALUE / nArea);