Back ground Subtraction class pros please answer - image

Can someone define the class BackgroundSubtractorMOG2.What does history(argument for the BackgroundSubtractor class mean).Is some technique like code books available using BackgroundSubtractorMOG2 class??
Thanks in advance

I made a new class from scratch and that solved the problem.Use the accumulator and frame subtraction methods to recreate the backgoundSubtractorMOG and i developed my own codebook model.

Related

How to de-couple the loading of the controls (GUI part) and the population with data in Java FX?

I want that the population with data to be triggered after the GUI part has been loaded. My Controller implements the Initializable interface and has only the initialize function and I was wondering if this is possible. I do not want to use Spring for Java FX, I have searched on google for this but i did not find any solution until now and any help would be greatly appreciated.

How to use JModel in Joomla 3

I'm developing a component for Joomla 3, but I don't understand how to use the datamodel in joomla 3. Am I supposed to use the Legacy-classes? Will these not be deprecated after a while?
I see most of the joomla components are using the class JModelList, which extends JModelLegacy. To load such a class I can use
JModelLegacy::getInstance('classname');
but is there a way to do this without using legacy-classes? I would think that the word legacy implies that the code hase been replace for something newer/better/hotter? Please enlighten me if anyone knows better ...
PS: I also asked this question on the Joomla - forum, but got no replies (http://forum.joomla.org/viewtopic.php?f=706&t=837707)
regards Jonas
I tend to use JModelList and JModelForm because this way PHP error logging will notify during code execution if your class has failed to meet some of its "contractual" class obligations from any of the parent/super classes.
The answer depends on yourself, and there is really no "wrong" answer here. Pick the method which makes the most sense to you and go with it.
** EDIT **
You can always load and instantiate a model class like so, using User's registration model as example.
JLoader::register('UsersModelRegistration', JPATH_ROOT . '/components/com_users/models/registration.php');
$model = new UsersModelRegistration();

MVC and class diagrams

I have done some programming with MVC but never really thought about class diagrams within them, but thinking about it I dont understand how a class diagram would work with one.
Would you just create a class diagram of each model,
Also, when I have used codenigter, i return query results from the model rather than a whole object, so would there even be any attributes?
Thanks
Would you just create a class diagram of each model
Anything that helps with clarity. I find its easiest to create a new diagram for each model.
Also, when I have used codenigter, i return query results from the model rather than a whole object, so would there even be any attributes?
Im not sure what you mean here? Why do you think your "results" are not objects? In pure OO everything (Integers, Strings etc) are objects too.

creating a model class

I've looked through the other questions and am still struggling so if anybody could take the time to look at this, it would be much appreciated :).
I currently have my app working fine but I've been reading and have decided it doesn't fit the MVC design pattern. I am still learning lots about design and would like to edit it so that it is more sound.
I think I know what should go in to my model class, and I think that it should be instantiated in the app delegate. My questions are: why in that location? Is lazy instantiation the best/correct way to do this? And finally, once initiated, do I use a property to access the class or do you use special methods?
Sorry for the overload; I am also trying to get my reputation up enough to vote on other questions! :)
It's really hard to answer a general question like this, since there are so many ways one could implement any particular project. In general, I don't think that instantiating a model class in your app delegate is necessarily the way to go. Since a controller class mediates between the model and the view, it's often better to instantiate your model in a controller class -- for instance, I have a program that keeps track of the plants in my garden, and my controller class is a subclass of NSArrayController. It seems to make sense to create new plant objects in the controller and then just add them to its arrangedObjects. I try to have as few connections (via properties or ivars) between classes as I can, the thought being that each class should take care of its own business as much as possible. Often, you don't need to have a reference to the class, because you are calling class methods to create new objects, and then those objects can access any instance methods of that class without any explicit reference to the class.

Effective Shopdesign (with ModelBinders?)

I´m planing a shopsystem. I want to sell different lamps. For that reason I have created a basemodelclass with properties which every lamp has and inherit from that class to special lampmodels. Now I want a controller to create productoffers but how can i do this? Do i need for every lampmodel a controller / view or is there a way to have one controller/view that can create me all kind of lamp?
I have read about 'ModelBinders' and think this could be a solution but I have no idea how this could work. A small example would be nice :-)
Have solved it and posted it in another question: stackoverflow

Resources