# Add OpenCV parallel_for_ tutorial. #7960

Merged
merged 1 commit into from Jan 11, 2017
+312 −0

None yet

### 4 participants

Contributor
commented Jan 3, 2017

a tutorial about cv::parallel_for_ to show how to easily parallelize your code.

I think it would be useful to have a quick tutorial to show how to use cv::parallel_for_.

I hope the tutorial is sufficiently correct and is sufficiently worthy to be incorporated into the OpenCV documentation. I am not an expert on multithreading so maybe some inaccuracies are present in the tutorial.

Contributor
 👍 Great! Something that was missing indeed!
reviewed
 +> That is, a complex number \f$c \f$ is part of the Mandelbrot set if, when starting with \f$z_0 = 0 \f$ and applying +> the iteration repeatedly, the absolute value of \f$z_n \f$ remains bounded however large \f$n \f$ gets. +> This can also be represented as +> ![](images/how_to_use_OpenCV_parallel_for_Mandelbrot_formula2.png)
Contributor

Such formulas can be written directly instead of including pictures.
Try something like this:

\f[\lim_{n\to\infty}\sup|z_{n+1}|\leqslant2\f]

Contributor

Use Latex code instead of images for the Mandelbrot formulas.

reviewed
 +Results +----------- + +You can find the full tutorial code [here](how_to_use_OpenCV_parallel_for_.cpp).
Jan 10, 2017 edited Contributor

This link expects that file how_to_use_OpenCV_parallel_for_.cpp is placed to the same directory as generated documentation, so it generally doesn't work.
https://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/core/mat_the_basic_image_container/mat_the_basic_image_container.cpp

Contributor

Done.

 catree Add OpenCV parallel_for_ tutorial. e16e141
approved these changes

👍

was assigned by alalek Jan 11, 2017
merged commit 97f5d05 into opencv:master Jan 11, 2017

#### 1 check passed

default Required builds passed
Details
deleted the catree:tutorial_parallel_for_ branch Jan 17, 2017