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 Development

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th January 2009, 15:20   #1  |  Link
whwhwhwh9
Registered User
 
Join Date: Jul 2005
Posts: 13
help with Histogram Levels mode

Guys,

I found it convenient to change how to display histograms in Levels mode:

After we get histY[256] from a frame, we put a cap to the array, say 4*height*width/256, like this:

cap = 4*height*width/256 ;
for ( i = 0 ; i < 255 ; i ++ )
if ( histY[i] > cap )
histY[i] = cap ;

This way, the histogram will not vary a lot in successive frames.

I've got the source code package and updated histogram.c, then tried to follow the compiling instructions on AviSynth.org, but couldn't get it compiled.

Could someone add that piece of code into the source?
whwhwhwh9 is offline   Reply With Quote
Old 17th January 2009, 23:08   #2  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,168
Yes, capping the cell counts to 1/64th the total population is an interesting idea for a new mode in Histogram. However breaking the existing "Levels" mode is not the way to do it. Also the cap percentage should be configurable. I will add it to my todo list.
IanB is offline   Reply With Quote
Old 4th January 2010, 04:22   #3  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,168
Okay, I have committed changes for this to CVS.

HistoGram("Levels", 1.5625) will achieve the 1/64th cap desired.

The new argument is percent of total population, 100.0 being the default value and behaving as before.
IanB 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 16:43.


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