Track-mate独特的条形码阅读

时间:2018-02-17 12:45:20

标签: java tags issue-tracking video-tracking

我有一个我希望在轨道配合上运行的程序

轨道配合系统通过连接到PC的网络摄像头识别对象。我们将网络摄像头放在树脂玻璃板(一个为儿童保存的透明表面)下,以跟踪条形码并将数字反馈返回给轨道配合...

条形码以String格式保存在数据库中,但我们的问题是每次在表面上移动对象时条形码读数都不同,这使得它对于确切的对象不是唯一的。 我们可以做些什么来解决这个问题?

节目来源:

//LusidOSC a layer that reads tags from a webcam and send the result to any application 
    public LusidOSCJavaApp(){
            // create the client, on port 3333.
            lusidClient = new LusidClient(this, 3333);
            System.out.println("lusid osc java app ");
            System.out.println(View.getisRunning());
            while(View.getisRunning()){//SOME CODE TO DO}

    // ---------------------------------------------------------------
        // these methods are called whenever a LusidOSC event occurs.


        // called when an object is added to the scene
        public void addLusidObject(LusidObject lObj) {
            System.out.println("add lusid object");

        //when object is added we add an instance of the object to lusidObj arraylist 
       lusidArr.add(lObj);

          //The problem is here because the ID isn't unique (but it should be unique...)
       if(lObj.getUniqueID().equals("0x111111AA1111"))  {
          System.out.println("you put the right shape");}
            else{
         System.out.println("error");}

         System.out.println("add object: "+lObj.getUniqueID());
         System.out.println("  location = 
         ("+lObj.getX()+","+lObj.getY()+","+lObj.getZ()+")");
           System.out.println("  rotation = 
        ("+lObj.getRotX()+","+lObj.getRotY()+","+lObj.getRotZ()+")");
           System.out.println("data = 
          ("+lObj.getEncoding()+","+lObj.getData()+")");
         System.out.println("#######################################");
         System.out.println(lusidArr.size());

        }

    // called when an object is removed from the scene
        public void removeLusidObject(LusidObject lObj) {
            lusidArr.remove(lObj);
            System.out.println("remove object: "+lObj.getUniqueID());
        }

        // called when an object is moved
        public void updateLusidObject (LusidObject lObj) {
            //System.out.println("update object: "+lObj.getUniqueID());

    ArrayList<LusidObject> currentLusidList = new ArrayList<LusidObject>
    (Arrays.asList(lusidClient.getLusidObjects()));

下载链接+来源:Trackmate

0 个答案:

没有答案