Raid 5

A raid 5 array distributes the data across the total amount of disks, increasing performance and at the same time providing redundancy. Using our six 1TB drives in raid 5 configuration, we would end up with a 5TB raid array. If any of the six disks go down, the array continues to operate, as it automatically uses data from the remaining five to reconstruct the data from the sixth. The array will have a reduced performance until the broken drive is replaced, but all data will be intact. The only way you can lose data with a raid 5 drive is if two drives fail at the same time, which is highly unlikely. You can even configure a hot spare drive, that isn’t used in the raid array for any purpose except to be added should one of the main drives goes down. The hot spare can then be converted to an array drive and you continue until you install a replacement.

So to summarize, raid 5 allows you to store data with increased disk performance, and also allows you to lose one drive to failure without affecting your data.

Advertisements

Inside Matlab Wiener2 Function

The Wiener filter requires a prior knowledge of the power spectral density of original image which is unavailable in practice.

wiener2 lowpass-filters a grayscale image that has been degraded by constant power additive noise. wiener2 uses a pixelwise adaptive Wiener method based on statistics estimated from a local neighborhood of each pixel.

The wiener2 function applies a Wiener filter (a type of linear filter) to an image adaptively, tailoring itself to the local image variance. Where the variance is large, wiener2 performs little smoothing. Where the variance is small, wiener2 performs more smoothing.

This approach often produces better results than linear filtering. The adaptive filter is more selective than a comparable linear filter, preserving edges and other high-frequency parts of an image. In addition, there are no design tasks; the wiener2 function handles all preliminary computations and implements the filter for an input image. wiener2, however, does require more computation time than linear filtering.

Continue reading Inside Matlab Wiener2 Function

Antenna Terms

dB: Relative comparison unit.

dBm: Transmitted power. -30dBm is 1 µW. 0dBm is 1 milliwatt. 30dBm puts out 1 Watt.

dBi: Gain of an antenna as referenced to an ISOTROPIC source (point source, which does not exist).

dBd: Gain of an antenna as referenced to an DIPOLE source.

A simple dipole antenna has a gain of 2.41dBi, and a gain of 0dBd (dBi is better for advertising).

CPU Benchmarks

CPU CPU Benchmark
Intel Xeon E5-1620 @ 3.60GHz 9109  HP
Intel Core i7-4702MQ @ 2.20GHz 7197 Lenovo
Intel Core i5-3230M @ 2.60GHz 3912 Casper
Intel Xeon E5405 @ 2.00GHz 2906 IBM Server
Intel Core2 Duo E8300 @ 2.83GHz 1997 HP
Intel Core2 Duo T9300 @ 2.50GHz 1668 Dell
Intel Core2 Duo T7250 @ 2.00GHz 1108 Dell
Intel Core2 Duo T5200 @ 1.60GHz 829 Asus
Intel Pentium T2130 @ 1.86GHz 718
Intel Pentium M Processor 740 @ 1.73GHz 418 Toshiba

Proxy On-Off Script

Save As VBS file

Set WshShell = WScript.CreateObject("WScript.Shell")

DimSetting = WshShell.RegRead ("HKCUSOFTWAREMicrosoftWindowsCurrentVersionInternet SettingsProxyEnable")

If DimSetting = 1 Then 
'Wscript.Echo "Proxy is Currently Enabled"

returnvalue=MsgBox ("Do you want to DISABLE the Proxy?", 36, "Proxy state is Currently ENABLED")


if returnvalue = 6 then 
' BEGIN CALLOUT A
WshShell.RegWrite "HKCUSoftwareMicrosoftWindows" & _
 "CurrentVersionInternet SettingsProxyEnable", _
 0, "REG_DWORD"
' END CALLOUT A

wShshell.Run "taskkill /im iexplore.exe",0,True
WScript.Sleep 500 'give kill time to take effect

wShshell.Run "iexplore.exe"
End If
WScript.Quit


Else 
'Wscript.Echo "Proxy is Currently Disabled" 
End If


'On Error Resume Next

returnvalue=MsgBox ("Do you want to ENABLE the Proxy?", 36, "Proxy state is Currently DISABLED")

If returnvalue = "" Then
 WScript.Quit
End If

if returnvalue = 6 then 
' BEGIN CALLOUT A
WshShell.RegWrite "HKCUSoftwareMicrosoftWindows" & _
 "CurrentVersionInternet SettingsProxyEnable", _
 1, "REG_DWORD"
WshShell.RegWrite "HKCUSoftwareMicrosoftWindows" & _
 "CurrentVersionInternet SettingsProxyServer","proxy.test.edu:80", "REG_SZ"
WshShell.RegWrite "HKCUSoftwareMicrosoftWindows" & _
 "CurrentVersionInternet SettingsProxyOverride","<local>", "REG_SZ"
' END CALLOUT A


wShshell.Run "taskkill /im iexplore.exe",0,True

WScript.Sleep 500 'give kill time to take effect

wShshell.Run "iexplore.exe"
End If

WScript.Quit

Matlab Noise Implementations

Poisson Noise:

Matlab’s Algorithm:

Adding Poisson Noise into an Image using ‘imnoise’

I = imread('2.jpg');

J = rgb2gray(I);

J = IMNOISE(J,'poisson')

Adding Poisson Noise Manually

I = imread('2.jpg');

a = rgb2gray(I);

a = im2double(a);

sizeA = size(a); % Matrix in MxN form

a = a(:);

b=zeros(size(a));

idx1=find(a<50);

% Matrix Positions whose pixels intensities are less than 50

t=ones(size(idx1));

% Matrix having all ones, the size is equal to idx size

em=-ones(size(idx1));

%Matrix having all -ones, the size is equal to idx size

idx2= (1:length(idx1))';

% Put values in idx2 equal to length of idx1

if (~isempty(idx1)) % if such pixels exists then

g=exp(-a(idx1)); % take Exponential of the values at those pixel

positions

while ~isempty(idx2)

em(idx2)=em(idx2)+1;

t(idx2)=t(idx2).*rand(size(idx2));

idx2 = idx2(t(idx2) > g(idx2));

end

b(idx1)=em;

end

idx1=find(a>=50);

% Cases where pixel intensities are more than 49 units

if (~isempty(idx1))

b(idx1)=round(a(idx1)+sqrt(a(idx1)).*randn(size(idx1)));

end

b = reshape(b,sizeA);

imshow(b)

Salt and pepper noise:

Matlab’s Algorithm:

Adding Salt n Pepper Noise into an Image using ‘imnoise’

I = imread('2.jpg');

J = rgb2gray(I);

K = IMNOISE(J,'salt & pepper',0.05);

figure, imshow(J), figure, imshow(K)

MANUAL Addition OF Salt n Pepper Noise

% p3 = density

I = imread('2.jpg');

J = rgb2gray(I);

p3= 0.05;

x = rand(size(J));

d = find(x < p3/2);

J(d) = 0; % Minimum value

d = find(x >= p3/2 & x < p3);

J(d) = 255; % Maximum (saturated) value

imshow(J)

Gaussian Noise:

Gaussian noise is an idealized form of white noise, which is caused by random

fluctuations in the signal. We can observe white noise by watching a television

which is slightly mistuned to a particular channel. Gaussian noise is white noise

which is normally distributed. The effect can again be demonstrated by the

imnoise function.

Matlab’s Algorithm:

b = a + sqrt(p4)*randn(sizeA) + p3;

ADDING GAUSSIAN NOISE INTO AN IMAGE USING IMNOISE

I = imread('2.jpg');

J = rgb2gray(I);

K = imnoise(J,'gaussian', 0.05);

figure, imshow(J), figure, imshow(K)

MANUAL ADDITION OF GAUSSIAN NOISE

% p3 mean

% p4 variance

I = imread('2.jpg');

J = rgb2gray(I);

p3= 0;

p4 = 0.05;

J = im2double(J);

b = J + sqrt(p4)*randn(size(J)) + p3;

imshow(b)

Speckle Noise:

Matlab’s Algorithm:

MANUAL ADDITION OF SPECKLE NOISE

% p3 = variance

I = imread('2.jpg');

J = rgb2gray(I);

p3= 0.05;

J = im2double(J);

b = J + sqrt(12*p3)*J.*(rand(size(J))-.5);

imshow(b)

ADDING SPECKE NOISE AUTOMATICALLY

I = imread('2.jpg');

J = rgb2gray(I);

K = imnoise(J,'speckle', 0.5);

figure, imshow(J), figure, imshow(K)