Skip to content
Snippets Groups Projects
Commit e83f2c96 authored by Sebastian Gomez-Gonzalez's avatar Sebastian Gomez-Gonzalez
Browse files

Small modification to display log likelihood instad of binary image

parent e92408f7
No related branches found
No related tags found
No related merge requests found
......@@ -49,19 +49,7 @@ int main(int argc, char** argv) {
std::cout << "Computation took "
<< std::chrono::duration_cast<std::chrono::milliseconds>(end_t - start_t).count() <<
" milliseconds" << endl;
/*cout << "pix data:" << im_proc.at<double>(340, 290) << endl
<< im_proc.at<double>(342, 291) << endl
<< im_proc.at<double>(290, 340) << endl
<< im_proc.at<double>(2, 2) << endl;*/
MatIterator_<double> it_ans = im_proc.begin<double>(),end=im_proc.end<double>();
//MatIterator_<Vec3b> it=im_proc.begin<Vec3b>(), end=im_proc.end<Vec3b>();
while(it_ans != end){
//cout << "pix data:" << *it_ans << endl;
double prob = 1.0 / (1.0 + exp(-*it_ans));
//*it_ans = 255*prob;
*it_ans = (prob > 0.95) ? 255 : 0;
it_ans++;
}
normalize(im_proc, im_proc, 0, 1, NORM_MINMAX);
imshow("Color", im_proc);
waitKey(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment