moDUMMYModule::moDUMMYModule() : moImageFilterModule(){ MODULE_INIT(); // declare properties her, e.g: // this->properties["size"] = new moProperty(1.); }
moBlobTrackerModule::moBlobTrackerModule() : moImageFilterModule() { MODULE_INIT(); // Minimum and maximum sizes for blobs. Blobs smaller or larger // will be discarded. this->properties["min_size"] = new moProperty(2.0); this->properties["max_size"] = new moProperty(25.0); this->output_data = new moDataStream("GenericBlob"); this->output_count = 2; this->output_infos[1] = new moDataStreamInfo("data", "GenericBlob", "Data stream with touch info"); this->next_id = 1; this->new_blobs = new CvBlobSeq(); this->old_blobs = new CvBlobSeq(); memset(&this->param, 0, sizeof(CvBlobTrackerAutoParam1)); this->param.FGTrainFrames = 0; this->param.pFG = new moFGDetector();//cvCreateFGDetectorBase(CV_BG_MODEL_FGD, NULL); //new moFGDetector(); this->param.pBT = cvCreateBlobTrackerCC(); //vCreateBlobTrackerCCMSPF(); //this->param.pBTPP = cvCreateModuleBlobTrackPostProcKalman(); this->tracker = cvCreateBlobTrackerAuto1(&this->param); }
moFiducialTrackerModule::moFiducialTrackerModule() : moImageFilterModule() { MODULE_INIT(); this->output_data = new moDataStream("GenericFiducial"); this->output_count = 2; this->output_infos[1] = new moDataStreamInfo("data", "GenericFiducial", "Data stream with fiducial info"); this->internal = malloc(sizeof(fiducials_data_t)); }
moHighpassModule::moHighpassModule() : moImageFilterModule(){ MODULE_INIT(); // declare properties this->properties["size"] = new moProperty(2); this->properties["blur"] = new moProperty(2); }
ROOTFUNC vsf_err_t module_entry(struct vsf_module_t *module, struct app_hwcfg_t const *hwcfg) { // check api version if (api_ver != VSF_API_VERSION) { return VSFERR_NOT_SUPPORT; } return MODULE_INIT(module, hwcfg); }
moSmoothModule::moSmoothModule() : moImageFilterModule(){ MODULE_INIT(); // declare properties this->properties["size"] = new moProperty(1.); this->properties["size"]->setMin(0); this->properties["size"]->setMax(50); this->properties["filter"] = new moProperty("gaussian"); this->properties["filter"]->setChoices("median;gaussian;blur;blur_no_scale"); }
moBackgroundSubtractModule::moBackgroundSubtractModule() : moImageFilterModule8() { MODULE_INIT(); this->bg_buffer = NULL; // declare properties this->properties["recapture"] = new moProperty(true); this->properties["toggle"] = new moProperty(false); this->properties["absolute"] = new moProperty(false); }
nuiVideoFileSource::nuiVideoFileSource() : nuiModule() { MODULE_INIT(); this->output = new nuiEndpoint(this); this->output->setTypeDescriptor(std::string("IplImage")); this->setOutputEndpointCount(1); this->setOutputEndpoint(0,this->output); this->outputDataPacket = new nuiVideoFileSourceDataPacket(); };
ccxTemporalFusionModule::ccxTemporalFusionModule() : ccxModule(CCX_MODULE_INPUT | CCX_MODULE_OUTPUT) { MODULE_INIT(); this->audioInput = new ccxDataStream("mAST"); this->tactileInput = new ccxDataStream("vector<unimodalLeaf>"); this->output = new ccxDataStream("mAST"); this->declareInput(0, &this->audioInput, new ccxDataStreamInfo("audio", "mAST", "Multimodal abstract syntax tree (from audio utterance)")); this->declareInput(1, &this->tactileInput, new ccxDataStreamInfo("tactile", "vector<unimodalLeaf>", "Series of unimodal actions from the GUI")); this->declareOutput(0, &this->output, new ccxDataStreamInfo("fused", "mAST", "Multimodal abstract syntax tree (fused)")); }
moFiducialTrackerModule::moFiducialTrackerModule() : moImageFilterModule() { MODULE_INIT(); this->output_data = new moDataStream("blob"); this->declareOutput(1, &this->output_data, new moDataStreamInfo( "data", "blob", "Data stream with fiducial info")); this->internal = malloc(sizeof(fiducials_data_t)); // change input type this->setInputType(0, "IplImage8"); }
moDistanceTransformModule::moDistanceTransformModule() : moImageFilterModule(){ MODULE_INIT(); // The factor by which the resulting image is scaled (for visibility) this->properties["scale"] = new moProperty(5); this->properties["scale"]->setMin(1); this->properties["scale"]->setMax(255); this->properties["mask_size"] = new moProperty("5"); this->properties["mask_size"]->setChoices("3;5;Precise"); this->properties["metric"] = new moProperty("L2"); this->properties["metric"]->setChoices("L2;L1;L12;Fair;Welsch"); }
moSaveImageModule::moSaveImageModule() : moModule(MO_MODULE_INPUT, 1, 0) { MODULE_INIT(); this->input = NULL; // declare inputs this->input_infos[0] = new moDataStreamInfo("image", "IplImage", "Image"); // declare properties this->properties["path"] = new moProperty("image.bmp"); this->properties["dosave"] = new moProperty(false); }
nuiGaussianBlurFilter::nuiGaussianBlurFilter() : nuiModule() { MODULE_INIT(); this->input = new nuiEndpoint(this); this->input->setTypeDescriptor(std::string("IplImage")); this->setInputEndpointCount(1); this->setInputEndpoint(0,this->input); this->output = new nuiEndpoint(this); this->output->setTypeDescriptor(std::string("IplImage")); this->setOutputEndpointCount(1); this->setOutputEndpoint(0,this->output); this->outputDataPacket = new nuiGaussianBlurFilterDataPacket(); }
moVideoModule::moVideoModule() : moModule(MO_MODULE_OUTPUT, 0, 1) { MODULE_INIT(); this->video = NULL; this->stream = new moDataStream("IplImage"); // declare outputs this->output_infos[0] = new moDataStreamInfo("video", "IplImage", "Video image stream"); // declare properties this->properties["filename"] = new moProperty(""); this->properties["loop"] = new moProperty(true); }
moCannyModule::moCannyModule() : moImageFilterModule(){ MODULE_INIT(); // declare properties this->properties["lower_threshold"] = new moProperty(100); this->properties["lower_threshold"]->setMin(0); this->properties["lower_threshold"]->setMax(500); this->properties["upper_threshold"] = new moProperty(200); this->properties["upper_threshold"]->setMin(0); this->properties["upper_threshold"]->setMax(500); this->setInputType(0, "IplImage8"); this->setOutputType(0, "IplImage8"); }
nuiDebugGestureOutputModule::nuiDebugGestureOutputModule() : nuiModule() { MODULE_INIT(); // this->stream = new nuiDataStream("vector<unimodalLeaf>"); // this->declareOutput(0, &this->stream, new nuiDataStreamInfo( // "tactiles", "vector<unimodalLeaf>", "Vector of tactile GUI events")); this->output = new nuiEndpoint(); this->output->setTypeDescriptor(std::string("tactiles")); this->setOutputEndpointCount(1); this->setOutputEndpoint(0,this->output); this->output->setModuleHoster(this); //! TODO no information transmited here. WTF? this->alreadySent = false; }
moPS3EyeModule::moPS3EyeModule() : moModule(MO_MODULE_OUTPUT) { MODULE_INIT(); this->stream = new moDataStream("IplImage8"); // declare outputs this->declareOutput(0, &this->stream, new moDataStreamInfo( "ps3camera", "IplImage8", "Image stream of the ps3 camera")); // declare properties this->properties["index"] = new moProperty(0); this->properties["settings"] = new moProperty(false); this->properties["settings"]->addCallback(showSettings, this); }
moImageModule::moImageModule() : moModule(MO_MODULE_OUTPUT, 0, 1) { MODULE_INIT(); this->image = NULL; this->stream = new moDataStream("IplImage"); // declare outputs this->output_infos[0] = new moDataStreamInfo( "image", "IplImage", "Image stream on a static image"); // declare properties this->properties["filename"] = new moProperty(""); this->properties["filename"]->addCallback(fileChangedCallback, this); }
moCombineModule::moCombineModule() : moModule(MO_MODULE_INPUT|MO_MODULE_OUTPUT) { MODULE_INIT(); this->input1 = NULL; this->input2 = NULL; this->output = new moDataStream("IplImage"); this->output_buffer = NULL; // declare inputs/output this->declareInput(0, &this->input1, new moDataStreamInfo( "image1", "IplImage", "Background image")); this->declareInput(1, &this->input2, new moDataStreamInfo( "image2", "IplImage", "Image to combine to background (black is transparent)")); this->declareOutput(0, &this->output, new moDataStreamInfo( "combine", "IplImage", "Result of the combine")); }
moImageDisplayModule::moImageDisplayModule() : moModule(MO_MODULE_INPUT) { MODULE_INIT(); this->input = NULL; this->img = NULL; // declare inputs this->declareInput(0, &this->input, new moDataStreamInfo( "image", "IplImage,IplImage8", "Show image stream in a window")); // declare properties std::ostringstream oss; oss << "Movid" << (_count++); this->properties["name"] = new moProperty(oss.str()); }
moBlobFinderModule::moBlobFinderModule() : moImageFilterModule(){ MODULE_INIT(); this->storage = cvCreateMemStorage(0); this->output_data = new moDataStream("blob"); this->declareOutput(1, &this->output_data, new moDataStreamInfo( "data", "blob", "Data stream with Blob info")); this->blobs = new moDataGenericList(); // since cvFindContour accept only one channel image, just change the input this->setInputType(0, "IplImage8"); this->properties["min_size"] = new moProperty(2 * 2); this->properties["max_size"] = new moProperty(50 * 50); }
moCameraModule::moCameraModule() : moModule(MO_MODULE_OUTPUT) { MODULE_INIT(); this->camera = NULL; this->stream = new moDataStream("IplImage"); this->monochrome = new moDataStream("IplImage8"); // declare outputs this->declareOutput(0, &this->stream, new moDataStreamInfo( "camera", "IplImage", "Image stream of the camera")); this->declareOutput(1, &this->monochrome, new moDataStreamInfo( "camera", "IplImage8", "Image stream of the camera")); // declare properties this->properties["index"] = new moProperty(0); }
moPeakFinderModule::moPeakFinderModule() : moImageFilterModule(){ MODULE_INIT(); // The minimum value a peak must have this->properties["min_value"] = new moProperty(0.); // The maximum value a peak may have this->properties["max_value"] = new moProperty(255.); // The maximum number of peaks that you want. Takes the strongest peaks. // If this is set to 0, it returns all peaks. this->properties["max_peaks"] = new moProperty(1); // Avoid duplicate peaks that are close to each other. this->properties["merge_distance"] = new moProperty(4.); // this->output_data = new moDataStream("GenericBlob"); // this->output_count = 2; // this->output_infos[1] = new moDataStreamInfo("data", "GenericBlob", "Data stream with Blob info"); }
moTuioModule::moTuioModule() : moModule(MO_MODULE_INPUT) { MODULE_INIT(); this->input = NULL; this->osc = NULL; this->fseq = 0; this->type = TUIO_UNKNOWN; // declare inputs this->declareInput(0, &this->input, new moDataStreamInfo( "data", "trackedblob", "Data stream with type of 'trackedblob'")); // declare properties this->properties["ip"] = new moProperty("127.0.0.1"); this->properties["port"] = new moProperty(3333); this->properties["sendsize"] = new moProperty(true); }
moCalibrationModule::moCalibrationModule() : moModule(MO_MODULE_INPUT | MO_MODULE_OUTPUT | MO_MODULE_GUI){ MODULE_INIT(); // declare input/output this->input = NULL; this->output = new moDataStream("trackedblob"); this->declareInput(0, &this->input, new moDataStreamInfo( "data", "trackedblob", "Data stream with type of 'trackedblob'")); this->declareOutput(0, &this->output, new moDataStreamInfo( "data", "trackedblob", "Data stream with type of 'trackedblob'")); this->properties["rows"] = new moProperty(3); this->properties["rows"]->setMin(2); this->properties["rows"]->addCallback(mocalibrationmodule_update_size, this); this->properties["cols"] = new moProperty(3); this->properties["cols"]->setMin(2); this->properties["cols"]->addCallback(mocalibrationmodule_update_size, this); this->properties["screenPoints"] = new moProperty(moPointList()); this->properties["surfacePoints"] = new moProperty(moPointList()); this->properties["surfacePoints"]->addCallback(mocalibrationmodule_triangulate, this); this->properties["calibrate"] = new moProperty(false); this->properties["calibrate"]->addCallback(mocalibrationmodule_activate_calibration, this); // Minimum frames that the user has to press a calibration point this->properties["duration_per_point"] = new moProperty(50); this->properties["duration_per_point"]->addCallback(mocalibrationmodule_activate_calibration, this); this->retriangulate = false; this->rect = cvRect(0, 0, 5000, 5000); this->storage = cvCreateMemStorage(0); this->active_point = 0; this->last_id = -1; this->last_finished_id = -1; this->current_duration = 0; this->current_touch = NULL; this->calibrated = false; this->subdiv = NULL; this->buildScreenPoints(); }
moFlatlandColorPairFinderModule::moFlatlandColorPairFinderModule() : moImageFilterModule(){ MODULE_INIT(); this->storage = cvCreateMemStorage(0); this->output_data = new moDataStream("trackedblob"); this->declareOutput(1, &this->output_data, new moDataStreamInfo("data", "trackedblob", "Data stream of type 'trackedblob'")); this->blobs = new moDataGenericList(); this->players = new moDataGenericList(); // since cvFindContour accept only one channel image, just change the input //TODO : demand colored input, possibly in HSV form //this->setInputType(0, "IplImage8"); this->properties["min_size"] = new moProperty(2 * 2); this->properties["max_size"] = new moProperty(50 * 50); this->frameCounter = 0; }
moThresholdColoredModule::moThresholdColoredModule() : moImageFilterModule(){ MODULE_INIT(); // declare properties this->properties["threshold"] = new moProperty(50); this->properties["threshold"]->setMin(0); this->properties["threshold"]->setMax(255); this->properties["adaptive"] = new moProperty(false); this->properties["block_size"] = new moProperty(21); // size fo neighbor hood to compare to for adaptive threshold this->properties["mode"] = new moProperty("mean"); this->properties["mode"]->setChoices("mean;gaussian"); this->properties["type"] = new moProperty("binary"); this->properties["type"]->setChoices("binary;binary_inv;trunc;tozero;tozero_inv"); // change the input/output type //this->setInputType(0, "IplImage8"); //this->setOutputType(0, "IplImage8"); }
moAbstractBlobTrackerModule::moAbstractBlobTrackerModule() : moModule(MO_MODULE_INPUT | MO_MODULE_OUTPUT) { MODULE_INIT(); // initialize input/output this->input = NULL; this->output = new moDataStream("trackedblob"); // declare input/output this->declareInput(0, &this->input, new moDataStreamInfo( "data", "blob", "Data stream of type 'blob'")); this->declareOutput(0, &this->output, new moDataStreamInfo( "data", "trackedblob", "Data stream of type 'trackedblob'")); this->properties["max_age"] = new moProperty(10); this->properties["min_age"] = new moProperty(3); // The maximum amount of degrees a blob may be rotated before we consider // the rotation having gone to the next quadrant. this->properties["max_rotation_speed"] = new moProperty(46); this->new_blobs = new moDataGenericList(); this->old_blobs = new moDataGenericList(); this->adolescent = new moDataGenericList(); }
moGreedyBlobTrackerModule::moGreedyBlobTrackerModule() : moAbstractBlobTrackerModule() { MODULE_INIT(); this->properties["max_distance"] = new moProperty(0.1); }
#include <vmm/hd.h> #include <vmm/floppy.h> #include <vmm/irq.h> #include <vmm/dma.h> #include <vmm/cookie_jar.h> #include <vmm/debug.h> #include <vmm/tasks.h> #include <vmm/traps.h> #include <vmm/vm.h> #include <vmm/errno.h> extern char root_dev[]; struct kernel_module kernel_module = { MODULE_INIT("kernel", SYS_VER, NULL, NULL, NULL, NULL), /* module functions */ find_module, open_module, close_module, expunge_module, /* mm functions */ alloc_page, alloc_pages_64, free_page, free_pages, map_page, set_pte, get_pte, read_page_mapping, lin_to_phys, put_pd_val, get_pd_val, check_area, /* kernel malloc */ malloc, calloc, free, realloc, valloc, /* task functions */ schedule, wake_task, suspend_task, suspend_current_task, add_task, kill_task, find_task_by_pid,