Difference between revisions of "FAQ"

From BoofCV
Jump to navigationJump to search
(Created page with "= Frequently Asked Questions = # 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 ca...")
 
m
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Frequently Asked Questions =
= Frequently Asked Questions =


# 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.  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 invokedIf you need to save the value of a returned data structure make a copy of itTo get around this issue each thread should have its own instance of a class.
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.
 
== How do I display binary images? ==
 
Binary images are of type GrayU8 with pixel values of 0 or 1.  If you display this image directly you will essentially see all black.  There are a few options.
 
# Use VisualizeBinaryData.renderBinary() to render the binary image into a BufferedImage
# Rescale the image so that it takes on values of 0 of 255 using PixelMath.multiply()
 
== How do I open in Eclipse ==
 
BoofCV uses [https://gradle.org/ Gradle] to build the project and these Gradle files can be opened in Eclipse.  Instructions for importing in to Eclipse can be found in the project's [https://github.com/lessthanoptimal/BoofCV/blob/master/README.md README.md] file.
 
== Why can't I find the class T any where? ==
 
If you see <T extends BLAH> in a class then it is using generics.  T is just a common variable used to represent a genric type in BoofCV.  Other common ones include D and I, which is used for derivative images and input images respectively.
 
http://docs.oracle.com/javase/tutorial/extra/generics/
 
== 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.
 
== How do I get a wiki account? ==
 
As of this writing you should be able to create your own if you can figure out the answer to a simple question.  Spam has been a serious issue which has prevented the wiki from being completely open.  If you have any ideas on how to deal with this issue let us know!
 
== 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 one exception is that Public Domain code can be "donated" to BoofCV without transfer of copyright since it doesn't impose restrictions.
 
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 yearsOther open source projects have been stuck and unable to change licenses because of this issue.  Your donation/contribution will always be acknowledged in the code's comments and readme.  In the future there might be an extras package for code which is not owned by BoofCV be integrated into it.

Latest revision as of 18:55, 7 January 2019

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.

How do I display binary images?

Binary images are of type GrayU8 with pixel values of 0 or 1. If you display this image directly you will essentially see all black. There are a few options.

  1. Use VisualizeBinaryData.renderBinary() to render the binary image into a BufferedImage
  2. Rescale the image so that it takes on values of 0 of 255 using PixelMath.multiply()

How do I open in Eclipse

BoofCV uses Gradle to build the project and these Gradle files can be opened in Eclipse. Instructions for importing in to Eclipse can be found in the project's README.md file.

Why can't I find the class T any where?

If you see <T extends BLAH> in a class then it is using generics. T is just a common variable used to represent a genric type in BoofCV. Other common ones include D and I, which is used for derivative images and input images respectively.

http://docs.oracle.com/javase/tutorial/extra/generics/

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.

How do I get a wiki account?

As of this writing you should be able to create your own if you can figure out the answer to a simple question. Spam has been a serious issue which has prevented the wiki from being completely open. If you have any ideas on how to deal with this issue let us know!

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 one exception is that Public Domain code can be "donated" to BoofCV without transfer of copyright since it doesn't impose restrictions.

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 and unable to change licenses because of this issue. Your donation/contribution will always be acknowledged in the code's comments and readme. In the future there might be an extras package for code which is not owned by BoofCV be integrated into it.