Gray value

Hi

Can anyone tell me solution for my following problem.

How to compute the gray value (0 to 255 ) of each pixel , and double the value of that pixel.
If a pixel has a gray value of 150, I want to make that pixel value into 150*2, so that it get

Comments

  • If you have an image I in the range [0 255] to double it, you can simply code:

    I_double = I*2;

    In this way every pixel of the image is doubled.

    But if you double the pixel values it become lighter, not darker. And it saturate.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion