mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
python: 'cv2.' -> 'cv.' via 'import cv2 as cv'
This commit is contained in:
@@ -29,8 +29,8 @@ $ yum install numpy opencv*
|
||||
@endcode
|
||||
Open Python IDLE (or IPython) and type following codes in Python terminal.
|
||||
@code{.py}
|
||||
>>> import cv2
|
||||
>>> print( cv2.__version__ )
|
||||
>>> import cv2 as cv
|
||||
>>> print( cv.__version__ )
|
||||
@endcode
|
||||
If the results are printed out without any errors, congratulations !!! You have installed
|
||||
OpenCV-Python successfully.
|
||||
@@ -230,7 +230,7 @@ But you will have to do this every time you install OpenCV.
|
||||
@code{.sh}
|
||||
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
|
||||
@endcode
|
||||
Thus OpenCV installation is finished. Open a terminal and try import cv2.
|
||||
Thus OpenCV installation is finished. Open a terminal and try 'import cv2 as cv'.
|
||||
|
||||
To build the documentation, just enter following commands:
|
||||
@code{.sh}
|
||||
|
||||
@@ -31,8 +31,8 @@ $ sudo apt-get install python-opencv
|
||||
Open Python IDLE (or IPython) and type following codes in Python terminal.
|
||||
|
||||
```
|
||||
import cv2
|
||||
print(cv2.__version__)
|
||||
import cv2 as cv
|
||||
print(cv.__version__)
|
||||
```
|
||||
|
||||
If the results are printed out without any errors, congratulations !!!
|
||||
@@ -160,6 +160,6 @@ All files are installed in "/usr/local/" folder.
|
||||
Open a terminal and try import "cv2".
|
||||
|
||||
```
|
||||
import cv2
|
||||
print(cv2.__version__)
|
||||
import cv2 as cv
|
||||
print(cv.__version__)
|
||||
```
|
||||
|
||||
@@ -35,8 +35,8 @@ Installing OpenCV from prebuilt binaries
|
||||
|
||||
-# Open Python IDLE and type following codes in Python terminal.
|
||||
@code
|
||||
>>> import cv2
|
||||
>>> print( cv2.__version__ )
|
||||
>>> import cv2 as cv
|
||||
>>> print( cv.__version__ )
|
||||
@endcode
|
||||
|
||||
If the results are printed out without any errors, congratulations !!! You have installed
|
||||
@@ -136,7 +136,7 @@ Building OpenCV from source
|
||||
|
||||

|
||||
|
||||
-# Open Python IDLE and enter import cv2. If no error, it is installed correctly.
|
||||
-# Open Python IDLE and enter 'import cv2 as cv'. If no error, it is installed correctly.
|
||||
|
||||
@note We have installed with no other support like TBB, Eigen, Qt, Documentation etc. It would be
|
||||
difficult to explain it here. A more detailed video will be added soon or you can just hack around.
|
||||
|
||||
Reference in New Issue
Block a user