Skip to content

Instantly share code, notes, and snippets.

View rajatsaxena's full-sized avatar

Rajat Saxena rajatsaxena

View GitHub Profile
@rajatsaxena
rajatsaxena / time_split.m
Created June 17, 2020 10:31
time splitting matlab
time_dataset = [1 2 3 4 5 6 7 8];
grp_size = 3;
overlap = 2;
% th = length(time_dataset) - overlap;
for i=1:grp_size-overlap:length(time_dataset)
disp(time_dataset(i:i+grp_size-1));
end
----------------------------------------------------------------------------------
g++ -o test_1 test_1.cpp `pkg-config opencv --cflags --libs`
---------------------------------- using gcc and cmake ----------------------------------
* Create a cmake file CMakeLists.txt
* Add the following to cmake file
cmake_minimum_required(VERSION 2.8)
project( DisplayImage )
find_package( OpenCV REQUIRED )
@rajatsaxena
rajatsaxena / raspividTest.c
Last active October 7, 2019 20:36
raspivid test script to also clock_reatime and gettimeofday for each frame
/*
Copyright (c) 2013, Broadcom Europe Ltd
Copyright (c) 2013, James Hughes
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
@rajatsaxena
rajatsaxena / stt_googleSpeech
Created October 6, 2014 00:33
Google Speech API in Python
import pyaudio
import wave
import audioop
from collections import deque
import os
import urllib2
import urllib
import time
import math
import json
@rajatsaxena
rajatsaxena / faceRecFacebook
Created October 4, 2014 19:11
Facial Recognition in Python and OpenCV
import cv
import cv2
import os
import Image
import json
import numpy as np
import urllib2
from StringIO import StringIO
CASCADE = "./haarcascade_frontalface_alt.xml"