Magic Lantern Forum

Using Magic Lantern => General Help Q&A => Topic started by: Veerle on July 23, 2022, 07:33:01 PM

Title: Eos M Focus Pixels in regular movie mode (not RAW)
Post by: Veerle on July 23, 2022, 07:33:01 PM
Hi guys,

I just went on a short trip, and shot a few random shots using my Canon Eos M. Upon returning I discovered RAW mode was turned off the whole time (was wondering why I could shoot such lengthy footage, but didn't pay too much attention to it). Anyway, that is what it is. The problem I'm encountering now though, is that there are a bunch of Focus Pixels on my regular .mov footage (since I was still running ML, just not the raw video module). I can't import the footage into the MLV app since these aren't MLV files, so there's no way to try and get rid of these pixels that way.

Does anyone have any solutions/ ideas on how to get rid of these pixels on regular video footage?

Thanks
Title: Re: Eos M Focus Pixels in regular movie mode (not RAW)
Post by: Danne on July 23, 2022, 10:27:09 PM
You can play around with denoising filters in ffmpeg or something like this:
https://www.bogotobogo.com/python/OpenCV_Python/python_opencv3_Image_Non-local_Means_Denoising_Algorithm_Noise_Reduction.php

Also test this maybe:
https://github.com/vi/videomedian

https://ffmpeg.org/ffmpeg-filters.html#tmedian

Here´s an interesting filter:
http://www.ffmpeg.org/ffmpeg-filters.html#smooth
Needs ffmpeg compiled with libopencv though.
Title: Re: Eos M Focus Pixels in regular movie mode (not RAW)
Post by: Danne on July 24, 2022, 12:12:27 AM
Actually, boxblur filter with ffmpeg seems to do a decent job removing chroma issues. Tested with a clip:

Following command was used:
ffmpeg -i Input.mov -vf boxblur=cr=40 Output.mov

http://www.ffmpeg.org/ffmpeg-filters.html#boxblur

Orignal:
(https://i.postimg.cc/m2p6q2cX/Screenshot-2022-07-24-at-00-04-31-png-scaled.jpg)

Cleaned
(https://i.postimg.cc/qMv5jC76/Screenshot-2022-07-24-at-00-07-29-png-scaled.jpg)


If you upload a sample file we could test it against the filter directly.



EDIT: this too might work after some testing:
-vf boxblur=4:2
Added some sharpen back:
-vf boxblur=4:2,unsharp=9:9:4.0:9:9:0
Title: Re: Eos M Focus Pixels in regular movie mode (not RAW)
Post by: ilia3101 on July 24, 2022, 02:11:14 PM
Also notice how it ruins all the colourful details on the flowery texture. It looks terrible :/

Maybe you could mask out any areas that are affected badly by the filter.
Title: Re: Eos M Focus Pixels in regular movie mode (not RAW)
Post by: Danne on July 24, 2022, 02:50:00 PM
Last syntax is better. Keeps the colors but a bit softer. Quick fix really. Would be nice with a mov sample from the author.
Title: Re: Eos M Focus Pixels in regular movie mode (not RAW)
Post by: Danne on July 25, 2022, 02:01:25 PM
Tested some more over here and it´s not good enough as a solution. I guess one could try and rewrite coordinates in a pixelmap file with ffmpeg delogo file. Starting something like this:
ffmpeg -i input.mov \
-vf "delogo=x=405:y=768:w=2:h=2",\
"delogo=x=410:y=772:w=2:h=2",\
"delogo=x=415:y=778:w=2:h=2" output.mov

But, a lot of job for probably half decent output...
Title: Re: Eos M Focus Pixels in regular movie mode (not RAW)
Post by: Veerle on July 27, 2022, 08:49:49 PM
Sorry, was away from my computer for a few days - thanks for your replies.

Here's some footage: https://drive.google.com/drive/folders/12tYARIf7kRuDMqiuC-O94u-LI0yDn8aQ?usp=sharing (https://drive.google.com/drive/folders/12tYARIf7kRuDMqiuC-O94u-LI0yDn8aQ?usp=sharing)
Title: Re: Eos M Focus Pixels in regular movie mode (not RAW)
Post by: Veerle on July 27, 2022, 08:54:28 PM
But there's no way to basically do it the same way 'MLV app' would do it, but then without using RAW (MLV) footage?
Title: Re: Eos M Focus Pixels in regular movie mode (not RAW)
Post by: Danne on July 27, 2022, 09:23:02 PM
A1ex be able and fix this I'm sure but otherwise some heavy pixelmapping could do the trick(which is the way it's done now).
Title: Re: Eos M Focus Pixels in regular movie mode (not RAW)
Post by: Veerle on August 26, 2022, 03:22:22 AM
Hey, sorry for the late respons. I've been crazy busy, and it slipped my mind.

Thanks for looking into it. I'm pretty handy with technology in comparison to the average Joe, but this kinda stuff is way over my head. Thanks for trying to help me though.

Have a good weekend!