Skip to content

Instantly share code, notes, and snippets.

View Niek-Okido's full-sized avatar

Niek Niek-Okido

  • Doderecht
View GitHub Profile
@maximus5684
maximus5684 / gist:082f8939edb6aed7ba0a
Created July 14, 2015 17:49
OpenCV Image Overlay w/Transparency
void OverlayImage(Mat* src, Mat* overlay, const Point& location)
{
for (int y = max(location.y, 0); y < src->rows; ++y)
{
int fY = y - location.y;
if (fY >= overlay->rows)
break;
for (int x = max(location.x, 0); x < src->cols; ++x)
@heskyji
heskyji / hmac_sha1.py
Created September 17, 2015 01:08
Generate HMAC-SHA1 Signature using Python 3
import hashlib
import hmac
import base64
def make_digest(message, key):
key = bytes(key, 'UTF-8')
message = bytes(message, 'UTF-8')
@yohhoy
yohhoy / ff2cv.cpp
Last active July 24, 2024 14:05
Read video frame with FFmpeg and convert to OpenCV image
/*
* Read video frame with FFmpeg and convert to OpenCV image
*
* Copyright (c) 2016 yohhoy
*/
#include <iostream>
#include <vector>
// FFmpeg
extern "C" {
#include <libavformat/avformat.h>
@yohhoy
yohhoy / cv2ff.cpp
Created February 17, 2016 15:41
Convert from OpenCV image and write movie with FFmpeg
/*
* Convert from OpenCV image and write movie with FFmpeg
*
* Copyright (c) 2016 yohhoy
*/
#include <iostream>
#include <vector>
// FFmpeg
extern "C" {
#include <libavformat/avformat.h>