Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!59g2000hsb.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Image Invariant Moment
Date: Sat, 14 Jun 2008 07:29:14 -0700 (PDT)
Organization: http://groups.google.com
Lines: 26
Message-ID: <c48a7a95-8406-499e-b6aa-2ded3f98d7ce@59g2000hsb.googlegroups.com>
References: <g30jp8$d4a$1@fred.mathworks.com> <g30jup$ecs$1@fred.mathworks.com>
NNTP-Posting-Host: 75.186.67.199
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1213453754 331 127.0.0.1 (14 Jun 2008 14:29:14 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 14 Jun 2008 14:29:14 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 59g2000hsb.googlegroups.com; posting-host=75.186.67.199; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 
Xref: news.mathworks.com comp.soft-sys.matlab:473780



On Jun 14, 10:18=A0am, "Nan W." <iiuu_c...@yahoo.co.jp> wrote:
> > m2=3Dsqrt((u20-u02).^2+4*u11.^2);
>
> is actually
>
> > m2=3D((u20-u02).^2+4*u11.^2);
>
> sorry I was trying various of versions though.
>
> Please help I really stucked!
> Thank you so much

------------------------------------
NaN:
Is your original image a uint8 (with values of 0-255)?  If so the
squaring and summing operations may exceed its range and it will
either clip or wrap around (I don't know which), or maybe just give an
error or warning or NaN (I'm not sure).  You might need to convert
your image to floating point with single() or double() before
computing the moments.

You need to detail more what "doesn't work out" actually means.  Does
that mean there is an error message, warnings displayed in the command
window, or the results just don't seem like the correct results?
Regards,
ImageAnalyst