Borrar filtros
Borrar filtros

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

7 visualizaciones (últimos 30 días)
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

Respuestas (1)

Image Analyst
Image Analyst el 17 de Abr. de 2016
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.

Categorías

Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by