how can i blur the background?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello, I want to blur the background not the man. please help as soon as possible.
1 Commento
Walter Roberson
il 3 Mag 2024
Note that in the general case, it is impossible for a program to automatically select which part of the image is "background" and which part is "foreground".
Consider the images produced by SOHO, the solar observatory. The images are primarily intended for observing the Sun, in which case you ignore everything outside of the solar disk. But if you take the same images and mask out the solar disk then you can observe objects moving close to the solar disk -- comets!
So in one case you ignore everything outside of the solar disk, and in the other case you ignore the solar disk, and so using the same image you can get two different purposes. The foreground for one purpose is the background for the other purpose.
Therefore it is impossible to automatically select foreground versus background: the "noise" for one purpose might easily be the "signal" for a different purpose.
Risposte (2)
DGM
il 3 Mag 2024
There are several answers already. Here's the latest one. See the links therein.
0 Commenti
Image Analyst
il 3 Mag 2024
You can try the foreground detector in the Computer Vision Toolbox.
help foregrounddetector
I have no idea how will its algorithm will work for your particular image(s).
Otherwise you can manually trace the foreground with drawfreehand to make a mask. Then blur the entire image and assign the blurred pixels inside the mask to the original unblurred image. Like for once you have the mask:
h = ones(15);
filteredRGB = imfilter(originalRGB, h);
[r,g,b] = imsplit(rgbImage);
[rf, gf, bf] = imsplit(filteredRGB);
r(mask) = rf(mask);
g(mask) = gf(mask);
b(mask) = bf(mask);
outputImage = cat(3, r, g, b);
See attached drawing demos for creating and masking images.
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!