PDA

View Full Version : How to fix purple noise caused by a too-bright sky


redblue
7th August 2010, 12:34
Hi,

a question for the filter experts:

I'm looking to fix videos filmed with a Pentax W90 digital camera.
This is a rugged waterproof camera great for filming sports
activities where normal cameras would not survive. But the
videos have serious brightness problems:

Whenever there's too much bright sky or sun in the picture,
I get vertical areas filled with purple noise.

Is there a filter that can find the areas and darken the purple
noise?

Below are some sample frames with typical problems.

http://img833.imageshack.us/img833/4346/pentaxw901.jpg (http://img833.imageshack.us/i/pentaxw901.jpg/)
http://img231.imageshack.us/img231/1792/pentaxw902.jpg (http://img231.imageshack.us/i/pentaxw902.jpg/)
http://img832.imageshack.us/img832/6175/pentaxw903.jpg (http://img832.imageshack.us/i/pentaxw903.jpg/)
http://img21.imageshack.us/img21/9201/pentaxw907.jpg (http://img21.imageshack.us/i/pentaxw907.jpg/)

Any suggestions are welcome.

scharfis_brain
7th August 2010, 12:57
This is CCD vertical smear combined with a bad IR-filter built-in in the camera.

the purple fog is caused by infrared light being passed to the sensor.

You cannot do anything against it in postprocessing AFAIK.

2Bdecided
7th August 2010, 13:26
Tell everyone that it's a special effect you worked very hard to achieve, and it's supposed to look like that!

If scharfis_brain is right, try adding an IR blocking filter in future. Be careful when purchasing: "IR filter" can mean something that blocks visible light, but lets IR through - you need the opposite ;) ND filter might help too.

Cheers,
David.

redblue
7th August 2010, 15:18
Thanks for the fast replies.

I might actually try taping a UV filter from a bigger camera to the outside of the camera for a test. It's not totally impossible.

This is the camera, by the way:
http://www.amazon.com/Pentax-W90-Waterproof-2-7-Inch-Black/dp/B0039237GU

This is CCD vertical smear combined with a bad IR-filter built-in in the camera.

the purple fog is caused by infrared light being passed to the sensor.

You cannot do anything against it in postprocessing AFAIK.

I'm OK with the 100% white CCD smear - nothing to do about that. But the purple itself?
No way of turning the purple parts of the frame into a mask and use that part to change the
contrast of the frame to darken the purple bits?

This is how far I got:
I can see the purple areas that need fixing in this script.
I haven't managed to replace them yet.
For the example video1 is the clip that needs fixing (I use the lower resolution as a test)
video2 is a grey clip I copy the color info into.
This has only the color info. Here I look for purple.
video3 is 100% green. As a test I want to replace the purple bits with the video3 areas - later this will be a darker black and white copy of video 1.


video1 = DirectShowSource("f:\dcim\104_0408\IMGP2114.AVI"). KillAudio.trim(5196,7596).ReduceBy2
video1 = video1.ConvertToYUY2.crop(0,0,180,240)

# Grey
video2 = BlankClip(video1,color=$7f7f7f)
# Green
video3 = BlankClip(video1,color=$00ff00).ConvertToRGB32


video2 = MergeChroma(video2 , video1 ,1).ConvertToRGB32

video2 = ResetMask(video2)
video2 = ColorKeyMask(video2, $B26A91 ,43)

video2 = Layer(video3,video2,"add",255)

return StackHorizontal(video2,video1.ConvertToRGB32)



This works at identifying the most of the purple areas, but
has some false positives.
The approach ignores also the information, that the purple
areas are vertical stripes.

scharfis_brain
8th August 2010, 11:49
UV light isn't the issue causing the purple effect.
It is IR light that creates the purple appearance.

PhrostByte
8th August 2010, 19:10
You can see the same purple effect with most cheap cameras -- take a picture of an IR LED with a phone and you'll see it.

I don't think you'll be able to filter that in software without losing some real shades of purple, but that seems to be a rare enough color that it might not matter.