Sign in

username:

password:



Not a member?

Search matlab



Search tips

Subscribe to matlab



matlab by Keywords

Atanh | Autocorrelation | Bandpass Filter | C++ | Conv | Database | Deconv | Excel | FFT | Filter | Filtering | FIR | Fourier Transfrom | FSK | Gaussian Noise | Haykin | IFFT | Image | Java | LFSR | LMS | LPC | MEX | OFDM | QPSK | Radix | Random | Sampling | Segmentation | Simulink | Visual Basic | Waveform | Wavelet

Sponsor

NEW! TMS320C6474: 3x the performance. 1/3 the cost. Three 1 GHz cores on 1 chip.

Discussion Groups

Discussion Groups | Matlab DSP | gradient of an image

Technical discussion about Matlab and issues related to Digital Signal Processing.

  

Post a new Thread

gradient of an image - ceg9901 - Jan 28 2:43:00 2005





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





(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )

Re: gradient of an image - Joe Sababa - Feb 1 18:08:00 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/ __________________________________





(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )