Merge pull request #26018 from Kumataro:fix26017

doc: remove duplicated OpenCV Theory at ToC in Basic Drawing #26018

Close #26017

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Kumataro 2024-08-12 19:32:52 +09:00 committed by GitHub
parent da3debda6d
commit 2fcea41f86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,15 +21,22 @@ In this tutorial you will learn how to:
- Draw a **circle** by using the OpenCV function **circle()**
- Draw a **filled polygon** by using the OpenCV function **fillPoly()**
@add_toggle_cpp
OpenCV Theory
-------------
@add_toggle_cpp
For this tutorial, we will heavily use two structures: @ref cv::Point and @ref cv::Scalar :
@end_toggle
@add_toggle_java
For this tutorial, we will heavily use two structures: @ref cv::Point and @ref cv::Scalar :
@end_toggle
@add_toggle_python
For this tutorial, we will heavily use tuples in Python instead of @ref cv::Point and @ref cv::Scalar :
@end_toggle
### Point
It represents a 2D point, specified by its image coordinates \f$x\f$ and \f$y\f$. We can define it as:
@add_toggle_cpp
@code{.cpp}
Point pt;
pt.x = 10;
@ -39,28 +46,8 @@ or
@code{.cpp}
Point pt = Point(10, 8);
@endcode
### Scalar
- Represents a 4-element vector. The type Scalar is widely used in OpenCV for passing pixel
values.
- In this tutorial, we will use it extensively to represent BGR color values (3 parameters). It is
not necessary to define the last argument if it is not going to be used.
- Let's see an example, if we are asked for a color argument and we give:
@code{.cpp}
Scalar( a, b, c )
@endcode
We would be defining a BGR color such as: *Blue = a*, *Green = b* and *Red = c*
@end_toggle
@add_toggle_java
OpenCV Theory
-------------
For this tutorial, we will heavily use two structures: @ref cv::Point and @ref cv::Scalar :
### Point
It represents a 2D point, specified by its image coordinates \f$x\f$ and \f$y\f$. We can define it as:
@code{.java}
Point pt = new Point();
pt.x = 10;
@ -70,6 +57,12 @@ or
@code{.java}
Point pt = new Point(10, 8);
@endcode
@end_toggle
@add_toggle_python
@code{.python}
pt = (10, 0) # x = 10, y = 0
@endcode
@end_toggle
### Scalar
- Represents a 4-element vector. The type Scalar is widely used in OpenCV for passing pixel
@ -77,11 +70,22 @@ Point pt = new Point(10, 8);
- In this tutorial, we will use it extensively to represent BGR color values (3 parameters). It is
not necessary to define the last argument if it is not going to be used.
- Let's see an example, if we are asked for a color argument and we give:
@add_toggle_cpp
@code{.cpp}
Scalar( a, b, c )
@endcode
@end_toggle
@add_toggle_java
@code{.java}
Scalar( a, b, c )
@endcode
We would be defining a BGR color such as: *Blue = a*, *Green = b* and *Red = c*
@end_toggle
@add_toggle_python
@code{.python}
( a, b, c )
@endcode
@end_toggle
We would be defining a BGR color such as: *Blue = a*, *Green = b* and *Red = c*
Code
----