Video Capture, Editing and Processing > Avisynth Usage

"Howto" - Process rgb images with yv12 filters (without color conversions)

(1/1)

Dogway:
I thought this was possible with the embedded Dither tools, but wasn't.
In any case if you do restorations of still images, photographs, etc, and photoshop isn't enough, use this method. It isn't anything groundbreaking but it didn't ring the bell for me until now, so maybe someone can find it valuable too.



--- Code: ---r=converttoyv12(showred(),matrix="PC.601")
g=converttoyv12(showgreen(),matrix="PC.601")
b=converttoyv12(showblue(),matrix="PC.601")
interleave(r,g,b)


# put here any yv12 filter


mergergb(SelectEvery (3, 0), SelectEvery (3, 1), SelectEvery (3, 2))
--- End code ---

J_Darnley:
So much for no colour conversions, I can see three going on there, granted they're all greyscale conversions.  What you want is:
r = ShowRed("YV12")
g = ShowGreen("YV12")
b = ShowBlue("YV12")

I also wouldn't suggest interleaving the r, g and b clips then using a temporal filter, it would be better to filter them separately then use MergeRGB() on the result.

Dogway:
true, I didn't assume showred("yv12") didn't change range to tv so I didn't investigate too much on options and used the easy way out.

I disagree on not using interleave. You create unnecessary overhead by using 3 instances of the same filter (not to say how annoying it is), besides whoever thinks using a temporal filter on a still image knows exactly what he is doing, interesting experiment nonetheless...

J_Darnley:
Oh yes, you did say "still images", my bad, sorry.

Selur:
btw. for those who do photo filtering with avisynth, Fritz Photo might be worth a try :)

Navigation

[0] Message Index

Go to full version