Frei0r Lens Correction Filter (more code!)

Yes, here’s another filter. They’re just like the others: .qml converted to .txt so I could upload them.

Have fun :smiley:

meta.txt (913 Bytes)
ui.txt (5.1 KB)

Lens Correct0r is more versatile than defisheye. It has an adjustable center along with the distortion controls.

Edit: Updated the ui.txt/qml so presets work.


Thank you for these, they’re fun and useful and they work well. :slight_smile: I hope to see them in an upcoming release.

One question, specifically with this filter, what does the brightness slider do? I tried it in my program but I couldn’t notice any visible changes while using it. At first I thought it might have been a leftover kind of “dummy” parameter, if you had written the code referenced from some other filter and then forgot to delete that section, but the MLT Framework page has it included here ->

It’s possible this could just not work for me, or I could be using it incorrectly, but I am curious as to how it’s supposed to work.

I noticed that too. I think I may have screwed up the QML. I’ll take a look tonight.



Excelent work with this filter, very useful for actions cameras.

Is it possible to save a preset with this kind of filters? I ask this because I tried, it saved the name but after when I tried to apply the present nothing happened.

Luis Sismeiro


I’ll take a look at it when I get home from work. I’ll let you know if part of my qml is broken.

attempted to fix the preset issue:

not sure why that’s not working.

as for the brightness thing, I checked the source on github. I found a line in that was an issue.

Line 200 and 201:

/* double brighten = 1.0 + mag * brightness; */
// Disabled to avoid compiler warnings

Apparently, brightness is disabled.



I used the new ui.qml file but no options are shown now. I took a look at the code and I think you put an additional } after removing the lines before and add the setControls() expression.

I gave it a go trying to fix it but no success. This time the filter options are shown but the present doesn’t seem to work like the others do.

Either way thank you for you effort, maybe someone can help here.

Luis Sismeiro

Updated the ui.txt in the original post so presets work.

1 Like

Thank you for your contribution. We need to rework the filter menu system before adding many more filters because it is getting unwieldy, but I will include your contribution for the next release. I will remove the brightness parameter since it does not work and does not really belong here.


This is a small test that I did with the footage taken with my SJ4000 sports camera:



Maybe it needs some tuning but for now it works very well with my videos.

Luis Sismeiro

1 Like


I have made a video of me riding my electric longboard and this time I decided to use the Lens Correct0r filter for the final cut. Also decided to make a side by side video without and with the Lens Correct0r filter for easy comparision and share it here:

What do you think?

Luis Sismeiro



You can really tell that the distortions are gone at the edges at parts with side-walk and markings on the roads. It looks great! The only issue, as with any fish-eye correction, is the cut off edges.

Are your presets getting saved? Have you been tweaking the settings?




The filter works very well for me. One of this days I will try again the filter Defisheye and see what I can do with it and if it’s better or not for my needs.

There is so much correction you can do that fits the 16:9 screen proportion. Nothing we can do regarding this.

The presets work very well now. I have tried to tweak the filter settings to get better results but didn’t get anything better for now.

Luis Sismeiro

OMG!!! This is sooooo totally awesome!

Seriously, I must have skipped right past this filter. I figured out settings for my cam’s 127 deg. lens and… welcome to Flatland!

I am a bit late for the reply, but how well did it work out for you? I’m curious about how we all calibrate our settings for our specific cameras.