vkdt dev diary, pt2

yay, the current linux user features an article about vkdt (9 pages! only for the german speakers):

https://www.linux-community.de/magazine/linuxuser-ce/2022/03/

unfortunately it seems pdf of the community edition misses that article, so it’s paywalled. anyways happy to see this :slight_smile:

15 Likes

Congrats, Jo!

:partying_face:

Does vkdt support CR3 files?

not that i know of. i suppose it’s a matter of compiling in the right flavour of rawspeed? i suppose my use of exiv2 is so scarce that it would probably not fail due to that.

if you want i can try and post instructions.


…in fact yes that’s all it takes (this is the R6 CR3 sample from raw.pixls.us):

cd ext/rawspeed
git remote add cytrinox https://github.com/cytrinox/rawspeed/tree/canon_cr3
git fetch --all
git checkout canon_cr3
cd ../../
rm -rf built/ext
cd bin
make -j20

…and it’s even slower than the CR2 decompressor was, it seems :frowning:

i also have this local diff

diff --git a/src/db/db.h b/src/db/db.h
index 665d924..b5311e6 100644
--- a/src/db/db.h
+++ b/src/db/db.h
@@ -118,6 +118,7 @@ dt_db_accept_filename(
   const char *f2 = f + strlen(f);
   while(f2 > f && *f2 != '.') f2--;
   return !strcasecmp(f2, ".cr2") ||
+         !strcasecmp(f2, ".cr3") ||
          !strcasecmp(f2, ".crw") ||
          !strcasecmp(f2, ".nef") ||
          !strcasecmp(f2, ".raw") ||

(and no i’m not proud about it) will push at some point, but need to run now.

I will try to mak use of omp for the RT version of the CR3 decompressor…

I think that CR3 PR has been abandon, as Roman said he’d need to rewrite it, but he hasn’t started rewriting it yet, which is why there is an in-tree version of libraw in darktable now.

i will not comment on the libraw thing.

the canon_cr3 branch i used above is 8 days old at the time of this writing.

that sounds great! not that i have a cr3 camera or the money to get one :slight_smile:
but decoding this thing took 500ms (!!!) here. that’s like half a second! unacceptable!11

i remember some formats were easier to parallelise, for instance the fuji raws decode so much quicker. hoping the tile based wavelets in cr3 offer enough possibility for parallel processing. i’m sure if anyone can do then it’ll be you.

1 Like

One of the problems is, that the current version (though already using omp) only uses up to 4 cores. I’ll see what I can do.

this is now pushed. also i updated rawspeed to new upstream. it contains colour matrices :slight_smile: so prospectively i can delete the adobe_coeff.h header. currently it’s still in use for some other things though (mlv, external tools) that need fixing.

note that for cr3 support you’d still need to compile in cytrinox’ branch, as in the listing above.

as of today, vkdt has initial support for timelapse videos. there is some minimal documentation, too.

in short, the i-raw module now supports filenames of the form DSCF%04d.RAF (for instance) and will open a sequence of numbers as animation. this can be played back in the gui or exported to h265 video (via gui export or cli).

currently this requires some manual .cfg file editing (setting number of frames, initial frame number, frames per second, setting filename with %04d). if you’re into timelapses and give this a spin, let me know how it goes.

2 Likes

Wait, so you go to spectral and create on-the-fly CMF to produce as many virtual “primaries” as you want ?

there is some code for this, yes. i should clean this up some. happy to discuss in more detail or take your input on how to best streamline it for certain use cases.

here’s a quick timelapse test run with 10 frames, using this cfg:

frames:10
fps:10
module:i-raw:main
module:denoise:01
[...]
param:filmcurv:01:black:-4.80169
param:i-raw:main:filename:DSCF%04d.RAF
param:i-raw:main:startid:4683

only the first two and last two lines are important for timelapses. i don’t really have images for this, so i’m only running it on a short burst of 10 frames (that’s the frames:10 line above). the result can be viewed like this:

adding keyframes like this

keyframe:0:colour:01:exposure:0:1:0
keyframe:9:colour:01:exposure:0:1:4

will make the sequence go from exposure 0 (frame 0) to exposure 4 (frame 9). you can create such keyframes from the gui by stopping the animation (space or the stop button) at the desired frame, setting the values you’d like, hovering over the control, and pressing ‘k’.

running the resulting graph through the cli (the same can be achieved from gui export):

vkdt-cli -g ~/Pictures/20200702_teapot/timelapse.cfg --format o-ffmpeg --filename timelapse --output main

and reencoding the h264 to webm for this post:

ffmpeg -i timelapse_0000.h264 output.webm

i arrive at the following video:

1 Like

Wow, that looks like that’s already the best time laps tool for Linux. :slight_smile:

Two questions:
Do you have any plans to add “auto align” of the images ?
And does crop and zoom work? (To make the Ken Burns effect)

I think both is impotent for nice time laps. Both can be don in post, but it would be nice to have in one tool.

the current align module will align the full image, not only do a camera shake correction (i.e. the teapot would not be moving any more). so that’d require a new module.

ah good question. i don’t think the k for keyframe shortcut will work on the ui widget. i just tried to manually put keyframes of the crop module in the .cfg, which works “fine”. actually i think this should probably be done in a different transformation module that will never change the resolution of the output. animating output size sounds like asking for trouble (the current implementation kinda works nontheless but leaves black borders if you animate to crop smaller than frame 0 did). could be a switch in the c/r module i suppose.

Good example and cute stop motion. :+1:

1 Like

actually the lens module works kinda okay on this one. let me demonstrate with a still image:

these are the interesting lines in the .cfg:

frames:200
fps:24
keyframe:0:lens:01:center:0:2:-0.25157:0
keyframe:199:lens:01:center:0:2:0.24528:0.21384
keyframe:0:lens:01:scale:0:2:1.9:1.9
keyframe:199:lens:01:scale:0:2:2.1:2.1
keyframe:0:lens:01:squish0:0:1:0
keyframe:199:lens:01:squish0:0:1:0.9434
1 Like