Ignore:
Timestamp:
02/21/17 16:37:58 (5 years ago)
Author:
Bayard Gildas
Message:

Plop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairVisionFilter/src/OpticalFlowSpeed.cpp

    r122 r143  
    4949
    5050    input->GetMutex();
    51     for(int i=0;i<input->NbFeatures();i++)
    52     {
    53         if(input->FoundFeature()[i]!=0)
    54         {
     51    for(int i=0;i<input->NbFeatures();i++) {
     52        if(input->FoundFeature()[i]!=0) {
    5553            deplx+=input->PointsB()[i].x-input->PointsA()[i].x;
    5654            deply+=input->PointsB()[i].y-input->PointsA()[i].y;
     
    5957    }
    6058    input->ReleaseMutex();
     59    Time deltaT=data->DataTime()-output->DataTime();
     60    output->SetDataTime(data->DataTime());
    6161
    62     if(nb_depl!=0)
    63     {
    64         output->SetValue(0,0,deplx/nb_depl);
    65         output->SetValue(1,0,deply/nb_depl);
     62    if(nb_depl!=0) {
     63        output->SetValue(0,0,deplx/(nb_depl*deltaT)*1000*1000*1000);
     64        output->SetValue(1,0,deply/(nb_depl*deltaT)*1000*1000*1000);
    6665    }
    6766
    68     output->SetDataTime(data->DataTime());
    6967    ProcessUpdate(output);
    7068}
Note: See TracChangeset for help on using the changeset viewer.