Ask Your Question

neto's profile - activity

2020-02-29 21:00:25 -0600 commented question undefined reference to imread

Yeh this fix problem, more precisely add "-loopencv_core" or any lib like "-lopencv_(THE LIB OPENCV NAME HERE)

2018-11-04 20:47:59 -0600 received badge  Enthusiast
2018-11-01 10:37:25 -0600 edited question How segment correctly the pupil and iris?

How segment correctly the pupil and iris? I'm trying to target both the iris and pupil border using opencv's Canny Edge,

2018-11-01 10:19:28 -0600 received badge  Organizer (source)
2018-11-01 01:15:46 -0600 asked a question How segment correctly the pupil and iris?

How segment correctly the pupil and iris? I'm trying to target both the iris and pupil border using opencv's Canny Edge,

2018-08-21 10:08:59 -0600 received badge  Critic (source)
2018-08-21 10:06:08 -0600 marked best answer Assertion erro in log operation

My code for calculate the log of all pixels in an image:

int main(int argc, char** argv)
{


    //ABRE A IMAGEM->CINZA e MOSTRA
    Mat img = imread("img.jpg", IMREAD_GRAYSCALE);
    Mat dest;

    cv::log(img, dest);
    namedWindow("t");
    imshow("t", dest);
    if (waitKey(0) == 27) destroyAllWindows();
    return 0;
}

Output:

OpenCV: terminate handler is called! The last OpenCV error is:
OpenCV(3.4.2) Error: Assertion failed (depth == 5 || depth == 6) in cv::log, file c:\build\3_4_winpack-build-win64-vc15\opencv\modules\core\src\mathfuncs.cpp, line 701
2018-08-21 09:52:48 -0600 edited question Assertion erro in log operation

Assertion erro in log operation My code for calculate the log of all pixels in an image: int main(int argc, char** argv

2018-08-21 09:52:10 -0600 commented question Assertion erro in log operation

ops, sorry

2018-08-21 09:47:44 -0600 received badge  Editor (source)
2018-08-21 09:47:44 -0600 edited question Assertion erro in log operation

Assertion erro in log operation My code for calculate the log of all pixels in an image: int main(int argc, char** argv

2018-08-21 09:47:06 -0600 asked a question Assertion erro in log operation

Assertion erro in log operation My code for calculate the log of all pixels in an image: int main(int argc, char** argv

2018-08-20 11:55:15 -0600 received badge  Supporter (source)
2018-08-20 11:45:51 -0600 marked best answer unexpected error during execution

Is a simple program for add +30 in intesitys, but it stop during the 'for'

#include "stdafx.h"


#include < opencv2/opencv.hpp >

#include < iostream >

#include < opencv2/imgproc/imgproc.hpp >


using namespace cv;

using namespace std;

Vec3b logPoint(Vec3b RGB) {
    Vec3b res;
    res[0] = RGB[0]+30;
    res[1] = RGB[1]+30;


    return res;
}

int main(int argc, char** argv)
{


    //ABRE A IMAGEM->CINZA e MOSTRA
    Mat img = imread("img.jpg", IMREAD_GRAYSCALE);
    Mat dest(img.size().width, img.size().height,CV_8SC1);



for (int i = 0; i-1 < img.rows; i++) {
    for (int j = 0; j-1 < img.cols; j++) {
        Vec3b pixel = img.at<Vec3b>(i,j);
        dest.at<Vec3b>(i, j) = logPoint(pixel);

        //cout << logPoint(pixel)[0] << "|" << logPoint(pixel)[1]<<endl;

    }
}

namedWindow("img", WINDOW_AUTOSIZE);
imshow("img", img);
if(waitKey(0) == 27) destroyAllWindows();


return 0;

}

2018-08-20 11:45:51 -0600 received badge  Scholar (source)
2018-08-20 11:45:31 -0600 commented answer unexpected error during execution

but why is 'for' not recommended? and I should do what to optimize an operation p to p that is not a simple sum, for exa

2018-08-20 11:42:04 -0600 commented answer unexpected error during execution

but why is not the use of 'for' recommended? and I should do what to optimize an operation p for p

2018-08-20 11:37:18 -0600 commented answer unexpected error during execution

Yep, I noticed this after, this code is only for theories practices . Thanks for your help!

2018-08-18 22:48:04 -0600 asked a question unexpected error during execution

unexpected error during execution Is a simple program for add +30 in intesitys, but it stop during the 'for' #include "