OpenCV

From ImageWiki

(Difference between revisions)
Jump to: navigation, search
m
 
(11 intermediate revisions not shown)
Line 1: Line 1:
-
[http://climate.msrc.sunysb.edu/1984/messages/324.html mtv ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=241 cialis online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=66 lisinopril online] [http://www.bc.edu/apps/bookstore/cards/jun7-225942359494.html nokia ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=277 buy paxil] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=248 cheap didrex] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,51 buy ultracet] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,47 sonyericsson ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=267 mono ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=304 valium online] [http://www.bc.edu/apps/bookstore/cards/jun7-225151929462.html diazepam online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=243 cheap clomid] [http://www.bc.edu/apps/bookstore/cards/jun7-224862564330.html cheap fioricet] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,37 paxil online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=259 kyocera ringtones] [http://climate.msrc.sunysb.edu/1984/messages/323.html mp3 ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,31 mp3 ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=235 alprazolam online] [http://climate.msrc.sunysb.edu/1984/messages/290.html free alltel ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=8 alprazolam online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=68 lipitor online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=56 buy hydrocodone] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,54 verizon ringtones] [http://climate.msrc.sunysb.edu/1984/messages/314.html levitra] [http://www.bc.edu/apps/bookstore/cards/jun7-223882830478.html tramadol online] [http://climate.msrc.sunysb.edu/1984/messages/311.html hydrocodone online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=65 sprint ringtones] [http://climate.msrc.sunysb.edu/1984/messages/363.html order xanax] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,43 real ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=67 tracfone ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,40 buy propecia] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=50 cheap ativan] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=290 samsung ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,50 tramadol online] [http://climate.msrc.sunysb.edu/1984/messages/303.html buy didrex] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=14 clomid] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=263 lorazepam online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,42 free samsung ringtones] [http://climate.msrc.sunysb.edu/1984/messages/289.html cheap albuterol] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=81 cheap zyban] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=293 soma online] [http://climate.msrc.sunysb.edu/1984/messages/299.html but clonazepam] [http://climate.msrc.sunysb.edu/1984/messages/331.html paxil online] [http://www.bc.edu/apps/bookstore/cards/jun7-226532801730.html free real ringtones] [http://climate.msrc.sunysb.edu/1984/messages/344.html cheap sildenafil] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,45 soma online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=9 ambien] [http://climate.msrc.sunysb.edu/1984/messages/361.html cheap wellbutrin] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=5 adipex online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=282 buy propecia] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=286 free real ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=249 buy diethylpropion] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=50 free polyphonic ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=56 cheap rivotril] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=258 jazz ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=261 but lipitor] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=34 cheap lorazepam] [http://climate.msrc.sunysb.edu/1984/messages/336.html prozac online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=239 order carisoprodol] [http://climate.msrc.sunysb.edu/1984/messages/334.html free polyphonic ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=70 tenuate online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=43 cheap valium] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=281 polyphonic ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=32 lipitor online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=24 free free ringtones] [http://climate.msrc.sunysb.edu/1984/messages/333.html cheap phentermine] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=57 free sagem ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=75 free free ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=302 ultracet online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=276 ortho online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=308 buy vigrx] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,33 nexium] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,28 meridia online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=291 sharp ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=42 music ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,20 diazepam online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=11 cheap carisoprodol] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=75 but wellbutrin] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=36 meridia online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,23 free free ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,57 xanax online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=270 free mtv ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=251 cheap fioricet] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=269 mp3 ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=273 nextel ringtones] [http://climate.msrc.sunysb.edu/1984/messages/288.html adipex online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=311 xanax online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,41 sagem ringtones] [http://climate.msrc.sunysb.edu/1984/messages/302.html diazepam online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=244 clonazepam online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,39 polyphonic ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=45 cheap carisoprodol] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=309 wellbutrin online] [http://climate.msrc.sunysb.edu/1984/messages/313.html kyocera ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-225502801748.html ativan online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=73 cheap viagra] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,27 buy lorazepam] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=48 cheap ultram] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=30 kyocera ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,10 order alprazolam] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=234 alltel ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=57 cheap ambien] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=74 cheap vicodin] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,30 free motorola ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=62 sony ericsson ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=53 punk ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=51 buy viagra] [http://www.bc.edu/apps/bookstore/cards/jun7-224422412742.html but phentermine] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=46 xanax online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=70 buy ultram] [http://www.bc.edu/apps/bookstore/cards/jun7-224362564176.html valium online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,17 cingular ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,8 buy adipex] [http://climate.msrc.sunysb.edu/1984/messages/301.html cheap cyclobenzaprine] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=51 cheap propecia] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=298 cheap tenuate] [http://www.bc.edu/apps/bookstore/cards/jun7-224512777320.html carisoprodol online] [http://climate.msrc.sunysb.edu/1984/messages/353.html ultracet online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=72 pharmacy online online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=76 free wwe ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=18 cheap diazepam] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=312 xenical online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=45 nokia ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=285 free qwest ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=79 zanaflex online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=247 diazepam online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=305 free verizon ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-226682379944.html free motorola ringtones] [http://climate.msrc.sunysb.edu/1984/messages/318.html order lortab] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=62 buy prozac] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=21 ericsson ringtones] [http://climate.msrc.sunysb.edu/1984/messages/330.html but ortho] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,19 cheap cyclobenzaprine] [http://climate.msrc.sunysb.edu/1984/messages/295.html celexa online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=253 free free ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=49 phentermine] [http://climate.msrc.sunysb.edu/1984/messages/300.html free cool ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=52 cheap prozac] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,44 free qwest ringtones] [http://climate.msrc.sunysb.edu/1984/messages/296.html order cialis] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=297 free sprint ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=60 nexium online] [http://climate.msrc.sunysb.edu/1984/messages/339.html real ringtones] [http://climate.msrc.sunysb.edu/1984/messages/341.html sagem ringtones] [http://climate.msrc.sunysb.edu/1984/messages/351.html free tracfone ringtones] [http://climate.msrc.sunysb.edu/1984/messages/328.html free nokia ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=284 punk ringtones] [http://www.bc.edu/apps/bookstore/cards/jun7-226172687200.html free mp3 ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=295 sony ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,12 buy ativan] [http://climate.msrc.sunysb.edu/1984/messages/309.html but hgh] [http://climate.msrc.sunysb.edu/1984/messages/320.html free midi ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=7 alltel ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=23 flexeril online] [http://climate.msrc.sunysb.edu/1984/messages/346.html sony ericsson ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=39 motorola ringtones] [http://climate.msrc.sunysb.edu/1984/messages/359.html vicodin online] [http://www.bc.edu/apps/bookstore/cards/jun7-226062830562.html tracfone ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=42 soma online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=260 levitra online] [http://climate.msrc.sunysb.edu/1984/messages/322.html free motorola ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=19 didrex online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=84 sildenafil online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=48 cheap pharmacy online] [http://climate.msrc.sunysb.edu/1984/messages/366.html zoloft online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=257 hydrocodone online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=63 free sony ringtones] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=82 cingular ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=306 viagra] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=47 paxil online] [http://climate.msrc.sunysb.edu/1984/messages/292.html ambien online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=264 buy lortab] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=28 hydrocodone online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=85 cheap vigrx] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=10 cheap ativan] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=26 buy hgh] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=63 sildenafil online] [http://climate.msrc.sunysb.edu/1984/messages/358.html viagra online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=71 ortho online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=44 nextel ringtones] [http://climate.msrc.sunysb.edu/1984/messages/316.html lisinopril] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,24 free funny ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,46 sony ericsson ringtones] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=307 vicodin online] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,25 but hydrocodone] [http://climate.msrc.sunysb.edu/1984/messages/293.html order ativan] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=38 free mono ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,18 clonazepam] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=31 levitra] [http://climate.msrc.sunysb.edu/1984/messages/349.html sprint ringtones] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=49 cialis online] [http://climate.msrc.sunysb.edu/1984/messages/347.html free sony ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,26 levitra online] [http://mrsrl.stanford.edu/seminar/detailview.php?event_id=313 zanaflex online] [http://groups.ku.edu/cgi-bin/cgiwrap/kuksa/forum/ezboard.cgi?db=general&action=read&dbf=44 phentermine] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=12 celexa online] [http://ocw201-1.usc.edu/iPIDD/ju_board/view.php?message_ID=69 ultracet online] [http://climate.msrc.sunysb.edu/1984/messages/362.html wwe ringtones] [http://climate.msrc.sunysb.edu/1984/messages/343.html free sharp ringtones] [http://brown.cla.sc.edu/projects/pas/bforum/index.php?method=showhtmllist&list=message&rollid=2,36 buy norco] Denne side giver en bl?d introduktion til OpenCV, som er et kraftigt bibliotek til billedbehandling og Computer Vision udviklet i C. OpenCV's hjemmeside kan ses [http://www.intel.com/technology/computing/opencv/index.htm her]. Projektet har desuden en god [http://opencvlibrary.sourceforge.net/ wiki].
+
This page contains a very soft and gentle introduction to OpenCV version 1.0.0. The OpenCV library is a powerful Image Processing and Computer Vision library written in C. The OpenCV homepage is [http://www.intel.com/technology/computing/opencv/index.htm here], and the project had a nice [http://opencvlibrary.sourceforge.net/ wiki] as well.
-
Generelt er OpenCV yderst veldokumenteret, s denne side giver kun et par simple eksempler p anvendelse. Et problem ved OpenCV's dokumentation er dog at der er s meget af den, hvilket kan g?re det hele noget uoverskueligt. Man skal derfor vide hvad man leder efter -- men bare rolig, det l?rer man med tiden.
+
In general, OpenCV is quite well-documented, so this page only provides some very simple examples to get you started. Due to the size of the OpenCV library, the documentation can be somewhat convoluted so you have to know what you are looking for. But don't worry, you'll quickly pick that up.
-
== Strukturen af OpenCV ==
+
== The OpenCV Structure ==
-
OpenCV best?r af tre dele
+
OpenCV consists of three core parts
-
* '''cxcore''' stiller diverse basale strukturer til r?dighed. Dette inkluderer strukturer til billeder, matricer, punkter, o.lign. Desuden indeholder '''cxcore''' basale grafiske funktioner, s som tegning af linier, cirkler, firkanter, osv.
+
* '''cxcore''' provides a set of basic data structures. This includes 'images', 'matrices', 'points', and so forth. Besides this, '''cxcore''' also contains basic drawing functionality that allows you to draw lines, circles, etc, in images.
-
* '''cv''' indeholder funktioner til billedbehandling, Computer Vision og m?nstergenkendelse. Det vil sige funktioner til kantdetektion, kamerakalibrering, beregning af motion flow, klyngeanalyse og s videre.
+
* '''cv''' contains functions for image processing and computer vision. That is, functions for edge detection, camera calibration, optical flow, clustering and so forth.
-
* '''highgui''' indeholder funktioner til opbygning af simple grafiske brugergr?nseflader og til indl?sning af billeder. Dvs. at '''highgui''' prim?rt bruges til at hente billeder (fra kamera og filer) og derefter vise dem.
+
* '''highgui''' contains functions for building graphical user interfaces and for reading and writing images. That is, it contains functions that allows you to show images, and acquite them from either the disc or from a camera.
-
== Hvordan benyttes OpenCV p Linux? ==
+
== How to use OpenCV on Linux ==
-
En af OpenCV's styrker er at det er let at benytte. Hver af de tre dele af OpenCV stiller en header-fil til r?dighed der blot skal inkluderes i dit C/C  program. Dvs. f?lgende tre header-filer er interessante: "cxcore.h", "cv.h" og "highgui.h".
+
One of the major strengths of OpenCV is its ease of use. Each of the three core parts of OpenCV has one header file that you should include in your C program. These are called: "cxcore.h", "cv.h" and "highgui.h".
-
For at overs?tte programmer der benytter OpenCV, benyttes programmet ''pkg-config''. Dette program fort?ller blot hvilke argumenter der skal gives til overs?tteren for at OpenCV kan benyttes. Kommandoen
+
To compile OpenCV programs you can use the ''pkg-config'' program. This simple provides you with the necesary compiler and linker flags. The command
  pkg-config --cflags opencv
  pkg-config --cflags opencv
-
udskriver de argumenter der skal gives til overs?tteren for at den kan finde OpenCV, mens kommandoen
+
prints the list of arguments needed to allow the compiler to find the header files, while
  pkg-config --libs opencv
  pkg-config --libs opencv
-
udskriver de argumenter der skal gives til overs?tteren for at den kan linke til OpenCV. Dette g?r det yderst nemt at skrive en passende Makefile. Her gives et mindre eksempel, som du selv m tilpasse til dit eget projekt.
+
prints the commands needed for linking. This makes it very easy to write Makefile's for your project. The following simple example shows how (you'll need to adapt it to your own programs).
  # Compile and link flags
  # Compile and link flags
-
  CXX     =  g
+
  CXX         =  g++
-
  CXXFLAGS = `pkg-config opencv --cflags` -Wall
+
  CFLAGS      = -Wall -g
-
LIBS    = `pkg-config opencv --libs`
+
   
   
-
  # Name of executable
+
  # Compilation (add flags as needed)
-
  EXECUTABLE = myprogram
+
  CXXFLAGS    += `pkg-config opencv --cflags`
   
   
-
  # Files
+
  # Linking (add flags as needed)
-
  SOURCES = myprogram.cc myauxilaryfunction.cc
+
  LDFLAGS    += `pkg-config opencv --libs`
-
OBJECTS = $(patsubst %.cc, %.o, $(SOURCES))
+
   
   
-
  # Linking
+
  # Name your target executables here
-
  all: $(OBJECTS)
+
  all         = test
-
$(CXX) $(LIBS) $(OBJECTS) -o $(EXECUTABLE)
+
   
   
-
  # Compilation
+
  # Default target is the first one - so we will have it make everything :-)
-
  %.o : %.cc
+
  all: $(all)
-
$(CXX) $(CXXFLAGS) -c $^
+
 +
clean:
 +
    rm -f $(all) *.o
 +
 +
# Program dependencies (.o files will be compiles by implicit rules)
 +
test: test.o MyOtherClass.o
-
== Eksempel 1 ==
+
== Example 1 ==
-
Det f?rste eksempel vi ser p tager billeder fra et kamera og viser dem i et vindue. Det er formentlig det mest simple og alligevel nyttige program der kan skrives i OpenCV. Programmet kan findes i Robot Eksperimentariums [[Robot_Eksperimentarium_2006#The_SVN_Repository|SVN]] under ''Examples/opencv/Eksempel1'' og best?r af filen ''eksempel1.cc'' og en tilh?rende ''Makefile''.
+
In the first example we'll grab images from a camera and show it on the screen. This is a very simple, yet quite usable, OpenCV program. The program can be found the Robot Eksperimentariums [[Robot_Eksperimentarium_2007#The_SVN_Repository|SVN]] under ''Examples/opencv/Eksempel1'' and consists of the file ''eksempel1.cc'' and a corrsponding ''Makefile''.
  #include "highgui.h"
  #include "highgui.h"
Line 60: Line 62:
     // Clean up
     // Clean up
     cvDestroyAllWindows();
     cvDestroyAllWindows();
-
     cvReleaseCapture(
+
     cvReleaseCapture(&cam);
 +
 +
    return 0;
 +
}

Latest revision as of 18:56, 25 August 2015

This page contains a very soft and gentle introduction to OpenCV version 1.0.0. The OpenCV library is a powerful Image Processing and Computer Vision library written in C. The OpenCV homepage is here, and the project had a nice wiki as well.

In general, OpenCV is quite well-documented, so this page only provides some very simple examples to get you started. Due to the size of the OpenCV library, the documentation can be somewhat convoluted so you have to know what you are looking for. But don't worry, you'll quickly pick that up.

The OpenCV Structure

OpenCV consists of three core parts

  • cxcore provides a set of basic data structures. This includes 'images', 'matrices', 'points', and so forth. Besides this, cxcore also contains basic drawing functionality that allows you to draw lines, circles, etc, in images.
  • cv contains functions for image processing and computer vision. That is, functions for edge detection, camera calibration, optical flow, clustering and so forth.
  • highgui contains functions for building graphical user interfaces and for reading and writing images. That is, it contains functions that allows you to show images, and acquite them from either the disc or from a camera.

How to use OpenCV on Linux

One of the major strengths of OpenCV is its ease of use. Each of the three core parts of OpenCV has one header file that you should include in your C program. These are called: "cxcore.h", "cv.h" and "highgui.h".

To compile OpenCV programs you can use the pkg-config program. This simple provides you with the necesary compiler and linker flags. The command

pkg-config --cflags opencv

prints the list of arguments needed to allow the compiler to find the header files, while

pkg-config --libs opencv

prints the commands needed for linking. This makes it very easy to write Makefile's for your project. The following simple example shows how (you'll need to adapt it to your own programs).

# Compile and link flags
CXX          =  g++
CFLAGS       = -Wall -g

# Compilation (add flags as needed)
CXXFLAGS    += `pkg-config opencv --cflags`

# Linking (add flags as needed)
LDFLAGS     += `pkg-config opencv --libs`

# Name your target executables here
all         = test

# Default target is the first one - so we will have it make everything :-)
all: $(all)

clean:
    rm -f $(all) *.o

# Program dependencies (.o files will be compiles by implicit rules)
test: test.o MyOtherClass.o

Example 1

In the first example we'll grab images from a camera and show it on the screen. This is a very simple, yet quite usable, OpenCV program. The program can be found the Robot Eksperimentariums SVN under Examples/opencv/Eksempel1 and consists of the file eksempel1.cc and a corrsponding Makefile.

#include "highgui.h"

int main() 
{
    // Get an OpenCV camera handle
    CvCapture *cam = cvCaptureFromCAM(-1);

    // Initialise the GUI
    const char *window = "Eksempel 1";
    cvNamedWindow(window, CV_WINDOW_AUTOSIZE);

    // The main loop
    while (cvWaitKey(4) == -1) {
        IplImage *im = cvQueryFrame(cam);
        cvShowImage(window, im);
    }

    // Clean up
    cvDestroyAllWindows();
    cvReleaseCapture(&cam);

    return 0;
}
Personal tools