Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy Lyudvichenko committed Aug 26, 2015
1 parent 467cd96 commit 83e39a9
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 29 deletions.
20 changes: 7 additions & 13 deletions modules/dnn/include/opencv2/dnn/blob.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ namespace dnn
/** @brief Returns the size of the specified @p axis.
*
* Does the same thing as size(int) const, but if non-existing axis will be passed then 1 will be returned,
* therefore this function always finishes successfuly.
* therefore this function always finishes successfully.
*/
int xsize(int axis) const;

Expand Down Expand Up @@ -152,7 +152,7 @@ namespace dnn
/** @brief Returns the size of the specified @p axis.
*
* Does the same thing as size(int) const, but if non-existing axis will be passed then 1 will be returned,
* therefore this function always finishes successfuly.
* therefore this function always finishes successfully.
*/
int xsize(int axis) const;

Expand All @@ -172,21 +172,18 @@ namespace dnn
/** @brief Checks equality of two blobs shapes. */
bool equalShape(const Blob &other) const;

/** @brief Returns sclice of first two dimensions.
* @details The behavior is similar to the following numpy code: blob[n, cn, ...]
/** @brief Returns slice of first two dimensions.
* @details The behaviour is similar to the following numpy code: blob[n, cn, ...]
*/
Mat getPlane(int n, int cn);

/** @addtogroup Shape getters of 4-dimensional blobs.
* @{
*/
/* Shape getters of 4-dimensional blobs. */
int cols() const; //!< Returns size of the fourth axis blob.
int rows() const; //!< Returns size of the thrid axis blob.
int channels() const; //!< Returns size of the second axis blob.
int num() const; //!< Returns size of the first axis blob.
Size size2() const; //!< Returns cv::Size(cols(), rows())
Vec4i shape4() const; //!< Returns shape of firt four blob axes.
/** @}*/
Vec4i shape4() const; //!< Returns shape of first four blob axes.

/** @brief Returns linear index of the element with specified coordinates in the blob.
*
Expand All @@ -198,9 +195,7 @@ namespace dnn
/** @overload */
size_t offset(int n = 0, int cn = 0, int row = 0, int col = 0) const;

/** @addtogroup CPU pointer getters
* @{
*/
/* CPU pointer getters */
/** @brief Returns pointer to the blob element with the specified position, stored in CPU memory.
*
* @p n correspond to the first axis, @p cn - to the second, etc.
Expand All @@ -214,7 +209,6 @@ namespace dnn
/** @overload ptr<float>() */
float *ptrf(int n = 0, int cn = 0, int row = 0, int col = 0);
//TODO: add const ptr methods
/** @}*/

/** @brief Shares data from other @p blob.
* @returns *this
Expand Down
2 changes: 1 addition & 1 deletion modules/dnn/include/opencv2/dnn/dict.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct DictValue
static DictValue arrayString(TypeIter begin, int size); //!< Constructs array of strings

template<typename T>
T get(int idx = -1) const; //!< Tries to convert array element with specified index to requested type and returns it.
T get(int idx = -1) const; //!< Tries to convert array element with specified index to requested type and returns its.

int size() const;

Expand Down
8 changes: 4 additions & 4 deletions modules/dnn/include/opencv2/dnn/dnn.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ namespace dnn //! This namespace is used for dnn module functionlaity.
String type; //!< Type name which was used for creating layer by layer factory.

Layer();
explicit Layer(const LayerParams &params); //!< Intialize only #name, #type and #blobs fields.
explicit Layer(const LayerParams &params); //!< Initialize only #name, #type and #blobs fields.
virtual ~Layer();
};

/** @brief This class allows to create and maunipulate comprehensive artifical neural networks.
/** @brief This class allows to create and manipulate comprehensive artificial neural networks.
*
* Neural network is presented as directed acyclic graph (DAG), where vertices are Layer instances,
* and edges specify relationships between layers inputs and ouputs.
* and edges specify relationships between layers inputs and outputs.
*
* Each network layer has unique integer id and unique string name inside its network.
* LayerId can store either layer name or layer id.
Expand Down Expand Up @@ -165,7 +165,7 @@ namespace dnn //! This namespace is used for dnn module functionlaity.
* @param inpPin descriptor of the second layer input.
*
* Descriptors have the following template <DFN>&lt;layer_name&gt;[.input_number]</DFN>:
* - the first part of the tamplate <DFN>layer_name</DFN> is sting name of the added layer.
* - the first part of the template <DFN>layer_name</DFN> is sting name of the added layer.
* If this part is empty then the network input pseudo layer will be used;
* - the second optional part of the template <DFN>input_number</DFN>
* is either number of the layer input, either label one.
Expand Down
15 changes: 5 additions & 10 deletions modules/dnn/tutorials/tutorial_dnn_build.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,16 @@ git clone https://github.com/Itseez/opencv_contrib

- Set binaries directory, for example, to **opencv_root**/build_opencv.
This directory will contain built libraries.

![](images/build_1.png)
![](images/build_1.png)

-# Configure opencv:
- press *Configure*;
- choose the preferred project generator (Makefiles for Linux, MS Visual Studio for Windows);
- also you can set many opencv build options, for more details see @ref tutorial_linux_install.

![](images/build_2.png)
![](images/build_2.png)

-# In the appeared list of build parameters find parameter `OPENCV_EXTRA_MODULES_PATH` and set it to the **opencv_root**/opencv_contrib.

![](images/build_3.png)
![](images/build_3.png)

-# *Configure* the project again, and set build options of dnn module:

Expand All @@ -51,12 +48,10 @@ git clone https://github.com/Itseez/opencv_contrib

- You can additionally check `opencv_dnn_BUILD_TORCH_IMPORTER` parameter to build [Torch7](http://torch.ch) importer.
It allows you to use networks, generated by Torch7 [nn](https://github.com/torch/nn/blob/master/README.md) module.

![](images/build_4.png)
![](images/build_4.png)

-# Press *Configure* and *Generate*.

![](images/build_5.png)
![](images/build_5.png)

-# Build the generated project:
- If Makefiles generator on Unix was used, run the following in terminal:
Expand Down
2 changes: 1 addition & 1 deletion modules/dnn/tutorials/tutorial_dnn_googlenet.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Explanation
We put the output of "prob" layer, which contain probabilities for each of 1000 ILSVRC2012 image classes, to the `prob` blob.
And find the index of element with maximal value in this one. This index correspond to the class of the image.

-# Print the results
-# Print results
@snippet dnn/samples/caffe_googlenet.cpp print_info
For our image we get:
> Best class: #812 'space shuttle'
Expand Down

0 comments on commit 83e39a9

Please sign in to comment.