Menu

problems with FFlow

2004-10-07
2013-04-25
  • Nobody/Anonymous

    Hi,
    i tried to use the FFlow Class to get the optical flow of two pictures (Image) in a sequence.
    The result sequence has stored three pics, but no one works. Some are blue and some are black. Normal the result pic have to be blue, green and red.
    What format the input pics have to, and what format the outputsequence have?

     
    • Nobody/Anonymous

      Pooor guy nobody helped u out is there nyone here in the forum

       
      • Admin of JavaVis

        yes, someone is here. Sometimes I arrive late, sometimes I can't anwser (so much work for just one person). If anyone would like to help, is welcome!!

         
    • Nobody/Anonymous

      Hi,
      I can't help you because I have an other problem,
      I tried to use FFlow with a sequence, I followed all instructions of manual but the result frames are totally black because the images segment haven't any segment!!!!
      this is the code, help me if there is some error,
      thank you.

      JIPSequence seq= new JIPSequence();
      JIPSequence ris= new JIPSequence();
      FColorToGray gray= new FColorToGray(); gray.setParamValue("gray","BYTE");

      //this "for" create the object seq with tree image of BYTE type       
      for(int i=0;i<3;i++){
      int[] pixel=new int[160*120];
      boolean forceRGB = true;
      PixelGrabber g1 = new PixelGrabber(imgriv[i], 0, 0,160,120, forceRGB);
      try {
         if (g1.grabPixels()){
           pixel=(int[])g1.getPixels();
         }
        }catch (Throwable e) {
           e.printStackTrace();
          }
        JIPImage s= new JIPImage(160,120,JIP.tCOLOR,pixel);
        seq.addFrame(gray.processImg(s));
      }
             
      FOpenWindow window= new FOpenWindow();
           
      FSmoothGaussian gauss= new FSmoothGaussian();
      gauss.setParamValue("method","PAD");
      gauss.setParamValue("sigma",3);
             
      for(int i=0; i<3;i++){
        seq.setFrame(gauss.processImg(seq.getFrame(i)),i);
        }

      FFlow flow= new FFlow();
      ris=flow.processSeq(seq);
      FGeoToGray geo=new FGeoToGray();
      geo.setParamValue("gray","BYTE");
      ris.setFrame(geo.processImg(ris.getFrame(3)),3);
      ris.setFrame(geo.processImg(ris.getFrame(4)),4);
         
      for(int i=0; i<ris.getNumFrames();i++){
        window.processImg(ris.getFrame(i));
      }   

       
    • Admin of JavaVis

      Small bug found in FFlow. Download the new version (3.51) and everything will be fine (I hope)

       

Log in to post a comment.