PDA

View Full Version : Which Filter should i use (Blocky Picture)?


krieger2005
29th January 2004, 15:18
Hi,

i get a DVD, which has very bad quality. The picture is very blocky (seems, that the movie were compressed bad/strong).
This is not the only problem. It seems, that the pictures at the end of a scene-change were compressed even stronger that the other pics in the scene, so that the most filter can produce a good pics in the scene, but produce bad pic (with black areas or bad artefacts) at the end of such a scene-end.

I've tried many filters. The best filter for now is a simple "blur"-Filter. But then the pic lost the sharpenes.

All other (different) Filters has this bad output-Pic at the end of a scene (at a scene-change).

Can someone help wich filter i should use?
Thanks

----------
EDIT:

Below i have added some links to some sample-Pics of the Movie... wich seems to be kicked for now.

I put them later online

scharfis_brain
29th January 2004, 17:11
mpeg2dec3.dll has an internal postprocessing.
read its documentation for details.

krieger2005
31st January 2004, 17:19
Hi,

@scharfis_brain: thanks for your help. The block-Artifacts are away. Now i have the problem on the end of scenes (which i have discribed above).

I looked now precisely at the picture and think, that this artefact is the result of the deinterlacing (the movie is interlaced). Are there filters, which determinate when is a scene-change, so that no both parts of the picture were used to deinterlace the picture, something like this:
at normal frame: Kerneldeint (or something like this)
at scene change: Duplicate field-Deinterlacer?

And i saw i second problem. In the movie are some frames, which have a noise. The pixel (the noise-pixel) have mostly a different color as the objects were they are (mostly black or white) and are only one pixel big. This noise problem is only on some frames and the frams before and after does not have this noise. I have tried a smoother (smartSmother in VirtualDub), but when i put a high threthold the noise is away but also the sharpenes...

Can someone give a tip.

Thank you

krieger2005
11th February 2004, 15:41
Seems that no one understand what i mean. I've done some pics and put them in the net. I saved them as png, so that every Pic have the size about 600kB. Sorry for the size, but i don't wont to show you the artefacts of the JPG-Compression.

The Interesting here is, that the Frame 7310 has many arefacts, were Frame 7311 is relativly clean. Most horrible Frames are Frames like 7320 but such Frames were more rare as the Frames with Artefacts like Frame 7310. In such moments (when one looks the movie) it seems like an explosion wich is at the next moment away.

Here the Frames of the uncompressed Movie (only deinterlaced):

Frame 7309 (http://freehost11.websamba.com/krieger2005/uncompressed7309.png)
Frame 7310 (http://freehost11.websamba.com/krieger2005/uncompressed7310.png)
Frame 7311 (http://freehost11.websamba.com/krieger2005/uncompressed7311.png)

Now the Scenchange-Artifacts:

Frame 7320 (http://freehost11.websamba.com/krieger2005/uncompressed7320.png) (Artefacts at a Scenechange)
Frame 7322 (http://freehost11.websamba.com/krieger2005/uncompressed7322.png) (After Scenechange)
-----------------------------------------------------

Okey now after Using the MPEG-Artefact-Remover of MPEG2DEC3. I'm Using cpu=4 (cpu more than 4 make the picture very smooth):

Frame 7309 (http://freehost11.websamba.com/krieger2005/cpu4_7309.png)
Frame 7310 (http://freehost11.websamba.com/krieger2005/cpu4_7310.png)
Frame 7311 (http://freehost11.websamba.com/krieger2005/cpu4_7311.png)

Frame 7320 (http://freehost11.websamba.com/krieger2005/cpu4_7320.png)
Frame 7322 (http://freehost11.websamba.com/krieger2005/cpu4_7322.png)

As you can see the effect of "cpu=4" generate a little bit better results. But as you can see on Frame 7310 the artefacts, were some pixels (mostly white and black) make the hole frame looks bad. I tried some median-Filters (UnDot and STMedianFilter) but this does not help.
--------------------------------------------

Even better Results i get when i use the "TemporalSoften" method. Here the pics look "clean". But as you can see, the Frame 7310 still have the stupid white and black pixels. They were away, when i set the Treathold of Luma at 20. But this is very high and make at fast motions bad artefacts.
But you can see by yourself. Here with "TemporalSoften"-Effects:

Frame 7309 (http://freehost11.websamba.com/krieger2005/temp_7309.png)
Frame 7310 (http://freehost11.websamba.com/krieger2005/temp_7310.png)
Frame 7311 (http://freehost11.websamba.com/krieger2005/temp_7311.png)

Frame 7320 (http://freehost11.websamba.com/krieger2005/temp_7320.png)
Frame 7322 (http://freehost11.websamba.com/krieger2005/temp_7322.png)

----------------
Now i tried some filter in PaintShopPro (Version 7).
First: The Median-Filter of PSP removes many more Artefacts as UnDot and STMedianFilter. I don't know why.
The I tried a Filter, which has in the german Version of PSP the name "Schwarze und weisse Bildfehler entfernen"... "remove black and white artefacts in the image". Maybe it has an other name in the english version. Here are the results:

Uncompressed Frame 7310 with PSP (http://freehost11.websamba.com/krieger2005/psp_uncompressed7310.png)
CPU=4, Frame 7310 with PSP (http://freehost11.websamba.com/krieger2005/psp_cpu4_7310.png)

As everyone can see the picture is still sharp but the artefacts are mostly away. After using this Effect with a Spartialsmoother or something else one can get a clean and sharp picture. The Question is: Is there a filter, wich can do that with a movie? Does someone know how this Filter works?
It must be something like a modified median-Filter.

A solution of the artefacts at the scenchange i still does not have. If someone know, how i can get a good solution, please answer and say it to me. I'm now over 3 months trying to make the movie.

Thanks

PS:
Here my Function for handling the movie:


function all(string "name", int "cpu", int "trimVon",
\ int "trimBis", int "cropX1",
\ int "cropY1", int "cropX2", int "cropY2")
{
clip = mpeg2source("D:\VTS\Äâå Ñóäüáû\Äèñê 1\DIVX\"+name, cpu=cpu, iPP=true)
clip = clip.trim(trimVon,trimBis)
clip = clip.KernelDeInt(order=1, sharp=true)
clip = clip.crop(cropX1,cropY1, cropX2, cropY2)
# clip = clip.ConvertToYUY2().SpatialSoften(1,2,3)
clip = clip.TemporalSoften(3,10,10,mode=2,scenechange=20)
# clip = clip.STMedianFilter(10,50,10,50)
# clip = clip.UnDot()
clip = clip.LanczosResize(712,520)
return clip
}


A Function, beacause it is a movie with 20 series

krieger2005
24th February 2004, 00:26
I've searched around and now i know: The name of the noise is salt-n-pepper. The Name in PSP 7.0 (Englisch-Version) wich i described above is something with "remove salt and pepper" (not the music-group ;))

Well, i searched for a simple Filter, wich can remove such noise but could not find any. There is no specific filter, which can remove salt-n-pepper-noise. UnDot is one filter but can only remove noise of one pixel (correct me if i'm wrong). Other Filters make the picture smoother.

I've tried now "SpotRemover" in VDub (Super-Filter, i think). It corrects many of such failures but i have after some time a Debug-View of the filter (Rectangles, which show the spot, which were removed) but the debug-modus is disabled.

Well maybe someone can answer me this questions:
Is there a Filter, wich removes Salt-N-Pepper-Noise (or is someone in build) and were
Does someone know how i can remove the failure of SpotRemover. It seems that not all who use this filter have this problem.

Thank you

Bogalvator
24th February 2004, 02:58
Hi.

I tried to check the pictures you provided but your web page no longer exists :(

Anyway, judging by the decriptions you give of the kind of noise, there a few filters that may help -

Conditional Temporal Median Filter (newer version called DeSpot - read the whole thread):
http://forum.doom9.org/showthread.php?s=&threadid=59388

and also RemoveDirt:
http://forum.doom9.org/showthread.php?s=&threadid=70856

Both are excellent filters when tweaked appropriately.

Mug Funky
24th February 2004, 13:06
wow... that's one awful DVD.

scene change artefacts are usually caused by the mpeg-2 encoder not detecting scene changes and closing the GOP and inserting an I-frame. the last thing you want is a scenechange on a b-frame :O
those can be mitigated a little with mpeg2dec3's postprocessing, but in the end you have to just accept that it's a bad source. Butthead (from Beavis and Butthead) said it best: "you can't polish a turd"

removedirt wont help on scenechanges as it uses past and future frames to clean the current one (although I HIGHLY recommend it anyway... fast, light and does wonders for compressibility).

Fizick
24th February 2004, 21:24
SpotRemover filter is not free, but shareware.
Demo version has limit of removed spots, and then go into debug mode.

krieger2005
25th February 2004, 01:15
Wow, thanks for your tips. They are all very helpfull.

DeSpot i found before yesterday and it do realy a good job.

The pics are kicked by the provider and i have only 56k-Modem. But with your tips, i think i would not need to upload the pics.

Big Thanks.

Fizick
25th February 2004, 18:42
I want to see your bad frame 7310.

krieger2005
26th February 2004, 16:07
I have upload all pics and modified the links above. All Links should work (hopefully longer, than the first time).

@Bogalvator: RemoveDirt seems to be a good filter but i does not have a cpu which support SSE.... that's bad luck. But thanks.

Bogalvator
27th February 2004, 03:15
krieger, judging by the pics you posted it doesn't look like DeSpot or RemoveDirt can help too much for this situation, it just looks like a noisy capture.

Have you tried one of the heavy duty denoisers like Dust or PeachSmoother, or perhaps Deen?

krieger2005
27th February 2004, 10:19
I've tried Deen, PeechSmooter many VD-Smoother (2D-Cleaner, Smart-Smoother, Dynamic Denoise,...). Deen removes the noise only when i set the threadhold very high.

A good result could get when smoothing the LUMA. But then the pics were unsharp.

Yesterday i tried DeSpot. @Bogalvator: You're right. DeSpot is not very helpfull. The very good thing while using DeSpot is the static-smoothing: pthres<p2 and tsmoth>=4
This removes many of the spots but such effect i can get when i will use temporalsmoother (i've tried also).

The Problem is not that the movie is noisy. The Problem is, that some 10 frames is such a noisy frame. Other Frames are "cleaner"...

But Thanks for the help