Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage
Register FAQ Today's Posts Search

Reply
 
Thread Tools Search this Thread
Old 7th August 2010, 12:34   #1  |  Link
redblue
Registered User
 
Join Date: May 2007
Posts: 5
How to fix purple noise caused by a too-bright sky

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.






Any suggestions are welcome.

Last edited by redblue; 7th August 2010 at 12:35. Reason: typo in subject
redblue is offline   Reply With Quote
Old 7th August 2010, 12:57   #2  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,655
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.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.

Last edited by scharfis_brain; 7th August 2010 at 12:59.
scharfis_brain is offline   Reply With Quote
Old 7th August 2010, 13:26   #3  |  Link
2Bdecided
Registered User
 
Join Date: Dec 2002
Location: UK
Posts: 1,673
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.
2Bdecided is offline   Reply With Quote
Old 7th August 2010, 15:18   #4  |  Link
redblue
Registered User
 
Join Date: May 2007
Posts: 5
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-Wat.../dp/B0039237GU

Quote:
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.

Code:
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.

Last edited by redblue; 7th August 2010 at 22:50. Reason: add my current code
redblue is offline   Reply With Quote
Old 8th August 2010, 11:49   #5  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,655
UV light isn't the issue causing the purple effect.
It is IR light that creates the purple appearance.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 8th August 2010, 19:10   #6  |  Link
PhrostByte
Grand Fruitioner
 
PhrostByte's Avatar
 
Join Date: Mar 2004
Location: Chicago, IL
Posts: 115
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.
PhrostByte is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:56.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.