This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Explanation: | |
The 2D matrix is treated as a 1D vector | |
An element M[x][y] will be represented as a vector M[id], where id = (y+x*col) | |
e.g. M[1][2] for a 3*3 matrix would be represented as a vector M[5]. | |
Each matrix M is thus, represented as an array of structs, with the following fields: | |
value - unsigned char element value | |
up , down, left, right - boolean values indicating whether the element lies on the border of the matrix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Global Variables **/ | |
bool DispThreadHasFinished; | |
bool MainThreadHasFinished; | |
iplImage* myImg; | |
/** Main Loop that loops at >100fps **/ | |
main() { | |
DispThreadHasFinished=FALSE; | |
MainThreadHasFinished=FALSE; | |
CreateThread(..,..,Thread,..); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Pree | |
% EECS - 442 | |
% Description - This code helps plot corners of the image using the harris | |
% corner detector. | |
% The value of K chosen is 0.04(default) since it seems to give finer | |
% accuracy in detecting points. | |
clc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [r,c, rsubp, csubp] = nonmaxsup(cim, radius, thresh, im) | |
subPixel = nargout == 4; % We want sub-pixel locations | |
[rows,cols] = size(cim); | |
sze = 2*radius+1; % Size of dilation mask. | |
mx = ordfilt2(cim,sze^2,ones(sze)); % Grey-scale dilate. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <stdio.h> | |
#include <math.h> | |
#include "mpi.h" | |
#include <vector> | |
#include <ctdlib> | |
#include <fstream> | |
#define PI 3.14159265 | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The approach I used to allocate the elements is by splitting the matrix into smaller matrices and allocating one to each of the processors. | |
Each of the smaller matrix, belonging to a processor has a global id in the form of xdim and ydim based on it’s location in the bigger matrix. | |
Xdim=proc_id/sqrt(num of processors) | |
Ydim=proc_id/sqrt(num of processors) | |
By dividing the total no. of elements by the number of processors, and based on the remainder, all extra elements can be evenly distributed among the processors, starting from the initial one. | |
Six empty arrays were created for sti=oring the border element information: top row, bottom row, left column, right column, diagonal right corner element for sending data, top left corner diagonal element for receiving data. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [Eng_Org] = Cal_Eng(N1); %function for calling from main program | |
Ini_val=0; %fvariable for initial value | |
for var_1=1:20 | |
% Reading The XLS File | |
A=input('Enter Signal No:','s'); | |
path=['H:\KRCL1\xls files for signal data\XLS-procdbs\Detection + Clutch Tight\Detection + Clutch Tight (VN EN)\ds',A,'.xls']; %Calculatign the path of the XLS file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Description - This code executes the function Reject_Outliers which finds | |
% the set of outliers using RANSAC | |
function [rej] = Reject_Outliers( B1, B2 ) | |
threshold=5.65; | |
p=0.95; | |
w=(0.83); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// EYETRACKER | |
/// | |
/// MAIN.CPP | |
/// | |
/// AUTHOR : Pree | |
/// | |
/// PROGRAM NAME : main.cpp | |
/// | |
/// LAST REVISED : 15th Oct, 2011 | |
/// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef BDD_TABLES_H | |
#define BDD_TABLES_H | |
/* | |
* File Bdd_tables.h | |
* | |
* Defines the class Bdd_tables, along with a structs computed_table_key | |
* and unique_table_key | |
*/ |
OlderNewer