VittorioAccomazzi / Artist

The artist which will paint your pictures before your eyes !
0 stars 0 forks source link

Improve the tensor Painter #7

Closed VittorioAccomazzi closed 3 years ago

VittorioAccomazzi commented 3 years ago

The tensor painter creates in several situation quite strong artefact. This is due to the fact that filter only works along the tangent direction (minor eigenvector) and so never smooth boundaries. In the areas of strong contrast, this works well, but in the area of low contrast, it ends up creating boundaries and so artefact.

The tensor painter alternates:

The low pass filter shall smooth across boundaries when both eigenvalues are similar, and so there is no strong boundary. This can be done steering a gaussian kernel, based on the well known anisotropy measure: image

VittorioAccomazzi commented 3 years ago

The code implementation is quite straightforward ( see class TensorSmoothing and it seems to improve the filtering, however doesn't completely eliminate the artefact. Here on the left the new filter and on the right the previos one in an image which shows strong artefact:

Screen Shot 2021-03-07 at 7 38 24 PM

and here is a details of the image: Screen Recording 2021-03-07 at 7 18 59 PM

VittorioAccomazzi commented 3 years ago

Implementation

The gaussian Kernel will be steered along the major and minor eigenvectors. The sampling step along the minor eigenvector is 1, while the sampling step along the major is 1-A.

VittorioAccomazzi commented 3 years ago

Multiscale Tensor Relax

Tested the multiscale tensor relax, as described in Image and Video Abstraction by Coherence-Enhancing Filtering section 3.1.3. ( source code tensorGenerator.ts). However I find very minor changes and the simpler implementation which I'm using : Original: myImage (26) modified: myImage (25) this code was not committed since there is no benefit in changing it.