Support for Pentax pixel shift files #3489

Some explanations about the news in pixelshift:

Here’s the current gui:

There’s a new method 3x3 new. While the other methods 1x1, 1x2, 3x3 and so on marked a pixel as motion when one of the pixels in the surrounding grid was dectected as motion, the new method does the following:

For each pixel it looks for motion in greens and marks them as value 1.0. If no motion in green is found (and red/blue check is enabled) it marks red/blue motion with the value of Red&Blue weight, 0.7 in example screen shot.

Then, if 3x3 new: Blur is enabled the values run through a gaussian blur with Blur simga.

This can be used to eliminate false positives.

In next step the sum of the values of a 3x3 grid for each pixel is compared against 3x3 new threshold (3.0 in example screen shot). If the sum is >= this threshold, the pixel is treated as motion.

When 3x3 new: Fill holes is enabled the result additionally runs through a hole fill algorithm.

Then, all pixels marked as motion are taken from:

  1. the selected amaze demosaiced frame in case median is disabled.
  2. the median of all 4 amaze demosaiced frames in case ‘median’ is enabled and Exclude selected frame from median is disabled
  3. the median of 3 amaze demosaiced frames in case ‘median’ is enabled and Exclude selected frame from median is enabled

Because images show more than words, here a first example for the hole fill (Left in screenshot is always pixelshift without motion detection):

The part at right shows what you get with simple green and Red/Blue cross detection.

There are still some artifacts. Let’s have a look at the motion mask:

As you can see, motion detection failed to detect motion at the back of the persons.
Let’s activate hole fill and have a look at the motion mask:

Now, the persons are completly marked as motion. Lets’s have a look without the motion mask:

Artifacts are gone :slight_smile:

2 Likes