Add OpenCV parallel_for_ tutorial. #7960

Merged
merged 1 commit into from Jan 11, 2017

Projects

None yet

4 participants

@catree
Contributor
catree commented Jan 3, 2017

This pullrequest adds

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.

@StevenPuttemans
Contributor

👍 Great! Something that was missing indeed!

+> 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)
@sovrasov
sovrasov Jan 9, 2017 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]
@catree
catree Jan 9, 2017 Contributor

Use Latex code instead of images for the Mandelbrot formulas.

+Results
+-----------
+
+You can find the full tutorial code [here](how_to_use_OpenCV_parallel_for_.cpp).
@sovrasov
sovrasov 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.
Please, change link address to future github url like this:
https://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/core/mat_the_basic_image_container/mat_the_basic_image_container.cpp

@catree
catree Jan 10, 2017 Contributor

Done.

@sovrasov

👍

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

1 check passed

default Required builds passed
Details
@catree catree deleted the catree:tutorial_parallel_for_ branch Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment