Reputation: 891
I have wrapped phases and I want to unwrap them using the function "wrap". However, in this case I can't get the unwrapped phases for reasons unclear to me.
The wrapped phases are
and by looking at the cross section I can see that the phases are wrapped
I have scaled the image to be from 0 to 2*pi by:
ScaledWrapped = Wrapped*7*2*pi;
When applying the function unwrap:
UnwrappedImage = unwrap(ScaledWrapped);
I don't get unwrapped phases and I don't know why. The result is :
and I don't know what's going wrong!
Any suggestions please!!
Many thanks in advance
Upvotes: 4
Views: 1935
Reputation:
Your data may not have proper jumps. From help unwrap
: unwrap(P) unwraps radian phases P by changing absolute jumps greater than or equal to pi to their 2*pi
complement.
See how bad scaling of data (compare y
and y1
) results in different unwrapped data:
x = linspace(0,pi,20)';
y = [x;x;x;x;x;];
y1 = 1.1*y;
plot(y,'ro'); hold on; plot(unwrap(y)); hold on; plot(unwrap(y1))
Upvotes: 2