MATLAB: Image processing structural Tensor Equation

image processingImage Processing Toolboxvertical spatial derivatives

CAn anyone pls help me, How to calculate structural tensor matrix H for a given RGB image. Herewith i had attatche the equation.

Best Answer

Try this to get the individual color channels:
% Extract the individual red, green, and blue color channels.
redChannel = rgbImage(:, :, 1);
greenChannel = rgbImage(:, :, 2);
blueChannel = rgbImage(:, :, 3);
then use imgradientxy().