Detect Candle.  Open VC++ Directories configuration: Tools > Options > Projects and Solutions > VC++ Directories  Choose "Show directories for: Include.

Slides:



Advertisements
Similar presentations
Processing Lecture. 1 What is processing?
Advertisements

Chapter 2 Programming by Example. A Holistic Perspective Three sections separated by blank lines. Program comment File: FileName.java
Image Transforms 主講人:虞台文. Content Overview Convolution Edge Detection – Gradients – Sobel operator – Canny edge detector – Laplacian Hough Transforms.
Histograms and Matching 主講人:虞台文. Content Overview Basic Histogram Structure Accessing Histograms Basic Manipulations with Histograms Color Spaces Histogram.
Gavin S Page OpenCV Tutorial Part II Loading Images and Using Histograms 29 November 2005.
Introduction to OpenCV Dr. Chung-Hao Chen Haole Guo Sep 2011.
Gavin S Page OpenCV Tutorial Part I Using OpenCV with Microsoft Visual Studio.net November 2005.
Gavin S Page OpenCV Tutorial Part IV A Brief Guide to Memory Management (and other Miscellaneous Functions) 02 December 2005.
*Third party marks and brands are the property of their respective owners Getting Started with OpenCV Yue Gao CS 4758/6758 Robot Learning
L.
Addison Wesley is an imprint of © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 3 Variables, Calculations, and Colors Starting Out with Games.
Filtering (I) Dr. Chang Shu COMP 4900C Winter 2008.
OpenCV Open source C omputer V ision library By: Bahare Torkaman Fall 2010.
OPENCV TUTORIAL OpenCV Windows 7 Microsoft Visual C++ Express 2010.
SDL Programming Introduction. Initialization 2  The first thing you must do is initialize SDL  int SDL_Init( SDL_INIT_EVERYTHING )  This will return.
Software Resources Multimodal Interaction Dr. Mike Spann
Content To Date Review Course Work/Labs Assigned to Date Review HTML Image Tag Editing code for image folder Introduce HTML Color Tags Webpage Safe Colors.
Multimedia Programming 02: Play with Images Departments of Digital Contents Sang Il Park.
Facial Recognition Alex Newcomb, Tom Stefanyk. Group Members Alex Newcomb In charge of web server, image compression and facial recognition database The.
1 k Jarek Rossignac,  2008 Processing  Install Processing  Learn how to edit, run, save, export, post programs  Understand.
Multimedia Programming 03: Point Processing Departments of Digital Contents Sang Il Park.
L. Akshay Masare Piyush Awasthi IMAGE PROCESSING AND OPENCV.
Chapter 2 - More Controls More controls – Text boxes - used for user input – Frames - containers to group items – check boxes - user select an option -
Lecture 3 OpenGL.
Image Processing 主講人:虞台文. Content Smoothing Image Morphology Some Applications of Image Morphology Flood Fill Resize Image Pyramids Threshold.
Introduction It is developed to create software applications. It is a tool for developers of any program that uses both basic and expert settings. It.
Multimedia Programming 13: Review and term project Departments of Digital Contents Sang Il Park.
Introduction of OpenCV Alireza Shirani Researcher of Medical Image and Signal Processing M. S Electrical Engineering yahoo. com Spring.
Learning With Computers I (Level Green) ©2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly.
Dr. Thurdsak LEAUHATONG Dept. of electronics, Faculty of Engineering, KMITL
1 Chapter 12 GUI C/C++ Language Programming Wanxiang Che.
Processing can load images, display them on the screen, and change their size, position, opacity, and tint. You can load gif, png and jpg images in processing.
Graphic Basics in C ATS 315. The Graphics Window Will look something like this.
1 Georgia Tech, IIC, GVU, 2006 MAGIC Lab Rossignac Lecture 02b: Tutorial for Programming in Processing Jarek Rossignac.
Variables Art &Technology, 3rd Semester Aalborg University Programming David Meredith
CSC 1010 Programming for All Lecture 7 Input, Output & Graphics.
Getting to Know OpenCV 主講人:虞台文. Content Basic Structures Arrays, Matrices, and Images Matrix and Image Operators Drawing Things Drawing Text Data Persistence.
Multimedia Programming 04: 점, 선, 면
Open project in Microsoft Visual Studio → build program in “Release” mode.
Sliding Doors Tutorial  doors/
Midterm: Question 1 (35%) (30 minutes) Write an assembly program to draw a rectangle. – (5%) Show a message to ask for information of the rectangle – (5%)
1 SIC / CoC / Georgia Tech MAGIC Lab Rossignac Processing  Install Processing  Learn how to edit, run, save, export,
Create a space Using the box Draw tool for your image.
Tabs with Rounded Corners (Sliding Doors). Sliding Doors Tutorial  doors/
Optical Flow walk through Aidean Sharghi Spring 14.
Multimedia Programming 10: Mouse, Draw and Morphing Departments of Digital Contents Sang Il Park.
Multimedia Programming 12: Mouse, Draw and Morphing2 Departments of Digital Contents Sang Il Park.
Representation of image data
David Meredith Aalborg University
OpenCV Tutorial Part I Using OpenCV with Microsoft Visual Studio .net November 2005 Gavin S Page
EEC-693/793 Applied Computer Vision with Depth Cameras
A Quick Introduction to the C Interface By David Johnston
TAB ONE TAB TWO TAB THREE TAB FOUR TAB FIVE
DIRECTIONS: 1. Click Enable Editing in the yellow bar above.
موضوع بحث: تعریف علم اصول جلسه 43.
اشاره به نتایج قیاس های فقهی گاهی، حکم شرعی است
علم اصول، «نفس قواعد» است نه «علم به قواعد»
EEC-693/793 Applied Computer Vision with Depth Cameras
12.4 p 471 a) double[] number = {1.05, 2.05, 3.05, 4.05, 5.05};
1 2 3 Animated countdown timer on textured background (Difficult)
EEC-693/793 Applied Computer Vision with Depth Cameras
EEC-693/793 Applied Computer Vision with Depth Cameras
Divide Whole Numbers by Decimal Numbers
The Development of Atomic Models
قاعده لا ضرر، تنها در شبهات حکمیه جاری است
TEXT FORMAT Textured and layered background with title - Advanced
جلسه 34.
26 days to go Animated countdown timer on textured background
1 ج : اشاره بعضی از اصولیون به تعریف ترکیبی آخوند با «یک لفظ»
Presentation transcript:

Detect Candle

 Open VC++ Directories configuration: Tools > Options > Projects and Solutions > VC++ Directories  Choose "Show directories for: Include files" Add "Folder OpenCV>\include\opencv"

 Choose "Show directories for: Library files" Add " \lib"  Choose "Show directories for: Source files" Add " \src\cv " Add " \src\cvaux " Add " \src\cxcore " Add " \src\highgui"

 Open Linker Input properties: Configuration Properties > Linker > Input  edit "Additional Dependencies" Add "cv210.lib" Add "cxcore210.lib" Add "highgui210.lib"

 IplImage cvQueryFrame(CvCapture* capture) cvCreateImage(CvSize size, int depth, int channels) cvLoadImage(const char* filename, int iscolor=CV_LOAD_IMAGE_COLOR) cvReleaseImage(IplImage** image)

 HighGui cvNamedWindow(const char* name, int flags) cvShowImage(const char* name, const CvArr* image) cvWaitKey(int delay=0) cvDestroyWindow(const char* name) cvDestroyAllWindows()

#include int main( int argc, char** argv ) { IplImage* img = cvLoadImage( “photo.jpg”); // โหลดภาพ photo.jpg cvNamedWindow( “Example1”, CV_WINDOW_AUTOSIZE ); // สร้างหน้าต่างสำหรับแสดงผล cvShowImage( “Example1”, img ); // กำหนดให้ภาพมาแสดงผลที่หน้าต่าง cvWaitKey(0); // Wait for any key cvReleaseImage( &img ); // Clear Memory cvDestroyWindow( “Example1” ); // หยุดการทำงานของหน้าต่างแสดงผล }

 Write String cvInitFont(CvFont* font, int fontFace, double hscale, double vscale, double shear=0, int thickness=1, int lineType=8) cvPutText(CvArr* img, const char* text, CvPoint org, const CvFont* font, CvScalar color)  Draw Circle cvCircle(CvArr* img, CvPoint center, int radius, CvScalar color, int thickness=1, int lineType=8, int shift=0)  Draw Rectangle cvRectangle(CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int lineType=8, int shift=0)  Draw Line cvLine(CvArr* img, CvPoint pt1, CvPoint pt2, CvScalar color, int thickness=1, int lineType=8, int shift=0)

//Print string CvFont font; cvInitFont(&font, CV_FONT_HERSHEY_SIMPLEX, 1.0, 1.0, 0, 1, CV_AA); cvPutText(img,"Hello", cvPoint(20,20), &font, cvScalar(255, 255, 255, 0)); //Draw x-mark cvLine(img, cvPoint(0,0), cvPoint(10,10), cvScalar(0,0,255,0)) cvLine(img, cvPoint(10,0), cvPoint(0,10), cvScalar(0,0,255,0))

 Access image data RGB image ImgHeight = x, ImgWidth = y Image[x][y] = (img->imageData + x * img->widthStep) + (3*y) Red Channel = Image[x][y] + 2 Green Channel = Image[x][y] + 1 Blue Channel = Image[x][y]

//Convert image to red channel void cutoff_gb ( IplImage* img ) { for( int x=0; x height; x++ ) { uchar* ptr = (uchar*) (img->imageData + x * img->widthStep); for( int y=0; y width; y++ ) { ptr[3*y] = 0; ptr[3*y+1] = 0; }

 Convert color space cvCvtColor(CvArr* src, CvArr* dst, int code) code = X2Y (such asRGB2GRAY, RGB2HSV)  Blur image cvSmooth(CvArr* src, CvArr* dst, int smoothtype=CV_GAUSSIAN, int param1=3, int param2=0)  Cut threshold cvThreshold(CvArr* src, CvArr* dst, double threshold, double maxValue, int thresholdType)

 Get Capture from camera CvCapture* capture = cvCreateCameraCapture( int index );  Get Image from capture IplImage *img = cvQueryFrame( capture );

//Capture from camera CvCapture* capture = cvCreateCameraCapture( 0 ); IplImage* img = cvQueryFrame( capture ); cvNamedWindow( "Input", CV_WINDOW_AUTOSIZE ); while(cvWaitKey(5) != 27) // wait 5 ms for press ESC { cvShowImage( "Input", img ); img = cvQueryFrame( capture ); } cvDestroyAllWindows();

IplImage* temp = cvCreateImage(cvGetSize(img),IPL_DEPTH_8U,1); cvCvtColor(img,temp,CV_RGB2GRAY); cvSmooth(temp,temp,CV_GAUSSIAN,7,7); CvMemStorage* MemStorage = cvCreateMemStorage(0); CvSeq* Circles = cvHoughCircles(temp,MemStorage,CV_HOUGH_GRADIENT,DP,MIN_DIST,200,100); for (int i = 0; i total; i++) { float* c = (float*)cvGetSeqElem( Circles, i ); if( cvRound(c[2]) MAX_RADIUS) continue; //Draw cvCircle( result, cvPoint(cvRound(c[0]),cvRound(c[1])),3, CV_RGB(0,255,0), -1, 8, 0 ); cvCircle( result, cvPoint(cvRound(c[0]),cvRound(c[1])),cvRound(c[2]), CV_RGB(255,0,0), 3, 8, 0 ); //แสดงรัศมี char radius_word[100]; sprintf(radius_word,"%d",cvRound(c[2])); cvPutText(result,radius_word, cvPoint(cvRound(c[0]),cvRound(c[1])), &font, cvScalar(255, 0, 0, 0)); }

 CvRect cvRect( int x, int y, int width, int height )  ROI (Region Of Interest) cvSetImageROI(IplImage* image, CvRect rect) cvResetImageROI(IplImage* image) cvCopy(CvArr* src, CvArr* dst, CvArr* mask=NULL)

Get Position Count black&white Cut ROI cvHoughCircles cvSmooth cvCvtColor Capture from camera