# Thread: Brightness scale in decibels.

1. ## Brightness scale in decibels.

I wonder if you can help me with this:

I've got these values that I need to convert to db values.

For example, I've got a value of 49.5 ... How will i fit into a scale of numbers where -88.8 is the minimum and 0 is the maximum ?

I'm not a mathematician so apologies if it doesn't make complete sense.

Thanks

2. ## re: Brightness scale in decibels.

There are any number of ways to fit your scale to all Real Numbers. Is there a particular way you MUST do it? You suggested "db", but then defined something a little different.

3. ## re: Brightness scale in decibels.

The scale i want to fit the numbers into is -88.8 minimum and 0 maximum.

4. ## re: Brightness scale in decibels.

What units do -88.8 and 0 have? Decibels use a log scale: $L = 10\log_{10}\left(\dfrac{P_1}{P_0}\right)$ where $P_0$ is a reference sound and $P_1$ is the sound being measured.
If this is the case then your maximum sound will be equal to the reference sound you used (this could be how you're defining the reference sound)

edit: the title is very vague - see Rule 4

5. ## re: Brightness scale in decibels.

What I'm actually trying to do is turn Brightness values, that i got from photoshop, into db values where 0db is the highest and -0.88 is the lowest. All the Brightness values range between 0 and 100.

The reason my title was vague is a because i wasn't sure how to phrase it.

Thanks

6. ## re: Brightness scale in decibels.

$-0.88 = 0 \text{ and } 0 =100$

There are 0.88 "steps" between the db values and 100 "steps" between the equivalent brightness values. Therefore I would say that each 1 step in brightness will be $\dfrac{0.88}{100} = 8.8 \cdot 10^{-3}$ steps in db level

Thence $y_{db} = 8.8 \cdot 10^{-3} x_{b} - 0.88$

I'm not entirely sure if it should be linear but it certainly makes the maths easier

7. ## re: Brightness scale in decibels.

As i said i'm not a mathematician so I want to ask what is the "Ib" for ? (it comes just before the -0.88)

Also, how can i calculate the 10 -3 that comes before the "Ib" on a calculator ?

Thanks again

8. ## re: Brightness scale in decibels.

That should read x_b? I was using it to signify units - in this case x_b is the brightness level. If you're not sure you can always draw it on a graph and connect with a straight line.

For inputting $10^{-3}$ on your calculator you should have something similar to a "E" or "10^x" button. If you prefer you can put in 0.001 as 10^(-3) simply means we move the decimal point three places to the left from 1.

9. ## re: Brightness scale in decibels.

Ok so if i had a value of brightness of 64 then i would do it like this ?

8.8 times 0.001 times 64 minus 0.88 = db value

10. ## Re: Brightness scale in decibels.

Official opinion. You appear not to have sufficient background to handle this problem. Please find someone local with sufficient math skills to help you.

Most importantly, and that's why I posted it first, you must understand that there is not JUST ONE way to proceed. You must find a way, build a way, and understand a way that fits your application and will be of some value.

So far, you are just shooting in the dark. This will not lead to understanding, but is a very nice path to frustration.

11. ## Re: Brightness scale in decibels.

No I don't have sufficient background, that's why i came to this forum. I'm not really trying to understand maths here because I'm not a mathematician.

This is a small piece of a bigger project and i just need the formula to proceed so that's why i hoped that one of you guys will be able to help me find the formula I'm looking for.

12. ## Re: Brightness scale in decibels.

Originally Posted by freddyG
No I don't have sufficient background, that's why i came to this forum. I'm not really trying to understand maths here because I'm not a mathematician.

This is a small piece of a bigger project and i just need the formula to proceed so that's why i hoped that one of you guys will be able to help me find the formula I'm looking for.
You have two options. 1. Provide the context of this problem in its entirety, so we can have any chance at all of helping you. 2. Following TKHunny's advice in Post # 10. If your next post in this thread does not contain the context of your problem, I will close the thread.

Thank you.

13. ## Re: Brightness scale in decibels.

Ok here it is:

I've taken brightness values from a picture using photoshop. These values range from 0 to 255.

I want to turn these values into db which in this case ranges from -100 to 0.

For example, if I get a value of 65 in brightness how can i turn it into a db value ?

Thanks again for the help.

14. ## Re: Brightness scale in decibels.

Hmm. Well, going off of e^(i*pi)'s (generally correct) formula in Post # 4, you cannot get what you need, because 0 is not in the domain of the logarithm function. I propose, therefore, a formula of the form

$\text{dB}=10\,\log_{10}(mx+b),$

where $x$ is the brightness, and $\text{dB}$ is the decibel rating. Plugging in the two conditions yields the following two equations for m and b:

$0=10\,\log_{10}(255m+b)$

$-100=10\,\log_{10}(b).$

Solving yields

$b=10^{-10},$ and

$m=\frac{1-10^{-10}}{255}.$

Thus, your final formula would be

$\text{dB}=10\,\log_{10}\left(\frac{1-10^{-10}}{255}\,x+10^{-10}\right).$