VideoHelp Forum




+ Reply to Thread
Results 1 to 9 of 9
  1. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    i have a new idea for one of my old noise reduction algorithms. so, i'm trying to apply a certain amount of noise reduction to some pixels with slight change, but only if the change or difference is within a certain percentage, lets use 5% or 0.05 in excel. column C is formated as percetange for viewing purposes in this post.

    the question is, did i do this correctly ?

    Code:
    if a pair of pixels is = or greater than 5%, apply filter1
    if a pair of pixels is less than 5%, apply filter2
    
    1   A     B     C     D
    2   70    70     0%   =abs((a2-b2)*0.05)
    3   70    71     5%   =abs((a3-b3)*0.05)
    4   70    69     5%   =abs((a4-b4)*0.05)
    5   10    20    50%   =abs((a5-b5)*0.05)
    6  255   128   635%   =abs((a6-b6)*0.05)
    Quote Quote  
  2. Percentage of what? One of the two values? Or of the full 256 value range?
    Quote Quote  
  3. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    i was trying this in excel since its easier for me to perceive or work out the results on ideas like this before throwing in programming code.

    column A and B are the pixels. i want the calculated difference, in percentage. the final percentage i set a limit on, which is 5% though i might change it or make it user configureable with a slider control and visualize the change in realtime. well, thats the goal. its a standalone utility. i'm too concirned with clamping at this time, just need to know if i got the formula correct, though i already have conditions set up to check for <0 and >255 values. thanks.
    Quote Quote  
  4. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    so, since A=70 and B=70 there is no difference or perceivable change. it is zero percent

    but since A=70 and B=71 there is a differnce in those two pixels. but what's the percentage of that difference or change. not sure i have the correct terms. is the change 5% or greater ? i need that formula.
    Quote Quote  
  5. ((A-B)/A)*100. Assuming you want the percentage difference from A. That's expressed as a percentage, you could simplify and leave off the "*100" and just express your check value as 0.05.
    Quote Quote  
  6. aBigMeanie aedipuss's Avatar
    Join Date
    Oct 2005
    Location
    666th portal
    Search Comp PM
    in his example he probably wants to also do some sort of absolute value calc so some percentages aren't negative.
    --
    "a lot of people are better dead" - prisoner KSC2-303
    Quote Quote  
  7. Again, percentage of what? Consider two values, 96 and 101:

    96 is 4.950 percent less than 101.
    101 is 5.021 percent more than 96.

    Temporal spacial noise reduction filters usually use a fixed value (equivalent to a percent of the full range of values), not a percent of one of the values. Ie, rather than calculating 5 percent, they would use a value of 5 units.

    Code:
    if (abs(A-B) <- 5)
         then filterA
         else FilterB
    That's because noise usually has a fixed amplitude, regardless of the signal level. Ie if you add 5 units of noise to a signal of 10 you get a range from 5 to 15. If you add 5 units of noise to a signal of 200 you get a range for 195 to 205.
    Last edited by jagabo; 2nd Dec 2013 at 15:52.
    Quote Quote  
  8. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    ok, i found the answer, right under my nose at work in one of my reports i use for "percentage markup"

    Code:
    if a pair of pixels is = or greater than 5%, apply filter1
    if a pair of pixels is less than 5%, apply filter2
    
    1   A     B     C     D
    2   70    69     1%   =abs((b2-a2)/b2)
    3   70    70     0%   =abs((b3-a3)/b3)
    4   70    71     1%   =abs((b4-a4)/b4)
    5   70    74     5%   =abs((b5-a5)/b5)
    6   10    20    50%   =abs((b6-a6)/b6)
    7  255   128    99%   =abs((b7-a7)/b7)
    now, if someone could verify it.
    Quote Quote  
  9. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    jagabo, true. in pixel manipulation those points can mean good or bad. it depends on which side you want to put the level on: the left or the right. in the markup report its basically the same thing but in that case either side would work out to meet end result, which is, what is the percentage difference. they don't care which side it lessor or higher. in pixel manipulatin, its a little bit the same but depends on your idea of the codes (filtering) purpose. you can make it matter, or not. hope that makes sense.

    thanks every one for your comments.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!