Difference between revisions of "FAQ"

From BoofCV
Jump to navigationJump to search
m
m
Line 1: Line 1:
= Frequently Asked Questions =
= Frequently Asked Questions =


# Is BoofCV Thread Safe?
List of quesetions which have been asked a few times.  If your question is not answered here please post the question on the BoofCV message board ([https://groups.google.com/group/boofcv link]). Also feel free to edit this wiki page if you see any mistakes.


Unless a class explicitly states that it is thread safe you should assume that it is not.  In practice, if you are calling a static function in a Util* or *Ops class there is a good chance that it is thread safe.  Classes tend to recycle data structures each time they are invoked and are extremely not thread safe.  For example, if a feature detector returned a Point2D_F32 with the feature's location then it owns that data structure and will reuse it the next time its invoked.  If you need to save the value of a returned data structure make a copy of it.  To get around this issue each thread should have its own instance of a class.
== Is BoofCV Thread Safe? ==


# How do I donate code
Unless a class explicitly states that it is thread safe you should assume that it is not.  In practice, if you are calling a static function in a Util* or *Ops class there is a good chance that it is thread safe.  Classes tend to recycle data structures each time they are invoked and are extremely not thread safe.  To get around this issue each thread should have its own instance of a class.
 
== Why are feature descriptors and other data structures randomly changing? ==
 
To maximize performance BoofCV minimizes memory creation/description by recycling data.  Unless stated otherwise, if a class creates a data structure you can assume that it owns it.  For example if a feature detector returns the location of a feature using Point2D_F64, then it owns that point.  The next time the code is invoked it will write over the previous results.
 
If you need to use a data structure and not have its value modified then create a copy of it.  Most data structure in BoofCV provide a copy() function.
 
== How do I donate code? ==


Post a message on the message board about the code you wish to donate and someone will contact you.  Before you donate code make sure you actually own it.  If you work for a company check with the legal department since they probably own it even if you did it in your spare time.  All donated code will need to be assigned over to BoofCV and released under an Apache 2.0 license.   
Post a message on the message board about the code you wish to donate and someone will contact you.  Before you donate code make sure you actually own it.  If you work for a company check with the legal department since they probably own it even if you did it in your spare time.  All donated code will need to be assigned over to BoofCV and released under an Apache 2.0 license.   


The main reason for the copyright being assigned is so that if the license needs to be changed in the future that can be done without getting permission from a few hundred people who donated code over the years.  Other open source projects have been stuck because of this issue.  Your donation/contribution will always be achknowledged in the code's comments.  In the future there might be an extras package for code which is not owned by BoofCV.
The main reason for the copyright being assigned is so that if the license needs to be changed in the future that can be done without getting permission from a few hundred people who donated code over the years.  Other open source projects have been stuck because of this issue.  Your donation/contribution will always be achknowledged in the code's comments.  In the future there might be an extras package for code which is not owned by BoofCV.

Revision as of 10:00, 23 September 2012

Frequently Asked Questions

List of quesetions which have been asked a few times. If your question is not answered here please post the question on the BoofCV message board (link). Also feel free to edit this wiki page if you see any mistakes.

Is BoofCV Thread Safe?

Unless a class explicitly states that it is thread safe you should assume that it is not. In practice, if you are calling a static function in a Util* or *Ops class there is a good chance that it is thread safe. Classes tend to recycle data structures each time they are invoked and are extremely not thread safe. To get around this issue each thread should have its own instance of a class.

Why are feature descriptors and other data structures randomly changing?

To maximize performance BoofCV minimizes memory creation/description by recycling data. Unless stated otherwise, if a class creates a data structure you can assume that it owns it. For example if a feature detector returns the location of a feature using Point2D_F64, then it owns that point. The next time the code is invoked it will write over the previous results.

If you need to use a data structure and not have its value modified then create a copy of it. Most data structure in BoofCV provide a copy() function.

How do I donate code?

Post a message on the message board about the code you wish to donate and someone will contact you. Before you donate code make sure you actually own it. If you work for a company check with the legal department since they probably own it even if you did it in your spare time. All donated code will need to be assigned over to BoofCV and released under an Apache 2.0 license.

The main reason for the copyright being assigned is so that if the license needs to be changed in the future that can be done without getting permission from a few hundred people who donated code over the years. Other open source projects have been stuck because of this issue. Your donation/contribution will always be achknowledged in the code's comments. In the future there might be an extras package for code which is not owned by BoofCV.