<p>Blurring an image depends on being able to read from the image. If you don’t have access to the pixel data, or external information about the image contents (e.g. average hue / luminance), there’s no way to find an overlay color that will look like you’ve blurred what it’s on top of.</p>

CC BY-SA 4.0
2019-09-11T17:24:42.940Z
2019-09-11T17:24:42.940Z
Noah Witherspoon
<p>While you can't do what you're asking, you might be able to use a compromise. It turns out that all human skin tones have the same hue. They vary only in saturation and brightness. You can see this on the scopes that television engineers use to calibrate their signals. There's a line where skin tones should be if everything's set correctly. </p>

<p>You could choose that hue and some low saturation and middle value in HSV space, then convert it to RGB and use that as the color you put in the ROI. </p>

<p>It looks like on most vectorscopes the skin tone line is about 15° past red towards yellow. According to <a href="https://larryjordan.com/articles/color-correction-make-people-look-normal/" rel="nofollow noreferrer">this article on skin tone correction</a> if the lighting is typical studio lighting, caucasian skin would usually be around 50-75% brightness, asian and hispanic skin around 35-55% brightness and african skin around 15-50% brightness. So setting your color to HSV = (15°, 25% saturation, 50% brightness) is RGB = (128, 104, 96). If you know your subjects will be lighter or darker, adjust accordingly. Note that these values change when in bright outdoor light or dim indoor light, or when there's light with a strong color cast falling on them. But again, this is a compromise.</p>

CC BY-SA 4.0
2019-09-18T04:21:40.040Z
2019-09-18T04:21:40.040Z
user1118321
<p>Since you know vaguely what the pixels you're covering up look like (they are faces), your best bet to get the appearance of a blur is to really blur an image of a face in a standard image editing tool, then use the colour picker to choose a representative colour from that region. That's the closest you can get, but it still won't look blurred: as Noah Witherspoon said, that's impossible given these constraints.</p>

<p>Obviously it will work less well if the pictures you're operating on have different lighting conditions or faces of a different skin colour from the one you sample. And if the images being redacted are frames of a video, the motion of the video will give you away immediately.</p>

<p>Another approach might be to choose a colour that you know won't show up in the real images (e.g. programmer pink). Then, instead of showing the image that comes out of your tool, use the marked pixels to generate a mask, and use an actual blur tool on the original image so that only the pixels selected by the mask are blurred.</p>

CC BY-SA 4.0
2019-09-12T07:26:56.790Z
2019-09-12T07:26:56.790Z
Dan Hulme
<p>I'm  using an app for face redaction that doesn't allow access to the source code but only allows me to pass pixel values for red, green and blue channel upon which it creates a matrix with the same average RGB values for every ROI pixel value. For eg. if I give Red=32,Blue=123 and Green=233 it will assign these RGB values for every pixel of the ROI and then draws a colored patch on the face.</p>

<p>So I was wondering is there a general combination of RGB values of a pixel to distort it and make it look like it's blurred. I can also set the opacity value in the app.</p>

<p>Thanks.</p>

CC BY-SA 4.0
2019-09-11T10:46:21.440Z
Can you read the existing pixels of the image before deciding what RGB to give it? If so, you can just do the convolution yourself.
Dan Hulme
CC BY-SA 4.0
2019-09-11T10:55:59.300Z
Unfortunately I cant, I was looking for an RGB combination that resembles of a blurred pixel. Right now I'm testing it with (192,192,192) which gives you a light shade of grey patch on top of the face.
Mohsin
CC BY-SA 4.0
2019-09-19T13:40:42.460Z
Statistically speaking, independent of application, one might expect a 50% gray color to be the average color of all possible pictures.  A 50% gray is pretty close to 192,192,192.  So that lends some credibility to your approach.
Wyck
<image-processing><blur><gaussian-blur>
Blurring image with RGB values without convolving it with a kernel
Mohsin
# Blurring image with RGB values without convolving it with a kernel

(Asked by: username_0 on 2019-09-11)

I'm using an app for face redaction that doesn't allow access to the source code but only allows me to pass pixel values for red, green and blue channel upon which it creates a matrix with the same average RGB values for every ROI pixel value. For eg. if I give Red=32,Blue=123 and Green=233 it will assign these RGB values for every pixel of the ROI and then draws a colored patch on the face.

So I was wondering is there a general combination of RGB values of a pixel to distort it and make it look like it's blurred. I can also set the opacity value in the app.

Thanks.

**Tags:** image-processing, blur, gaussian-blur

> **Comments:**
> **username_1**: Can you read the existing pixels of the image before deciding what RGB to give it? If so, you can just do the convolution yourself.  
> **username_0**: Unfortunately I cant, I was looking for an RGB combination that resembles of a blurred pixel. Right now I'm testing it with (192,192,192) which gives you a light shade of grey patch on top of the face.  
> **username_2**: Statistically speaking, independent of application, one might expect a 50% gray color to be the average color of all possible pictures.  A 50% gray is pretty close to 192,192,192.  So that lends some credibility to your approach.  

---

## 3 answers

### Answer by username_3 on 2019-09-11. Score: 3

Blurring an image depends on being able to read from the image. If you don’t have access to the pixel data, or external information about the image contents (e.g. average hue / luminance), there’s no way to find an overlay color that will look like you’ve blurred what it’s on top of.


---

### Answer by username_4 on 2019-09-18. Score: 1

While you can't do what you're asking, you might be able to use a compromise. It turns out that all human skin tones have the same hue. They vary only in saturation and brightness. You can see this on the scopes that television engineers use to calibrate their signals. There's a line where skin tones should be if everything's set correctly.

You could choose that hue and some low saturation and middle value in HSV space, then convert it to RGB and use that as the color you put in the ROI.

It looks like on most vectorscopes the skin tone line is about 15° past red towards yellow. According to [this article on skin tone correction](https://larryjordan.com/articles/color-correction-make-people-look-normal/) if the lighting is typical studio lighting, caucasian skin would usually be around 50-75% brightness, asian and hispanic skin around 35-55% brightness and african skin around 15-50% brightness. So setting your color to HSV = (15°, 25% saturation, 50% brightness) is RGB = (128, 104, 96). If you know your subjects will be lighter or darker, adjust accordingly. Note that these values change when in bright outdoor light or dim indoor light, or when there's light with a strong color cast falling on them. But again, this is a compromise.


---

### Answer by username_1 on 2019-09-12. Score: 1

Since you know vaguely what the pixels you're covering up look like (they are faces), your best bet to get the appearance of a blur is to really blur an image of a face in a standard image editing tool, then use the colour picker to choose a representative colour from that region. That's the closest you can get, but it still won't look blurred: as username_3 username_3 said, that's impossible given these constraints.

Obviously it will work less well if the pictures you're operating on have different lighting conditions or faces of a different skin colour from the one you sample. And if the images being redacted are frames of a video, the motion of the video will give you away immediately.

Another approach might be to choose a colour that you know won't show up in the real images (e.g. programmer pink). Then, instead of showing the image that comes out of your tool, use the marked pixels to generate a mask, and use an actual blur tool on the original image so that only the pixels selected by the mask are blurred.


---

