<p>I've been working on implementing the technique from the paper "Designing look-and-feel using generalized crosshatching" which can be found at: 
 <a href="http://dl.acm.org/citation.cfm?id=3085054" rel="nofollow noreferrer">http://dl.acm.org/citation.cfm?id=3085054</a></p>

<p>The paper uses triplanar texture mapping to put tilable "line shading" style textures onto 3d rendered models.</p>

<p>It uses the brightness of the pixel to select which texture to use, where it has source textures of varying brightness levels like in the image below.</p>

<p><a href="https://i.sstatic.net/qdL0X.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/qdL0X.png" alt="enter image description here"></a></p>

<p>It says:</p>

<blockquote>
  <p>The key part of our approach is a texture synthesis algorithm that
  can construct on average constant color crosshatching textures
  from a single crosshatching image that can be hand-drawn by
  artists</p>
</blockquote>

<p>It then explains that it takes that constant color texture and applies dilation and erosion filters to obtain the darker and lighter versions of the (greyscale) texture.</p>

<p>My question is this:  Let's say that you have a greyscale image of an artist drawing some cross hatching on a white piece of paper using a pencil.  How would you convert that image to be constant average color or brightness?</p>

<p>The only other relevant info from the paper seems to be this:</p>

<blockquote>
  <p>Our texture synthesis algorithm is an extremely simple nonstationary
  convolution filter that consists of two stages as follows:
  (1) For every pixel, compute the average color in a region around
  the pixel where the shape of the region and weights are controlled
  by a user-defined kernel. (2) If the color of the region is darker than
  the goal color, make the color of the pixel lighter; or otherwise
  darker</p>
</blockquote>

<p>That information is a bit sparse, and doesn't explain how much lighter or darker you should make a pixel. It's also a bit ambiguous to me whether they are talking about the process that makes the image constant color, or if they are talking about the process that makes lighter or darker versions of the constant color source texture.</p>

CC BY-SA 3.0
2017-09-22T20:07:46.780Z
I'll make an answer with details specific to this question after i get it working, but from what i've heard, the answer is to use a high pass filter.  More info regarding high pass filters in graphical applications here: https://www.gamasutra.com/view/feature/3073/the_power_of_the_high_pass_filter.php?print=1
Alan Wolfe
CC BY-SA 3.0
2017-09-24T14:38:01.087Z
two related links:
http://hhoppe.com/proj/hatching/
and
http://www.floored.com/blog/2014sketch-rendering/
Alan Wolfe
<image-processing>
Making an approximately constant color or brightness image
Alan Wolfe
# Making an approximately constant color or brightness image

(Asked by: username_0 on 2017-09-20)

I've been working on implementing the technique from the paper "Designing look-and-feel using generalized crosshatching" which can be found at:
<http://dl.acm.org/citation.cfm?id=3085054>

The paper uses triplanar texture mapping to put tilable "line shading" style textures onto 3d rendered models.

It uses the brightness of the pixel to select which texture to use, where it has source textures of varying brightness levels like in the image below.

[![enter image description here](https://i.sstatic.net/qdL0X.png)](https://i.sstatic.net/qdL0X.png)

It says:

> The key part of our approach is a texture synthesis algorithm that
> can construct on average constant color crosshatching textures
> from a single crosshatching image that can be hand-drawn by
> artists

It then explains that it takes that constant color texture and applies dilation and erosion filters to obtain the darker and lighter versions of the (greyscale) texture.

My question is this: Let's say that you have a greyscale image of an artist drawing some cross hatching on a white piece of paper using a pencil. How would you convert that image to be constant average color or brightness?

The only other relevant info from the paper seems to be this:

> Our texture synthesis algorithm is an extremely simple nonstationary
> convolution filter that consists of two stages as follows:
> (1) For every pixel, compute the average color in a region around
> the pixel where the shape of the region and weights are controlled
> by a user-defined kernel. (2) If the color of the region is darker than
> the goal color, make the color of the pixel lighter; or otherwise
> darker

That information is a bit sparse, and doesn't explain how much lighter or darker you should make a pixel. It's also a bit ambiguous to me whether they are talking about the process that makes the image constant color, or if they are talking about the process that makes lighter or darker versions of the constant color source texture.

**Tags:** image-processing

> **Comments:**
> **username_0**: I'll make an answer with details specific to this question after i get it working, but from what i've heard, the answer is to use a high pass filter.  More info regarding high pass filters in graphical applications here: https://www.gamasutra.com/view/feature/3073/the_power_of_the_high_pass_filter.php?print=1  
> **username_0**: two related links: http://hhoppe.com/proj/hatching/ and http://www.floored.com/blog/2014sketch-rendering/  

---

## 0 answers

