Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
No tourists on photo
If one try to take a clean photo from old buidings, people or cars appear in front of the lens. The solution is to take a few pictures with the same viewpoint (tripod) with an interval of a few seconds. Then load the photos in gimp as layers, make a mask on each layer and wipe the unwanted out. A few years ago I dit it with PS but it is the same with gimp.

You can automate this with a "median filter". This filter computes the median value for a given pixel using the values of that pixel on several layers.

In math, the "median" is the value for which there are as many samples below than above. For instance, in 1,1,1,1,6 the average is 2 (10/5), but the median is 1. When your set of samples contain a preponderant value, this value ends up as the median.

So when you apply this to pixels in an image, this select the pixel value that appears the most often in the pictures, which is usually the fixed part. So in practice you take 7 shots or more. There is a median filter in GMIC, and I did one in Python
I've tried with the GMic median filter on the 7 pictures I own and the result is a little disappointing. Ofnuts, as you mention, there are more photos needed because I think if the filter don't find enough information on a place in the photos, the filter can not decide which I want to keep. Or am I wrong ?
The median filter won't find that single picture where a particular spot is not masked. That works if people move and their density of not too high. And of course, the more pictures, the better.

But what kind of result do you get? The problem could be elsewhere.
Result with GMic Qt :

I think the interval between pictures is a bit too short.
An alternative method to achieve the same result is to use Hugin. This will even work for hand-held photographs, as Hugin can align photos to sub-pixel accuracy.
With the pictures aligned you can continue with Hugin, using "include" or "exclude" masks, or pull the images into GIMP and mask there, or use a median filter if it has enough information to work on.
I know about Hugin but I just want to show how this can be done with gimp masks. With the seven photos I toke, I was able to make one photo without people and cars. Ofnuts, thank you for the tip and david, thank you to remind Hugin that can do the job. By the way, the seven pictures were taken with the camera on a wall and were automatic aligned with easyHDR3 (registered version) before I imported them in gimp. I don't know if the exist somthing in gimp that can do the same job.

Forum Jump: