Detect flying birds with Pixel Shift

(nosle) #21

The default motion mask seems really quite conservative now that all motion is visualised in it’s full green glory. Scenes that work well with motion correction off are lit up with large areas of green. Deselection blur motion mask shrinks it back a bit. So does going negative on the ISO adaption.

I guess it’s shows how well you are dealing with artefacts but as a default I’d say it’s to sensitive. Would be interesting to hear what other pixelshifters say.

(Ingo Weyrich) #22

I agree that the default (automatic mode) is quite conservative (or oversensitive). But each time I tried to improve it (because it’s oversensitive for some pictures) I found other pictures where the newly tested settings didn’t find all the motion artifacts.

Please suggest better default settings, dear pixelshifters. You are the users. I just code it :wink:

(nosle) #23

That’s a great observation, looking at the mask it really appears that almost every group has a single dot trailing. I guess it shows how deceitful and oversensitive our (human) pattern recognition is. I read it exactly the same way as you

(nosle) #24

With working dynamic profiles perhaps a conservative default is best. It’s so easy now to use a tweak as default.

(Ingo Weyrich) #25

Btw: the sensitivity of the motion detection didn’t change (expect for the bug I fixed). It’s just the visualization of the motion mask which has changed (darker greens means less demosaiced values and vice versa, black means only pixel shift combined, bright green means only demosaiced). The result was almost the same before, but the feedback to the user wasn’t as accurate.

(Gimbal Lock) #26

Very nice improvement with the green mask. And as already stated the default motion correction is VERY sensitive, but that is ok since one can adjust it with the sliders to find the best compromise.

Iso adaption down to -1 is usually a good start (at least with the pictures I’ve messed with lately).
The name “ISO adaption” is a bit confusing though, maybe it is an accurate name but I kind of use it as a sensitivity slider.

Good work though. Thumbs up.

(Ingo Weyrich) #27

I’m absolutely not against changing the name of this slider. In fact, it’s not only for ISO adaption, but also for changing sensitivity when the shots are underexposed or overexposed, so changing the name to ‘Sensitivity’ sounds good. That’s exactly the feedback I need :+1:

@nosle Do you agree?

(Ingo Weyrich) #28

@Gimbal @nosle

About the sensitivity slider:

There are two possibilities:

1.) I can simply set the default to -1


2.) I can change the calculation in a way that default 0 in new code behaves like default -1 in old code. Because we have version information in pp3 files, it should also be possible, to convert the value from an old pp3 file to the new behaviour automatically.

I would prefer the second solution.

(Gimbal Lock) #29

I’m fine with option 2.

I also want to add that I did a test shot yesterday of a bottle of black currant lemonade (instead of some fancy liqueur) lighted by a candle. The candle light moves ever so slightly during the exposure and there were some fine details on the label on the bottle.

The auto setting picked up everything around the candle but also all details on the label which looked very good with all motion correction set to off. So I figured I would try to get some balance by adjusting the settings. At first it seemed impossible to get both a clean label and smooth area around the candle. Had it been a serious picture I figured I would probably have to blend it manually.

But all of a sudden I found a setting that worked perfectly (on this particular picture). Unticking the red/blue detection and increasing the blur area, increasing the blending (can’t remember the exact labels) and the mask magically picked up exactly everything I wanted and left the label untouched. The area around the light was perfectly blended from a single image to PS and the label was pure PS.

Impressive! (I posted the picture at pentax forum, K1, Pixelshifted images).

(Ingo Weyrich) #30

Very nice result. Did the improved motion mask help to find the perfect settings?

For other users:
You can find the picture @gimbal mentioned above here.

(Gimbal Lock) #31

Absolutely, it always helps to see what you are doing.

(Gimbal Lock) #32

Unrelated to the PS functions, a little problem with the testbuild.
I had problems selecting directories in the settings panel. For example, path to external editor, or output directory. The popup dialog didn’t update when selecting drives.

(Ingo Weyrich) #33

Can you post the content of your ‘AboutThisBuild.txt’ ?

(nosle) #34

Yep sounds good to me! The ISO adaption name somehow made me think it shouldn’t be changed. (which I did anyway…) So sensitivity sounds better and invites to fiddling around with.

What does it do? Before this discussion came up I was wondering to myself if the motion detection knows how much the pixel values have changed. The reason I was wondering was because if you could have a … sensitivity… slider that could cull pixels from the mask based on the diff. You’d have a useful way of manipulating the mask. If the diff is small there won’t be visible artefacts. High contrast diffs could be left in the mask and low contrast diffs you could still pixelshift. Just a thought, how close to this is the Iso adaption slider as it stands? I’m not sure this is actually an iq advantage but my guess is that it is.

About the sensitivity of the slider option two sounds better but I’ll try to check some more photos after I put my kids to sleep tonight.

@Gimbal is pixslhift a swedish affliction here on :slight_smile:

(Gimbal Lock) #35

The AboutThisBuild.txt :

Version: 5.4-232-g651ad4d0
Branch: pixelshift_fixes
Commit: 651ad4d0
Commit date: 2018-04-14
Compiler: gcc 7.3.0
Processor: generic x86
System: Windows
Bit depth: 64 bits
Gtkmm: V3.22.0
Lensfun: V0.3.2.0
Build type: release
Build flags: -m64 -mwin32 -msse2 -mfpmath=sse -mthreads -Wno-aggressive-loop-optimizations -std=c++11 -mtune=generic -Werror=unused-label -fopenmp -Werror=unknown-pragmas -Wall -Wno-unused-result -Wno-deprecated-declarations -DNDEBUG -O3
Link flags: -m64 -mthreads -static-libgcc -mtune=generic -s -O3 -fno-use-linker-plugin
OpenMP support: ON
MMAP support: ON

(nosle) #36

I’ve looked through at least a dozen tricky motion pixelshifts and it seems that reducing the iso adaptation by -1 has almost no issues.

One photo which even the defaults couldn’t handle was made a bit worse by reducing the iso adaptation. His butt is translucent! The noise around ‘the area’ is made worse by the -1 setting

DNG here
This is from the same shoot as all almost my difficult pixelshift files shared on!

1 out of many had issues so I think it’s ok do reduce the noise adaptation to -1 (current scale). If we wait a bit a do more testing we could end up with an even better default. It would be interesting to test other usage scenarios as well.

(Ingo Weyrich) #37

As you build on windows, most likely it’s related to this bug:


If you use my builds, I had some faulty buids due to a bad revert of GTK3 (see post above). Now it should be fixed. sorry for the trouble.

(Ingo Weyrich) #39

To detect motion, you have to distinguish between changes caused by noise and changes caused by motion. For low ISO images that works quite good (though not perfect, especially not perfect in dark regions), but for high ISO images even a large difference can be caused by noise and should not be detected as motion and also vice versa.
The original intention for the ISO adaption slider was to allow moving this detection threshold up or down.
The functionality of the slider didn’t change with the new version (except the -1 change).
It’s very close to what you think of :slight_smile:

(nosle) #40

Then the rename to “sensitivity” is perfect!