Dear supporter:
Our algorithm team currently requires the information of Histogram of Gradient (HOG) for image processing. HOG is the combination result of Sobel X(H) , Sobel Y(V), Gradient Magnitude(GM), Gradient Orientation(GO), then Histogram generation. We'd like to obtain simpler solution of GM thru an idea of absolute(Sobel X)+absolute(Sobel Y), which happens to be able to leverage TI API
void IMG_sobel_3x3_8
(
const unsigned char *in, /* Input image data */
unsigned char *out, /* Output image data */
short cols, short rows /* Image dimensions */
)
Since our GM here is the combination of abs(Sobel X)+abs(Sobel Y), the addition should be over 255.
However, as you may see the output data type (unsigned char) has clamped the data larger than 255
to 255
if (O > 255) O = 255;
Would you please provide a solution by removing the clamping and outputting short data type instead.
We really appreciate your supports.
Joey