vendredi 29 janvier 2021

how to make a code for posterzing for RBG colors in between 0-255 using python language. Cimpl library?

Recall that a pixel's red, green and blue components have values between 0 and 255, inclusive. We divide this range into four equal-size quadrants: 0 to 63, 64 to 127, 128 to 191, and 192 to 255. For each pixel, we change the red component to the midpoint of the quadrant in which it lies. We do the same thing for the green and blue components Develop a filter named posterize that returns a posterized copy of an image. The posterize function must call the _adjust_component function to determine the quadrant in which a component lies and obtain the midpoint of that quadrant.

Aucun commentaire:

Enregistrer un commentaire