Changeset 143 in flair-src for trunk/lib


Ignore:
Timestamp:
Feb 21, 2017, 4:37:58 PM (8 years ago)
Author:
Bayard Gildas
Message:

Plop

Location:
trunk/lib/FlairVisionFilter/src
Files:
2 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}
  • trunk/lib/FlairVisionFilter/src/OpticalFlowSpeed.h

    r122 r143  
    3131    * \brief Optical flow speed calculation
    3232    *
    33     * Speed is the mean of all optical flow values.
     33    * Speed is the mean of all optical flow values divided by the delta time between images.
    3434    */
    3535    class OpticalFlowSpeed : public core::IODevice
     
    6767            * \brief Output matrix
    6868            *
    69             * Matrix is of sze (2,1). \n
     69            * Matrix is of size (2,1). \n
    7070            * First line is speed along x axis. \n
    7171            * Second line is speed along y axis. \n
Note: See TracChangeset for help on using the changeset viewer.