Azzera filtri
Azzera filtri

How can I simulate motion blur due to camera and object movement?

6 visualizzazioni (ultimi 30 giorni)
Hi, I want to simulate motion blur of an image due to camera and object movement. I know I can use the MATLAB function fspecial so blur the image due to camera movement since the function applies the same 2D filter to the whole image which is exactly what happens when there is camera movement (e.g. the whole image is blurred). But in the case of motion blur due to object movement only part of the image is blurred since the background is stationary. What is the easiest method of simulating motion blur due to a moving object? I want to combine it with the motion blur due to camera movement. This in effect means that the image will be blurred to a "greater" extend in the region of the object than in the background (e.g. The background will ONLY have motion blur due to camera movement and the region of the object will have a COMBINED motion blur due to camera and object movement). An answer to an efficient way of combining the 2 types of motion blur (e.g. motion blur due to camera and object movement) will also be appreciated.
Regards Johann Berrangé

Risposte (1)

Image Analyst
Image Analyst il 22 Giu 2018
Use conv2() or imfilter()
  3 Commenti
Image Analyst
Image Analyst il 22 Giu 2018
Correct. Use fspecial() to create a blurring kernel. Then use it to blur the image.
kernel = fspecial(....
blurredImage = imfilter(grayImage, kernel);

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by