arko && funsize. what is beer? amazing what is computer vision? giving computers cameras,...
TRANSCRIPT
![Page 1: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/1.jpg)
COMPUTER VISION, ROBOTS & BEER
Arko && funsize
![Page 2: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/2.jpg)
What is Beer? Amazing
![Page 3: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/3.jpg)
What is computer vision? Giving computers cameras, LIDAR,
optical sensors Run that through an algorithm Now you know where things are!
![Page 4: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/4.jpg)
In code we trust
![Page 5: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/5.jpg)
What’s out there?
HardwareUSB CameraMicrosoft KinectUSB LIDAR
SoftwareOpenCV (cross-platform)Microsoft SDK (meh)OpenNI (cross-platform)OpenPCL (cross-platform)
![Page 6: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/6.jpg)
Let’s just dive in..
OpenCV Example:Import IplImage (BGR.. not RBG..)Convert BRG to HSVThresholds, Erode, DilateHSV Selection and Band (Take a slice)Draw contours on what meets the cases
![Page 7: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/7.jpg)
Here’s the Code:output_im = cvCloneImage(input_im);
IplImage *hsv_im = cvCreateImage(cvSize(input_im->width, input_im->height), 8, 3);
IplImage *temp_im = cvCreateImage(cvSize(input_im->width, input_im->height),8, 1);
cvCvtColor(input_im, hsv_im, CV_BGR2HSV);
int rows = input_im->height;
int cols = input_im->width;
cvZero(temp_im);
for (int row=0; row<rows; row++) {
for (int col=0; col<cols; col++) {
CvScalar hsv = cvGet2D(hsv_im, row, col);
int h = hsv.val[0];
int v = hsv.val[2];
if ((170 < h || h > 175) && (v > 80)) {
cvSet2D(temp_im, row, col, cvScalar(255));
}
}
}
cvErode(temp_im, temp_im, NULL, 1);
CvMemStorage *storage = cvCreateMemStorage();
CvSeq *contours;
cvFindContours(temp_im, storage, &contours); // destroys temp
cvDrawContours(output_im, contours, CV_RGB(0,255,0), CV_RGB(0,255,0), 1);
![Page 8: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/8.jpg)
Try for yourself:
Good Source to learn: https://github.com/egradman/cv-worksho
p/blob/master/code_fragments.txt
OpenCV webapp (please don’t spam): https://github.com/egradman/cv-worksho
p/blob/master/code_fragments.txt
![Page 9: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/9.jpg)
Example on OpenCV
![Page 10: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/10.jpg)
Example with Kinect + OpenCV
![Page 11: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/11.jpg)
Example with OpenPCL
![Page 12: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/12.jpg)
Demo of OpenPCL
Will it work? Yes.
![Page 13: Arko && funsize. What is Beer? Amazing What is computer vision? Giving computers cameras, LIDAR, optical sensors Run that through an algorithm](https://reader030.vdocuments.net/reader030/viewer/2022032703/56649d0c5503460f949e1038/html5/thumbnails/13.jpg)
Apply this to a robot
Now it can see State Estimation Apply visual data to update state
estimate Recognize points of interestHave sensors like an IMU
Now you can navigate,
plan paths, avoid objects