Sobel output is directional? Not magnitude?

Just to add some further information…

I tested the following:

cv::Mat image = cv::imread(dir.replace_filename(“some_grayscalefile.png”).string(), cv::IMREAD_GRAYSCALE);

cv::Mat imageCV32F;

image.convertTo(imageCV32F, CV_32FC1);
cv::Mat gradX;

cv::Sobel(imageCV32F, gradX, CV_32FC1, 1, 0, 5);

cv::Mat gradY;

cv::Sobel(imageCV32F, gradY, CV_32FC1, 0,1, 5);

My CUDA kernel matches gradX and gradY exactly.

When I write out the floating point values to a csv file, I see that my values are exact matches.
But…

cv::Mat gradXY;
cv::Sobel(imageCV32F, gradXY, CV_32FC1, 1,1, 5);

produces in gradXY something I cannot determine. It doesn’t seem to be a simple combination of gradX and gradY, either in multiplication or addition…

What is the output supposed to be in this case? The code I’m trying to port uses this value (undocumented, magic stuff of course) and I’m hoping to match it exactly or pretty darn close…

Mystery…

Any original authors on the forum? The documentation doesn’t seem to cover the case of 1,1 for x and y gradients, but rather separate and then combining…