How to make image distortion using convolution operator and matrix-vector formulation?

4 次查看(过去 30 天)
Hello guys;
I am having an exercise to make image restoration by means of least square.. I had simulated an image and also proposed a filter but i had stopped in making distortion to the image (using matrix-vector formulation) to obtain image g.and also to Distort f using the mask h (using convolution operator).?!
Can any one tell me how to make or distort image using matrix vector formulation and using convolution on matlab?
if true
% % stimulate an image f
A= zeros (255,255, [ones (255:200),(100:200)]);
A(50:200, 50:200)=1;
% the image f
f = A;
% the mask h
h = fspecial('gaussian',255,10);
end

回答(1 个)

Image Analyst
Image Analyst 2016-4-17
Distortion is an optical aberration. it is a non-linear mapping of points that cannot be done with a linear process like convolution. The formulas for it are given in that link. You'd have to use something like nlfilter() or else program up a scanning filter on your own.
I don't know how least squares would be involved in your problem at all. Not sure what you were thinking but correcting, or creating, distortion is a straightforward mathematical operation. You would use a polynomial interpolation though in deciding where to pull the input pixel from, since it will likely lie in between integer rows and columns.
Your formula for A is really messed up. Please read the documentation on zeros for how to pass the proper input arguments.

类别

Help CenterFile Exchange 中查找有关 Read, Write, and Modify Image 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by