Computer Graphics

Note on Laplacian Operator (Diffusion) in Geometry Processing

Note on Laplacian-Beltrami (Diffusion) Operator Motivation Laplacian on graph and on discrete geometry (mesh) are very useful tools. One core intuition, just like Laplacian in $\R^n$ space, it’s related to diffusion and heat equation. Recall the diffusion equation is

May 8, 2020

Importing Geometry from Google Map to Blender

Motivation Method Follow the link to install the add-on to blender https://github.com/eliemichel/MapsModelsImporter Install the RenderDoc program on windows, to inject process to Chrome to fetch 3d data from it. Create a shortcut to launch chrome with some additional debug flags Run chrome, record the process number, pause. Inject to that number in RenderDoc program Then start chrome and go to google map to your favorite buildings Capture through RenderDoc. Save to rdc files to disk. Load that rdc through Blender! and you have your 3d models! Post processing Join the patches to a single object. And merge vertices by distance。 Process texture and stuff to retain a single kind of material with the color. See the youtube video for a tutorial.

Apr 29, 2020

Note on Photometric Reasoning

Note on Photometric Reasoning Shape $\hat n$, lighting $l$, reflectance $\rho$ affect image appearance $I$. Can we infer them back? $$ I=\rho<\hat n,l> $$ How much does shading and photometric effects tell us about shape, in natural settings.

Mar 17, 2020

Note on Generative Adversarial Network

Note on GAN Note with reference to the Youtube lecture series Hongyi Li. Architecture Developments Self Attention Used in Self-Attention GAN and BigGAN class Self_Attn(nn.Module): """ Self attention Layer""" def __init__(self,in_dim,activation): super(Self_Attn,self).__init__() self.chanel_in = in_dim self.activation = activation self.query_conv = nn.Conv2d(in_channels = in_dim , out_channels = in_dim//8 , kernel_size= 1) self.key_conv = nn.Conv2d(in_channels = in_dim , out_channels = in_dim//8 , kernel_size= 1) self.value_conv = nn.Conv2d(in_channels = in_dim , out_channels = in_dim , kernel_size= 1) self.gamma = nn.Parameter(torch.zeros(1)) self.softmax = nn.Softmax(dim=-1) # def forward(self,x): """ inputs : x : input feature maps( B X C X W X H) returns : out : self attention value + input feature attention: B X N X N (N is Width*Height) """ m_batchsize,C,width ,height = x.size() proj_query = self.query_conv(x).view(m_batchsize,-1,width*height).permute(0,2,1) # B X CX(N) proj_key = self.key_conv(x).view(m_batchsize,-1,width*height) # B X C x (*W*H) energy = torch.bmm(proj_query,proj_key) # transpose check attention = self.softmax(energy) # BX (N) X (N) proj_value = self.value_conv(x).view(m_batchsize,-1,width*height) # B X C X N out = torch.bmm(proj_value,attention.permute(0,2,1) ) out = out.view(m_batchsize,C,width,height) out = self.gamma*out + x return out,attention Style GAN BigGAN Conditional GAN Text Conditioning Text is processed and combined with noise vector.

Mar 7, 2020

Note on Hardware Based Computational Photography

Note on Hardware Based Computational Photography Now we have far more computational power than before! Besides, many images will go through complex algorithms as postprocessing. But we can also optimize camera measurement, so that results look even better.

Feb 27, 2020

Note on Computational Photography

Computational Photography TOC {:toc} Basically, enhance image by computation! Intersection of 3 fields Optics Vision Graphics Majorly two kinds of work Co-design camera and image processing (optics + vision) Use Vision to help Graphics to help generate better image faster! CG2REAL CG rendering is very computational intensive!

Feb 27, 2020

Computer Graphics Environment in Matlab

Computer Graphics environment in Matlab @(515.1 Computer Graphics)[matlab] Recently, we are using matlab to do computer vision experiments. Thus this note introduces some function controlling the elementary graphics environment. For Computer Graphics, the basic 3 components are

Nov 14, 2019