Generate simulated signal data through random number generation.

In the human visual system, the two images sensed by the left and right eyes are processed continuously. Small image patterns of an object in one image are matched with those in the other image that corresponds to the same object. This provides perception of stereo-vision or 3D geometry of scenes to humans. Similar pattern matching problems arise in computer vision, medical image analysis, and other engineering domains. In this project, you will use multi-dimensional arrays to solve a simple pattern matching problem. Memory for arrays will be determined at runtime and must be allocated dynamically.
Input is a general digital signal with variable number of dimensions, n=1,2, or 3. Two-dimensional (2D) signals could be digital images, and three-dimensional (3D) signals could be digital video or 3D medical images obtained by Computed Tomography.
The input format is:
n // number of dimensions of the signal n=1,2, or 3.
m1 // array dimension along the first dimension for n=1,2, or 3.
m2 // present when n>=2; array dimension along the second dimension for n=2 or 3.
m3 // present when n==3; array dimension along the third dimension for n=3.
k // size of pattern/template to be matched:
// 1D or n=1: k; 2D or n=2: k x k; 3D or n=3: k x k x k.
Std // noise parameter in the range 0 to 5.
Method // Method==1 means, use minimum of sum of squared differences
// Method != 1 use Maximum of correlation coefficient.

Example of input data:

2.50 // Std=2.50; noise is uniformly distributed in the interval [-2.50 to 2.50].
1 // Method 1

Step 1: Forward process: Generating simulation data:
This step will be explained for the three-dimensional case (n=3). Extrapolate this yourself to infer the explanation for n=2, and n=1.
a. Read input data. See the example above.
b. Dynamically allocate memory for digital signal, d[m1][m2][m3] and template/pattern p[k][k][k].
c. Generate simulated signal data through random number generation. Let the data at each entry d[i1][i2][i3] be a random floating point number in the range 000.00 to 255.49 with two decimal digit precision. Get this by generating a random integer and taking modulo or remainder with respect to 25550, and dividing the result by 100. This step will initialize the full array d[m1][m2][m3].
d. Pick a pattern of size kxkxk inside the signal data randomly. Do this by generating a random location [k1,k2,k2] within the signal data, such that k1 is in the range [0 to m1-k], k2 is in the range 0 to m2-k, and k3 is in the range 0 to m3-k. Use the random number generator and the modulo operator to accomplish this step. Print k1,k2,k3.
e. Initialize the pattern to be p[0 to k-1][0 to k-1][0 to k-1] = d[k1 to k1+k-1][k2 to k2+k-1][k3 to k3+k-1].
f. Add independent uniformly distributed random noise x to every entry of the signal data d[i1][i2][i3] and the pattern data p[j1][j2][j3]. Noise should be a decimal number in the range [-std to +std] with two decimal digit precision. Do this by generating a random positive integer y in the range 0 to 200*std, subtracting 100*std from y, and dividing the result by 100, i.e. x= (y-100*std)/100. Round off values of each entry in the signal and the pattern to the nearest integer. Any number below 0 should be set to 0, and any number over 255 should be set to 255. The result should be a positive integer in the range 0 to 255. This method is equivalent to simulating random noise and quantization effect when the data is stored in one byte per data item (unsigned integer).

Step 2: Pattern Matching: Finding the best matching location of p[j1][j2][j3] in d[i1][i2][i3] in the presence of noise. Other real-world effects like pattern shift and pattern distortion (rotation, zoom, different amounts of stretching and compression along different directions) have been ignored here. Assume that there are no errors in the input file.

Find the location (r1,r2,r3), which is an estimate of the location (k1,k2,k3), using two methods:
a. Method 1: Minimizing the Sum-of-Squared-Differences
Sum of (d-p)^2.

An outline of pseudocode for this step could be

Last Completed Projects

topic title academic level Writer delivered

Are you looking for a similar paper or any other quality academic essay? Then look no further. Our research paper writing service is what you require. Our team of experienced writers is on standby to deliver to you an original paper as per your specified instructions with zero plagiarism guaranteed. This is the perfect way you can prepare your own unique academic paper and score the grades you deserve.

Use the order calculator below and get started! Contact our live support team for any assistance or inquiry.

[order_calculator]