Skip to content

Instantly share code, notes, and snippets.

View demid5111's full-sized avatar

Alexander Demidovskij demid5111

View GitHub Profile
@demid5111
demid5111 / 1_install_opencv_ubuntu.md
Last active November 22, 2023 08:41
Instructions for installing opencv on Ubuntu 18.04

Install OpenCV 4.5 on Ubuntu 18.04

Pre-configured OpenCV for Python from PyPi

  1. open the terminal
  2. check Python3 installation: python3 --version
  3. go to official website to learn details: https://pypi.org/project/opencv-python/
  4. choose the most complete package and run: python3 -m pip install opencv-contrib-python often you will not find the pip installed by default, therefore use the corresponding steps from the
@demid5111
demid5111 / 1_install_opencv_win.md
Last active June 19, 2024 14:06
Instructions for installing opencv on Windows 10

Install OpenCV 4.5 on Windows 10

Pre-configured OpenCV for Python from PyPi

  1. open the terminal (Ctrl+R + cmd)
  2. check Python3 installation: py --version
  3. go to official website to learn details: https://pypi.org/project/opencv-python/
  4. choose the most complete package and run: py -m pip install opencv-contrib-python
  5. check installation by entering the Python REPL: py
  6. import tha library: import cv2
@demid5111
demid5111 / 1_install_opencv_mac.md
Last active February 9, 2021 16:35
Instructions for installing opencv on macOS

Install OpenCV 4.5 on macOS

Pre-configured OpenCV for Python from PyPi

  1. open the terminal
  2. check Python3 installation: python3 --version
  3. go to official website to learn details: https://pypi.org/project/opencv-python/
  4. choose the most complete package and run: pip install opencv-contrib-python
  5. check installation by entering the Python REPL: python3
  6. import tha library: import cv2
#include <iostream>
#include <vector>
int main () {
std::vector<int> counters = {10, 20, 30};
// need mutable as lambda by default is a const expression
auto passByValueLambda = [=] () mutable {
std::cout << "Hello, lambda by value" << std::endl;
// modifying the copy - original vector is not influenced
#include <iostream>
int main () {
int counter = 10;
auto basicLambdaFunc0 = [] () { std::cout << "Hello, lambda" << counter << std::endl;};
basicLambdaFunc0();
}
@demid5111
demid5111 / main01.cpp
Last active September 10, 2017 15:33
#include <iostream>
int main () {
// the most used form of lambdas without return type
auto basicLambdaFunc0 = [] () { std::cout << "Hello, lambda0" << std::endl;};
// omitting parameters
auto basicLambdaFunc1 = [] { std::cout << "Hello, lambda1" << std::endl;};
// the most detailed syntax