I am using the Peak to Correlation Energy (PCE) Metric to measure the similarity between two images using MATLAB. In some cases, the PCE value obtained is NaN. How can I solve this problem?
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.
Sign up to join this community
dbstop if naninf
. That should stop execution when a NaN or inf gets created and you can expect your code and data right when the problem happens. And yes, it's either your data or your algorithm or possible the combination of both. $\endgroup$