About 50 results
Open links in new tab
  1. OpenCV - Apply mask to a color image - Stack Overflow

    The locations where the mask had pixel value 255 (white), the resulting image retained its original gray value. To apply this mask to our original color image, we need to convert the mask into a 3 channel …

  2. How can I convert a color image to grayscale in MATLAB?

    Nov 23, 2009 · Yeah, it is completely fine to use the build-in function but doing thing manual gives you a better understanding of how a grayscale image is generated. Protected question. To answer this …

  3. How to find the dominant/most common color in an image?

    Here's code making use of Pillow and Scipy's cluster package. For simplicity I've hardcoded the filename as "image.jpg". Resizing the image is for speed: if you don't mind the wait, comment out the resize …

  4. Semi-transparent color layer over background-image?

    Learn how to create a semi-transparent color layer over a background image using CSS techniques in this Stack Overflow discussion.

  5. How to modify the fill color of an SVG image when being served as ...

    You can use the svg image as mask and manipulate the background-color of the element. This will have the same effect as changing the fill. (detailed answer provided)

  6. python - Giving grayscale image color - Stack Overflow

    I want to add color to a black and white image, I assume that changing the values of the pixels should work. for rows in rgb: for e in rows: for i in range(len(e)): max_val...

  7. Convert Color image to grayscale image using Octave

    Jun 10, 2019 · If RGB is an RGB image (a matrix of size [n,m,3]) then converting to a gray-scale image gray (an array of [n,m]) is accomplished by a weighted averaging of the 3 color channels.

  8. Formula to determine perceived brightness of RGB color

    To determine the brightness of a color with R, I convert the RGB system color in HSV system color. In my script, I use the HEX system code before for other reason, but you can start also with RGB …

  9. Change specific RGB color pixels to another color, in image file

    I would like to change a single color with Python. If a fast solution with PIL exists, I would prefer this solution. At the moment, I use convert -background black -opaque '#939393' MyImage.png

  10. Convert full color image to three color image for e-ink display

    May 5, 2019 · I'd like to be able to automagically convert full color images down to three color (black / red / white) for an e-ink display (Waveshare 7.5"). Right now I'm just letting the screen handle it, but …