Skip to content

Instantly share code, notes, and snippets.

View rakesh-gopal's full-sized avatar

Rakesh P Gopal rakesh-gopal

View GitHub Profile
@rakesh-gopal
rakesh-gopal / opencv_capture_video_frames.c
Last active March 21, 2023 09:32
OpenCV program to capture 30 frames from a video
#include <stdio.h>
#include <stdlib.h>
#include "cv.h"
#include "highgui.h"
#define NUM_SECONDS 30
int main( int argc, char** argv )
{
if (argc < 2)
@rakesh-gopal
rakesh-gopal / unix-lsusb.c
Created January 7, 2015 15:17
Unix code to list USB devices (lsusb equilent)
/*
* Compile with -lusb
*/
#include <stdio.h>
#include <usb.h>
main(){
struct usb_bus *bus;
struct usb_device *dev;
usb_init();
usb_find_busses();
@rakesh-gopal
rakesh-gopal / listusb.c
Created January 7, 2015 13:02
List the USB devices connected
#ifdef __cplusplus
extern "C" {
#endif
#include <windows.h>
#include <tchar.h>
#include <setupapi.h>
#include <initguid.h>