mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Misc. ./apps ./doc ./platoforms typos
Found via `codespell -q 3 --skip="./3rdparty" -I ../opencv-whitelist.txt`
This commit is contained in:
+1
-1
@@ -112,7 +112,7 @@ you may access it. For sequences you need to go through them to query a specific
|
||||
for (; it != it_end; ++it)
|
||||
cout << (string)*it << endl;
|
||||
@endcode
|
||||
For maps you can use the [] operator again to acces the given item (or the \>\> operator too):
|
||||
For maps you can use the [] operator again to access the given item (or the \>\> operator too):
|
||||
@code{.cpp}
|
||||
n = fs["Mapping"]; // Read mappings from a sequence
|
||||
cout << "Two " << (int)(n["Two"]) << "; ";
|
||||
|
||||
+3
-3
@@ -25,12 +25,12 @@ In OpenCV 3.2, the following parallel frameworks are available in that order:
|
||||
7. Pthreads (if available)
|
||||
|
||||
As you can see, several parallel frameworks can be used in the OpenCV library. Some parallel libraries
|
||||
are third party libraries and have to be explictly built and enabled in CMake (e.g. TBB, C=), others are
|
||||
are third party libraries and have to be explicitly built and enabled in CMake (e.g. TBB, C=), others are
|
||||
automatically available with the platform (e.g. APPLE GCD) but chances are that you should be enable to
|
||||
have access to a parallel framework either directly or by enabling the option in CMake and rebuild the library.
|
||||
|
||||
The second (weak) precondition is more related to the task you want to achieve as not all computations
|
||||
are suitable / can be adatapted to be run in a parallel way. To remain simple, tasks that can be splitted
|
||||
are suitable / can be adatapted to be run in a parallel way. To remain simple, tasks that can be split
|
||||
into multiple elementary operations with no memory dependency (no possible race condition) are easily
|
||||
parallelizable. Computer vision processing are often easily parallelizable as most of the time the processing of
|
||||
one pixel does not depend to the state of other pixels.
|
||||
@@ -39,7 +39,7 @@ Simple example: drawing a Mandelbrot set
|
||||
----
|
||||
|
||||
We will use the example of drawing a Mandelbrot set to show how from a regular sequential code you can easily adapt
|
||||
the code to parallize the computation.
|
||||
the code to parallelize the computation.
|
||||
|
||||
Theory
|
||||
-----------
|
||||
|
||||
@@ -122,7 +122,7 @@ Selecting a region of interest:
|
||||
Rect r(10, 10, 100, 100);
|
||||
Mat smallImg = img(r);
|
||||
@endcode
|
||||
A convertion from Mat to C API data structures:
|
||||
A conversion from Mat to C API data structures:
|
||||
@code{.cpp}
|
||||
Mat img = imread("image.jpg");
|
||||
IplImage img1 = img;
|
||||
|
||||
@@ -84,7 +84,7 @@ int main( int argc, char** argv )
|
||||
printf("-- Min dist : %f \n", min_dist );
|
||||
|
||||
//-- Draw only "good" matches (i.e. whose distance is less than 2*min_dist,
|
||||
//-- or a small arbitary value ( 0.02 ) in the event that min_dist is very
|
||||
//-- or a small arbitrary value ( 0.02 ) in the event that min_dist is very
|
||||
//-- small)
|
||||
//-- PS.- radiusMatch can also be used here.
|
||||
std::vector< DMatch > good_matches;
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ Theory
|
||||
### How does it work?
|
||||
|
||||
- Equalization implies *mapping* one distribution (the given histogram) to another distribution (a
|
||||
wider and more uniform distribution of intensity values) so the intensity values are spreaded
|
||||
wider and more uniform distribution of intensity values) so the intensity values are spread
|
||||
over the whole range.
|
||||
- To accomplish the equalization effect, the remapping should be the *cumulative distribution
|
||||
function (cdf)* (more details, refer to *Learning OpenCV*). For the histogram \f$H(i)\f$, its
|
||||
|
||||
@@ -27,7 +27,7 @@ Explanation / Result
|
||||
@snippet samples/cpp/tutorial_code/ImgTrans/imageSegmentation.cpp load_image
|
||||

|
||||
|
||||
-# Then if we have an image with white background, it is good to tranform it black. This will help us to desciminate the foreground objects easier when we will apply the Distance Transform:
|
||||
-# Then if we have an image with a white background, it is good to transform it to black. This will help us to descriminate the foreground objects easier when we will apply the Distance Transform:
|
||||
@snippet samples/cpp/tutorial_code/ImgTrans/imageSegmentation.cpp black_bg
|
||||

|
||||
|
||||
@@ -36,11 +36,11 @@ Explanation / Result
|
||||

|
||||

|
||||
|
||||
-# Now we tranfrom our new sharped source image to a grayscale and a binary one, respectively:
|
||||
-# Now we transfrom our new sharped source image to a grayscale and a binary one, respectively:
|
||||
@snippet samples/cpp/tutorial_code/ImgTrans/imageSegmentation.cpp bin
|
||||

|
||||
|
||||
-# We are ready now to apply the Distance Tranform on the binary image. Moreover, we normalize the output image in order to be able visualize and threshold the result:
|
||||
-# We are ready now to apply the Distance Transform on the binary image. Moreover, we normalize the output image in order to be able visualize and threshold the result:
|
||||
@snippet samples/cpp/tutorial_code/ImgTrans/imageSegmentation.cpp dist
|
||||

|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ Assuming that the image to be operated is \f$I\f$:
|
||||
When the size of the kernel is `3`, the Sobel kernel shown above may produce noticeable
|
||||
inaccuracies (after all, Sobel is only an approximation of the derivative). OpenCV addresses
|
||||
this inaccuracy for kernels of size 3 by using the **Scharr()** function. This is as fast
|
||||
but more accurate than the standar Sobel function. It implements the following kernels:
|
||||
but more accurate than the standard Sobel function. It implements the following kernels:
|
||||
\f[G_{x} = \begin{bmatrix}
|
||||
-3 & 0 & +3 \\
|
||||
-10 & 0 & +10 \\
|
||||
|
||||
@@ -36,7 +36,7 @@ discuss briefly 5 operations offered by OpenCV:
|
||||
foreground)
|
||||
- For instance, check out the example below. The image at the left is the original and the image
|
||||
at the right is the result after applying the opening transformation. We can observe that the
|
||||
small spaces in the corners of the letter tend to dissapear.
|
||||
small spaces in the corners of the letter tend to disappear.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ Results
|
||||
|
||||

|
||||
|
||||
-# First, we try to threshold our image with a *binary threhold inverted*. We expect that the
|
||||
-# First, we try to threshold our image with a *binary threshold inverted*. We expect that the
|
||||
pixels brighter than the \f$thresh\f$ will turn dark, which is what actually happens, as we can see
|
||||
in the snapshot below (notice from the original image, that the doggie's tongue and eyes are
|
||||
particularly bright in comparison with the image, this is reflected in the output image).
|
||||
|
||||
@@ -239,7 +239,7 @@ Well, running samples from Eclipse is very simple:
|
||||
@code{.sh}
|
||||
adb shell getprop ro.product.cpu.abi
|
||||
@endcode
|
||||
If you're using an AVD emulator, go Window \> AVD Manager to see the list of availible devices.
|
||||
If you're using an AVD emulator, go Window \> AVD Manager to see the list of available devices.
|
||||
Click Edit in the context menu of the selected device. In the window, which then pop-ups, find
|
||||
the CPU field.
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ key topis:
|
||||
-# [Android
|
||||
Activity](http://developer.android.com/training/basics/activity-lifecycle/starting.html) and its
|
||||
lifecycle, that is an essential Android API class.
|
||||
-# OpenCV development will certainly require some knowlege of the [Android
|
||||
-# OpenCV development will certainly require some knowledge of the [Android
|
||||
Camera](http://developer.android.com/guide/topics/media/camera.html) specifics.
|
||||
|
||||
Quick environment setup for Android development
|
||||
@@ -261,7 +261,7 @@ Here is the standard way to compile C++ part of an Android application:
|
||||
|
||||
**warning**
|
||||
|
||||
We strongly reccomend using cmd.exe (standard Windows console) instead of Cygwin on
|
||||
We strongly recommend using cmd.exe (standard Windows console) instead of Cygwin on
|
||||
**Windows**. Use the latter if only you're absolutely sure about, what you're doing. Cygwin is
|
||||
not really supported and we are unlikely to help you in case you encounter some problems with
|
||||
it. So, use it only if you're capable of handling the consequences yourself.
|
||||
@@ -397,7 +397,7 @@ application, but sure the most uncomplicated one to configure.
|
||||
|
||||

|
||||
|
||||
-# When you click the Create AVD button, your new AVD will be availible in AVD Manager.
|
||||
-# When you click the Create AVD button, your new AVD will be available in AVD Manager.
|
||||
-# Press Start to launch the device. Be aware that any AVD (a.k.a. Emulator) is usually much slower
|
||||
than a hardware Android device, so it may take up to several minutes to start.
|
||||
-# Go Run -\> Run/Debug in Eclipse IDE to run your application in regular or debugging mode.
|
||||
|
||||
@@ -307,7 +307,7 @@ application. It will be capable of accessing camera output, processing it and di
|
||||
@endcode
|
||||
-# Defines that your activity implements CvCameraViewListener2 interface and fix activity related
|
||||
errors by defining missed methods. For this activity define onCreate, onDestroy and onPause and
|
||||
implement them according code snippet bellow. Fix errors by adding required imports.
|
||||
implement them according to the code snippet below. Fix errors by adding required imports.
|
||||
@code{.java}
|
||||
private CameraBridgeViewBase mOpenCvCameraView;
|
||||
|
||||
|
||||
@@ -380,7 +380,7 @@ user=> (.area sq-100)
|
||||
100.0
|
||||
@endcode
|
||||
If you find yourself not remembering a OpenCV class behavior, the REPL gives you the opportunity to
|
||||
easily search the corresponding javadoc documention:
|
||||
easily search the corresponding javadoc documentation:
|
||||
@code{.clojure}
|
||||
user=> (javadoc Rect)
|
||||
"http://www.google.com/search?btnI=I%27m%20Feeling%20Lucky&q=allinurl:org/opencv/core/Rect.html"
|
||||
@@ -455,7 +455,7 @@ org.opencv.core.Scalar
|
||||
@endcode
|
||||
We're going to mimic almost verbatim the original OpenCV java tutorial to:
|
||||
|
||||
- create a 5x10 matrix with all its elements intialized to 0
|
||||
- create a 5x10 matrix with all its elements initialized to 0
|
||||
- change the value of every element of the second row to 1
|
||||
- change the value of every element of the 6th column to 5
|
||||
- print the content of the obtained matrix
|
||||
|
||||
@@ -71,7 +71,7 @@ Explanation
|
||||
order in case of color images).
|
||||
|
||||
-# So now we have our new *gray_image* and want to save it on disk (otherwise it will get lost
|
||||
after the program ends). To save it, we will use a function analagous to @ref cv::imread : @ref
|
||||
after the program ends). To save it, we will use a function analogous to @ref cv::imread : @ref
|
||||
cv::imwrite
|
||||
@code{.cpp}
|
||||
imwrite( "../../images/Gray_Image.jpg", gray_image );
|
||||
|
||||
@@ -193,7 +193,7 @@ OpenCL {#tutorial_transition_hints_opencl}
|
||||
------
|
||||
All specialized `ocl` implemetations has been hidden behind general C++ algorithm interface. Now the function execution path can be selected dynamically at runtime: CPU or OpenCL; this mechanism is also called "Transparent API".
|
||||
|
||||
New class cv::UMat is intended to hide data exchange with OpenCL device in a convinient way.
|
||||
New class cv::UMat is intended to hide data exchange with OpenCL device in a convenient way.
|
||||
|
||||
Following example illustrate API modifications (from [OpenCV site](http://opencv.org/platforms/opencl.html)):
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ Let's introduce the notation used to define formally a hyperplane:
|
||||
|
||||
where \f$\beta\f$ is known as the *weight vector* and \f$\beta_{0}\f$ as the *bias*.
|
||||
|
||||
@sa A more in depth description of this and hyperplanes you can find in the section 4.5 (*Seperating
|
||||
@sa A more in depth description of this and hyperplanes you can find in the section 4.5 (*Separating
|
||||
Hyperplanes*) of the book: *Elements of Statistical Learning* by T. Hastie, R. Tibshirani and J. H.
|
||||
Friedman (@cite HTF01).
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ Explanation
|
||||
-# __Set up SVM's parameters__
|
||||
|
||||
@note In the previous tutorial @ref tutorial_introduction_to_svm there is an explanation of the
|
||||
atributes of the class @ref cv::ml::SVM that we configure here before training the SVM.
|
||||
attributes of the class @ref cv::ml::SVM that we configure here before training the SVM.
|
||||
|
||||
@snippet cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp init
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ of data.
|
||||
|
||||
*Author:* Fernando Iglesias García
|
||||
|
||||
Learn what a Suport Vector Machine is.
|
||||
Learn what a Support Vector Machine is.
|
||||
|
||||
- @subpage tutorial_non_linear_svms
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ To support this tutorial, several official OpenCV applications will be used: [op
|
||||
|
||||
### Important notes
|
||||
|
||||
- If you come accross any tutorial mentioning the old opencv_haartraining tool <i>(which is deprecated and still using the OpenCV1.x interface)</i>, then please ignore that tutorial and stick to the opencv_traincascade tool. This tool is a newer version, written in C++ in accordance to the OpenCV 2.x and OpenCV 3.x API. The opencv_traincascade supports both HAAR like wavelet features @cite Viola01 and LBP (Local Binary Patterns) @cite Liao2007 features. LBP features yield integer precision in contrast to HAAR features, yielding floating point precision, so both training and detection with LBP are several times faster then with HAAR features. Regarding the LBP and HAAR detection quality, it mainly depends on the training data used and the training parameters selected. It's possible to train a LBP-based classifier that will provide almost the same quality as HAAR-based one, within a percentage of the training time.
|
||||
- If you come across any tutorial mentioning the old opencv_haartraining tool <i>(which is deprecated and still using the OpenCV1.x interface)</i>, then please ignore that tutorial and stick to the opencv_traincascade tool. This tool is a newer version, written in C++ in accordance to the OpenCV 2.x and OpenCV 3.x API. The opencv_traincascade supports both HAAR like wavelet features @cite Viola01 and LBP (Local Binary Patterns) @cite Liao2007 features. LBP features yield integer precision in contrast to HAAR features, yielding floating point precision, so both training and detection with LBP are several times faster then with HAAR features. Regarding the LBP and HAAR detection quality, it mainly depends on the training data used and the training parameters selected. It's possible to train a LBP-based classifier that will provide almost the same quality as HAAR-based one, within a percentage of the training time.
|
||||
|
||||
- The newer cascade classifier detection interface from OpenCV 2.x and OpenCV 3.x (@ref cv::CascadeClassifier) supports working with both old and new model formats. opencv_traincascade can even save (export) a trained cascade in the older format if for some reason you are stuck using the old interface. At least training the model could then be done in the most stable interface.
|
||||
|
||||
@@ -69,7 +69,7 @@ Command line arguments:
|
||||
|
||||
- `-num <number_of_samples>` : Number of positive samples to generate.
|
||||
|
||||
- `-bgcolor <background_color>` : Background color (currently grayscale images are assumed); the background color denotes the transparent color. Since there might be compression artifacts, the amount of color tolerance can be specified by -bgthresh. All pixels withing bgcolor-bgthresh and bgcolor+bgthresh range are interpreted as transparent.
|
||||
- `-bgcolor <background_color>` : Background color (currently grayscale images are assumed); the background color denotes the transparent color. Since there might be compression artifacts, the amount of color tolerance can be specified by -bgthresh. All pixels within bgcolor-bgthresh and bgcolor+bgthresh range are interpreted as transparent.
|
||||
|
||||
- `-bgthresh <background_color_threshold>`
|
||||
- `-inv` : If specified, colors will be inverted.
|
||||
@@ -188,7 +188,7 @@ Training is finished and you can test your cascade classifier!
|
||||
Visualising Cascade Classifiers
|
||||
-------------------------------
|
||||
|
||||
From time to time it can be usefull to visualise the trained cascade, to see which features it selected and how complex its stages are. For this OpenCV supplies a opencv_visualisation application. This application has the following commands:
|
||||
From time to time it can be useful to visualise the trained cascade, to see which features it selected and how complex its stages are. For this OpenCV supplies a opencv_visualisation application. This application has the following commands:
|
||||
|
||||
- `--image` <b>(required)</b> : path to a reference image for your object model. This should be an annotation with dimensions [`-w`,`-h`] as passed to both opencv_createsamples and opencv_traincascade application.
|
||||
- `--model` <b>(required)</b> : path to the trained model, which should be in the folder supplied to the `-data` parameter of the opencv_traincascade application.
|
||||
|
||||
@@ -98,7 +98,7 @@ get CAP_OPENNI_IMAGE_GENERATOR_PRESENT property.
|
||||
@code{.cpp}
|
||||
bool isImageGeneratorPresent = capture.get( CAP_PROP_OPENNI_IMAGE_GENERATOR_PRESENT ) != 0; // or == 1
|
||||
@endcode
|
||||
Flags specifing the needed generator type must be used in combination with particular generator
|
||||
Flags specifying the needed generator type must be used in combination with particular generator
|
||||
property. The following properties of cameras available through OpenNI interfaces are supported:
|
||||
|
||||
- For image generator:
|
||||
|
||||
@@ -35,7 +35,7 @@ C++ class. This on itself builds on the FFmpeg open source library. This is a ba
|
||||
dependency of OpenCV so you shouldn't need to worry about this. A video is composed of a succession
|
||||
of images, we refer to these in the literature as frames. In case of a video file there is a *frame
|
||||
rate* specifying just how long is between two frames. While for the video cameras usually there is a
|
||||
limit of just how many frames they can digitalize per second, this property is less important as at
|
||||
limit of just how many frames they can digitize per second, this property is less important as at
|
||||
any time the camera sees the current snapshot of the world.
|
||||
|
||||
The first task you need to do is to assign to a @ref cv::VideoCapture class its source. You can do
|
||||
|
||||
Reference in New Issue
Block a user