Ask Your Question

Metalzero2's profile - activity

2020-09-16 17:09:09 -0600 received badge  Popular Question (source)
2019-09-03 21:23:54 -0600 received badge  Famous Question (source)
2019-06-26 08:33:40 -0600 received badge  Critic (source)
2018-02-22 17:34:45 -0600 received badge  Notable Question (source)
2017-07-19 01:23:45 -0600 received badge  Popular Question (source)
2016-03-15 08:01:05 -0600 received badge  Notable Question (source)
2015-09-10 07:17:38 -0600 received badge  Enthusiast
2015-09-09 06:38:01 -0600 commented question When loading KeyPoint from XML, the class_id is lost

@LBerger Is there some bug report ?

2015-09-08 22:46:44 -0600 asked a question When loading KeyPoint from XML, the class_id is lost

Hello all,

When I use point extractor (specifically I use AKAZE but it is similar to SIFT) I use the FileStorage to save it in a .XML file. After I extract the points, I manually give each point a class_id. Later on I save it in a xml file. After it is saved, I look at the xml file and everything is saved correctly. Then I try to load it and everything loads correctly except the class_id. I manually checked everything and only the class_id is wrong. Not only it is wrong but far exceeds the limits of a int (which the class_id is). For example

  • I saved class_id = 1 and when I load it I get class_id = 1065353216
  • I saved class_id = 2 and when I load it I get class_id = 1073741824
  • I saved class_id = 3 and when I load it I get class_id = 1077936128

Here is the code of how I load it

vector<KeyPoint> temp_kpts;
FileStorage fs("Myfile.xml", FileStorage::READ);
fs["KeyPoints_1"] >> temp_kpts;
cout<<"KeyPoitn ID is --> "<< temp_kpts[0].class_id <<endl;
cout<<"KeyPoitn ID is --> "<< temp_kpts[1].class_id <<endl;
cout<<"KeyPoitn ID is --> "<< temp_kpts[2].class_id <<endl;
fs.release();

Does anybody know what is going on?

2015-08-27 19:41:12 -0600 received badge  Supporter (source)
2015-07-22 03:38:23 -0600 received badge  Popular Question (source)
2015-06-28 06:52:28 -0600 received badge  Student (source)
2015-05-12 18:43:19 -0600 asked a question What do "KeyPoint" contain when used with 2D feature detectors

Hello all,

I was playing around with 2D feature detection algorithms, like AKAZE, ORB, SIFT and SURF.

After a little bit I wanted to see the coordinates of the features found. But when I saw the "KeyPoint" in which the features where saved, I saw that they are float. Of course this is logical (if we look here). But on the other hand, the Mat (that had the original image) has integer numbers to represent the coordinates of each pixel.

My question is, what do these Float numbers mean?? When "KeyPoint.pt.x == 2.5" does this mean the centre of the point is in between pixel 2 and 3?

Hope I was able to express it correctly.

2015-04-17 04:18:03 -0600 commented answer FLANN error in OpenCV 3

@Eduardo I do understand the theory but I cant implement this. I created the "matcher" in the way to suggested but what function of the object will find the matches? With my code I used "matcher.match(...)", what do I use now?

2015-04-16 14:18:25 -0600 asked a question FLANN error in OpenCV 3

Hello all, I am running Ubuntu 14.04. I am trying to run FLANN with openCV 3 but I get an error.

After I use ORB to find points, I use the following code to find matches:

  FlannBasedMatcher matcher;
  std::vector< DMatch > matches;
  matcher.match( descriptors_1, descriptors_2, matches );

The code builds fine and everything. When I run the code I get this error:

OpenCV Error: Unsupported format or combination of formats (type=0
) in buildIndex_, file /home/jim/opencv/modules/flann/src/miniflann.cpp, line 315
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/jim/opencv/modules/flann/src/miniflann.cpp:315: error: (-210) type=0
 in function buildIndex_

Aborted (core dumped)

Can anybody tell me why? Is it something with OpenCV 3 being in BETA state? Is there an alternative to FLANN (expect BFMetcher)

2014-11-28 07:37:47 -0600 asked a question Error: build did not find imgproc in OpenCV 3

Hello there,

I am trying to install openCV 3 from source. The prossece I did is as followed:

1) Down load source from github 2) Use CMake (GUI) to generate Unix Makefiles in a build directory where the source code is 3) Open the terminal and write "Sudo make"

Then at around 27% it writes this:

Linking CXX shared library ../../lib/libopencv_imgproc.so
/usr/bin/ld: ../../../3rdparty/ippicv/unpack/ippicv_lnx/lib/ia32/libippicv.a(jmp_ippiResizeGetBufferSize_16s_as.s.o): relocation R_386_GOTOFF against undefined symbol `ippicvJumpIndexForMergedLibs' can not be used when making a shared object
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
make[2]: *** [lib/libopencv_imgproc.so.3.0.0] Error 1
make[1]: *** [modules/imgproc/CMakeFiles/opencv_imgproc.dir/all] Error 2
make: *** [all] Error 2

I think it can't find the module for some reason.

Can anybody help? I am using lubuntu 14.04

2014-09-13 09:50:48 -0600 commented question Double installation of OpenCV 2.4.9

@JewelCV What do you mean to change the OpenCV_INCLUDE_DIRS? You meant when I built OpenCV? What should I change it to?

2014-09-12 07:04:35 -0600 received badge  Editor (source)
2014-09-12 06:36:22 -0600 asked a question Double installation of OpenCV 2.4.9

So let me start from the beggining.

I used to have Ubuntu 12.04 and OpenCV 2.4.8. I made some programes back then and have saved them. I am now using Ubuntu 14.04 64-bit and installed OpenCV2.4.9. I installed OpenCV 2.4.9 and most of the programmes I had worked just fine. Then I was trying to use ROS but got an error when trying to use the nonfree module (although out of ROS it worked find). I could not find any help so I tried to uninstall and re install OpenCV2.4.9.

I uninstalled OpenCV by going to the build I made and running "make uninstall". It ran fine and I thought it was uninstalled. I when and installed opencv 2.4.9 again (by using the CMake and source from sourceforce.net).

Now look what I have:

1)in "/usr/include/opencv2" I have all the modules (folders with .h and .hcc files in them) except "nonfree" and "viz"

2)in "/usr/local/include/opencv2" I have all modules in there (+ nonfree and viz)

3)in "/usr/local/lib" I can find the "linker name", "soname" and "real name" for opencv. For example I see "libopencv_nonfree.so", "libopencv_nonfree.so.2.4" and "libopencv_nonfree.so.2.4.9". How can I be sure they are looking at the correct place?

The thing is that when I run code it is looking that the /usr/include/opencv2 location. I think this to be true because after I thought I uninstalled opencv I when and installed opencv a again (the second time). I did something wrong and the folders in /usr/local/include/opencv2 was there with folders that had the modules name but with no code in them (I found this out later). Although OpenCV was not installed right the second time, the code that did not include nonfree in it, was able to run fine (when I tried). Then I installed it correctly and now I have openCV installed in two places (as I said above).

I want to get read of the code from one place and keep it in the second place with the nonfree module included. What can I do to fix this problem? Where is it better for the code to be installed in?

2014-09-12 04:45:47 -0600 commented question ROS: OpenCV SURF is there but can't be found

@berak Now it is installed and I can see the nonfree folder. I guess I did bad when I uninstaled it. We are getting way sidetracked from the main topic. I will make a new post so I can say with more detail what I did and what is going on now. Thanks for tying to help me :)

2014-09-12 03:48:38 -0600 commented question ROS: OpenCV SURF is there but can't be found

@berak about 3 comments ago you ask about the version. Yes I am sure it is 2.4.9. I got it from http://sourceforge.net and the folder that I download says 2.4.9 .

I am using the "Makefile.txt" that linux uses. I was just asking because I think I read ones that "making" the program again can create problems. I will try to run it again and hope that it will work now.

2014-09-12 03:23:38 -0600 commented question ROS: OpenCV SURF is there but can't be found

@berak I don't remember any error messages or any special output. I am not sure now if there was anything in particular. If I use CMake to build it again and then "make" the library again, will that make any problems or will it just add anything that is not where is should be?

2014-09-11 17:31:37 -0600 commented question ROS: OpenCV SURF is there but can't be found

@berak I'm sorry for being annoying but I am really trying to understand what is going on. Not so good with this stuff yet.

I am using the GUI CMake. I download the source and build it. When I build it, the option "BUILD_opencv_nonfree" is selected (it is true). What do you mean to check what is selected and how to change it?

2014-09-11 17:10:38 -0600 commented question ROS: OpenCV SURF is there but can't be found

@berak the thing is I am trying to use the nonfree module in a openCV project (nothing to do with ROS) and I can't now. I reinstalled OpenCV and I guess that made the problem. But now I can see the nonfree module does not exist at all. How can I add it now to my OpenCV library ?

2014-09-11 16:56:29 -0600 asked a question Get wrong version from pkg-config --modversion opencv

When I run the command "pkg-config --modversion opencv", I get "2.4.8". The thing is that I have installed 2.4.9. Why is this returning wrong version?

2014-09-11 16:19:11 -0600 commented question ROS: OpenCV SURF is there but can't be found

@berak hey there. I was looking for the OpenCV folder I found something interesting. I have ubuntu 14.04 and went to /usr/include/opencv2 and saw that I am missing two modules (according to the OpenCV 2.4.9 documentation). There where no folders named "nonfree" and "viz". Probably this is my problem. Any idea how to fix this? How can I add them to my system?

I remember that when I build openCV I included in the options the nonfree module, for sure :/ .

2014-09-11 06:15:01 -0600 commented question ROS: OpenCV SURF is there but can't be found

@berak I did what you said but now I get new error /usr/bin/ld: cannot find -lopencv_nonfree collect2: error: ld returned 1 exit status now what? why am I missing only opencv_nonfree and not any other lib?

2014-09-09 15:20:45 -0600 asked a question ROS: OpenCV SURF is there but can't be found

I was able to run OpenCV with ROS. I have run basic things (like loading images, getting video stream ect) but I am trying to run SURF or SIFT and I get this error:

Linking CXX executable /home/jim/ROS/catkin_ws/devel/lib/opencv_ros/open
CMakeFiles/open.dir/src/open.cpp.o: In function `main':
open.cpp:(.text+0x15b): undefined reference to `cv::SURF::SURF(double, int, int, bool, bool)'
CMakeFiles/open.dir/src/open.cpp.o: In function `cv::SURF::~SURF()':
open.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0xe): undefined reference to `vtable for cv::SURF'
open.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x26): undefined reference to `vtable for cv::SURF'
open.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x2e): undefined reference to `vtable for cv::SURF'
open.cpp:(.text._ZN2cv4SURFD1Ev[_ZN2cv4SURFD1Ev]+0x3b): undefined reference to `VTT for cv::SURF'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/jim/ROS/catkin_ws/devel/lib/opencv_ros/open] Error 1
make[1]: *** [opencv_ros/CMakeFiles/open.dir/all] Error 2
make: *** [all] Error 2
Invoking "make" failed

The project name is "opencv_ros" and the code is in "open.cpp". I have include these headers:

#include <stdio.h>
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/nonfree/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/nonfree/nonfree.hpp"

the thing is that when I run the same code in my c++ IDE (code::blocks) it runs just fine. I even found the header file and saw that it's in the correct place (according to the include I gave).

In the ROS ask website, they told me that I am doing something wrong with OpenCV and the make file. They said I should ask here for help. Here is my CMakeLists.txt :

cmake_minimum_required(VERSION 2.8.3)
project(opencv_ros)

find_package(catkin REQUIRED COMPONENTS
  cv_bridge
  image_transport
  roscpp
  sensor_msgs
  std_msgs
)

catkin_package(  CATKIN_DEPENDS cv_bridge image_transport roscpp sensor_msgs std_msgs )

include_directories(${catkin_INCLUDE_DIRS})

add_executable(open src/open.cpp)
target_link_libraries(open ${catkin_LIBRARIES} ${OpenCV_LIBRARIES})
add_dependencies(open opencv_ros_generate_messages_cpp)

I am running ubuntu 14.04 64bit on Indigo with OpenCV 2.4.9 .

Why cant it find SURF or SIFT in ROS?

2014-03-23 13:21:47 -0600 asked a question problem with "cornerHarris"

I am trying to run the example from the openCV website ( http://docs.opencv.org/doc/tutorials/features2d/trackingmotion/harris_detector/harris_detector.html ) but I get this error message:

OpenCV Error: Assertion failed (src.type() == CV_8UC1 || src.type() == CV_32FC1) in cornerEigenValsVecs, file /home/metalzero2/opencv/opencv/modules/imgroc/src/corner.cpp, line 259 terminate called after throwing an instance of 'cv::Exception' what(): /home/metalzero2/opencv/opencv/modules/imgproc/src/corner.cpp:259: error: (-215) src.type() == CV_8UC1 || src.type() == CV_32FC1 in function cornerEigenValsVecs

I'm running on Ubuntu 12.04 64-bit on a laptop what is going on?