This file contains hidden or 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 "opencv2/opencv.hpp" | |
#define PIX(img,i,j,k) (((uchar*)img->imageData)[i*img->widthStep+j*img->nChannels+k]) | |
IplImage* createbinary(IplImage *img, int thresh) | |
{ | |
int i,j,ht,wd; | |
ht=img->height; | |
wd=img->width; | |
This file contains hidden or 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 "opencv2/opencv.hpp" | |
#define PIX(img,i,j,k) (((uchar*)img->imageData)[i*img->widthStep+j*img->nChannels+k]) | |
int findmedian(IplImage* img) | |
{ | |
int intensities[256]; | |
int i,j,temp=0; | |
for(i=0;i<256;i++) | |
intensities[i]=0; |
This file contains hidden or 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 <iostream> | |
#include <stdlib.h> | |
using namespace std; | |
struct NODE{ | |
int val; | |
struct NODE *next; | |
}; | |
This file contains hidden or 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 <stdio.h> | |
#include "opencv2/opencv.hpp" | |
#define PIX(img,i,j,k) (((uchar*)img->imageData)[i*img->widthStep+j*img->nChannels+k]) | |
void dfsrecursion(IplImage* img, int x, int y, int **status, int blobcount) | |
{ | |
int i,j; | |
//traverse all connected pixels and start dfs if encounter a black unvisited pixel |
This file contains hidden or 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
#!/bin/bash | |
#======================================================================= | |
# Author : Nevin Valsaraj <nevin[dot]valsaraj32[at]gmail[dot]com> | |
# Distributed under the MIT License. | |
# (See full license at http://opensource.org/licenses/MIT) | |
#======================================================================= | |
#In short, I can't be held accountable if you wreck your computer. | |
echo -e "\nAlright, let's begin." | |
read -p "Is this the directory you cloned morse? [y/n]" -n 1 -r |
This file contains hidden or 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
#!/usr/bin/env python | |
# script to download all study material slides from http://db-book.com/ | |
# ======================================================================= | |
# Author : Nevin Valsaraj <nevin[dot]valsaraj32[at]gmail[dot]com> | |
# Distributed under the MIT License. | |
# (See full license at http://opensource.org/licenses/MIT) | |
# ======================================================================= |
This file contains hidden or 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
#!/usr/bin/python | |
# Software License Agreement (BSD License) | |
# | |
# Copyright (c) 2012, Willow Garage, Inc. | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: |
This file contains hidden or 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
#!/usr/bin/env python | |
# Python script to get the day's contribution count from user's GitHub account | |
# Use flag -h for parameter information | |
import urllib2 | |
from bs4 import BeautifulSoup | |
import argparse | |
# parse args and set parameter details | |
parser = argparse.ArgumentParser(description='Get GitHub contribution data') |
This file contains hidden or 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
#!/bin/zsh | |
# Clear rbenv variables before starting tmux | |
unset RBENV_VERSION | |
unset RBENV_DIR | |
tmux start-server\; has-session -t auv-core 2>/dev/null | |
if [ "$?" -eq 1 ]; then | |
cd /home/routeaccess |
This file contains hidden or 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 <ros/ros.h> | |
#include <ros/console.h> | |
#include <std_msgs/String.h> | |
#include <cv_bridge/cv_bridge.h> | |
#include <image_transport/image_transport.h> | |
#include <sensor_msgs/image_encodings.h> | |
#include <opencv2/opencv.hpp> | |
#include <topicheaders/topicheaders.h> | |
#define CAMERA_ID 0 // 0: front camera, 1: bottom camera |
OlderNewer