픽셀 다루기

Similar documents
BMP 파일 처리

(JBE Vol. 24, No. 2, March 2019) (Special Paper) 24 2, (JBE Vol. 24, No. 2, March 2019) ISSN

3 : OpenCL Embedded GPU (Seung Heon Kang et al. : Parallelization of Feature Detection and Panorama Image Generation using OpenCL and Embedded GPU). e

02( ) SAV12-19.hwp

CONTENTS 01 Adobe Photoshop Lightroom을 소개합니다 촬영부터 출력까지 간편한 사진 작업 (Simplify photography from shoot to finish) Adobe Photoshop Lightroom 작업공간(Workspace)

Microsoft PowerPoint - IP11.pptx

(JBE Vol. 23, No. 6, November 2018) (Regular Paper) 23 6, (JBE Vol. 23, No. 6, November 2018) ISSN 2

Mobile Service > IAP > Android SDK [ ] IAP SDK TOAST SDK. IAP SDK. Android Studio IDE Android SDK Version (API Level 10). Name Reference V

Dialog Box 실행파일을 Web에 포함시키는 방법

!K_InDesginCS_NFH

김기남_ATDC2016_160620_[키노트].key

solution map_....

슬라이드 1

DocsPin_Korean.pages

Analytics > Log & Crash Search > Unity ios SDK [Deprecated] Log & Crash Unity ios SDK. TOAST SDK. Log & Crash Unity SDK Log & Crash Search. Log & Cras

Microsoft PowerPoint - Install Guide[ ].ppt [호환 모드]

PowerPoint 프레젠테이션


Microsoft PowerPoint - 13prac.pptx

1

슬라이드 1

Orcad Capture 9.x

[ReadyToCameral]RUF¹öÆÛ(CSTA02-29).hwp

Open GL

PCServerMgmt7

디지털영상처리3

ODS-FM1

APOGEE Insight_KR_Base_3P11

Eclipse 와 Firefox 를이용한 Javascript 개발 발표자 : 문경대 11 년 10 월 26 일수요일

Copyright 2012, Oracle and/or its affiliates. All rights reserved.,.,,,,,,,,,,,,.,...,. U.S. GOVERNMENT END USERS. Oracle programs, including any oper

초보자를 위한 C# 21일 완성

2 : 3 (Myeongah Cho et al.: Three-Dimensional Rotation Angle Preprocessing and Weighted Blending for Fast Panoramic Image Method) (Special Paper) 23 2

DBPIA-NURIMEDIA

ICT03_UX Guide DIP 1605

KEY 디바이스 드라이버

Gray level 변환 및 Arithmetic 연산을 사용한 영상 개선

기술 이력서 2.0

2011년 10월 초판 c 2011 Sony Corporation. All rights reserved. 서면 허가 없이 전체 또는 일부를 복제하는 것을 금합니다. 기능 및 규격은 통보 없이 변경될 수 있습니다. Sony와 Sony 로고는 Sony의 상표입니다. G L

Microsoft PowerPoint - lecture2-opengl.ppt [호환 모드]

26 이경승(394~400).hwp

강의10


Remote UI Guide

À±½Â¿í Ãâ·Â

Axxon_Next_Brochure_1_Lee

슬라이드 1

thesis

1. GigE Camera Interface를 위한 최소 PC 사양 CPU : Intel Core 2 Duo, 2.4GHz이상 RAM : 2GB 이상 LANcard : Intel PRO/1000xT 이상 VGA : PCI x 16, VRAM DDR2 RAM 256MB

Windows Embedded Compact 2013 [그림 1]은 Windows CE 로 알려진 Microsoft의 Windows Embedded Compact OS의 history를 보여주고 있다. [표 1] 은 각 Windows CE 버전들의 주요 특징들을 담고

Apache Ivy

untitled

목차 제 1 장 inexio Touch Driver소개 소개 및 주요 기능 제품사양... 4 제 2 장 설치 및 실행 설치 시 주의사항 설치 권고 사양 프로그램 설치 하드웨

<B4EBC7D1BAF1B8B8C7D0C8B8C3DFB0E8C7D0BCFABFACBCF62D C1F8C2A520C3D6C1BE292E687770>

분산처리 프레임워크를 활용한대용량 영상 고속분석 시스템

Lab10

Æí¶÷4-¼Ö·ç¼Çc03ÖÁ¾š

High Resolution Disparity Map Generation Using TOF Depth Camera In this paper, we propose a high-resolution disparity map generation method using a lo

±èÇö¿í Ãâ·Â

MPLAB C18 C

PowerPoint Presentation

컴퓨터과학과 교육목표 컴퓨터과학과의 컴퓨터과학 프로그램은 해당분야 에서 학문적 기술을 창의적으로 연구하고 산업적 기술을 주도적으로 개발하는 우수한 인력을 양성 함과 동시에 직업적 도덕적 책임의식을 갖는 IT인 육성을 교육목표로 한다. 1. 전공 기본 지식을 체계적으로

공지사항

04서종철fig.6(121~131)ok

C++-¿Ïº®Çؼ³10Àå

UNIST_교원 홈페이지 관리자_Manual_V1.0

MAX+plus II Getting Started - 무작정따라하기

example code are examined in this stage The low pressure pressurizer reactor trip module of the Plant Protection System was programmed as subject for

歯Phone

1. 자바프로그램기초 및개발환경 2 장 & 3 장. 자바개발도구 충남대학교 컴퓨터공학과


Something that can be seen, touched or otherwise sensed

소프트웨어개발방법론

chap 5: Trees

Interstage5 SOAP서비스 설정 가이드

1 : 360 VR (Da-yoon Nam et al.: Color and Illumination Compensation Algorithm for 360 VR Panorama Image) (Special Paper) 24 1, (JBE Vol. 24, No

untitled

iii. Design Tab 을 Click 하여 WindowBuilder 가자동으로생성한 GUI 프로그래밍환경을확인한다.

The_IDA_Pro_Book

REP - CP - 016, N OVEMBER 사진 요약 25 가지 색상 Surf 를 이용한 사진 요약과 사진 배치 알고리즘 Photo Summarization - Representative Photo Selection based on 25 Color Hi

untitled

untitled

Tad_가이드라인

DE1-SoC Board

MasoJava4_Dongbin.PDF

(JBE Vol. 21, No. 1, January 2016) (Regular Paper) 21 1, (JBE Vol. 21, No. 1, January 2016) ISSN 228

HTML5* Web Development to the next level HTML5 ~= HTML + CSS + JS API

02 C h a p t e r Java

(JBE Vol. 7, No. 4, July 0)., [].,,. [4,5,6] [7,8,9]., (bilateral filter, BF) [4,5]. BF., BF,. (joint bilateral filter, JBF) [7,8]. JBF,., BF., JBF,.

PowerPoint Presentation

Assign an IP Address and Access the Video Stream - Installation Guide

10주차.key

... K-vision Fig.. K-vision camera tracking screen Drummond [3] 3. 3 (lines), (edge) 3. (target). (homography perspective transform) [4]. (drifting).

DR-M140 사용 설명서

untitled

LEICA C-LUX

SchoolNet튜토리얼.PDF

C# Programming Guide - Types

Microsoft PowerPoint - AME_InstallRoutine_ver8.ppt

°í¼®ÁÖ Ãâ·Â

47-56±è»õ·Ò

Transcription:

OpenCV 개요및설치 김성영교수 금오공과대학교 컴퓨터공학과

학습내용 OpenCV Library Introduction Installing OpenCV Library (Visual Studio 2010) Loading, displaying and saving images 주요자료구조 2

OpenCV Library Introduction open computer vision and machine learning software library developed by Intel, supported by Willow Garage and Itseez WebSite : http://opencv.org (http://docs.opencv.org) History Intel Research Project (1999) v1.0 (2006) Stable Release v2.4.2 (2012. 7. 4) Support OS : Windows, Linux, Mac, Android, ios Interface : C, C++, Python, JAVA(Android only) License : open source BSD License free for both academic & commercial use IPP(MMX, SSE), TBB, GPU(CUDA) support 3

Non-free functionality module SIFT : Scale-Invariant Feature Transform David G. Lowe, Distinctive Image Features from Scale-Invariant Keypoints, IJCV, 60(2), 2004 OpenCV Implementation : Rob Hess SURF : Speeded Up Robust Features Herbert Bay, Andreas Ess, Tinne Tuytelaars and Luc Van Gool, SURF: Speeded Up Robust Features, CVIU, Vol. 110, No. 3, pp. 346-359, 2008 OpenCV Implementation : Liu Liu 4

OpenCV 1.x C Interface 5

OpenCV 2.x C++ Interface Module core imgproc highgui video calib3d features2d objdetect ml flann gpu photo stitching nonfree contrib legacy Function The Core Functionality Image Processing High-level GUI and Media I/O Video Analysis Camera Calibration and 3D Reconstruction 2D Features Framework Object Detection Machine Learning Clustering and Search in Multi-Dimensional Spaces GPU-accelerated Computer Vision Computational Photography Images Stitching Non-free functionality Contributed / Experimental Stuff Deprecated Stuff 6

C:\opencv\samples\cpp C:\opencv\samples\cpp\tutorial_code edge.cpp contour2.cpp watershed.cpp dft.cpp 7

Installing OpenCV Library http://sourceforge.net/projects/opencvlibrary/files/ opencv-win/ 8

파일구성 C:\OpenCV 에압축해제 Third Party Code : OpenCV 라이브러리에서사용하는라이브러리 (JPEG, ffmpeg, TBB 등 ) Android용 OpenCV 응용프로그램코드플랫폼으로이미빌드된파일 CMake 설정파일 XML 학습데이터 OpenCV 문서들 : 사용자가이드, 참조문서, 튜토리얼, 로고등 include 헤더파일 ios(mac) 관련파일 OpenCV 모듈별소스코드 OpenCV 예제코드 9

10

path 설정 Windows XP 시작 내컴퓨터 속성 고급 환경변수 Path ; C:\opencv\build\x86\vc10\bin 11

Windows 7 시작 컴퓨터 속성 고급시스템설정 고급 환경변수 Path ; C:\opencv\build\x86\vc10\bin 12

tbb download http://threadingbuildingblocks.org/ver.php?fid=174 13

C:\tbb40_233oss\bin\ia32\vc10 Copy tbb.dll and tbb_debug.dll to C:\windows\system32 14

Loading, displaying and saving images 파일 새로만들기 프로젝트 File New Project Project OpenCVTest 15

콘솔응용프로그램 빈프로젝트 Console Application Empty Project 16

보기 속성관리자 View Property Manager 1. Right-clicking on Debug Win32 2. 새프로젝트속성시트추가 Add New Project Property Sheet OpenCV2_4ProjectD 17

포함디렉토리 Include Directories C:\OpenCV\build\include 18

라이브러리디렉토리 Library Directories C:\OpenCV\build\vc10\lib 19

추가종속성 Additional Dependencies opencv_calib3d242d.lib opencv_contrib242d.lib opencv_core242d.lib opencv_features2d242d.lib opencv_flann242d.lib opencv_gpu242d.lib opencv_haartraining_engine.lib opencv_highgui242d.lib opencv_imgproc242d.lib opencv_legacy242d.lib opencv_ml242d.lib opencv_nonfree242d.lib opencv_objdetect242d.lib opencv_photo242d.lib opencv_stitching242d.lib opencv_ts242d.lib opencv_video242d.lib opencv_videostab242d.lib 20

보기 솔루션탐색기 View Solution Explorer 1. Right-clicking on 소스파일Source Files 2. 추가 새항목 Add New Item main.cpp 21

#include "opencv/cv.h" #include "opencv/highgui.h" int main(void) { IplImage* pimage = cvloadimage( "lena.png", -1 ); if(pimage == NULL) return -1; cvnamedwindow( "Image", 1 ); cvshowimage( "Image", pimage ); cvwaitkey( 0 ); cvdestroywindow( "Image" ); cvreleaseimage( &pimage ); } return 0; 22

#include "opencv/cv.h" #include "opencv/highgui.h" int main(void){ IplImage* pimage = cvloadimage( "lena.jpg", -1 ); if(pimage == NULL) return -1; int param[3]; param[0] = CV_IMWRITE_JPEG_QUALITY; param[1] = 95; param[2] = 0; cvsaveimage( "result.jpg", pimage, param ); cvreleaseimage( &pimage ); } return 0; CV_IMWRITE_JPEG_QUALITY: 0 to 100 (better quality) CV_IMWRITE_PNG_COMPRESSION: 0 to 9 (smaller size) CV_IMWRITE_PXM_BINARY: 0 or 1 23

24

#include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" using namespace cv; int main(void) { Mat image = imread( "lena.jpg", -1 ); if(image.data == NULL) return -1; namedwindow( "Image" ); imshow( "Image", image ); waitkey( 0 ); } return 0; 25

#include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" using namespace cv; int main(void) { Mat image = imread( "lena.jpg", -1 ); if(image.data == NULL) return -1; vector<int> params; params.push_back( CV_IMWRITE_JPEG_QUALITY ); params.push_back( 95 ); imwrite( "result.jpg", image, params ); } return 0; CV_IMWRITE_JPEG_QUALITY: 0 to 100 (better quality) CV_IMWRITE_PNG_COMPRESSION: 0 to 9 (smaller size) CV_IMWRITE_PXM_BINARY: 0 or 1 26

주요자료구조 typedef struct _IplImage { int nsize; /* sizeof(iplimage) */ int ID; /* version (=0)*/ int nchannels; /* Most of OpenCV functions support 1,2,3 or 4 channels */ int depth; /* pixel depth in bits */ int dataorder; /* 0 - interleaved color channels, 1 - separate color channels */ int origin; /* 0 - top-left origin, 1 - bottom-left origin (Windows bitmaps style) */ int align; /* Alignment of image rows (4 or 8). OpenCV ignores it and uses widthstep instead */ int width; /* image width in pixels */ int height; /* image height in pixels */ struct _IplROI *roi;/* image ROI */ int imagesize; /* image data size in bytes (=image->height*image->widthstep in case of interleaved data)*/ char *imagedata; /* pointer to aligned image data */ int widthstep; /* size of aligned image row in bytes */ char *imagedataorigin; /* pointer to a very origin of image data (not necessarily aligned) - it is needed for correct image deallocation */ } IplImage; 27

class CV_EXPORTS Mat { public: //... a lot of methods...... /*! includes several bit-fields: - the magic signature - continuity flag - depth - number of channels */ int flags; //! the array dimensionality, >= 2 int dims; //! the number of rows and columns int rows, cols; //! pointer to the data uchar* data; //! pointer to the reference counter; // when array points to user-allocated data, the pointer is NULL int* refcount; }; // other members... 28

Exercise 칼라영상을불러와서 split() 함수를이용하여영상을빨강, 녹색, 파랑채널 ( 평면 ) 로분리하여녹색영상만을화면에출력하시오. 29

#include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" using namespace cv; int main(void) { Mat image = imread( "color.png", -1 ); if(image.data == NULL) return -1; } vector<mat> mv; split( image, mv ); namedwindow( "Image" ); imshow( "Image", mv[1] ); waitkey( 0 ); return 0; 30

요약 OpenCV Library open computer vision and machine learning software library Installing OpenCV Library (Visual Studio 2010) Loading, displaying and saving images 주요자료구조 IplImage, Mat 31

Reference R. Laganière, OpenCV2 Computer Vision: Application Programming Cookbook, PACKT Publishing, 2011 G. Bradski and A. Kaebler, Learning OpenCV: Computer Vision with the OpenCV Library, O REILLY, 2008 정성환, 이문호, 오픈소스 OpenCV를이용한컴퓨터비전실무프로그래밍, 홍릉과학출판사, 2007 32