Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!q39g2000hsf.googlegroups.com!not-for-mail
From: selvi <AlshiJiji@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: How to find Horizontal & Vertical Gradients?
Date: Sat, 5 Jan 2008 08:40:48 -0800 (PST)
Organization: http://groups.google.com
Lines: 14
Message-ID: <fd664390-3ad5-4a89-9f65-a824f963677c@q39g2000hsf.googlegroups.com>
NNTP-Posting-Host: 61.2.231.8
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1199551248 26954 127.0.0.1 (5 Jan 2008 16:40:48 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 5 Jan 2008 16:40:48 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: q39g2000hsf.googlegroups.com; posting-host=61.2.231.8; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 
Xref: news.mathworks.com comp.soft-sys.matlab:444485


Hi,
   I want to implement the following Equations in MATLAB to find hori
& Vert Gradient.

DH = | x(i , j-2) + x(i ,,j+2) - 2x(i, j) |  +  | x(i,,j-1) - x(i,,j
+1) |

DV = | x(i-2, j) + x(i+2,,j) - 2x(i, j) |  +  | x(i-1, j) - x(i+1,,j)
|

If(DH+35< DV)

   G={ [ x(i,,j-1) + x(i,,j+1) ] /2 }    +   { [ 2x(i, j) - x(i , j-2)
- x(i ,,j+2) ]/4}