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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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);
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?
Pooor guy nobody helped u out is there nyone here in the forum
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!!
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));
}
Small bug found in FFlow. Download the new version (3.51) and everything will be fine (I hope)