Pure Software code
 
www.puresoftwarecode.com

SOFTWARE Institute
Teach YourSelf
125 Software Programming Training Courses
For Free Download


CHRISTIANITY Institute
HUMANITIES Institute
Art Institute

All more the 500 Subjects, All for Free Download.
Lebanon  
Python Programming Courses
Software Institute / OpenCV  
 
  Home : Software Institute : Python Opencv Page 1 Home
Python Opencv Pages   -   1    2    3             
 
 
1-  Py-cv-image Python program, to explain cv2.imshow() method
 
  1. Py-cv-image Python program, Python program to explain cv2.imshow() method
    step 1: Reading an image and Displaying the image - cv2.imshow() method
    step 2: Concatenated 3 Images - cv2.imshow() method

     
  2. Create a new Python project In Visual Studio 2022
    1. the Microsoft Visual Studio (... or 2019 or 2022) is a powerful IDE for Python language
    2. Open/Run Microsoft Visual Studio 2022
    3. To view Python templates, search for python.
       Select the Python Application template, and select Next.
    4. Create a new Python project In Visual Studio 2022
              On the Configure your new project screen  -   (specify a name and file location for the project, and then select Create)
              Project name: Py-cv-image
              Location: C:\Users\...\source\repos    (default location for
      Visual Studio 2022)
       


  3. The new project opens in Visual Studio 2022  - (Visual Studio 2022 Compiler - IDE, to compile Python project / file )
    1. The Visual Studio Solution Explorer window shows the project structure
    2. Python Project Properieties - Py-cv-image
      • Projct Folder: C:\Users\...\source\repos\Py-cv-image
      • Startup File: Py_cv_image.py
      • Project file: Py-cv-image.sln
    3. Download Python Project : Py-cv-image.zip - (168 KB zip file)   Download
    4. Project consist of:
       One Python Form - (Py_cv_image.py )

     

    Download Python Project : Py-cv-image.zip - (168 KB zip file)   Download    

     

  4. Install numpy and opencv in Python on Windows Operating System, Using Command Prompt
     
     1- Install numpy in Python on Windows Operating System, Using Command Prompt
           pip install numpy

     

     2- Install  opencv  CV in Python on Windows Operating System, Using Command Prompt
     
     Step 1 - Run the Command Prompt on Windows Operating System:
                  
                  
    Command Prompt is an application on most Windows computers that directly communicates with the operating system
                   How to
    open the Command Prompt:  Press the Windows key + r. In the Run box, type cmd, and then click Ok.

     
     Step 2 - install opencv-python
                    In the
    Command prompt, use the following pip command to install the opencv library
                   
    pip install opencv-python  

      Note: Is cv2 the same as OpenCV, cv2 (old interface in old OpenCV versions was named as cv ) is the name that OpenCV
     
     
     
  5. Source Code of Python Project - Py-cv-image:

    Download this Source Code at python  file: Py_cv_image.py  - (1.07 KB Python file)   download     

       Py_cv_image.py Python Code,  to explain cv2.imshow() method

     

     
  6. Debug Py-cv-image project, 0 Errors 
     
     
     
  7. Output of Python Project - Py-cv-image:
     
      step 1: display image

      step 2: display Concatenated Images

     

     

   
2-  Py-Webcam-Views Python program, Capture Video Frames from a  Webcam in OpenCV
 
  1. Py-Webcam-Views Python program, Capture Video Frames from a  Webcam in OpenCV
    • Install  library: OpenCV .
    • Import the library, OpenCV
    • Define the main function:
      The Webcam of PC is connected, then the index is 0 - (Wwebcam = cv2.VideoCapture(0))
      Test if the Webcam is opened - (Wwebcam.isOpened())
      Test if the Webcam is read the frames
      To display them on the computer screen
    • Run the code, the webcam will open up, and Display Video on a Computer Screen
     
  2. Create a new Python project In Visual Studio 2022
    1. the Microsoft Visual Studio (... or 2019 or 2022) is a powerful IDE for Python language
    2. Open/Run Microsoft Visual Studio 2022
    3. To view Python templates, search for python.
       Select the Python Application template, and select Next.
    4. Create a new Python project In Visual Studio 2022
              On the Configure your new project screen  -   (specify a name and file location for the project, and then select Create)
              Project name: Py-Webcam-Views
              Location: C:\Users\...\source\repos    (default location for
      Visual Studio 2022)
       


  3. The new project opens in Visual Studio 2022  - (Visual Studio 2022 Compiler - IDE, to compile Python project / file )
    1. The Visual Studio Solution Explorer window shows the project structure
    2. Python Project Properieties - Py-Webcam-Views
      • Projct Folder: C:\Users\...\source\repos\Py-Webcam-Views
      • Startup File: Py_Webcam_Views.py
      • Project file: Py-Webcam-Views.sln
    3. Download Python Project : Py-Webcam-Views.zip - (8.87 KB zip file)   Download
    4. Project consist of:
       One Python Form - (Py_Webcam_Views.py )

     

    Download Python Project : Py-Webcam-Views.zip - (8.87 KB zip file)   Download    

     

     

  4. Install opencv in Python on Windows Operating System, Using Command Prompt
     
     Step 1 - Run the Command Prompt on Windows Operating System:
                  
                  
    Command Prompt is an application on most Windows computers that directly communicates with the operating system
                   How to
    open the Command Prompt:  Press the Windows key + r. In the Run box, type cmd, and then click Ok.

     
     Step 2 - install opencv-python
                    In the
    Command prompt, use the following pip command to install the numpy library
                   
    pip install opencv-python 

      Note: Is cv2 the same as OpenCV, cv2 (old interface in old OpenCV versions was named as cv ) is the name that OpenCV
                 

     
     
  5. Source Code of Python Project -Py-Webcam-Views :

    Download this Source Code at python  file: Py_Webcam_Views.py  - (1014 Byte Python file)   download   

       Py_Webcam_Views.py Python Code, to Capture Video Frames from a  Webcam in OpenCV 

     

     
  6. Debug Py-Webcam-Views project, 0 Errors 
     
     
  7. Output of Python Project -Py-Webcam-Views, is Using the Webcam of PC :
     
    1-
       
    2-
     

   
   
3-  Py-Mesh_Module Python program, Creating a face mesh using OpenCV and mediapipe
 
  1. Py-Mesh_Module Python program, Creating a face mesh using OpenCV and mediapipe
    • Install two libraries: OpenCV and MediaPipe.
    • Import the libraries, which include OpenCV and MediaPipe
    • Set up a class called “draw_mesh”, which is responsible for defining the parameters of the face mesh, such as the maximum number of faces to detect, confidence thresholds for detection and tracking, and whether to redefine the landmarks or not.
      Within the class, we create a method called “face_mesh”, which takes in an input frame and detects and tracks the facial landmarks on the face(s) present in the image. If the parameter “draw” is set to True, the method will also draw the mesh and the contours of the face(s) onto the input frame.
    • Define the main function that sets up the video capture object from the webcam
    • Run the code, the webcam will open up, and you should see the face mesh overlay on your face.
     
  2. Create a new Python project In Visual Studio 2022
    1. the Microsoft Visual Studio (... or 2019 or 2022) is a powerful IDE for Python language
    2. Open/Run Microsoft Visual Studio 2022
    3. To view Python templates, search for python.
       Select the Python Application template, and select Next.
    4. Create a new Python project In Visual Studio 2022
              On the Configure your new project screen  -   (specify a name and file location for the project, and then select Create)
              Project name: Py-Mesh_Module
              Location: C:\Users\...\source\repos    (default location for
      Visual Studio 2022)
       


  3. The new project opens in Visual Studio 2022  - (Visual Studio 2022 Compiler - IDE, to compile Python project / file )
    1. The Visual Studio Solution Explorer window shows the project structure
    2. Python Project Properieties - Py-Mesh_Module
      • Projct Folder: C:\Users\...\source\repos\Py-Mesh_Module
      • Startup File: Py_Mesh_Module.py
      • Project file: Py-Mesh_Module.sln
    3. Download Python Project : Py-Mesh_Module.zip - (100 KB zip file)   Download
    4. Project consist of:
       One Python Form - (Py_Mesh_Module.py )

     

    Download Python Project : Py-Mesh_Module.zip - (100 KB zip file)   Download    

     

  4. Install opencv and mediapipe in Python on Windows Operating System, Using Command Prompt
     
     1- Install opencv in Python on Windows Operating System, Using Command Prompt
          Step 1 - Run the Command Prompt on Windows Operating System:
                  
                  
    Command Prompt is an application on most Windows computers that directly communicates with the operating system
                   How to
    open the Command Prompt:  Press the Windows key + r. In the Run box, type cmd, and then click Ok.

     
           Step 2 - install opencv-python
                    In the
    Command prompt, use the following pip command to install the numpy library
                   
    pip install opencv-python 

      Note: Is cv2 the same as OpenCV, cv2 (old interface in old OpenCV versions was named as cv ) is the name that OpenCV
                 

     
     2- Install mediapipe in Python on Windows Operating System, Using Command Prompt
           Step 1 - Run the Command Prompt on Windows Operating System:
                  
                  
    Command Prompt is an application on most Windows computers that directly communicates with the operating system
                   How to
    open the Command Prompt:  Press the Windows key + r. In the Run box, type cmd, and then click Ok.

     
            Step 2 - install mediapipe
                    In the Command prompt, use the following pip command to install the mediapipe library
                   
    pip install mediapipe                

     

     
  5. Source Code of Python Project -Py-Mesh_Module :

    Download this Source Code at python  file: Py_Mesh_Module.py  - (2.50 KB Python file)   download      

      Py_Mesh_Module.py Python Code, to Creating a face mesh using OpenCV and mediapipe    

     

     
  6. Debug Py-Mesh_Module project, 0 Errors 
     
     
     
  7. Output of Python Project -Py-Mesh_Module, is Using the Webcam of PC :
     
    1-
       
    2-
       
    3-  Show of Output Data, is Using the Webcam of PC  - image
       

   
 
Python Opencv Pages   -   1    2    3       

 
 www.puresoftwarecode.com  :  CHRISTIANITY Institute  HUMANITIES Institute  ART Institute & Others
 SOFTWARE Institute - "All Courses Free"    History of the MARONITES in Arabic  Basilica Architecture, in the Shape of a Cross

 Python, Teach yourSelf  Programs in 6 pages

 Holy BIBLE in 22 Languages and Studies ...  Le HANDICAP c'est quoi ?   (in French)  
 Machine Learning Projects in Python - 12 samples  220 Holy Christian ICONS  Drugs and Treatment in English, french, Arabic  Old Traditional Lebanese houses
 Opencv Python Projects with Source Code - 7 samples  Catholic Syrian MARONITE Church   Classification of Wastes from the Source in Arabic  5 DRAWING Courses & 3 Galleries
 Matplotlib in Python Projects - 4 samples  HOLY MASS of  Maronite Church - Audio in Arabic  Christianity in the Arabian Peninsula in Arabic  Meteora, Christianity Monasteries - En, Ar, Fr
 VISUAL STUDIO 2019, C# Programs, in English  VIRGIN MARY, Mother of JESUS CHRIST GOD  Summary of the Lebanese history in Arabic  Monasteries of Mount Athos & Pilgrimage
   SAINTS of the Church  LEBANON EVENTS 1840 & 1860, in Arabic  Carved Rock Churches, Lalibela - Ethiopia
VISUAL STUDIO 2010 in English  Saint SHARBEL - Sharbelogy in 10 languages, Books  Great FAMINE in LEBANON 1916,  in Arabic   4 Different STUDIES
 VISUAL STUDIO .NET, Windows & ASP in En  Catholic RADIO in Arabic, Sawt el Rab  Great FAMINE and Germny Role 1916,  in Arabic   SOLAR Energy & Gas Studies
 VISUAL STUDIO 6.0 in English  Saint SHARBEL Family - Evangelization  Armenian Genocide 1915  in Arabic  Personal Protective Equipment
 Microsoft ACCESS in English  Читать - БИБЛИЯ и Шарбэль cвятой, in Russe  Sayfo or Assyrian Genocide 1915 in Arabic  WELCOME to LEBANON
   Apparitions of  Virgin Mary - Ar  Christianity in Turkey in Arabic  YAHCHOUCH, my Lebanese Village
 PHP & MySQL in English  Neocatechumenal Way   Prononce English and French and Arabic Letters  ZOUEIN, my Family - History & Trees
 SOFTWARE GAMES in English  Holy BIBLE, for the Maronite Liturgical Year    About, my PRODUCTS, and Statistiques ...
 WEB DESIGN in English  Holy BIBLE, according to Maronite Calendar, (2023)  Yahchouch Social Statistical Cultural Project  Traffic Statistics 2025 of PureSoftwareCode.com
 JAVA SCRIPT in English  Holy BIBLE, Online Translation in 133 Languages    Site Map of  PureSoftwareCode.com
 FLASH - ANIMATION in English      REPORT, Cyber Attack Attacks the Current Site
 PLAY, 5 GAMES  Andree Zouein Foundation  GIGI  L'AMOROSO Fashion and Jewellery  Josette Zoueïn. Psychanalyste Psychologue
 Multi-Functional 4 Wheel Drive Robot Car  CARLOS SLIM HELU Site, New Design  Saadeh Bejjane Architecture  Hermez Steel, Steel  Decor Artwork
      Chucri Simon Zouein, Computer engineer
     
echkzouein@gmail.com
© pure software code - Since 2003