svlFilterImageCenterFinder::svlFilterImageCenterFinder() :
    svlFilterBase(),
    Smoothing(0.0),
    ThresholdLevel(10),
    MassRatio(50),
    LinkHorizontally(false),
    LinkVertically(true),
    EllipseFittingEnabled(false),
    EllipseFittingDrawEllipse(false),
    EllipseFittingSlices(32),
    EllipseFittingMode(0),
    EllipseFittingEdgeThreshold(100),
    EllipseFittingErrorThreshold(18),
    EllipseMaskEnabled(false),
    EllipseMaskSlices(32),
    EllipseMaskTransitionStart(0),
    EllipseMaskTransitionEnd(0),
    EllipseMargin(0),
    MaskImage(0),
    TransitionImage(0)
{
    AddInput("input", true);
    AddInputType("input", svlTypeImageRGB);
    AddInputType("input", svlTypeImageRGBStereo);

    AddOutput("output", true);
    SetAutomaticOutputType(true);
}
svlOSGImage::svlOSGImage() :
  svlFilterBase(),
  image( NULL ){
  
  AddInput("input", true);
  AddInputType("input", svlTypeImageMono8);
  AddInputType("input", svlTypeImageMono8Stereo);

}
svlOSGImage::svlOSGImage( float x, float y,  
			  float width, float height, 
			  osaOSGHUD* hud ):
  svlFilterBase(){
  
  AddInput("input", true);
  AddInputType("input", svlTypeImageMono8);
  AddInputType("input", svlTypeImageMono8Stereo);

  image = new svlOSGImage::Image( x, y, width, height, hud );
  image->svlImage = this;

}
svlFilterImageBlobTracker::svlFilterImageBlobTracker() :
    svlFilterBase(),
    OutputBlobs(0)
{
    AddInput("blobsmap", true);
    AddInputType("blobsmap", svlTypeImageMono32);
    AddInputType("blobsmap", svlTypeImageMono32Stereo);

    AddInput("blobs", false);
    AddInputType("blobs", svlTypeBlobs);

    AddOutput("blobsmap", true);
    SetAutomaticOutputType(true);

    AddOutput("blobs", false);
    SetOutputType("blobs", svlTypeBlobs);
}
svlFilterImageColorSegmentation::svlFilterImageColorSegmentation() :
    svlFilterBase(),
    OutputImage(0)
{
    AddInput("input", true);
    AddInputType("input", svlTypeImageRGB);
    AddInputType("input", svlTypeImageRGBStereo);

    AddOutput("output", true);

    // Calculate Square Root Look-up Table Normalized to 0-255
    const unsigned int len = 3 * 255 * 255;
    const unsigned int maxval = static_cast<unsigned int>(sqrt(static_cast<float>(len)));
    NormSqrtLUT.SetSize(len);
    for (unsigned int i = 0; i < len; i ++) {
        NormSqrtLUT[i] = 255 * static_cast<unsigned int>(sqrt(static_cast<float>(i))) / maxval;
    }
}
Exemple #6
0
CMyFilter1::CMyFilter1() :
    svlFilterBase()                                                       // Call baseclass' constructor
{                                                                         //
    AddInput("input", true);                                              // Create synchronous input connector
    AddInputType("input", svlTypeImageRGB);                               // Set sample type for input connector
                                                                          //
    AddOutput("output", true);                                            // Create synchronous ouput connector
    SetAutomaticOutputType(true);                                         // Set output sample type the same as input sample type
}
svlFilterImageWindow::svlFilterImageWindow() :
    svlFilterBase(),
    FullScreenFlag(false),
    PositionSetFlag(false),
    IsVisible(true),
    Thread(0),
    ThreadProc(0),
    WindowManager(0),
    EventHandler(0)
{
    CreateInterfaces();
    
    AddInput("input", true);
    AddInputType("input", svlTypeImageRGB);
    AddInputType("input", svlTypeImageRGBStereo);

    AddOutput("output", true);
    SetAutomaticOutputType(true);
}
svlFilterImageExposureCorrection::svlFilterImageExposureCorrection() :
    svlFilterBase(),
    Brightness(0.0),
    Contrast(0.0),
    Gamma(0.0)
{
    CreateInterfaces();
    
    AddInput("input", true);
    AddInputType("input", svlTypeImageRGB);
    AddInputType("input", svlTypeImageRGBStereo);
    AddInputType("input", svlTypeImageRGBA);
    AddInputType("input", svlTypeImageRGBAStereo);
    AddInputType("input", svlTypeImageMono8);
    AddInputType("input", svlTypeImageMono8Stereo);

// Might be added in the future
//    AddInputType("input", svlTypeImageMono16);
//    AddInputType("input", svlTypeImageMono16Stereo);
//    AddInputType("input", svlTypeImageMono32);
//    AddInputType("input", svlTypeImageMono32Stereo);

    AddOutput("output", true);
    SetAutomaticOutputType(true);
}
svlFilterVideoFileWriter::svlFilterVideoFileWriter() :
    svlFilterBase(),
    Action(false),
    ActionTime(0.0),
    TargetActionTime(0.0),
    IsRecording(false),
    TargetCaptureLength(-1), // Continuous saving by default?
    CaptureLength(-1),
    CodecsMultithreaded(false)
{
    AddInput("input", true);
    AddInputType("input", svlTypeImageRGB);
    AddInputType("input", svlTypeImageRGBStereo);

    AddOutput("output", true);
    SetAutomaticOutputType(true);

    UpdateCodecCount(2);

    TimeServer = new osaTimeServer;
    TimeServer->SetTimeOrigin();
}
svlFilterImageResizer::svlFilterImageResizer() :
    svlFilterBase(),
    OutputImage(0)
{
    CreateInterfaces();

    AddInput("input", true);
    AddInputType("input", svlTypeImageRGB);
    AddInputType("input", svlTypeImageMono8);
    AddInputType("input", svlTypeImageRGBStereo);
    AddInputType("input", svlTypeImageMono8Stereo);
//  TO DO:
//    svlTypeImageMono16 and svlTypeImageMono16Stereo
//    svlTypeImageMono32 and svlTypeImageMono32Stereo

    AddOutput("output", true);
    SetAutomaticOutputType(true);

    for (unsigned int i = 0; i < 2; i ++) {
        WidthRatio[i] = HeightRatio[i] = 1.0;
        Width[i] = Height[i] = 0;
    }
    InterpolationEnabled = false;
}
svlFilterCapFramerate::svlFilterCapFramerate() :
svlFilterBase(),
    TimeForLastFrame(0.0)
{
    AddInput("input", true);
    AddInputType("input", svlTypeImageRGB);
    AddInputType("input", svlTypeImageRGBA);
    AddInputType("input", svlTypeImageRGBStereo);
    AddInputType("input", svlTypeImageRGBAStereo);
    AddInputType("input", svlTypeImageMono8);
    AddInputType("input", svlTypeImageMono8Stereo);
    AddInputType("input", svlTypeImageMono16);
    AddInputType("input", svlTypeImageMono16Stereo);
    AddInputType("input", svlTypeImageMono32);
    AddInputType("input", svlTypeImageMono32Stereo);
    AddInputType("input", svlTypeImage3DMap);
    AddInputType("input", svlTypeCUDAImageRGB);
    AddInputType("input", svlTypeCUDAImageRGBA);
    AddInputType("input", svlTypeCUDAImageRGBStereo);
    AddInputType("input", svlTypeCUDAImageRGBAStereo);
    AddInputType("input", svlTypeCUDAImageMono8);
    AddInputType("input", svlTypeCUDAImageMono8Stereo);
    AddInputType("input", svlTypeCUDAImageMono16);
    AddInputType("input", svlTypeCUDAImageMono16Stereo);
    AddInputType("input", svlTypeCUDAImageMono32);
    AddInputType("input", svlTypeCUDAImageMono32Stereo);
    AddInputType("input", svlTypeCUDAImage3DMap);
    AddInputType("input", svlTypeMatrixInt8);
    AddInputType("input", svlTypeMatrixInt16);
    AddInputType("input", svlTypeMatrixInt32);
    AddInputType("input", svlTypeMatrixInt64);
    AddInputType("input", svlTypeMatrixUInt8);
    AddInputType("input", svlTypeMatrixUInt16);
    AddInputType("input", svlTypeMatrixUInt32);
    AddInputType("input", svlTypeMatrixUInt64);
    AddInputType("input", svlTypeMatrixFloat);
    AddInputType("input", svlTypeMatrixDouble);
    AddInputType("input", svlTypeTransform3D);
    AddInputType("input", svlTypeTargets);
    AddInputType("input", svlTypeText);
    AddInputType("input", svlTypeBlobs);

    AddOutput("output", true);
    SetAutomaticOutputType(true);
}
Exemple #12
0
svlFilterSplitter::svlFilterSplitter() :
    svlFilterBase()
{
    CreateInterfaces();

    AddInput("input", true);
    AddInputType("input", svlTypeImageRGB);
    AddInputType("input", svlTypeImageRGBA);
    AddInputType("input", svlTypeImageRGBStereo);
    AddInputType("input", svlTypeImageRGBAStereo);
    AddInputType("input", svlTypeImageMono8);
    AddInputType("input", svlTypeImageMono8Stereo);
    AddInputType("input", svlTypeImageMono16);
    AddInputType("input", svlTypeImageMono16Stereo);
    AddInputType("input", svlTypeImageMono32);
    AddInputType("input", svlTypeImageMono32Stereo);
    AddInputType("input", svlTypeImage3DMap);
    AddInputType("input", svlTypeCUDAImageRGB);
    AddInputType("input", svlTypeCUDAImageRGBA);
    AddInputType("input", svlTypeCUDAImageRGBStereo);
    AddInputType("input", svlTypeCUDAImageRGBAStereo);
    AddInputType("input", svlTypeCUDAImageMono8);
    AddInputType("input", svlTypeCUDAImageMono8Stereo);
    AddInputType("input", svlTypeCUDAImageMono16);
    AddInputType("input", svlTypeCUDAImageMono16Stereo);
    AddInputType("input", svlTypeCUDAImageMono32);
    AddInputType("input", svlTypeCUDAImageMono32Stereo);
    AddInputType("input", svlTypeCUDAImage3DMap);
    AddInputType("input", svlTypeMatrixInt8);
    AddInputType("input", svlTypeMatrixInt16);
    AddInputType("input", svlTypeMatrixInt32);
    AddInputType("input", svlTypeMatrixInt64);
    AddInputType("input", svlTypeMatrixUInt8);
    AddInputType("input", svlTypeMatrixUInt16);
    AddInputType("input", svlTypeMatrixUInt32);
    AddInputType("input", svlTypeMatrixUInt64);
    AddInputType("input", svlTypeMatrixFloat);
    AddInputType("input", svlTypeMatrixDouble);
    AddInputType("input", svlTypeTransform3D);
    AddInputType("input", svlTypeTargets);
    AddInputType("input", svlTypeText);
    AddInputType("input", svlTypeBlobs);

    // Add the trunk output by default
    svlFilterBase::AddOutput("output", true);
    SetAutomaticOutputType(false);
}
void YUV420toRGBFilter::InitialiseInputTypes()
{
  AddInputType(&MEDIATYPE_Video, &MEDIASUBTYPE_YUV420P, &FORMAT_VideoInfo);
  AddInputType(&MEDIATYPE_Video, &MEDIASUBTYPE_I420,	  &FORMAT_VideoInfo);
}