Skip to content

Instantly share code, notes, and snippets.

View mshabunin's full-sized avatar
🌚

Maksim Shabunin mshabunin

🌚
  • Nizhny Novgorod, Russia
  • 00:21 (UTC +03:00)
View GitHub Profile

QRCode

bool detect(InputArray img, OutputArray points) const;
string decode(InputArray img, InputArray points, OutputArray straight_qrcode = noArray()) const;
string detectAndDecode(InputArray img, 
                       OutputArray points=noArray(), 
                       OutputArray straight_qrcode = noArray()) const;
// + curved
bool detectMulti(InputArray img, OutputArray points) const;
bool decodeMulti(InputArray img, 

The OpenCV repository has several branches with different contribution policies.

Common rules for all branches

  • Your development branch name must differ from the names of branches in the upstream OpenCV repository, i.e. your branch must NOT be named 2.4, 3.4, 4.x, 5.x, or master/next (it's a technical requirement specific to our continuous integration system to properly test multi-repository patches with opencv_extra/opencv_contrib)
  • Multiple related commits should be squashed into one. A pull request must contain either a single commit, or several unrelated commits (e.g, commit with test + commit with code fix)
@mshabunin
mshabunin / contours.cpp
Created May 14, 2020 13:13
Pixels and contours
#include <iostream>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
using namespace cv;
using namespace std;
int main()
@mshabunin
mshabunin / build_opencv_msvc_arm.sh
Created March 11, 2020 15:37
Build OpenCV for ARM64 in Visual Studio
#!/bin/bash
set -e
cmake -G"Visual Studio 16 2019" \
-A ARM64 \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_SYSTEM_VERSION=10.0 \
-DCMAKE_SYSTEM_PROCESSOR=ARM64 \
-DWITH_IPP=OFF \
@mshabunin
mshabunin / logo.cpp
Created January 29, 2020 09:11
Drawing OpenCV logo
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace cv;
using namespace std;
@mshabunin
mshabunin / pool.cpp
Created December 30, 2019 22:40
Memory pool with two modes: safe and fast
#include <cstddef>
#include <iostream>
#include <list>
// #define SAFE
using namespace std;
class Pool
{
@mshabunin
mshabunin / posix_memalign_not_reclaiming.cpp
Last active September 19, 2019 12:06
Reproduce issue with posix_memalign
// command: g++ posix_memalign_not_reclaiming.cpp -o test
#include <malloc.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
const size_t ALIGN = 64;
const size_t ITERATIONS = 1000;
const size_t SIZE = 3 * 1000 * 1000;
@mshabunin
mshabunin / fragment.cpp
Created September 18, 2019 16:02
Memory fragmentation with posix_memalign
#include <thread>
#include <utility>
#include <vector>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <malloc.h>
using namespace std;
@mshabunin
mshabunin / build.sh
Created December 22, 2017 11:22
Build script for size investigations
#!/bin/bash
set -e
set -x
export PATH=/usr/lib/ccache:$PATH
build_one() {
BUILDDIR=$1
shift
@mshabunin
mshabunin / median_blur_perf_test.cpp
Created September 2, 2016 11:35
medianBlur performance test
#include "opencv2/core.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgcodecs.hpp"
#include <iostream>
using namespace cv;
using namespace std;
int main(int argc, char** argv)
{