Ask Your Question

Cristina's profile - activity

2019-04-17 11:45:14 -0500 received badge  Notable Question (source)
2017-04-14 01:47:50 -0500 received badge  Taxonomist
2017-04-06 06:46:48 -0500 received badge  Popular Question (source)
2012-12-06 15:23:01 -0500 commented question error LNK2019 with OpenCV e ARuco

I've been googling it for hours and this kind of error refers to LINKER.. So I should link the aruco libraries to Linker, but there aren't .lib files in the package that I downloaded.

2012-12-06 12:47:28 -0500 asked a question error LNK2019 with OpenCV e ARuco

HI! I have a problem with Aruco Library. I downloaded Aruco from here: http://sourceforge.net/projects/aruco/ I'm on win7 x64 and I use VS2010. I wrote this simple code:

#include <iostream>
#include <stdio.h>
#include <string>   // for strings
#include <iomanip>  // for controlling float print precision
#include <sstream>  // string to number conversion
#include "C:/Users/Cristina/Desktop/OpenCV/dep/aruco/src/aruco.h"
#include "C:/Users/Cristina/Desktop/OpenCV/dep/aruco/src/cvdrawingutils.h"
#include "C:/Users/Cristina/Desktop/OpenCV/dep/aruco/src/cameraparameters.hpp"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/include/opencv/cv.h"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/include/opencv/highgui.h"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/imgproc/include/opencv2/imgproc/imgproc.hpp"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/highgui/include/opencv2/highgui/highgui.hpp"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/core/include/opencv2/core/core.hpp"

using namespace cv;
using namespace aruco;

int main() {

    aruco::CameraParameters CamParam;
    aruco::MarkerDetector MDetector;
    vector <Marker> Markers;
    cv::Mat img;

    img = imread("prova marker", 0);

    cv::namedWindow("originale", 1);
    cv::namedWindow("risultato", 1);

    cv::Mat risultato;

    img.copyTo(risultato);

    MDetector.detect(img, Markers, CamParam, -1);

    for (int i=0; i< Markers.size(); i++) {

        Markers[i].draw(risultato, Scalar(0,0, 255));
    }

    cv::imshow("originale", img);
    cv::imshow("risultato", risultato);
    waitKey(0);

return 0;
}

But, when a click on Debug button, i receive a lot of warnings e this errors:

1>------ Inizio compilazione: Progetto: aruco marker, Configurazione: Debug Win32 ------
1>main.obj : error LNK2019: riferimento al simbolo esterno "public: __thiscall aruco::MarkerDetector::~MarkerDetector(void)" ([email protected]@@[email protected]) non risolto nella funzione _main
1>main.obj : error LNK2019: riferimento al simbolo esterno "public: void __thiscall aruco::Marker::draw(class cv::Mat &,class cv::Scalar_<double>,int,bool)const " ([email protected]@[email protected]@[email protected]@@[email protected]@[email protected][email protected]) non risolto nella funzione _main
1>main.obj : error LNK2019: riferimento al simbolo esterno "public: void __thiscall aruco::MarkerDetector::detect(class cv::Mat const &,class std::vector<class aruco::Marker,class std::allocator<class aruco::Marker> > &,class aruco::CameraParameters,float,bool)" ([email protected]@[email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@@[email protected]@[email protected]@[email protected]) non risolto nella funzione _main
1>main.obj : error LNK2019: riferimento al simbolo esterno "public: __thiscall aruco::CameraParameters::CameraParameters(class aruco::CameraParameters const &)" ([email protected]@@[email protected]@@Z) non risolto nella funzione _main
1>main.obj : error LNK2019: riferimento al simbolo esterno "public: __thiscall aruco::MarkerDetector::MarkerDetector(void)" ([email protected]@@[email protected]) non risolto nella funzione _main
1>main.obj : error LNK2019: riferimento al simbolo esterno "public: __thiscall aruco::CameraParameters::CameraParameters(void)" ([email protected]@@[email protected]) non risolto nella funzione _main
1>C:\Users\Cristina\Desktop\OpenCV\Progetti\MIEI PROGETTI\aruco marker\Debug\aruco marker.exe : fatal error LNK1120: 6 esterni non risolti
========== Compilazione: 0 completate, 1 non riuscite, 0 aggiornate, 0 ignorate ==========

I linked all possible opencv libraries (on linker-->input), but I have the same errors.

Can someone help me? Thanks.

2012-12-06 11:43:19 -0500 commented question error LNK2019 from C++ tutorial

Hi! I have a similar problem (error LNK2019: ....) and also I'm on win7 x64. How i can change (step by step) the project settings to x64??

Thanks!

2012-12-06 06:28:42 -0500 answered a question Feature Matching with FLANN - Exception on "nonfree_init.cpp"

no idea why this exception? I also linked the nonfree (static) library (Project --> property --> Linker --> input --> additional directives). May be the cause?

2012-12-04 06:34:28 -0500 commented answer Feature Matching with FLANN - Exception on "nonfree_init.cpp"

I changed it as you suggested, but the problem remains .. It doesn't come in the main function, because doesn't print my test string (printf("uff\n")).

2012-12-02 15:59:41 -0500 asked a question Feature Matching with FLANN - Exception on "nonfree_init.cpp"

HI! I'm new to OpenCV. I use opencv 2.4.3 with Visual Studio 2010 Express on Windows 7. To better understand OpenCV, I created a project on matching using SURF and FLANN. I just copied / pasted the code from the opencv tutorial.

I report my code:

#include <stdio.h>
#include <iostream>
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/core/include/opencv2/core/core.hpp"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/features2d/include/opencv2/features2d/features2d.hpp"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/highgui/include/opencv2/highgui/highgui.hpp"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/nonfree/include/opencv2/nonfree/features2d.hpp"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/nonfree/include/opencv2/nonfree/nonfree.hpp"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/nonfree/src/surf.cpp"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/nonfree/src/sift.cpp"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/nonfree/src/nonfree_init.cpp"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/calib3d/include/opencv2/calib3d/calib3d.hpp"
#include "C:/Users/Cristina/Desktop/OpenCV/opencv/modules/imgproc/include/opencv2/imgproc/imgproc.hpp"

using namespace std;
using namespace cv;

int main() 
{
  Mat img_1 = cvLoadImage( "box.png", CV_LOAD_IMAGE_GRAYSCALE );
  Mat img_2 = cvLoadImage( "box_in_scene.png", CV_LOAD_IMAGE_GRAYSCALE );

  namedWindow("Good Matches", CV_WINDOW_AUTOSIZE);
  imshow("Good Matches",img_1);
  namedWindow("Good Matches1", CV_WINDOW_AUTOSIZE);
  imshow("Good Matches1",img_2);

  if( !img_1.data || !img_2.data )
  { std::cout<< " --(!) Error reading images " << std::endl; 
  system("pause");
  return -1; }

  //-- Step 1: Detect the keypoints using SURF Detector

 cv::initModule_nonfree();
    int minHessian = 400;

  SurfFeatureDetector detector( minHessian );
  vector<KeyPoint> keypoints_1, keypoints_2;
        printf("arriva qui 1\n");

  detector.detect( img_1, keypoints_1);
        printf("arriva qui 2\n");
  detector.detect( img_2, keypoints_2 );

  //-- Step 2: Calculate descriptors (feature vectors)
  SurfDescriptorExtractor extractor;

  Mat descriptors_1, descriptors_2;
 extractor.compute( img_1, keypoints_1, descriptors_1 );
  extractor.compute( img_2, keypoints_2, descriptors_2 );

  //-- Step 3: Matching descriptor vectors using FLANN matcher
  FlannBasedMatcher matcher;
  std::vector< DMatch > matches;
  matcher.match( descriptors_1, descriptors_2, matches );

  double max_dist = 0; double min_dist = 100;

  //-- Quick calculation of max and min distances between keypoints
  for( int i = 0; i < descriptors_1.rows; i++ )
  { double dist = matches[i].distance;
    if( dist < min_dist ) min_dist = dist;
    if( dist > max_dist ) max_dist = dist;
  }
  printf("-- Max dist : %f \n", max_dist );
  printf("-- Min dist : %f \n", min_dist );

  //-- Draw only "good" matches (i.e. whose distance is less than 2*min_dist )
  //-- PS.- radiusMatch can also be used here.
  std::vector< DMatch > good_matches;

  for( int i = 0; i < descriptors_1.rows; i++ )
  { if( matches[i].distance < 2*min_dist )
    { good_matches.push_back( matches[i]); }
  }

  //-- Draw only "good" matches
  Mat img_matches;
  drawMatches( img_1, keypoints_1, img_2, keypoints_2,
               good_matches, img_matches, Scalar::all(-1), Scalar::all(-1),
               vector<char>(), DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS );

  //-- Show detected matches
  namedWindow("Good Matches2",CV_WINDOW_AUTOSIZE);
  imshow( "Good Matches2", img_matches );

  for( int i = 0; i < (int)good_matches.size(); i++ )
  { printf( "-- Good Match [%d] Keypoint 1: %d  -- Keypoint 2: %d  \n", i, good_matches[i].queryIdx, good_matches[i].trainIdx ); }

  waitKey(0); 
  return 0;
}

When I run my project, I get this exception about (I suppose) "nonfree_init.cpp" file: image description

(it seems to me that just does not come in the ... (more)

2012-12-02 15:10:27 -0500 commented answer Problems with ALL_BUILD (error with vs2010)

Thank you!

2012-12-02 14:09:54 -0500 received badge  Critic (source)
2012-12-02 14:09:42 -0500 received badge  Supporter (source)
2012-11-25 17:24:11 -0500 received badge  Editor (source)
2012-11-25 16:26:35 -0500 asked a question Problems with ALL_BUILD (error with vs2010)

H

HI! I'm new to OpenCV .. I installed OpenCV 2.4.3 on Windows 7 with Visual Studio 2010 Express from this guide: http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html

And everything went ok up to step 7. Here when I open the solution 'OpenCV' and I try to debug it, I get this error:

Unable to start program C:\Users\Cristina\Desktop\OpenCV\Progetti\Debug\ALL_BUILD Cannot find the specified file

The ALL_BUILD program is in: C:\Users\Cristina\Desktop\OpenCV\Progetti, so I copied it in C:\Users\Cristina\Desktop\OpenCV\Progetti\Debug, but I still get the same error.

Can someone help me??

Thanks in advance