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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th July 2013, 21:45   #1  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,861
RgbAmplifier - Forensic Tool - v1.04 - 28 Nov 2018

Originally prompted by post #3 below, has been moved into this thread from another.

RgbAmplifier, Concept by Forensic, Plugin by StainlessS, mod ideas Gavino.

Plugins for avs v2.58, avs/+ v2.60 x86 & x64

Code:
RgbAmplifier (RGB24 and RGB32), requires VS2008 CPP Runtimes.
========================================
An Avisynth plugin to amplify color shifts

Given a clip, this filter examines every pixel of every frame and independently multiplies the difference of its specific
 R, G and B values from the average R, G and B values of that same pixel location spanning a defined radius of adjacent frames.
 If the new values are above or below the allowed RGB values, they are capped at those limits.
 The revised RGB values replace the original values, and the amplified clip is returned.
 If the Multiplier is set to a value of zero, the plugin acts as a temporal frame averager.

This plugin will:
 Convert seemingly imperceptible color changes into obvious color changes
 Highlight seemingly imperceptible movements of high contrast pixels
 Sharpen the details of moving objects
 Cause distortion or ghosting/transparency effect to moving objects (an unavoidable side effect)

This plugin requires RGB24 or RGB32 color space, and is intended for forensic analysis of videos created from fixed position cameras.
 Usage on non-stationary cameras may produce unpredictable or content destructive results. The faster the object and/or the greater
 the radius, the greater the risk of negatively impacting the visual accuracy of the moving object.

=====
Usage
RgbAmplifier(clip clip,int "Radius"=2,float "Multiplier"=2.0,int "Rmin"=0,int "GMin"=0,int "Bmin"=0, \
    int "RMax"=255,int "GMax"=255,int "BMax"=255,bool "Precise"=false)


=====
Parameters:
 Radius: integer from 1 to 99 (default 2). Defines the radius of how many frames are to be averaged (2 * radius -1).
 For example, a radius of 7 will instruct the filter to average 13 frames (2 * 7 -1).
 A value of 1 effectively disables the function (useful if adjusting the values within AVSpmod).

Multiplier: float from >=0.0 to <=20.0 (default 2.0). Defines the multiplier for the difference between a pixel’s color value
 (for each of R, G and B values) and its average value (as defined by the Radius).
 For example, the default value of 2.0 will replace every R, G and B value of every pixel with a value twice as far from the
 average R, G or B value of that pixel.

Rmin: integer from 0 to 255 (default 0). Cannot be greater than Rmax.
 The filter will not alter any pixel whose Red color value is below this threshold value.

Gmin: integer from 0 to 255 (default 0). Cannot be greater than Gmax.
 The filter will not alter any pixel whose Green color value is below this threshold value.

Bmin: integer from 0 to 255 (default 0). Cannot be greater than Bmax.
 The filter will not alter any pixel whose Blue color value is below this threshold value.

Rmax: integer from 0 to 255 (default 255). Cannot be less than Rmin.
 The filter will not alter any pixel whose Red color value is above this threshold value.

Gmax: integer from 0 to 255 (default 255). Cannot be less than Gmin.
 The filter will not alter any pixel whose Ged color value is above this threshold value.

Bmax: integer from 0 to 255 (default 255). Cannot be less than Bmin.
 The filter will not alter any pixel whose Blue color value is above this threshold value.

Precise: bool default false. Default uses integer math and is faster than Precise=true which uses double precision Floating point.

=====
Examples:

Double pixel color deviations from the average of the current, preceding and postceding frame’s pixel value
RgbAmplifier ()


Temporal averaging using the current frame and the first four (Radius - 1) preceding and postceding frame’s pixel values
RgbAmplifier (Radius=5, Multiplier=0.0)


Triple pixel color deviations from the average of the current frame and the first two preceding and postceding frame’s
 pixel values, but only for pixels with a color within 2% of pure Cyan (“00AEEF”)
 RgbAmplifier (Radius=2, Multiplier=3, Rmin=0, GMin=169, Bmin=234, RMax=5, GMax=179, BMax=244)


#########################################
Forensic
dll's, + Source + full VS2008 project files for easy build.
For Download see below MediaFire in sig.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 28th November 2018 at 11:35. Reason: Update
StainlessS is offline   Reply With Quote
Old 22nd July 2013, 20:30   #2  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,861
Forensic, yes, Absolutely, does not it make you sick how he is always right.
Will sort it out, dont hold your breath.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by Guest; 23rd July 2013 at 01:22. Reason: rule 4
StainlessS is offline   Reply With Quote
Old 22nd July 2013, 21:26   #3  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,861
Problem I was having was the two (versions ie yours and the big G) gave differing results, ie they should give
same results with M-1.0 args, I was not getting that, think I have sorted the diff (down to precision stuff), and
should put up source giving identical results (+- 1.0 multipier) arg soon).

EDIT: the fast versions (PM) were giving identical results but floating point were not.

EDIT: Differing results were due to a real stupid mistake, I could not see the wood for the trees.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 9th August 2013 at 04:18.
StainlessS is offline   Reply With Quote
Old 23rd July 2013, 01:19   #4  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
Why do we have two identically named threads about this? Which one should I close after linking to the other?
Guest is offline   Reply With Quote
Old 23rd July 2013, 07:11   #5  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,173
Check with Wilbert, I believe he split post #148 through #162 off from the other thread, but post #148 was by Forensic and they wanted the thread owned by StainlessS. So post #148 (global post 1636945) became the owner of the other orphan thread and post #149 (global post 1636961) became the owner of this thread.

Perhaps you can remerge the 2 threads and "clone" an earlier dated post by StainlessS (eg global post 1636921) and press it into service as the owner for this thread.
IanB is offline   Reply With Quote
Old 23rd July 2013, 10:42   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,861
RgbAmplifier v1.01, with Gavino mod, see first post.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 23rd July 2013, 12:23   #7  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
Oy, I'll leave it to Wilbert then. Thanks.
Guest is offline   Reply With Quote
Old 24th July 2013, 12:32   #8  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,861
@Forensic,
I refer the honourable gentleman to the post I made some moments ago:
[EDIT: Margaret Thatcher's favourite reply during PM's question time, with 'post' substituted for 'reply']

Quote:
Originally Posted by StainlessS View Post
RgbAmplifier v1.01, with Gavino mod, see first post.
EDIT: Also, can you remove your dead link from this post:
http://forum.doom9.org/showthread.ph...70#post1637870

EDIT: Perhaps you would also like to insert a link to this thread, into your currently last post in
RT_Stats thread, here: http://forum.doom9.org/showthread.ph...44#post1637744
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 28th November 2018 at 11:53.
StainlessS is offline   Reply With Quote
Old 23rd July 2013, 18:09   #9  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,341
I'm a loss at what to do. Yes originally #148 was the first one of this thread. Since that post was not from StainlessS, i removed it from this thread (and moved the contents to the third post of this thread; #3). I thought that was sufficient. Perhaps Forensic didn't see that and moved it also to a new thread, so that's why there are two of them. So, tell me what i need to do ...
Wilbert is offline   Reply With Quote
Old 23rd July 2013, 20:11   #10  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,922
I wouldn't try to tell you what to do, Wilbert!

I'll have a look and maybe make a suggestion. It just seems confusing to forum members to have the same thread title and same subject matter.
Guest is offline   Reply With Quote
Old 23rd July 2013, 21:15   #11  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,861
I am well confused, Forensic, please delete your thread, thankyou.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 24th July 2013, 08:50   #12  |  Link
Forensic
Registered User
 
Join Date: Apr 2008
Location: California, USA
Posts: 127
Alternate discussion deleted

As requested, the other discussion has been deleted.

StainlessS, thank you for your work on this. When you post the new RgbAmplifier plug zip file (which I am very anxious to try) please include:

Gavino's [allow a zero multiplier]
Assert(Multiplier>=0.0 && Multiplier<10.0,"RgbAmplifier: 0.0 <= Multiplier < 10.0 ("+String(Multiplier)+")")

Gavino's [new color is added to the color avg value, not the color value]
newred = Round(redavg + (Multiplier * ( red - redavg)))
newgreen = Round(greenavg + (Multiplier * ( green - greenavg)))
newblue = Round(blueavg + (Multiplier * ( blue - blueavg)))

creaothceann's [corrected math, same as my original post]
color=(newred*256+newgreen)*256+newblue

Please include the above documentation in the text file.
Forensic is offline   Reply With Quote
Old 24th July 2013, 17:21   #13  |  Link
Forensic
Registered User
 
Join Date: Apr 2008
Location: California, USA
Posts: 127
@StainlessS
The dead link reference has been removed and my original RT_Stats comment now directs here. That should alleviate all the double post confusion.
Thank you for the new version. This plug has so much potential and is building excitement among my forensic colleagues.

Last edited by Forensic; 24th July 2013 at 18:36. Reason: Just realized where the new version is. Duhhhhh
Forensic is offline   Reply With Quote
Old 24th July 2013, 21:38   #14  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,861
Your Forensic colleagues seem to be an excitable bunch.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 24th July 2013, 22:15   #15  |  Link
Forensic
Registered User
 
Join Date: Apr 2008
Location: California, USA
Posts: 127
We often get cases that haunt us for years after the enhancement is unsuccessful . Each tool allows us to revisit those cases. Besides, we love our profession.
Forensic is offline   Reply With Quote
Old 24th July 2013, 22:23   #16  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,861
Yes, but promise me something, you aint gonna nail me with my own "Stuff", give me a get out of jail free card, please.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 24th July 2013, 22:28   #17  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,861
I think from 5 upwards is considered serial killer, Let me have at least 4, so I know where to draw the line.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 25th July 2013 at 00:23.
StainlessS is offline   Reply With Quote
Old 24th July 2013, 23:38   #18  |  Link
Forensic
Registered User
 
Join Date: Apr 2008
Location: California, USA
Posts: 127
I will promise you this: If a major case is solved using this tool, I will post about it here (as much as it can be talked about).
Forensic is offline   Reply With Quote
Old 9th September 2013, 23:52   #19  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 8,861
RgbAmplifier v1.02. see 1st post.

Sped up a little, especially if RMin/RMax etc at defaults (0,255).
Multiplier max now changed from 10.0 to 20.0.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 10th September 2013, 08:28   #20  |  Link
Forensic
Registered User
 
Join Date: Apr 2008
Location: California, USA
Posts: 127
Thanks for the speed improvements. I will test it later this week.
Forensic is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 08:00.


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