Ask Your Question

HYPEREGO's profile - activity

2020-10-26 15:26:03 -0600 received badge  Nice Answer (source)
2020-08-28 08:25:43 -0600 received badge  Popular Question (source)
2020-07-12 11:46:06 -0600 commented question How to solve this? (finding an image)

The error is very explanatory, it say that you should recompile the entire library with the nonfree module. In opencv 3

2020-07-12 11:45:50 -0600 commented question How to solve this? (finding an image)

The error is very explanatory, it say that you should recompile the entire library with the nonfree module. In opencv 3

2020-07-11 07:11:19 -0600 edited question how to resolve (-215:Assertion failed) !_src.empty() in function 'cv::boxFilter'

how to resolve org.opencv.imgproc.Imgproc.blur_2(Native Method) Hello everyone, I am creating a system for object recogn

2020-07-10 13:24:47 -0600 commented question Ideal Pinhole Camera consistency

The pinhole in photography is used but the problem here is the autofocus from my perspective, i Think. And yeah, moreove

2020-07-10 02:57:03 -0600 commented question How to solve this? (finding an image)

features2D is already on OpenCV, you should have it installed. Without any other information is difficult give an help.

2020-07-09 09:58:59 -0600 commented question warpAffine and use the memory allocated on CUDA devices

@cudawarped sorry for tagging but your website is a reference for me THANK YOU A LOT and I hope that you can give to me

2020-07-08 15:22:40 -0600 received badge  Necromancer (source)
2020-07-08 15:22:40 -0600 received badge  Self-Learner (source)
2020-07-08 08:36:24 -0600 edited answer Residual error from fundamental matrix

I finally solved this problem using the code from findFundamentalMat as suggested by @eduardo in his question and answer

2020-06-19 10:19:09 -0600 commented answer CUDA::remap with shared-memory -> black output

The = operator in OpenCV is a soft-copy (just the mat header) while a copyTo is an hard-copy. Hard copy means that the e

2020-06-17 04:39:27 -0600 commented question Stereo Rectification produces rectified images of only the top left quarter of the original image

That's strange, are you sure that you get the correct calibration matrices? It look like it is shifted, have you tried a

2020-06-17 04:25:41 -0600 edited question warpAffine and use the memory allocated on CUDA devices

warpAffine and use the memory allocated on CUDA devices Hi folks, I' trying to to the following pipeline in C++ using Op

2020-06-16 11:54:03 -0600 edited question warpAffine and use the memory allocated on CUDA devices

warpAffine and use the memory allocated on CUDA devices Hi folks, I' trying to to the following pipeline in C++ using Op

2020-06-16 07:06:17 -0600 commented question warpAffine and use the memory allocated on CUDA devices

It can be an idea, I'll see if I've time. It is something that I should figure it out when everything is working, it sho

2020-06-16 07:05:52 -0600 commented question warpAffine and use the memory allocated on CUDA devices

It can be an idea, I'll see if I've time, but is something that I should figure it out when everything is working, it sh

2020-06-16 06:25:28 -0600 asked a question warpAffine and use the memory allocated on CUDA devices

warpAffine and use the memory allocated on CUDA devices Hi folks, I' trying to to the following pipeline in C++ using Op

2020-06-15 10:20:50 -0600 edited question is it possibele to use 2 darknets one one machine with two Gpu ,s

is it possibele to use 2 darknets one one machine with two Gpu ,s I want to use 2 seperate instances of darknet running

2020-06-15 09:10:42 -0600 edited question How warpAffine works?

How warpAffine works? when i use warpAffine(InputArray src, OutputArray dst, InputArray M, Size dsize); imshow("dst",d

2020-06-14 01:52:22 -0600 received badge  Popular Question (source)
2020-06-13 11:18:58 -0600 edited answer Passing an array of cv::GpuMat to a cuda kernel?

You can directly pass the array of GpuMats to kernels, but use them as an array of PtrStepSz in the kernel. You don't ha

2020-05-26 05:51:23 -0600 commented question How do we matching the features on image with live camera and draw the rectangle?

Can you provide to me a little bit of more code? The input points should be a std::vector<cv::Point2f> or a cv::Ma

2020-05-26 04:42:03 -0600 commented question How do we matching the features on image with live camera and draw the rectangle?

Can you provide to me a little bit of more code? The input points should be a std::vector<cv::point2f> or a cv::Ma

2020-05-16 08:08:30 -0600 commented question How do we matching the features on image with live camera and draw the rectangle?

Ok, I got it but there are some tricky part. You need to apply an homography to make the two image as have been acquired

2020-05-15 05:47:19 -0600 commented answer Find average distance between 2 matched keypoints (after using findHomography() mask) c++

If you don't mind please mark my reply as correct answer to help who's looking at the same thing. Thank you!

2020-05-15 05:46:49 -0600 edited answer Find average distance between 2 matched keypoints (after using findHomography() mask) c++

What you're doing is completely fine. You just need to answer to this: which distance you would like to use? There are t

2020-05-15 02:55:39 -0600 answered a question Find average distance between 2 matched keypoints (after using findHomography() mask) c++

What you're doing is completely fine. You just need to answer to this: which distance you would like to use? There are t

2020-05-12 05:04:25 -0600 commented question Android+CV4.3.0: Why did NDK run 50% slower to detect the faces??

Have you compiled it with the RELEASE flag instead of the DEBUG flag?

2020-05-11 07:51:49 -0600 marked best answer Residual error from fundamental matrix

Hi guys,

as in the previous topics I made I'm still working on self calibration stuff. I'm generating the data for the evaluation but I end out with some strange error computing the residual error as defined here slide 31. But maybe I'm using the wrong function to compute the norm. The resulting residual error is absurd, while the epipolar equation x'Fx=0 give to me a residual of 0.25 so I suppose is almost perfect.

I've points correspondences for image L and R and the fundamental matrix. Actually I'm doing in this way, I don't care that it isn't efficient since is not important, is just for data generation.

 for(int i=0; i<maskInliers.rows; i++)
 {
    if((uchar)maskInliers.at<uchar>(i) == 1)
    {   
        inliersL.push_back(featuresL.at(i));
        inliersR.push_back(featuresR.at(i));

        cv::Mat temp_point_1 = cv::Mat(3,1,CV_64F);
        temp_point_1.at<double>(0,0) = featuresL.at(i).x;
        temp_point_1.at<double>(1,0) = featuresL.at(i).y;
        temp_point_1.at<double>(2,0) = 1;

        cv::Mat temp_point_2 = cv::Mat(3,1,CV_64F);
        temp_point_2.at<double>(0,0) = featuresR.at(i).x;
        temp_point_2.at<double>(1,0) = featuresR.at(i).y;
        temp_point_2.at<double>(2,0) = 1;

        /*******************************
        * COMPUTING THE F RESIDUALS
        *******************************/
        //Epipolar equation x'Fx=0
        cv::Mat tempResF = temp_point_2.t()*fundamentalMat*temp_point_1;
        residualF += fabs(tempResF.at<double>(0,0));

        //Residual error
        double resError = cv::norm(temp_point_2-(fundamentalMat*temp_point_1)) + 
                     cv::norm(temp_point_1-(fundamentalMat.t()*temp_point_2));
        residualF_error += resError;
     }
 }

I would like to find the residual error, is there any built in function to do that? I've looked on the documentation but I've not find it.

EDIT: the result I'm getting are the following:

Residual of F 0.250138
Mean residual of F 0.0039084
F RESIDUAL ERROR: 65237.2

where:

  • Residual of F is computed using the epipolar geometry x'Fx=0
  • mean error is the previous value divided by the number of inliers used for estimating the fundamental matrix
  • The last one (F RESIDUAL ERROR) is the one that is wrong and that I'm asking about
2020-05-11 07:51:34 -0600 answered a question Residual error from fundamental matrix

I finally solved this problem using the code from findFundamentalMat as suggested by @eduardo in his question and answer

2020-05-10 15:26:23 -0600 commented question Eyes bags removal using OpenCV ?

With OpenCV you have the tools to manipulate and do whatever you want with images. You have the tools, the knowledge sho

2020-05-10 15:23:21 -0600 received badge  Associate Editor (source)
2020-05-10 15:23:21 -0600 edited answer Mat to Eigen, eigen2cv and cv2eigen errors

I'll reply to myself because I've done some very stupid errors. In the second part of the code I wrote: cv::Mat U_Open

2020-05-10 15:22:22 -0600 answered a question OpenCV(3.4.2) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:356: error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow

It can't open the image correctly. Check if the path is correct and the file exist. The error is very easy to be unders

2020-05-10 09:56:06 -0600 marked best answer Mat to Eigen, eigen2cv and cv2eigen errors

Dear guys,

I'm trying to solve SVD using the Eigen library, since I'm trying to solve one of the biggest error I've got so far in retrieving the fundamental matrix (here the link)

I'm using OpenCV 3.x and I can't compile OpenCV from sources with Eigen and/or LAPACK support, so I downloaded the Eigen library and putted under usr/local/include. No problem so far, I can see Eigen function and variables, so the linker and compiler are ok with that, I suppose. So, since I'm interesting in SVD and since I mostly use OpenCV for my stuff, I would like to write a function that directly compute the SVD for me. I've seen that there are a lot of possibilities to make cv::Mat working as Eigen::Matrix and vice-versa. What I would like is a function that do that:

int runEigenSVD(cv::InputArray _mat,
    cv::OutputArray _U, cv::OutputArray _S, cv::OutputArray _V,
    unsigned int QRPreconditioner,
    unsigned int computationOptions)

I'm not even able to compile since using different approaches I always get different errors. I obtain the input matrix with cv::Mat inputMat = _mat.getMat();, so suppose mat as my input matrix, always.

First try:

//OpenCV-> Eigen: it works!
 Eigen::Map<Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>>
            mat_Eigen(inputMat.ptr<double>(), mat.rows, mat.cols);

//Executing Eigen stuff, here SVD
 Eigen::JacobiSVD<Eigen::MatrixXd, Eigen::FullPivHouseholderQRPreconditioner> 
            svd(mat_Eigen, Eigen::ComputeThinU | Eigen::ComputeThinV);

//Eigen -> OpenCV
 int U_row = svd.matrixU().rows();
 int U_cols = svd.matrixU().cols();
 cv::Mat U_OpenCV(U_row, U_cols, CV_64FC1, svd.matrixU().data());

The errors I got are in the last line:

invalid conversion from ‘const void’ to ‘void’ [-fpermissive]

no matching function for call to ‘cv::Mat::Mat(int&, int&, int, const Scalar*)’

Using eigen2cv and cv2eigen

I got always error, using both function, even with simple code like this one:

cv::Mat_<float> a = Mat_<float>::ones(2,2);
Eigen::Matrix<float,Eigen::Dynamic,Eigen::Dynamic> b;
cv::cv2eigen(a,b);

The error I get is:

Invalid arguments ' Candidates are:

void eigen2cv(const ? &, cv::Mat &)

void eigen2cv(const ? &, cv::Matx<#0,int3 #1 0,int3 #2 0> &)'

Any suggestion? The documentation regarding it is like... nothing and it's incredible that nobody else have done it so far!!

EDIT ## I'm able to map from Mat to Eigen, but still find no way to map it back without the use of for-loop

2020-05-10 09:56:06 -0600 received badge  Scholar (source)
2020-05-10 09:55:52 -0600 answered a question Mat to Eigen, eigen2cv and cv2eigen errors

I'll reply to myself because I've done some very stupid errors. In the second part of the code I wrote: cv::Mat U_Open

2020-05-10 09:27:32 -0600 edited answer How to automatically align an image using OpenCV in Python

You should define what is aligned from the algorithm point of view. For us, aligned means that the writing of the coins

2020-05-10 09:14:03 -0600 commented answer How to automatically align an image using OpenCV in Python

The feature detection and matching are very common tasks, there are a LOT of tutorials. You just need to understand basi

2020-05-09 10:12:14 -0600 answered a question How to align images of a known object with a 3D model of that object using opencv?

This task is addressed as a augmented reality. There are several tutorial and articles on the web, I suggest you to star

2020-05-09 09:58:00 -0600 commented question How do we matching the features on image with live camera and draw the rectangle?

Ciao, bel libro! (for english reader is just "hello, nice book!) Can you provide an example of the result that you expe

2020-05-09 09:55:14 -0600 answered a question How does the Sobel operator handle gradients over 255?

You need to take care about it. From the documentation of Sobel function you can see that the third argument is ddepth t

2020-05-09 09:48:58 -0600 edited answer How to automatically align an image using OpenCV in Python

You should define what is aligned from the algorithm point of view. For us, aligned means that the writing of the coins

2020-05-09 09:47:11 -0600 answered a question How to automatically align an image using OpenCV in Python

You should define what is aligned from the algorithm point of view. For us, aligned means that the writing of the coins