Code Monkey home page Code Monkey logo

Comments (2)

xMutzelx avatar xMutzelx commented on August 31, 2024

I got it!
Here is my Code in linemod_detect.cpp in line 382:

/* Check every pixel of the image. CARE: rows cols world */
for(int i=0; i<depth_real_model_raw.cols; i++)
 {
    for(int j=0; j<depth_real_model_raw.rows;j++)
     {
        cv::Vec3f & pixel = depth_real_model_raw.at<cv::Vec3f>(j,i); 

                if(pixel[0]!=pixel[0] || pixel[1]!=pixel[1] || pixel[2]!=pixel[2])
                        std::cout<<"Pixel is not a number (NAN)"<<std::endl;

        else if(pixel[2]<0.1||pixel[2]>1.0)
            std::cout<<"Z-value is invalid"<<std::endl;

        else
             std::cout<<"This pixel contains valid data"<<std::endl;
    }
  }
std::cout<<"Match: "<<match.x<<" "<<match.y<<std::endl;

This x and y coordinates are inside the bounding box so you also have to translate them. Variable "match" contains the relevant informations (match.x and match.y).
There are still some problems with this solution. If the model doesn't fit the real world object perfectly some informations are lost. For me it is enough information, but if there is a better solution please let me know.

from linemod.

vrabaud avatar vrabaud commented on August 31, 2024

@nlyubova , any opinion on that?

from linemod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.