\caption{Example of ASM ReLu on an $8\times8$ block. Green pixels are negative, red pixels are positive, and blue pixels are zero. Left: original image. Middle: ReLu. Right: ReLu approximation using ASM with 6 spatial frequencies.}

\caption{Example of ASM ReLu on an $8\times8$ block. Green pixels are negative, red pixels are positive, and blue pixels are zero. 6 spatial frequencies are used for both approximations. Note that the direct approximation fails to preserve positive pixel values.}

\label{fig:asm}

\end{figure}

...

...

@@ -83,12 +106,12 @@ We call the function $\nnm(x)$ the nonnegative mask of $x$. This is our binary m

\begin{equation}

r(x) = \nnm(x)x

\end{equation}

This new function can be computed efficiently from fewer spatial frequencies with much higher accuracy since only the sign of the original function needs to be correct. Figure \ref{fig:asm} gives an example of this algorithm on a random block, and pseudocode is given in the supplementary material. To extend this method from the DCT domain to the JPEG transform domain, the rest of the missing JPEG tensor can simply be applied as follows:

This new function can be computed efficiently from fewer spatial frequencies with much higher accuracy since only the sign of the original function needs to be correct. Figure \ref{fig:asm} gives an example of this algorithm on a random block and compares it to computing ReLu on the approximation directly. Note that in the ASM image the pixel values of all positive pixels are preserved, the only errors are in the mask. In the direct approximation, however, none of the pixel values are preserved and it suffers from masking errors. The magnitude of the error is tested in Section \ref{sec:exprla} and pseudocode for the ASM algorithm is given in the supplementary material.

To extend this method from the DCT domain to the JPEG transform domain, the rest of the missing JPEG tensor can simply be applied as follows: