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
5 | |
5 | |
#22B14C X1 | |
#3F48CC X1 | |
#ED1C24 X10 | |
#FF00FF X10 | |
#FFF200 X1 | |
D: 4.00 | |
#99CCFF 100 3 Motorcycle 14 0.8 Car 18 0.6 Train 22 0.5 | |
#99FF66 50 2 Helicopter 25 0.2 Jet 30 0.1 |
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
6 | |
6 | |
#3F48CC X1 | |
#B5E61D X0 | |
#FFC90E X2 | |
#ED1C24 X2 | |
#880015 X1 | |
#A349A4 X6 | |
D: 4.00 | |
#808000 250 2 Bicycle 10 0.9 Motorcycle 14 0.8 |
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
5 | |
4 | |
#FF80FF X1 | |
#EFE4B0 X1 | |
#C3C3C3 X1 | |
#FF8000 X1 | |
#22B14C X1 | |
D: 2.00 | |
#A349A4 200 0 | |
#808000 200 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
6 | |
5 | |
#FFF200 X1 | |
#A349A4 X2 | |
#ED1C24 X10 | |
#3F48CC X1 | |
#B97A57 X1 | |
#22B14C X15 | |
D: 5.00 | |
#880015 90 5 Motorcycle 14 0.8 Car 18 0.6 Train 22 0.5 Helicopter 25 0.2 Jet 30 0.1 |
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
6 | |
6 | |
#3F48CC X1 | |
#B5E61D X0 | |
#FFC90E X2 | |
#ED1C24 X2 | |
#880015 X1 | |
#A349A4 X6 | |
D: 4.00 | |
#808000 250 2 Bicycle 10 0.9 Motorcycle 14 0.8 |
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
#define PINL1 8 //left motor pin 1 | |
#define PINL2 9 //left motor pin 2 | |
#define PINR1 10 //right motor pin 1 | |
#define PINR2 11 //right motor pin 2 | |
void setup() | |
{ | |
//Set motor pinouts as output | |
pinMode(PINL1,OUTPUT); | |
pinMode(PINL2,OUTPUT); |
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
void setup() | |
{ | |
Serial.begin(9600); // set up Serial library at 9600 bits per second | |
Serial.println("Hello world!"); // prints hello with ending line break | |
} | |
void loop() {} |
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
#define IMGDATA(image,i,j,k) *((uchar *)&image->imageData[(i)*(image->widthStep) + (j)*(image->nChannels) + (k)]) //extracts pixel information | |
IplImage* get_binary(IplImage* grayimg, int threshold) | |
{ | |
IplImage* bin; //To store and return the result | |
bin = cvCreateImage(cvGetSize(grayimg),IPL_DEPTH_8U,1); | |
for(int i=0; i < grayimg->height; i++) { | |
for(int j=0; j < grayimg->width; j++) { | |
//It is checked if the gray-scale equivalent is larger than the threshold or not |
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
#define IMGDATA(image,i,j,k) *((uchar *)&image->imageData[(i)*(image->widthStep) + (j)*(image->nChannels) + (k)]) //extracts pixel information | |
IplImage* get_grayscale(IplImage* colorimg) | |
{ | |
IplImage* gray; //To store and return the result | |
gray = cvCreateImage(cvGetSize(colorimg),IPL_DEPTH_8U,1); //Resultant image initialized | |
for(int i=0; i < colorimg->height; i++) { | |
for(int j=0; j < colorimg->width; j++) { | |
//Conversion formula for gray-scale is applied as had been discussed | |
IMGDATA(gray,i,j,0) = 0.33*IMGDATA(colorimg,i,j,0)+0.56*IMGDATA(colorimg,i,j,1)+0.11*IMGDATA(colorimg,i,j,2); |
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 "stdafx.h" | |
#include <stdio.h> | |
#include <highgui.h> | |
#include <cv.h> | |
#include <cxcore.h> | |
int main() | |
{ | |
CvCapture* capture = cvCreateCameraCapture(-1); //The streaming video is loaded into a pointer of type CvCapture | |
IplImage* frame; //For each frame of the video |