Hi, How to find horizontal and vertical gradidnet of an image.is there any command derivation of an image?. |

# gradient of an image

Started by ●January 28, 2005

Posted by ●February 1, 2005

--- ceg9901 <> wrote: > > > Hi, > How to find horizontal and vertical gradidnet of an > image.is there > any command derivation of an image?. > Hi, Follow these steps: 1)Get the matrix: M=getframe(gca); % assuming it is already displayed. If not, use imread. P=frame2im(M); 2) a) If it is a BW image go to next step. b) If it is a colored image: P=rgb2gray(P); % Need images toolbox. Otherwise: P=sum(double(P,3))/3 3)[Dx,Dy] = gradient(P); Cheers, Joe Sababa BSTeX - Equation viewer for Matlab http://www.geocities.com/bstex2001/ __________________________________ |

Posted by ●February 1, 2005

--- ceg9901 <> wrote: > > > Hi, > How to find horizontal and vertical gradidnet of an > image.is there > any command derivation of an image?. > Hi, Follow these steps: 1)Get the matrix: M=getframe(gca); % assuming it is already displayed. If not, use imread. P=frame2im(M); 2) a) If it is a BW image go to next step. b) If it is a colored image: P=rgb2gray(P); % Need images toolbox. Otherwise: P=sum(double(P,3))/3 3)[Dx,Dy] = gradient(P); Cheers, Joe Sababa BSTeX - Equation viewer for Matlab http://www.geocities.com/bstex2001/ __________________________________ |

Posted by ●January 28, 2005