This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//! in - src image to balance | |
//! out - empty mat to merge results into | |
//! percent - 0 - 100. somewhere around 20 looks good. | |
void colorBalance(Mat& in, Mat& out, float percent) { | |
assert(in.channels() == 3); | |
assert(percent > 0 && percent < 100); | |
float half_percent = percent / 200.0f; | |
vector<Mat> tmpsplit; split(in,tmpsplit); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <stdint.h> | |
#include <fcntl.h> | |
#include <termios.h> | |
#include <errno.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//this code is not tested | |
class Color { | |
constructor(r, g, b){ | |
if(arguments.length === 1){ | |
this.r = r.r; | |
this.g = r.g; | |
this.b = r.b; | |
}else{ | |
this.r = r; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///this code is not tested | |
////.h | |
struct Color { | |
Color(){} | |
Color( int r, int g, int b ):r( static_cast<float>(r) ),g( static_cast<float>(g) ),b( static_cast<float>(b) ){} | |
float r{0}; | |
float g{0}; | |
float b{0}; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//USAGE $ program.exe path\\to\\video-in.mp4 path\\to\\video-out.mp4 | |
#include <iostream> | |
#include <string> | |
#include <mfidl.h> // Media Foundation interfaces | |
#include <mfapi.h> // Media Foundation platform APIs | |
#include <mferror.h> // Media Foundation error codes | |
#include <mfreadwrite.h> | |
#include <wmcontainer.h> // ASF-specific components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ATOM DUMP FROM ORIGINAL FILE | |
[ftyp] size=8+24 | |
major_brand = isom | |
minor_version = 200 | |
compatible_brand = isom | |
compatible_brand = iso2 | |
compatible_brand = avc1 | |
compatible_brand = mp41 | |
[free] size=8+0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using System.Collections.Generic; | |
using UnityEditor.Recorder.Input; | |
using UnityEngine; | |
using UnityEngine.Profiling; | |
using UnityEngine.Rendering; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Collections.Concurrent; |