Ask Your Question

double's profile - activity

2017-06-14 15:37:29 -0600 asked a question How to use real_time_pose_estimation

Hi everyone,

I am trying to use real_time_pose_estimation module in https://github.com/opencv/opencv/tree...

I generated cpp-tutorial-pnp_detection and cpp-tutorial-pnp_registration and use these in my own object.

However, the result video always cannot generate the correct solution.

My 3D textured model of the object to be detected is shown following:

image description

image description

However, my results always cannot detect the object as following:

image description

Does there someone have experience that know the exact problem is? I will be appreciated for your ideas.

2017-06-14 14:46:00 -0600 commented question executable file of Opencv_contrib

Yes, I have installed all the dependencies shown in http://docs.opencv.org/3.1.0/db/db8/t...

2017-06-14 14:31:11 -0600 commented question executable file of Opencv_contrib

There is no cmake_cache.txt file in Opencv or Opencv_contrib

2017-06-14 13:47:01 -0600 asked a question executable file of Opencv_contrib

Hi everyone,

I am trying to use sfm module in Opencv_contrib.

I following instructions in https://github.com/opencv/opencv_contrib to make and install extra module. It was successful.

However, I cannot find any executable file like example_sfm_scene_reconstruction after sudo make install.

Meanwhile, when I try to cmake sfm module in opencv_contrib directly, it gives me the following error:

:~/opencv_contrib-3.2.0/modules/sfm/build$ cmake ..

-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.

-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.

-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.

-- Found installed version of Eigen: /usr/lib/cmake/eigen3

-- Found required Ceres dependency: Eigen version 3.2.92 in /usr/include/eigen3

-- Found required Ceres dependency: glog

-- Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.

-- Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.

-- Found required Ceres dependency: gflags

-- Found Ceres version: 1.13.0 installed in: /usr/local with components: [LAPACK, SuiteSparse, SparseLinearAlgebraLibrary, CXSparse, SchurSpecializations, OpenMP]

-- Checking SFM deps... TRUE

-- Module opencv_sfm disabled because the following dependencies are not found: Eigen

CMake Error at CMakeLists.txt:37 (ocv_module_disable): Unknown CMake command "ocv_module_disable".

CMake Warning (dev) in CMakeLists.txt:

No cmake_minimum_required command is present. A line of code such as

cmake_minimum_required(VERSION 3.5)

should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it.

-- Configuring incomplete, errors occurred!

See also "/home/rmal/opencv_contrib-3.2.0/modules/sfm/build/CMakeFiles/CMakeOutput.log".

See also "/home/rmal/opencv_contrib-3.2.0/modules/sfm/build/CMakeFiles/CMakeError.log".

Could someone give me some ideas? Any ideas will be appreciated.

2017-06-13 17:05:32 -0600 commented question Unable to run programs of SFM (Structure From Motion) module

I tried cmake -DEIGEN_INCLUDE_PATH=/usr/include/eigen3 -DEIGEN_INCLUDE_DIR=/usr/include/eigen3 .. and cmake -DOPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.2.0/modules -DEIGEN_INCLUDE_PATH=/usr/include/eigen3/ .. Both of them give me the same error :(

2017-06-13 15:26:34 -0600 commented question Unable to run programs of SFM (Structure From Motion) module

i already added set(EIGEN_INCLUDE_PATH ${EIGEN_INCLUDE_PATH} $/usr/include/eigen3) in line 26. But it still give me this error. I have checked /usr/include/eigen3, eigen3 exists.

2017-06-13 14:55:55 -0600 commented question Unable to run programs of SFM (Structure From Motion) module

I used opencv-3.2.0 and opencv_contrib-3.2.0. I also meet this error -- Module opencv_sfm disabled because the following dependencies are not found: Eigen CMake Error at CMakeLists.txt:35 (ocv_module_disable): Unknown CMake command "ocv_module_disable".

However, I already install Eigen 3.2.92

2017-06-13 14:31:19 -0600 commented question StructureFromMotion ExploringSfMExec to obtain 3D textured object

Thanks! I will think about it.

2017-06-13 14:22:58 -0600 commented question StructureFromMotion ExploringSfMExec to obtain 3D textured object

I will check this. Could this program store information in YAML file?

2017-06-13 14:10:41 -0600 asked a question StructureFromMotion ExploringSfMExec to obtain 3D textured object

Hi everyone,

I am using https://github.com/MasteringOpenCV/co... to 3D textured object. I run the code successfully and get the final 3D figure in Sfmtoykibrary Viewe window.

However, I want to obtain the 3D points and the descriptors stored in different lists in a file with YAML file.

I cannot find how to change the code in https://github.com/MasteringOpenCV/co... to obtain the results I want. Could anyone give me some ideas? Any suggestions is appreciate.

Thanks in advance.

2017-06-08 12:47:50 -0600 commented question cpp-tutorial-pnp_registration cannot detect object exactly

Moreover, even I use the original picture and ply file from opencv to obtain the yml file. The cpp-tutorial-pnp_detection give me the same result. So that means created yml file is not good enough to use.

2017-06-08 11:17:14 -0600 commented question cpp-tutorial-pnp_registration cannot detect object exactly

I have tried other objects with more pictures, but it still gives me the result.

2017-06-08 11:15:46 -0600 received badge  Enthusiast
2017-06-07 15:03:34 -0600 asked a question cpp-tutorial-pnp_registration cannot detect object exactly

Hi every one, I am using cpp-tutorial-pnp_registration (location is /opencv-3.2.0/samples/cpp/) to detect my object, then i am trying to use cpp-tutorial-pnp_detection to do Real Time pose estimation.

I have already build ply model of my object, but when I try to use cpp-tutorial-pnp_registration to build my yml model, it always cannot detect my object clearly according to the points I set.

My setting points (red points) are shown below:

image description

And it gives me the following result:

image description

When I run cpp-tutorial-pnp_detection, it cannot detect my object as following: image description

However, I do not know what the problem exactly is. Could anyone give me some ideas? I will be applicate for your help.

Thanks in advance.

2017-06-06 11:29:54 -0600 commented question cpp-tutorial-pnp_registration throw error

Yes, it fixed. Thanks! i will update it.

2017-06-05 14:56:34 -0600 received badge  Editor (source)
2017-06-05 14:55:53 -0600 commented question cpp-tutorial-pnp_registration throw error

I use ubuntu 16.04 and I can attach my screen shot of my pc.

2017-06-05 14:31:18 -0600 commented question cpp-tutorial-pnp_registration throw error

i check the picture in the window, it is black and does not show the box figure.

2017-06-05 14:27:29 -0600 commented question cpp-tutorial-pnp_registration throw error

Thanks for your quick reply. after I run ./cpp-tutorial-pnp_registration, the window is closed quickly and I don't have time to clic in the window.

2017-06-05 13:45:28 -0600 asked a question cpp-tutorial-pnp_registration throw error

Hi everyone,

I am trying to use cpp-tutorial-pnp_registration in opencv sample code whose location is /home/*/opencv-3.2.0/samples/cpp/tutorial_code/calib3d/real_time_pose_estimation/src/main_registration.cpp

I just try to use opencv original data resized_IMG_3875.JPG and box.ply to get textured 3D model (yml file), however, opencv throw the following error for me:

--------------------------------------------------------------------------
This program shows how to create your 3D textured model. 
Usage:
./cpp-tutorial-pnp_registration
--------------------------------------------------------------------------

init done
Click the box corners ...
Waiting ...
COMPUTING POSE ...
OpenCV Error: Assertion failed (npoints >= 0 && npoints == std::max(ipoints.checkVector(2, CV_32F), ipoints.checkVector(2, CV_64F))) in solvePnP, file /tmp/binarydeb/ros-kinetic-opencv3-3.2.0/modules/calib3d/src/solvepnp.cpp, line 63
terminate called after throwing an instance of 'cv::Exception'
  what():  /tmp/binarydeb/ros-kinetic-opencv3-3.2.0/modules/calib3d/src/solvepnp.cpp:63: error: (-215) npoints >= 0 && npoints == std::max(ipoints.checkVector(2, CV_32F), ipoints.checkVector(2, CV_64F)) in function solvePnP

Aborted (core dumped)

I am not sure what the problem is and could you give me some idea? Any idea will be appreciate.

Thanks in advance.

2017-06-01 13:45:48 -0600 commented question How to use cpp-tutorial-pnp_detection in real time camera

Yes, i think so. Thanks for quick reply

2017-06-01 13:20:29 -0600 asked a question How to use cpp-tutorial-pnp_detection in real time camera

Hi, I tried to use cpp-tutorial-pnp_detection in opencv sample code. I compile it successfully and can use in the box video, which is provided in opencv master. However, I know cpp-tutorial-pnp_detection can be used in real time camera but I cannot find information about how to use it. Has someone used in that way? Could you please give me some ideas?

Thanks in advance

2017-04-25 12:09:48 -0600 commented question OpenCV ROI on Real time camera

The camera shows nothing about the picture, looks like I didn't set ROI in the camera and I didn't input the picture.

2017-04-24 20:22:00 -0600 commented question OpenCV ROI on Real time camera

If i donot use cv::imshow("ir", irmat / 4500.0f); my ir information cannot change successfully.;At this moment, my ir information can be shown very well in real time camera. Additionally, I cannot understand why I should used maximum value of mat to set ROI? Could you please explain it more clearly? Thanks in advance

2017-04-24 16:54:34 -0600 asked a question OpenCV ROI on Real time camera

I am trying to set ROI in real time camera and copy a picture in the ROI. However, I tried many methods from Internet but it is still unsuccessful. Part of my code is shown below:

 while(!protonect_shutdown)
        {
         listener.waitForNewFrame(frames);   

         libfreenect2::Frame *ir = frames[libfreenect2::Frame::Ir];    

         cv::Mat(ir->height, ir->width, CV_32FC1,  ir->data).copyTo(irmat);
         Mat img = imread("button.png");
         cv::Rect r(1,1,100,200);
         cv::Mat dstroi = img(Rect(0,0,r.width,r.height));
         irmat(r).convertTo(dstroi, dstroi.type(), 1, 0);
         cv::imshow("ir", irmat / 4500.0f);

        int key = cv::waitKey(1);

        protonect_shutdown = protonect_shutdown || (key > 0 && ((key & 0xFF) == 27)); 

        listener.release(frames);
     }

My real time camera can show the video normally.

I used rectangle(irmat,r,Scalar(0,255,0),2); in my code, the rectangle can be shown successfully in the real time camera. But the picture is unsuccessful.

And no bugs in my program, but the picture cannot be shown in the ROI. Does anyone have some ideas? Any help is appreciate.