Tuesday, November 24, 2009

Digital facial engraving


http://www.iro.umontreal.ca/~ostrom/publications/abstracts.html
Victor Ostromoukhov. Digital Facial Engraving, In Proceedings of SIGGRAPH'99, in Computer Graphics Proceedings, Annual Conference Series, pp. 417-424, 1999.

Sunday, November 1, 2009

Test illuminating lines

The height field for a sphere is created by calculating the distance between the light and the vertices of the sphere. The lines are shown as contour lines based on different light position. Next step is to try to make the contour line continuous or long.

Random heights for a sphere.

a sphere
a sphere
a sphere
all illuminating lines
Triangulation for irregular PSLG
Add Image

Wednesday, October 21, 2009

Halftoning almost-final report

The influence of mask size
The variant method
The basic method dealing with one kind of leftout and without dealing the leftout from isolated pixelsThe basic method dealing with both kinds of leftout


PSNR
MSSIM

The variant method(6 out of 12 better than Pang method in tone matching and 12 out of 12 better in structure matching):
Dealing with the two kinds of residue: 1: some leftout from fully-filled pixels after several-time distributions in the mask and 2: leftout from isolated pixels

Using a map to store the residues, when a pixel is popped up from the heap, it will check the mask to find out if there are some residues in this mask; if there are it will carry these residues on the current error. Then the modified error will be distributed in the mask based the weight strategy.

Parameters: k1 = 1; k2 = 2; masksize 7 by 7; takes 4.625 seconds(*********This speed is not better than SAED method with the same size of mask, but better if considering the quality)

************************SAED speed analysis *******************
Kernel size CPU GPU
4 × 4 1.18 0.04
8 × 8 2.27 0.23
16 × 16 6.74 0.75----their best tradeoff
32 × 32 26.31 15.09

*****************************************************************
The basic method(10 out of 12 better than Pang method in tone matching and 9 out of 12 better in structure matching) :
Without ordering and processing it by raster scanning order, deal with the first class residue only. The isolated situation is ignored. If dealing with the isolated situation, the artefacts are very clear.

Parameters: k1 = 20; k2 = 2.25; masksize 7 by 7; takes 0.864 seconds

Monday, October 12, 2009

Results from processing the residue twice

Red dots are isolated pixels. There are so many of them, which affects the tone and structure a lot(The variant method)

BasicVariant

After distributing the residue once, then the residue left is distributed again based on the weight function without spreading the error on those pixels attaining black or white. It turns out the tone matching is getting better, the structure matching is getting lower. Basic method is 11 out of 12 better than Pang's method for PSNR, but 4 out of 12 for MSSIM. The variant is 6 out of 12 better than Pang's method for PSNR and 11 out of 12 for MSSIM.

Thursday, October 8, 2009

Deal with the leftout

The basic method
The variant

A lefout map is used to store the residue for each done pixel no matter it is an isolated pixel or not. Next time, before calculating the total weights for a chosen pixel, find the total leftout(T_leftout) around the chosen pixel and the new error = error + T_leftout. There is no global leftout and others are same as before. The tone PSNR has a tiny improvement for both basic and variant method. For example, for variant usually 5 out of 12 examples better than Pang's method, right now it is 6 out of 12. For basic method 10 out of 12 better than Pang's method, right now it is 11 out of 12. But the MSSIM for the basic method is not good anymore. Look at the ramp for both method. This modification improves the variant method, but brings some wrong matching for the basic method.

The wrong matching comes from the decision for drawing white or black after adding the total leftout.

Wednesday, September 23, 2009

Color halftoning and other testings



Look much better than Pang's method and it is fast.



Intensity=128
not good in visualiztion

Intensity tests:
Intensity black pixels percentage
25 27060/30000 90.2%
80 20591/30000 68.64%
100 18248/30000 60.82%
128 14946/30000 49.82%
204 6010/30000 20.03%

Monday, September 21, 2009

Resutls for modified accumulation function

The ordering is based on the distance to the black or the white. Based on my measurement, we have higher MSSIM and Constrast MSE. Our PSNR haver higher values than previous method except cat, tree, bat examples.

The modified weight function
if(error>0)
maxin = max(0.5,(Ii/(5*pow(r,1.0f))));
else
maxin = max(0.5,((255-Ii)/(5*pow(r,1.0f))));
in = min(maxin, 255-Ii);// to maintain the maximum;
ramp image
Good structure for tree and snail images


It seems the structure is better, but the tone looks not that good.

The tone looks fine. Clumping is there.

Friday, September 18, 2009

What do you think the following results?

The cat looks good! It is fast and the running time has the same order as 2009 paper. But our method has annoying patterns and some structure are missed.(No ordering, not both errors, raster order, circular mask, half bottom, Ii/r)


Thursday, September 17, 2009

A bad news

Their results for comparison


http://www.iro.umontreal.ca/~ostrom/publications/pdf/SIGGRAPH-ASIA09_saed.pdf
This paper is published in this year SIGGRAPH-ASIA. They did the error diffusion very very fast and have the structure well maintained.

Following the last blog

With sorting pixels by the distance to the two ends
The measurement shows the results have higher contrast similarity and structure similarity than those in last blog without ordering step, but lower tone similarity than them.

the weight function
maxin = max(0.5,(Ii/(5*pow(r,1.0f))));
in = min(maxin, 255-Ii);

Tone similarity(not high, better than 'structure-aware ' paper)Structure similarity(good)
Contrast similarity(good)