Skip to content

Commit

Permalink
change folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaireXie committed Oct 9, 2014
1 parent f23b097 commit 2f49397
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 172 deletions.
72 changes: 0 additions & 72 deletions mainCode/computeDistPath.m

This file was deleted.

17 changes: 8 additions & 9 deletions mexFunctions/createGraph.cpp
Expand Up @@ -20,7 +20,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
// labels

if (nrhs != 7) {
mexErrMsgTxt("7 inputs required: \n index candidateHTrans patchSize m n structureSzie labels \n");
mexErrMsgTxt("7 inputs required: \n index candidateHTrans patchSize structureSize labels \n");
}

if (nlhs != 3) {
Expand Down Expand Up @@ -68,7 +68,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {

if (abs(x0-xx) < patchSize && abs(y0-yy) < patchSize) {
sr[nonzero] = 1;
ir[nonzero] = i;
ir[nonzero] = j; //j
nonzero++;
}
}
Expand All @@ -94,13 +94,11 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
double *edgeEnds = (double *)mxGetData(plhs[2]);




for (int i = 0 ; i < nonzero; i++) {
int tmpMap[m*n];
// initialization
for (int i = 0; i < m*n; i++) {
tmpMap[i] = 0;
for (int ii = 0; ii < m*n; ii++) {
tmpMap[ii] = 0;
}

int y1 = index[a[i]]-1;
Expand All @@ -116,7 +114,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
}

// compute the bounding box
int min_x = 1000, min_y = 1000, max_x = -1000, max_y = -1000;
int min_x = 10000, min_y = 10000, max_x = -10000, max_y = -10000;
for (int j = min(y1, y2)-half; j <= max(y1, y2)+half; j++) {
for (int k = min(x1, x2)-half; k <= max(x1, x2)+half; k++) {

Expand All @@ -129,7 +127,8 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
}
}

for (int k1 = 0; k1 < labels; k1++) {

for (int k1 = 0; k1 < labels; k1++) {
for (int k2 = 0; k2 < labels; k2++) {

double sum = 0;
Expand All @@ -147,7 +146,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) {
}

// matlab index
edgePots[i + (k1 + k2*labels)*nonzero] = sum;
edgePots[i + (k2 + k1*labels)*nonzero] = sum;
edgeEnds[i] = a[i]+1;
edgeEnds[i+nonzero] = b[i]+1;
}
Expand Down
Binary file modified mexFunctions/createGraph.mexa64
Binary file not shown.
Binary file removed mexFunctions/tempResult.mat
Binary file not shown.
44 changes: 0 additions & 44 deletions mexFunctions/testBilateralUpcample.m

This file was deleted.

12 changes: 0 additions & 12 deletions mexFunctions/testCreateGraph.m

This file was deleted.

35 changes: 0 additions & 35 deletions mexFunctions/testrConstructGraph.m

This file was deleted.

Binary file removed mexFunctions/tmpGraph.mat
Binary file not shown.

0 comments on commit 2f49397

Please sign in to comment.