This file contains hidden or 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
void DImage::deskew(string filename, unsigned int angle) | |
{ | |
if (filename == "") | |
return; | |
std::cout << "Being called with filename " << filename << std::endl; | |
Mat img = imread(filename, CV_LOAD_IMAGE_GRAYSCALE); |
This file contains hidden or 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
for(i = 0; i < n_rows; i++) | |
{ | |
tmp = 0; | |
for(j = i + 1; j < n_rows; j++) | |
{ | |
tmp += prA[i*n_rows + j]*prX[j]; | |
} | |
y += prX[i]*2.0*tmp; | |
y += prX[i]*prX[i]*prA[i*n_rows + i]; | |
} |
NewerOlder