MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by mahesh chathuranga
on 30 Sep 2013

i have a gray scale image.my codes are

V=(-1*diff(summ));%%gives the horizontal edges of the image

H=(-1*(diff(summ'))');%%gives the vertical edges of the image

HV=imadd(H,V);%%i want to see the both edges in same image. i'm very new for matlab.i dont know these codes are correct or not.is there any operation to convert the arithmatic results into image.thanks.

Answer by Image Analyst
on 30 Sep 2013

Why not use imgradient() or imgradientxy()?

mahesh chathuranga
on 3 Oct 2013

it gives the error message??? Undefined function or method 'imgradient' for input arguments of type 'double'.

Image Analyst
on 3 Oct 2013

You must be using an old version of MATLAB. Please download the latest version. It's included in your maintenance contract.

## 3 Comments

## Jan Simon (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/88628#comment_171572

Now it would be helpful, if you explain what "summ" is. The more details we have to guess, the less matching the answers will be.

## mahesh chathuranga (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/88628#comment_172069

summ is the the image of cooccurrence matrix features(contrast and energy)

## Image Analyst (view profile)

Direct link to this comment:http://www.mathworks.com/matlabcentral/answers/88628#comment_172110

The cooccurrence matrix is a 2D array and can be displayed as an image, true. But, the

edgesof the cooccurrence matrix??? I have no idea what that would even represent. I don't think it means anything, at least nothing intuitive that I can think of.