Git Product home page Git Product logo

my_cv's Introduction

MY_CV

My CV note.

>> im = imread('perpers.png');
>> imgreen = im(:,:,2); %matlab index start at 1. so green channel is 2.
>> imshow(imgreen)
>> line([1 512],[256 256],'color','r');
>> plot(imgreen(256,:));
>> disp(size(im));
>> disp(class(im)); %uint8
>> 

Multiply by a scal function 函数的写法

function result = scal(img, value)
	result = value .* img;
endfunction

产生Gaussian noise

noise = randn([1, 100]);
[n, x] = hist(noise, [-3, -2, -1, 0, 1, 2, 3]);

n是数量,x是bin。

disp([x; n]);

 	-3    -2    -1    0     1      2     3
    1     4    27    35    26     6     1
noise = randn([1, 10000])
[n, x] = hist(noise, linspace(-3, 3, 21));
plot(x, n);

randn-> Standard Normal Distribution

rand -> uniform distribution

randi-> random integers

##3 Effect of sigma on Gaussian Noise noise = randn(size(im))*sigma;

Lession 2A-L2 Filtering

Gaussion Noise

![png](./imgs/Gaussian Noise 0-6 screenshot.png)

adding a noise function to an image function

noise = randn(size(im)).*sigma;
output = im + noise;

output was just the image + noise worry to the range of the image: image [0 255] sigma=5 should plausible, if image [0 1] that is not plausible.

![png](./imgs/Gaussian Noise 1-22 screenshot.png)

![png](./imgs/Gaussian Noise 1-27 screenshot.png)

replace each pixel with an average of the values of the pixels neighborhood, this is referred to as a moving average. 最终得到smooth后的结果。

Averaing Assumptions

1 The "true" value of pixels are similar to the true value of pixels nearby.

2 The noise added to each pixel is done independently.

Weighted Moving Average

png png

non-uniform weight 与数值相邻近。

To do the moving average conputation the num of weights should be Symmetric and Odd-makes it easier to have a middle pixel.

Moving Average In 2D

image - 2D

png

Correlation Filtering

save the averaging window size is .

-->Uniform weight for each pixel.

-->loop over all pixels in neighborhood around image pixel F[i,j].

Correlation filtering - non-uniform weights

Now generalize to allow different weights depending on neighboring pixel's relative position: This is called cross-correlation, denoted .

H[u,v]--> None-uniform weights The filter "kernel" or "mask" H[u,v] is the matrix of weights in the linear combination.

Averaging Filter

png png

what went wrong with the output?

squares are not smooth, filters are blurring of filtering an image to make it smoother doesn't seem right.

To blur a signle pixel into a "blurry" spot, we would need to need to filter the spot with a something that look like a blurry spot - higher values in the middle, falling off to the edges.

png

Gaussian Filter

png png

Compare with Gaussian and non-Gaussian

png png

non-Gaussian filter you can see those shape edges.

Gaussian filters are referred to as exponentials. The complete formular is:

Variance or Standard Deviation

The Gaussian we just talked about is what's referred to as isotropic(各向同性) and it basically had 1 parameter $\sigma$, the bigger the more blur. the filter: the size of matrix $(3\times 3)$,$(5\times 5)$,$(11\times 11)$.

png png The bigger kernel, it's smoother, it's going to work better.->actually mean a bigger $\sigma$. That's what you care about is the size of the sigma, not actual kernel.

Matlab

png MATLAB 用surf函数画出来的图 叫surf 三维着色表面图、三维表面图、表面图。imagesc(A)将矩阵A中的元素数值按大小转化为不同颜色,并在坐标轴对应位置处以这种颜色染色。 surf() --> surface; imagesc() --> show image

png

Remove Noise

my_cv's People

Contributors

aaronmayue avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.