Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: help on normxcorr2
Date: Mon, 26 Aug 2013 15:32:09 +0000 (UTC)
Organization: Intel
Lines: 41
Message-ID: <kvfsdp$mr1$1@newscl01ah.mathworks.com>
References: <kv8mi3$8tn$1@newscl01ah.mathworks.com> <kvfpom$3n2$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: rubyext-06-ls.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1377531129 23393 172.20.102.182 (26 Aug 2013 15:32:09 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 26 Aug 2013 15:32:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 4195005
Xref: news.mathworks.com comp.soft-sys.matlab:801467

Thanks, Steve! After I converted the image to binary, it worked.

Sam


"Steven_Lord" <slord@mathworks.com> wrote in message <kvfpom$3n2$1@newscl01ah.mathworks.com>...
> 
> 
> "Sam " <sam_xu@hotmail.com> wrote in message 
> news:kv8mi3$8tn$1@newscl01ah.mathworks.com...
> > Hi, I have a question regarding normxcorr2. It works when I use 2 orignal 
> > images A and B, but when I increase the resolution of images by using 
> > interp2 and plug the new image C and D into the fuction, I got the 
> > following error. What does this error mean?
> >
> > Error using normxcorr2
> > Expected input number 1, T, to be finite.
> 
> There's a nonfinite value (Inf, -Inf, or NaN) in the variable that you pass 
> into NORMXCORR2 as the first input. To locate the nonfinite values, assuming 
> that the name of the variable you're using is T:
> 
> locationOfNonfiniteValues = find(~isfinite(T));
> 
> My guess is that around the edges you're trying to "interpolate" outside the 
> region where you have data and so you receive NaN values.
> 
> http://www.mathworks.com/help/matlab/ref/interp2.html?searchHighlight=NaNs
> 
> "ZI = interp2(X,Y,Z,XI,YI) returns matrix ZI containing elements 
> corresponding to the elements of XI and YI and determined by interpolation 
> within the two-dimensional function specified by matrices X, Y, and Z. X and 
> Y must be monotonic, and have the same format ("plaid") as if they were 
> produced by meshgrid. Matrices X and Y specify the points at which the data 
> Z is given. Out of range values are returned as NaNs."
> 
> -- 
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on 
> http://www.mathworks.com