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$>
References: <kv8mi3$8tn$> <kvfpom$3n2$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1377531129 23393 (26 Aug 2013 15:32:09 GMT)
NNTP-Posting-Date: Mon, 26 Aug 2013 15:32:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 4195005
Xref: comp.soft-sys.matlab:801467

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


"Steven_Lord" <> wrote in message <kvfpom$3n2$>...
> "Sam " <> wrote in message 
> news:kv8mi3$8tn$
> > 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.
> "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
> To contact Technical Support use the Contact Us link on