0. Requirements

 

- Windows 10 (please keep your windows up to date.)

- Visual studio 2017 with the windows 10 creator update SDK  (previous version also maybe programmable, but 2017 is recommended.)


1. Intro


 The simplest way to learn new language is to run sample code. Therefore, let's download dx12 sample code from git. Following link allows to download many samples.


https://github.com/Microsoft/DirectX-Graphics-Samples


2. Run sample


  Now, let's run the sample code. In this posting, we are going to execute 'D3D12HelloTriangle'. Let's open it. The code sample is placed in the following URL.


  \anydirectoryyouwant\Directx12\Samples\Desktop\D3D12HelloWorld\src


Then, you can find the 'D3D12HelloWorld.sin'. Open it. There are several sample projects.  Now, please follow the instructions:


1) Click the mouse right button on the project named 'D3D12HelloTriangle' and select the 'Set as startup project'. 

2) Press the F5 button *^^*! (If it does not work, please follow further instructions)

3) If you have problems, maybe some requirements are missed or properties are set wrong. check followings

  3-1)  Does your operating system (windows 10) provides the latest windows SDK version? (The latest version on 2017.04.13 is  10.0.15063.0.) You can identify it from  Right click on Projects->property->Configuration Properties->General->Windows SDK Version. (You can change the SDK version by clicking its panel.)

  3-2)  Does your project use right platform toolset? You can identify it from  Projects->property->Configuration Properties->General->Platform Toolset.  You can use v120 for Visual studio 2015 and v141 for Visual studio 2017. 


 

*Include directory and library is already set in a right way because it is a sample code. So, you may not need to configure those things. 

 *If any problem occur, please leave reply. 


Posted by Cat.IanKang
,

It is a critical mistake we've done easily that we assume that we already know what people think.   

-> It is a critical mistake (we can easily make/we tend to make/we are prone to make) to assume that we already know what people think.

-> To assume that we already know what people think is a critical mistake we are prone to make. 


Making brief time to write sincere words once a week will bring you something meaningful.

->  


Most people do not appreciate/acknowledge that Washington was a wise military leader.  

-> Washington is usually not acknowledged as a wise military leader.  


Losing moisture from excretion and evaporation must be continuously replaced.

-> Moisture organisms lose through excretion and evaporation must be continuously replaced. 


What makes us real human? 

-> What makes us really/truly human?


More similar point is that two subway systems cover the wide area with cheap fee for commuters.

->  More similar point is that two subway systems cover wide area at a cheap fee for commuters.

-> A further similarity is that two subway systems cover wide area at a low cost for commuters.

  

Posted by Cat.IanKang
,

Step 1. Define


 CB_BANDWIDTH*        pcbBandwidth = NULL; //CB_BANDWIDTH is a structure for transmitting. 

        ID3D11Buffer*                                     bandwidthBuffer = NULL;

ID3D11ShaderResourceView*       bandwidthBuffer_RV = NULL;


Step 2. Set buffer and its shader resource view

  

        D3D11_BUFFER_DESC Desc2;

Desc2.Usage = D3D11_USAGE_DYNAMIC;

Desc2.BindFlags = D3D11_BIND_SHADER_RESOURCE;

Desc2.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;

Desc2.MiscFlags = 0;

Desc2.ByteWidth = sizeof(CB_BANDWIDTH);

V_RETURN(pd3dDevice->CreateBuffer(&Desc2, NULL, &bandwidthBuffer));

D3D11_SHADER_RESOURCE_VIEW_DESC rd; //never replace this thing into NULL. 

ZeroMemory(&rd, sizeof(rd));

rd.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;

rd.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;

rd.Buffer.FirstElement = 0;

rd.Buffer.NumElements = 7;

pd3dDevice->CreateShaderResourceView(bandwidthBuffer, &rd, &bandwidthBuffer_RV);


Step 3. Fill the data


//Set constant buffer

D3D11_MAPPED_SUBRESOURCE MappedResource;

pd3dImmediateContext->Map(bandwidthBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &MappedResource);

  pcbBandwidth = (CB_BANDWIDTH*)MappedResource.pData; //CB_BANDWIDTH is a structure for transmitting. 

  pcbBandwidth.data = somedata;


Step 4. Set shader resource and unmap


  pd3dImmediateContext->PSSetShaderResources(77, 1, &bandwidthBuffer_RV); // 77 is a register number. you can set in the shader. 

               // In this example, tbuffer is set to only for pixel shader, 

  pd3dImmediateContext->Unmap(bandwidthBuffer, 0);                       


Step 5. Define the CB_BANDWIDTH in the hlsl shader code with 77 register. 


tbuffer CB_BANDWIDTH : register(t77)

{

Bandwidth bandwidth; //must be synchronized with definition in the cpp code. 

};



Note that, the detailed description of CB_BANDWIDTH and Bandwidth structure is omitted. They can be replaced by simply float4.  

Posted by Cat.IanKang
,

This posting introduces various methods for measuring stochastic similarity between two groups A and B. 


1. Goodness-of-fit

 

   Goodness-of-fit is widely used to test whether two samples have identical (or similar) distribution. The goodness-of-fit of a statistical model describes how well it fits a set of observations. Measures of goodness-of-fit summarize the discrepancy between observed values and the values expected under the model in question. A goodness-of-fit statistic tests the following hypothesis:


   H_0: the model M_0 fits

   H_A: the model M_0 does not fit(or, some other model M_A fits)


We call H_0 as a null hypothesis and H_A as a alternative hypothesis. 


  In assessing, there are two cases :


1. when the distribution of sample B is known, and

2. when the distribution of sample B is unknown. 


At first, let's assume that group B has known distribution, Gaussian(normal) distribution. 


1-1. Normality Test


 In statistics, normality tests are used to determine if a data set is well-modeled by a normal distribution and to compute how likely it is for a random variable underlying the data set to be normally distributed. For this, following tests are available.


- D'agostin's K-squared test

- Jarque-Bera test

- Anderson-Darling test

- Cramer-von Mises criterion

- Lilliefors test

- Kolmogorov-Smirnov test

- Shapiro-Wilk test

- Pearson's chi-squared test

  

In [Razali et.al. 2011: "Power comparisons of Shapiro–Wilk, Kolmogorov–Smirnov, Lilliefors and Anderson–Darling tests"], Shapiro-Wilk has the best power for a given significance, followed closely by Anderson-Darling when comparing the Shapiro-Wilk, Kolmogorov-Smirnov, Lilliefors, and Anderson-Darling tests. Therefore, we will check those four tests. 





Shafiro test


Anderson-darling test




ANOVA?


Null hypothesis?


K-test?


Difference between One-way ANOVA & Two-way ANOVA


One-Way ANOVA: An ANOVA hypothesis tests the difference in population means based on one characteristic or factor. a----->b "An example of when a one-way ANOVA could be used is if you want to determine if there is a difference in the mean height of stalks of three different types of seeds. Since there is more than one mean, you can use a one-way ANOVA since there is only one factor that could be making the heights different. " Two-Way ANOVA: An ANOVA hypothesis tests comparisons between populations based on multiple characteristics. a---->c<----b "Suppose that there are three different types of seeds, and the possibility that four different types of fertilizer is used, then you would want to use a two-way ANOVA. The mean height of the stalks could be different for a combination of several reasons" Multivariate analysis of variance (MANOVA): it is simply an ANOVA with several dependent variables. That is to say, ANOVA tests for the difference in means between two or more groups, while MANOVA tests for the difference in two or more vectors of means. a----->c, b------>d, a----->d, b----->c 

Posted by Cat.IanKang
,

I got an award XD

Cat.Album 2016. 12. 12. 20:07

 

 

Save the memory :)

 

 

 

Posted by Cat.IanKang
,

In order to write a good newspaper article, following steps are highly recommended. 


1. Preliminary steps for writing an article. 


1.1  Collect credible information


  Once you've decided what you're going to write about article, you'll need to gather the information. Presenting a objective story to readers who have no knowledge is a big responsibility. Therefore, you'll want to collect as much well-researched and firsthand information as possible. 


1.2 Conduct interview


  News articles are enhanced by accounts from firsthand witnesses or people with expert opinions. Ask them a short but proper question to supplement information you present in your article. 


1.3 Perform a fact check


  You have a responsibility to present accurate information to your readers. Getting a wrong information may seem insignificant, but it has consequence; aside from trouble that could be caused by misinforming to public, your reliability as a journalist could come into question.  














+Reference

  http://www.wikihow.com/Write-a-Newspaper-Article






Posted by Cat.IanKang
,

http://www.umiacs.umd.edu/~ramani/cmsc426/

Posted by Cat.IanKang
,

Phase & Magnitude analysis in Fourier Transform


  The purpose of this post is to observe differences between textures which are quite similar but have slight differences. Here shows the texture samples. 


 Five samples are used for the experiment. The first sample is a grass texture, and we call it as an original sample. Rest four samples are variation of the original one. Long black rectangular is used for making variations. If it lies on top of the original sample, we call it as a 'Top'. In the same manner, 'Cen', 'Bot', and 'Right' are generated. 


 Now let's convert spatial data into frequency data using Fourier Transform. (For the convenience, we only examine R channel of samples - presented textures have three channels, RGB.) In the frequency domain, we can observe texture characteristics from two major components: magnitude and phase. Therefore, plotting those components is helpful to investigate differences  between those samples. Let's plot original one first. 



  then, let's plot rest four samples. 

  


 In terms of magnitude spectrum, we can find obvious differences. 'Top', 'Cen', 'Bot', and 'Right' samples have long huge white line at the center. 'Top', 'Cen', and 'Bot' have long vertical white line and 'right' sample has long white horizontal line. It represents the long black rectangle in the spatial domain. We can also observe that the white line lies on the same position in 'Top', 'Cen,' and 'Bot'. Since the frequency domain represents the data into signals, it is natural. 


 On the other hand, we cannot observe any significant differences from phase spectrum. They still seem mere random. MAYBE, since the phase have no locality (the data have similar phase distribution in all coordinates), we cannot find the obvious changes in the phase spectrum. Following graph shows the phase data is spread widely. 





(For the visualization purpose, we used log function to plot magnitude spectrum. Mat2gray normalization was also used for both magnitude and phase spectrum. Magnitude spectrum is the result of abs() function and phase spectrum is the result of angle() function of MATLAB) 

'Cat.Storage > SubCat.Research' 카테고리의 다른 글

Classification of Eye Movements based on their functions  (0) 2018.01.19
Comparison method for two groups  (0) 2017.01.10
DirectX Tessellation Strategy  (0) 2016.09.02
Likert Scale  (0) 2016.08.16
Two-alternative forced choice  (0) 2016.08.16
Posted by Cat.IanKang
,