want to compute zero mean for whole matrix and then some scaling to this ?
2 次查看(过去 30 天)
显示 更早的评论
I have a matrix of 1024*966 for this matrix I want to compute zero mean and want to scale after this and want to improve result by doing this but how can I? Final result will be nearly equal result to matrix of 1024*966.
for zero mean I got
X=AC1(:,1);
Y=X-mean(X(:,:));
For scaling I don't know?
1 个评论
the cyclist
2013-8-29
I'm sorry, but I don't think the explanation is what you want is very clear. Can you give a very small example (maybe 3x3?) that shows what you want to do?
回答(1 个)
Image Analyst
2013-8-29
编辑:Image Analyst
2013-8-29
You should have edited your original question, or added a comment to my answer there.
Why do you call it zero mean? That's not standard terminology. Why are you taking only the left column of 2D image AC1? That doesn't do the whole matrix, just the left column. Anyway, you can do
Y = double(AC1) - mean2(AC1); % Use mean(AC1(:)) if you don't have the IPT.
For scaling just multiply by some scaling factor, like 42 or whatever - I'm not sure why that part is confusing to you.
6 个评论
Image Analyst
2013-9-18
I still don't understand. Did you switch terminology on us? Is your new x the old z (the plane number, or 1,2,3) and the new y is the pixel value at that (x,y) location in the three matrices?
Since you've lost me, why don't you just use polyfit() to get your parabola?
coefficients = polyfit(x, y, 2);
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!