Is it possible to combine two Sobel kernels into one? sobel-y --&gt; [ 1   2   1]
                             [ 0   0   0]
                             [-1  -2  -1]

                sobel-x --&gt;  [1  0 -1]
                             [2  0 -2]
                             [1  0 -1] 


Is it possible to combine two Sobel kernels (x-direction, and y-direction) into one and then convolve that with an image?

The idea is that, I already have an Convolution function written. I would be able to reuse it in that way.

Update: 

I tried Fat32's suggestion of applying X and Y kernels sequentially.

Input:



Expected Output:



Present Output:



Looks like my filter isn't producing the correct output.
A Sobel edge detector compares an approximation of the image gradient $|\nabla f_c(x,y)|$ to a threshold to decide if a pixel is an edge or not. A proper threshold must be determined and computed so that the comparison produces useful results. The approximation is given by the following:
$$|\nabla f_c(x,y)| \longrightarrow \sqrt{ (f \star h_x)^2 + (f \star h_y)^2 }$$
where $f = f[n_1,n_2]$ is the discrete-time image sequence, and $h_x = h_x[n_1,n_2]$ and $h_y = h_y[n_1,n_2]$ are the two directional Sobel kernels respectively.
As seen, the Sobel operator is nonlinear in the filters $h_x$ and $h_y$, and a single kernel, which would replace those two directional kernels, cannot be obtained in this case.