Menu

Lesson 1 – November 19 (Aula G)

- Lessons
Lesson 1 – November 19 (Aula G)
  1. Introduction to the seminar cycle (15 min)
    Download
  2. Check system configuration
  3. Lesson
    Download
    Main data types in python, we’ll focus on:
    • Numeric Types: int, float, complex
    • Text Sequence Type: str
    • Boolean Type: bool
  4. Variable declaration and definition
  5. Understanding Python variables and Memory Management
  6. Function type()
  7. Python Operators
  8. Conditional expressions
    • if/else
    • try/except
Tags:

4 thoughts on “Lesson 1 – November 19 (Aula G)

Ivan

Hi
In the homework section you write:
Install OpenCV library
But… how can we install this library?
Thanks!

Reply
    paolacelio

    That was an advanced exercise but you’re right so I’ll say here how to install libraries (this part is the official documentation that you can find here:
    ======>>> […]
    installation and Usage
    If you have previous/other manually installed (= not installed via pip) version of OpenCV installed (e.g. cv2 module in the root of Python’s site-packages), remove it before installation to avoid conflicts.
    Select the correct package for your environment:
    There are four different packages and you should select only one of them. Do not install multiple different packages in the same environment. There is no plugin architecture: all the packages use the same namespace (cv2). If you installed multiple different packages in the same environment, uninstall them all with pip uninstall and reinstall only one package.
    a. Packages for standard desktop environments (Windows, macOS, almost any GNU/Linux distribution)
    run pip install opencv-python if you need only main modules
    run pip install opencv-contrib-python if you need both main and contrib modules (check extra modules listing from OpenCV documentation)
    b. Packages for server (headless) environments
    These packages do not contain any GUI functionality. They are smaller and suitable for more restricted environments.
    run pip install opencv-python-headless if you need only main modules
    run pip install opencv-contrib-python-headless if you need both main and contrib modules (check extra modules listing from OpenCV documentation)
    Import the package:
    import cv2
    All packages contain haarcascade files. cv2.data.haarcascades can be used as a shortcut to the data folder. For example:
    cv2.CascadeClassifier(cv2.data.haarcascades + “haarcascade_frontalface_default.xml”)
    Read OpenCV documentation
    <<<===== [...] We'll cover this part in next lessons Paola Celio

    Reply
Silvia

Buongiorno, non riesco a scaricare la lezione 1, mi dà errore, grazie!

Reply
    paolacelio

    From sunday will be available sorry 🙂

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *