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)
+ Reply to Thread
Results 1 to 9 of 9
-
-
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. -
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. -
((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.
-
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 -
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
Last edited by jagabo; 2nd Dec 2013 at 15:52.
-
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)
-
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.
Similar Threads
-
Rolling Shutter Percentage?
By RogerTango in forum Camcorders (DV/HDV/AVCHD/HD)Replies: 2Last Post: 6th May 2012, 21:15 -
Calculating letterbox in AVS
By AlanHK in forum Video ConversionReplies: 5Last Post: 26th Oct 2009, 04:50 -
Am I calculating resolution correctly?
By alcOre in forum Newbie / General discussionsReplies: 2Last Post: 24th Sep 2009, 07:37 -
percentage of hard drives fail
By MJA in forum ComputerReplies: 29Last Post: 4th May 2009, 11:44 -
Progress percentage is under-reported
By tomf84 in forum ffmpegX general discussionReplies: 4Last Post: 5th Jan 2009, 04:34