DeRainbow() - "There is no such function" whhaaaaat??

This forum is for questions and discussion of all the aspects of handling your footage. If you have questions about capturing/ripping footage, AviSynth, or compression/encoding/converting, look here.

DeRainbow() - "There is no such function" whhaaaaat??

Postby Rider4Z » Mon Aug 31, 2009 5:53 pm

lol okay i'm taking this from A&E's Technical Guides to All Things Audio and Video (v3) Improving Visual Quality and Compressibility

There exist a number of different filters and functions designed to combat rainbowing, but many of them are old and outdated or just don't work all that well. I have decided on just two methods of rainbow removal that I believe work very well for pretty much all situations.

DeRainbow: This is a function written a few years ago by Sh0dan which is excellent at removing rainbows. It works by creating a mask of the edges in the video, then smoothing the chroma channel of these edges both spatially and temporally. This works extremely well and with few side effects. You should note however, that it can case some slight discolorations around edges, especially if you use a high threshold. The default threshold for rainbow removal is 10, and you can increase or decrease this value as you deem necessary by calling this function like so:

DeRainbow(10)

well there it is, but dagnabbit when i try it i get the infamous error message from VirtualDub "There is no such function"

what the crap did i do wrong? herupu me puri-zu
Image Image
Image Image
Anime Conji AMV Contest Coordinator
Anime Vegas AMV Contest Co-coordinator
User avatar
Rider4Z
Pirate King
 
Joined: 14 Dec 2003
Location: Grand Line
Status: Afloat

Re: DeRainbow() - "There is no such function" whhaaaaat??

Postby Scintilla » Mon Aug 31, 2009 8:35 pm

It's a script function. It was included in the older versions of the AMVapp (though it may have had the name SDDeRainbow (to make it clear that it's Shodan's, as other people have also written functions named DeRainbow), so try that instead), and it should be in the newest version as well... right?
ImageImage
:pizza: :pizza: Image :pizza: :pizza:
User avatar
Scintilla
(for EXTREME)
 
Joined: 31 Mar 2003
Location: New Jersey
Status: Quo

Re: DeRainbow() - "There is no such function" whhaaaaat??

Postby Phantasmagoriat » Mon Aug 31, 2009 8:53 pm

Do you have the file "DeRainbow.avsi" in your avisynth plugins folder?

if not, you can copy and paste the following into a .txt file, and rename it "DeRainbow.avsi"


Code: Select all
function DeRainbow(clip org, int "thresh")
{
  assert(org.isYV12(),"DeRainbow() requires YV12 input!")
  thresh = default(thresh, 10)

  org_u = utoy(org)
  org_v = vtoy(org)

  msharpen(org, threshold = thresh, mask=true)
  reduceby2()
  greyscale()
  uv = blur(1.5).levels(0,2.0,255,0,255, coring=false).blur(1.5).blur(1.5).levels(50,2.0,255,0,255, coring=false)

  filtered_u = org_u.blur(1.5).blur(1.5).blur(1.5).temporalsoften(2,255,0,3,2)
  filtered_v = org_v.blur(1.5).blur(1.5).blur(1.5).temporalsoften(2,255,0,3,2)

  u_final = mt_merge(org_u, filtered_u, uv)
  v_final = mt_merge(org_v, filtered_v, uv)

  return ytouv(u_final, v_final, org)
}


be aware that DeRainbow() is basically a function made out of other functions, so in order for it to work, you will need all of those too.
Image
Org Profile | AMVGuide | Phan Picks! | THE424SHOW | YouTube | "Galactic Escape"

"Effort to Understand; Effort to be Understood; to See through Different Eyes."
User avatar
Phantasmagoriat
 
Joined: 06 Feb 2006
Status: ☁SteamPunked≈☂

Re: DeRainbow() - "There is no such function" whhaaaaat??

Postby mirkosp » Tue Sep 01, 2009 12:56 am

Derainbow is terribad since it washes out chroma everywhere even with a strength of 1. >_>
I prefer the LUTDeRainbow by our very own Scintilla. :D
Though it tends to miss some rainbows even at settings stronger than recommended, it's a rare occurence, and tends to successfully remove most of the rainbows without other downsides. I found it to work much better than BiFrost even if both are just temporal.
By the way, moved to the AviSynth section.
Image
User avatar
mirkosp
MODkip
 
Joined: 24 Apr 2006
Location: Gallarate (VA), Italy
Status: (」・ワ・)」(⊃・ワ・)⊃

Re: DeRainbow() - "There is no such function" whhaaaaat??

Postby Rider4Z » Tue Sep 01, 2009 9:56 am

THANKS VERY MUCH! i'll try these suggestions and keep you updated on my success/failure
Image Image
Image Image
Anime Conji AMV Contest Coordinator
Anime Vegas AMV Contest Co-coordinator
User avatar
Rider4Z
Pirate King
 
Joined: 14 Dec 2003
Location: Grand Line
Status: Afloat

Re: DeRainbow() - "There is no such function" whhaaaaat??

Postby Rider4Z » Fri Sep 04, 2009 12:46 am

Scintilla wrote:It's a script function. It was included in the older versions of the AMVapp (though it may have had the name SDDeRainbow (to make it clear that it's Shodan's, as other people have also written functions named DeRainbow), so try that instead), and it should be in the newest version as well... right?

turns out that's all i needed. most of the rainbows were eliminated :up:

thanks very much everybody :D
Image Image
Image Image
Anime Conji AMV Contest Coordinator
Anime Vegas AMV Contest Co-coordinator
User avatar
Rider4Z
Pirate King
 
Joined: 14 Dec 2003
Location: Grand Line
Status: Afloat


Return to Footage Help

Who is online

Users browsing this forum: No registered users and 1 guest