Standard

I’ve grown soft. Should be harsher on myself from now on

Advertisements

2 thoughts on “

  1. kakaluote

    Hello Saburo, I’m robot, I’m trying to compile and run the project (fast-match) code in VS2010.

    there are some error as follows:

    /* Convert each configuration to corresponding affine transformation matrix */
    tbb::parallel_for( 0, no_of_configs, 1, [&](int i) {
    Mat affine = configs[i].getAffineMatrix();

    /* Check if our affine transformed rectangle still fits within our boundary */
    Mat affine_corners = (affine * corners).t();
    affine_corners = affine_corners + transl;

    if( WITHIN( affine_corners.at(0), top_left, bottom_right) &&
    WITHIN( affine_corners.at(1), top_left, bottom_right) &&
    WITHIN( affine_corners.at(2), top_left, bottom_right) &&
    WITHIN( affine_corners.at(3), top_left, bottom_right) ) {

    affines[i] = affine;
    insiders[i] = true;
    }
    });

    OpenCV error:

    OpenCV Error: Assertion failed (dims <= 2 && data && (unsigned)i0 < (unsigned)(s
    ize.p[0]*size.p[1]) && elemSize() == (((((DataType::type) & ((512 – 1) 3) + 1) ((DataType::type)
    & ((1 << 3) – 1))*2) & 3))) in cv::Mat::at, file c:\eduardo\opencv-2.4.9\build3
    2\include\opencv2\core\mat.hpp, line 569

    My environment is Windows xp, OpenCV 2.4.11, TBB 4.0 and VS2010 with C++10.

    and then the function also error:
    FAsTMatch::evaluateConfigs( Mat& image, Mat& templ, vector& affine_matrices,Mat& xs, Mat& ys, bool photometric_invariance )
    {
    …..
    if(!photometric_invariance) {
    for( int j = 0; j < no_of_points; j++ ) {
    int target_x = int( a11 * xs_ptr_cent[j] + a12 * ys_ptr_cent[j] + tmp_1 ),
    target_y = int( a21 * xs_ptr_cent[j] + a22 * ys_ptr_cent[j] + tmp_2 );
    score += abs(vals_i1[j] – padded.at(target_y – 1, target_x – 1) );

    }
    if(!photometric_invariance) {
    for( int j = 0; j < no_of_points; j++ ) {
    int target_x = int( a11 * xs_ptr_cent[j] + a12 * ys_ptr_cent[j] + tmp_1 ),
    target_y = int( a21 * xs_ptr_cent[j] + a22 * ys_ptr_cent[j] + tmp_2 );
    score += abs(vals_i1[j] – padded.at(target_y – 1, target_x – 1) );

    there are some errors when run the “score += abs(vals_i1[j] – padded.at(target_y – 1, target_x – 1) );”

    can i send my project to you ?
    thanks a lot!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s