Skip to content

Brings ofxCv into the core #4861

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 466 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
466 commits
Select commit Hold shift + click to select a range
5148c61
updated gitignore for suo, minor vs2010 mods
kylemcdonald Jun 15, 2012
c396e07
forgot to git add
kylemcdonald Jun 15, 2012
c383708
flow fixes for vs2010, line ending issues maybe? not sure
kylemcdonald Jun 15, 2012
4835dc9
added toOf(Mat, ofImage)
kylemcdonald Jun 17, 2012
f1aa29a
fixed autothreshold call
kylemcdonald Jun 28, 2012
f5482de
Merge branch 'master' of github.com:kylemcdonald/ofxCv
kylemcdonald Jun 28, 2012
d2331c7
updated face tracking from workshop, showing what histogram equalizat…
kylemcdonald Jun 28, 2012
32304b0
poorly named argument on imitate
kylemcdonald Jul 11, 2012
1949c04
cross-bitdepth copy() works correctly now, and drawMat has been updat…
kylemcdonald Jul 11, 2012
5c3d029
added equalizeHist wrapper with support for multichannel images
kylemcdonald Jul 11, 2012
0366e89
in-place histogram equalization
kylemcdonald Jul 11, 2012
fd472c0
updating Makefiles to reference openFrameworks common Makefile
noisecapella Jul 26, 2012
f96b63a
Merge pull request #47 from bostonbusmap/master
kylemcdonald Jul 26, 2012
98631ef
updated xcode projects to use better relative paths
kylemcdonald Aug 16, 2012
23adb69
ran update-projects to make copies of updated xcode project
kylemcdonald Aug 16, 2012
230aea6
constifying more of Tracker, might need to double-check contour examples
kylemcdonald Aug 16, 2012
1466bb7
Merge branch 'master' of github.com:kylemcdonald/ofxCv
kylemcdonald Aug 16, 2012
0d50e51
added TrackerFollower and Follower classes making it easier to work w…
kylemcdonald Aug 16, 2012
bcf2d90
forgot to remove old project files
kylemcdonald Aug 16, 2012
0e4b857
added basic kalman filter demo
kylemcdonald Aug 17, 2012
118ac4b
added video.mov to the two tracking examples
kylemcdonald Aug 17, 2012
e30d868
updated c::b for 0071, and vs 2010 had some changes too
kylemcdonald Aug 17, 2012
e16f7d2
adding return statement to non-void function
noisecapella Aug 17, 2012
9f85d1a
Merge pull request #51 from bostonbusmap/master
kylemcdonald Aug 17, 2012
cbfa937
Fixed for LLVM Utilities.h scope bug
danoli3 Aug 23, 2012
b430030
iOS changes to ofxCv
danoli3 Aug 23, 2012
06b18cb
Changes for iOS / OpenGLES
danoli3 Aug 23, 2012
f3859cb
Merge pull request #53 from danoli3/master
kylemcdonald Aug 24, 2012
5d7d6bf
first 0072 compatible project file
kylemcdonald Oct 1, 2012
86bcc3f
removed old xcode projects
kylemcdonald Oct 1, 2012
be45a2b
updated all projects for 0072
kylemcdonald Oct 1, 2012
6d2014d
added toCv(vector<ofVec2f>& points)
kylemcdonald Oct 31, 2012
01b40be
keeping the wiki in here
kylemcdonald Nov 22, 2012
3bacbba
added example demonstrating a technique for registration (alignment) …
kylemcdonald Jan 13, 2013
1ce83c0
added some safety for fitEllipse, and a new toCv for vector<ofVec3f>
kylemcdonald Jan 18, 2013
a65c903
ContourFinder: 2 different modes to (not) find holes
arturoc Jan 29, 2013
2d9858a
Tracker: fix track method not returning anything
arturoc Jan 29, 2013
12b5167
FlowPyrLK: several fixes + example
arturoc Jan 29, 2013
f06e921
Merge pull request #58 from arturoc/bugfix-tracker
kylemcdonald Jan 29, 2013
fc5da5e
Merge pull request #59 from arturoc/feature-findholes
kylemcdonald Jan 29, 2013
b94ace5
example-flow-externalfeatures: add project files
arturoc Jan 29, 2013
d690109
Merge pull request #60 from arturoc/feature-flowPyrLK
kylemcdonald Jan 29, 2013
e143435
Utilities: getDepth detects signed types
arturoc Jan 29, 2013
bccc56d
fix several warnings
arturoc Jan 30, 2013
c66905e
Merge pull request #63 from arturoc/bugfix-warnings
kylemcdonald Jan 30, 2013
59dd269
Merge pull request #62 from arturoc/feature-getdepthsigned
kylemcdonald Jan 30, 2013
da4c28c
Flow: add calls to create pyramids conditionally for cv >2.4.1
arturoc Jan 30, 2013
b1aba54
Merge pull request #65 from arturoc/bugfix-flowcvversion
kylemcdonald Jan 30, 2013
375369c
added accuracy argument to estimateAffine3D wrappers
kylemcdonald Jan 31, 2013
1e311b1
Merge branch 'master' of github.com:kylemcdonald/ofxCv
kylemcdonald Jan 31, 2013
61dd5d0
updated flow example with control panel and xml addons
kylemcdonald Jan 31, 2013
ac8ad24
added standard project files
kylemcdonald Feb 7, 2013
db91f2a
removed ios and nonstandard project files
kylemcdonald Feb 7, 2013
6572305
standardized source formatting
kylemcdonald Feb 7, 2013
4e109c0
renamed keypoints example
kylemcdonald Feb 7, 2013
0a4a477
removed old project files for estimate-affine
kylemcdonald Feb 7, 2013
3185b2c
added new project files for estimate affine
kylemcdonald Feb 7, 2013
7a5285c
added flow keypoints project files
kylemcdonald Feb 7, 2013
b3abb5d
working towards CLD addition
kylemcdonald Feb 7, 2013
8e30f8f
example is running, updated gitignore for user-specific xcode4 files
kylemcdonald Feb 7, 2013
e981950
working towards a single function, but it's causing crashes right now
kylemcdonald Feb 7, 2013
13a2e59
working on a good gesture recognition and tracking example for basic …
kylemcdonald Feb 21, 2013
8e0edbc
fitLine added to wrappers
kylemcdonald Feb 21, 2013
326925f
added a convex hull reducer in the same vein as getFitQuad, detecting…
kylemcdonald Feb 21, 2013
129ccc7
separated geometry code into GeometryHelpers
kylemcdonald Feb 21, 2013
071d3ed
better elliptical arc generation
kylemcdonald Feb 21, 2013
a0c9785
cleaner gesture example that simplifies things to the line and arc cases
kylemcdonald Feb 21, 2013
3507833
reporting error, better naming
kylemcdonald Feb 21, 2013
b5c495c
replacing gesture with gesture-basic
kylemcdonald Feb 21, 2013
115deaf
adding face zoom example
kylemcdonald Feb 26, 2013
5279a94
key points compatible with cv 2.3
obviousjim Feb 28, 2013
ab599bd
Merge pull request #70 from obviousjim/master-flow-keypoints-fix
kylemcdonald Feb 28, 2013
60d2359
setter for intrinsics
obviousjim Feb 28, 2013
21c30a8
fixed whitespace
obviousjim Feb 28, 2013
8967401
Merge pull request #71 from obviousjim/master-flow-intrinsics-setter
kylemcdonald Feb 28, 2013
dbd20d3
variable naming for setIntrinsics
obviousjim Feb 28, 2013
4e619a0
Merge pull request #72 from obviousjim/master-flow-intrinsics-setter
kylemcdonald Feb 28, 2013
0cec5a4
removed osx-specific line. closes #74.
kylemcdonald Mar 14, 2013
7702236
Merge branch 'master' of github.com:kylemcdonald/ofxCv
kylemcdonald Mar 14, 2013
54095fc
Merge branch 'master' into feature/CLD
kylemcdonald Mar 20, 2013
f61ce2c
working towards CLD integration, still getting errors
kylemcdonald Mar 20, 2013
f202fe7
added some missing project files
kylemcdonald Mar 20, 2013
0346fdf
Merge branch 'master' into feature/CLD
kylemcdonald Mar 20, 2013
920b579
working towards a generic object finder/tracker
kylemcdonald Mar 20, 2013
0f1d6bf
made resize only allocate when necessary, might need to be moved else…
kylemcdonald Mar 21, 2013
ec14e29
face tracking abstracted into separate class
kylemcdonald Mar 21, 2013
d4409df
better warning messages if you try to calibrate after load
kylemcdonald Apr 4, 2013
51ae4e1
Merge branch 'master' of github.com:kylemcdonald/ofxCv into feature/CLD
kylemcdonald Apr 21, 2013
bc0db0e
fixed cld copy bug
kylemcdonald Apr 22, 2013
6ffdce2
added images, updated example to show canny detection as well
kylemcdonald Apr 22, 2013
a5424f5
updated xcode projects to add CLD
kylemcdonald Apr 22, 2013
1dcf3f9
updated cld project file
kylemcdonald Apr 22, 2013
066ee16
updated all project files for all platforms to handle CLD
kylemcdonald Apr 23, 2013
fbe81c5
updated two control panel examples, fixed ABS macro
kylemcdonald Apr 23, 2013
6f29c2a
Merge branch 'master' into feature/object-finder
kylemcdonald Apr 23, 2013
6fb627b
first implementation of detection class, working towards #12
kylemcdonald Apr 24, 2013
5904770
added tracking to object finder
kylemcdonald Apr 24, 2013
8f342f1
abstracted velocity into RectTracker
kylemcdonald Apr 24, 2013
cde235f
added face follow example with glasses a la vanderlin
kylemcdonald Apr 24, 2013
1b365f3
added working project files for all projects and all platforms
kylemcdonald Apr 24, 2013
13ecfea
removed extra face project files
kylemcdonald Apr 24, 2013
89e60dc
added label and velocity demo for face tracking
kylemcdonald Apr 24, 2013
54f63e1
added file not found warning since opencv just ignores the missing file
kylemcdonald Apr 24, 2013
98cda3d
dirty hack for code::blocks
kylemcdonald Apr 25, 2013
15ca733
completed smoothing
kylemcdonald Apr 26, 2013
d54ebf9
working on convexity defects
kylemcdonald Apr 26, 2013
3e89d62
convexity defects implemented, thanks abudiman250172. closes #79
kylemcdonald Apr 27, 2013
c5f7570
moved convexity defects demo to advanced contour example
kylemcdonald Apr 27, 2013
3875739
moved convexityDefects into wrappers, made ofPolyline version
kylemcdonald Apr 27, 2013
6329a6c
added saveImage for saving Mat using ofSaveImage
kylemcdonald May 9, 2013
4d215a5
vs2010 hates round
kylemcdonald May 20, 2013
4f1ca21
fixed a bug with farneback flow where motion vectors were x-y swapped…
kylemcdonald Jun 12, 2013
ce530d7
added flow-based distortion example based on suggestion from @halfdanj
kylemcdonald Jun 12, 2013
aadf87a
Update all example main.cpp to use default
bakercp Jun 12, 2013
bc1748b
Merge pull request #82 from bakercp/master
kylemcdonald Jun 12, 2013
f4e2729
added ofxaddons thumbnail
kylemcdonald Aug 12, 2013
e42d84f
added erode and dilate
kylemcdonald Aug 12, 2013
8de8bf7
Merge branch 'master' of github.com:kylemcdonald/ofxCv
kylemcdonald Aug 12, 2013
95479b2
updated readme with draw info
kylemcdonald Aug 16, 2013
90fa351
minor bug in calcOpticalFlow when using lastImage and currentImage pa…
samatt Sep 8, 2013
609c2a6
Merge pull request #90 from samatt/master
kylemcdonald Sep 11, 2013
8b1d96c
added notes about installation
kylemcdonald Sep 15, 2013
ab8dfe5
Merge branch 'master' of github.com:kylemcdonald/ofxCv
kylemcdonald Sep 15, 2013
08ab854
added resetFlow() , fixed NaN for switching videos by selectively app…
samatt Oct 17, 2013
2c2b5cc
fixed spacing
samatt Oct 17, 2013
7883b9e
implemented resetFlow() for pyrLK. clearing last image, calling reset…
samatt Oct 17, 2013
23bc5e8
Merge pull request #91 from samatt/inital-flow-fix
kylemcdonald Oct 17, 2013
bdb0f58
added rotate90 and moved allocation check code from imitate() to allo…
kylemcdonald Oct 24, 2013
1a29a23
added flip
kylemcdonald Nov 20, 2013
f0a3942
added overloaded loadProjectionMatrix with viewportRect argument
cyrildiagne Nov 21, 2013
b2a776d
added overloaded loadProjectionMatrix with viewportRect argument
cyrildiagne Nov 21, 2013
8b1d199
added setter for Intrinsics::imageSize
cyrildiagne Nov 21, 2013
55de2e0
also use viewport width/height for frustum computation for consistency.
cyrildiagne Nov 21, 2013
73e34c4
fixed whitespace
cyrildiagne Nov 21, 2013
8a19483
replaced viewport rectangle by a position offset to simplify client apps
cyrildiagne Nov 21, 2013
d62ec04
Merge pull request #93 from kikko/master
kylemcdonald Nov 21, 2013
584b598
Fixes ofxCv::RectTracker::track() to erase from map directly with ite…
ngbrown Dec 25, 2013
7390685
Update visual studio projects to point to OpenFramework 0.8 paths.
ngbrown Dec 26, 2013
a174465
Merge pull request #99 from ngbrown/issue_98
kylemcdonald Dec 26, 2013
078cd24
Merge pull request #100 from ngbrown/of8_update_for_vs
kylemcdonald Dec 26, 2013
305f032
This should fix issue #101 by post-incrementing the iterator before e…
ngbrown Dec 28, 2013
ef1fea5
Opengles fix for gluLookAt for iOS/Android/Raspberry Pi etc
danoli3 Dec 28, 2013
c3d80f9
Merge pull request #103 from ngbrown/issue_101
kylemcdonald Dec 28, 2013
e94b504
Merge pull request #105 from danoli3/opengles-fix-two
kylemcdonald Dec 28, 2013
81c9856
FlowFarneback pyramidScale must be < 1
jeffcrouse Jan 13, 2014
34f59a4
Merge pull request #106 from jefftimesten/patch-1
kylemcdonald Jan 13, 2014
73126e5
added reset to Calibration
obviousjim Feb 17, 2014
7c84594
Merge pull request #109 from obviousjim/reset-calibration
kylemcdonald Feb 18, 2014
de83f0f
ContourFinder option to sort contours by size
totalgee Feb 24, 2014
fb31940
Merge pull request #111 from totalgee/sortContours
kylemcdonald Feb 27, 2014
b6dc3ed
Allow setting of image type to more than just OF_IMAGE_GRAYSCALE.
ngbrown Mar 1, 2014
88f06dc
Some fixes in calcFlow when OpenCV is a newer visior with buildOptica…
ngbrown Mar 1, 2014
d74d770
Merge pull request #112 from ngbrown/fixFlow
kylemcdonald Mar 3, 2014
817f1af
adding a shader based flow distortion example and some little mods to…
kylemcdonald Mar 24, 2014
f876254
Merge branch 'master' of github.com:kylemcdonald/ofxCv
kylemcdonald Mar 24, 2014
61e9895
better flow distort w shader and cleaned up Flow: removed ofImage, te…
kylemcdonald Mar 28, 2014
38813fa
added ofxCv::copyGray and made more progress on #114
kylemcdonald Mar 28, 2014
c472145
accidentally a RateTimer
kylemcdonald Mar 28, 2014
9e24ad1
ignore xcworkspace
kylemcdonald Mar 28, 2014
ac235ab
closes #115
kylemcdonald Apr 2, 2014
102e84b
allow grayscale image to be tracked
orgicus Apr 3, 2014
d68c213
allow grayscale image to be tracked
orgicus Apr 3, 2014
46c782a
Merge http://github.com/kylemcdonald/ofxCv
Apr 12, 2014
69f7e21
ObjectFinder.update() takes grayscale images into account
Apr 12, 2014
e93cd09
Merge pull request #116 from orgicus/master
kylemcdonald Apr 12, 2014
0386800
removing RateTimer
kylemcdonald Apr 13, 2014
7eaf302
Merge branch 'master' of github.com:kylemcdonald/ofxCv
kylemcdonald Apr 14, 2014
951e34a
fixed gray grabber bug in example, closes #113
kylemcdonald Apr 15, 2014
51e6650
Added getter in Tracker for TrackedObject::lastSeen. Useful for knowi…
prisonerjohn May 13, 2014
dac9e21
Merge branch 'master' of github.com:prisonerjohn/ofxCv
prisonerjohn May 13, 2014
3bfea3e
Fixed tabs.
prisonerjohn May 13, 2014
5e784bd
Added setter for ContourFinder::useTargetColor. Without it there's no…
prisonerjohn May 14, 2014
2a0f2ef
Merge pull request #118 from prisonerjohn/master
kylemcdonald May 15, 2014
8dd50a3
Refactor loadProjectionMatrix() to use OF matrix functions instead of gl
fieldOfView Jun 20, 2014
c426776
Merge pull request #122 from fieldOfView/refactor_loadprojectionmatri…
kylemcdonald Jun 30, 2014
165193b
testApp -> ofApp
kylemcdonald Jul 6, 2014
e5c28fb
Merge branch 'master' of github.com:kylemcdonald/ofxCv
kylemcdonald Jul 6, 2014
a4c0773
Add Kalman filter positioning API and update example-kalman
micuat Aug 10, 2014
d03970a
Add Kalman filter orientation API and example-kalman-euler
micuat Aug 10, 2014
931b883
Merge pull request #125 from micuat/feature-kalman
kylemcdonald Aug 10, 2014
a6f4d97
Add bUseAccel option to KalmanPosition for smoother velocity
micuat Aug 14, 2014
6635dc5
added smile detection example
kylemcdonald Aug 17, 2014
cd3d604
Merge branch 'master' of github.com:kylemcdonald/ofxCv
kylemcdonald Aug 17, 2014
b5df921
indentation
kylemcdonald Aug 17, 2014
3dac23f
Merge pull request #127 from micuat/feature-kalman
kylemcdonald Sep 1, 2014
1904517
fixes #120
kylemcdonald Sep 1, 2014
51fae5d
Update readme.md
noio Sep 2, 2014
1bc3ae9
copyGray is more robust by accounting for different image types
kylemcdonald Oct 1, 2014
88620c5
avoid texture drawing errors
kylemcdonald Oct 1, 2014
90f7398
0.9.0 compat in core ofCv.
bakercp Oct 22, 2014
85636e5
Toward 0.9.0 examples.
bakercp Oct 22, 2014
7c7ac9e
updates for 0.9.0
kylemcdonald Oct 25, 2014
b31e7dc
updated project files for 0.9.0
kylemcdonald Oct 28, 2014
77abd3c
Merge branch '0.9.0' of https://github.com/bakercp/ofxCv into bakercp…
kylemcdonald Oct 28, 2014
647f111
Merge branch 'bakercp-0.9.0'
kylemcdonald Oct 28, 2014
453d50e
Merge pull request #130 from noio/patch-1
kylemcdonald Oct 28, 2014
bc6be93
added ofTexture support to ofxCv::allocate(), getDepth(), getChannels…
kylemcdonald Oct 29, 2014
b187176
Merge branch 'master' of github.com:kylemcdonald/ofxCv
kylemcdonald Oct 29, 2014
3b2ec85
formatting, changing to default face haarcascade
kylemcdonald Nov 3, 2014
398ecad
added example-blur, added GaussianBlur wrapper, changed default blur …
kylemcdonald Jan 2, 2015
5d604a2
fixed contour finder HS mode bug, closes #146
kylemcdonald Feb 2, 2015
7b3649f
fixed contour finder HS mode bug, closes #146
kylemcdonald Feb 2, 2015
dcbb2a5
added example-blur, added GaussianBlur wrapper, changed default blur …
kylemcdonald Jan 2, 2015
ec10f9a
Merge branch 'develop' of github.com:kylemcdonald/ofxCv into develop
kylemcdonald Feb 2, 2015
74440dc
added example-blur, added GaussianBlur wrapper, changed default blur …
kylemcdonald Jan 2, 2015
deb2bda
fixed contour finder HS mode bug, closes #146
kylemcdonald Feb 2, 2015
88eb187
0.9.0
kylemcdonald Mar 2, 2015
738b2fc
Merge branch 'develop' of github.com:kylemcdonald/ofxCv into develop
kylemcdonald Mar 2, 2015
98fde2e
wip towards updating project files for 0.9.0
kylemcdonald May 15, 2015
87ddbbd
updated example flow to use ofxGui
kylemcdonald May 15, 2015
62207c6
converted example-coherent to ofxGui
kylemcdonald May 15, 2015
d653350
update for most recent master
kylemcdonald Jul 16, 2015
0c14011
added ofxGui
kylemcdonald Jul 16, 2015
db3f205
updated readme.md
kylemcdonald Jul 23, 2015
96777b8
glInternalFormat renaming and remove HighResolution flag from plist
kylemcdonald Jul 23, 2015
16d1aad
updated project files to remove extra libs on osx
kylemcdonald Aug 14, 2015
93ace57
added quality level to saveImage
kylemcdonald Sep 12, 2015
71f012e
whoops, forgot to add to header instead
kylemcdonald Sep 12, 2015
be7a970
revised terminology for intrinsics headers, added example of construc…
kylemcdonald Sep 12, 2015
7c51fd1
rename
kylemcdonald Sep 12, 2015
a21d7e4
rename
kylemcdonald Sep 12, 2015
df23483
Update readme with new https://github.com/openframeworks/OFXcodeMenu.
bakercp Sep 24, 2015
913907a
Merge pull request #161 from bakercp/develop
kylemcdonald Sep 24, 2015
587c522
add Sobel wrapper function
avilleret Sep 25, 2015
335cd84
update example to demonstrate Sobel filter
avilleret Sep 25, 2015
5078f61
Merge pull request #162 from avilleret/feature/sobel
kylemcdonald Sep 30, 2015
7b6f62b
Replace deprecated initGrabber() function with setup().
bakercp Oct 27, 2015
4fb7cd8
Fail faster allocation.
bakercp Oct 27, 2015
ccb6cec
Merge pull request #169 from bakercp/develop
kylemcdonald Oct 27, 2015
710b2f7
fixed issue with getIndexFromLabel() closes #168
kylemcdonald Oct 28, 2015
5687069
Merge pull request #170 from bakercp/develop-cleanest
kylemcdonald Oct 28, 2015
f8904b5
Replace functions deprecated in 0.9.0.
bakercp Oct 28, 2015
22e7d3d
Merge pull request #171 from bakercp/develop
kylemcdonald Oct 28, 2015
60afb23
swapped cv::Size2d with cv::Size2f
Oct 29, 2015
6316a23
Merge branch 'develop' of github.com:kylemcdonald/ofxCv into develop
Oct 29, 2015
e023361
Merge pull request #172 from aspeteRakete/develop
kylemcdonald Oct 29, 2015
67afcf0
remove project files
kylemcdonald Nov 8, 2015
0858a4a
updated readme
kylemcdonald Nov 8, 2015
2ce9a35
Added addon_config.mk
HalfdanJ Nov 11, 2015
596617f
Merge pull request #173 from HalfdanJ/config
kylemcdonald Nov 11, 2015
bd97be3
fixes some include issues
arturoc Dec 10, 2015
70d89c0
don't include ofMain
arturoc Dec 10, 2015
f2e83c4
don't expect std in headers
arturoc Dec 10, 2015
4dba411
Merge pull request #180 from arturoc/master
kylemcdonald Dec 10, 2015
97cdffe
moved ofxCv to addons/ofxCv
arturoc Feb 19, 2016
df6b7d7
Merge branch 'ofxcv-merge' into feature-ofxcv
arturoc Feb 19, 2016
e31b13f
breaklines
arturoc Feb 19, 2016
1f6fbdd
moved addon_config to ofxCv
arturoc Feb 19, 2016
84847ef
gitignore: add ofxCv
arturoc Feb 19, 2016
affe25a
allAddonsExample: add ofxCv
arturoc Feb 19, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions addons/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ ofxAndroid/ofAndroidLib/gen
!ofxEmscripten
!ofxUnitTests
!ofxProjectGenerator
!ofxCv

# don't ignore the .gitignore file
!.gitignore
63 changes: 63 additions & 0 deletions addons/ofxCv/addon_config.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# All variables and this file are optional, if they are not present the PG and the
# makefiles will try to parse the correct values from the file system.
#
# Variables that specify exclusions can use % as a wildcard to specify that anything in
# that position will match. A partial path can also be specified to, for example, exclude
# a whole folder from the parsed paths from the file system
#
# Variables can be specified using = or +=
# = will clear the contents of that variable both specified from the file or the ones parsed
# from the file system
# += will add the values to the previous ones in the file or the ones parsed from the file
# system
#
# The PG can be used to detect errors in this file, just create a new project with this addon
# and the PG will write to the console the kind of error and in which line it is

meta:
ADDON_NAME = ofxCv
ADDON_DESCRIPTION = Addon for computer vision using the open source library openCv
ADDON_AUTHOR = Kyle McDonald
ADDON_TAGS = "computer vision" "opencv" "image processing"
ADDON_URL = https://github.com/kylemcdonald/ofxcv

common:
# dependencies with other addons, a list of them separated by spaces
# or use += in several lines
ADDON_DEPENDENCIES = ofxOpenCv

# include search paths, this will be usually parsed from the file system
# but if the addon or addon libraries need special search paths they can be
# specified here separated by spaces or one per line using +=
ADDON_INCLUDES = libs/ofxCv/include
ADDON_INCLUDES += libs/CLD/include/CLD
ADDON_INCLUDES += src

# any special flag that should be passed to the compiler when using this
# addon
# ADDON_CFLAGS =

# any special flag that should be passed to the linker when using this
# addon, also used for system libraries with -lname
# ADDON_LDFLAGS =

# linux only, any library that should be included in the project using
# pkg-config
# ADDON_PKG_CONFIG_LIBRARIES =

# osx/iOS only, any framework that should be included in the project
# ADDON_FRAMEWORKS =

# source files, these will be usually parsed from the file system looking
# in the src folders in libs and the root of the addon. if your addon needs
# to include files in different places or a different set of files per platform
# they can be specified here
# ADDON_SOURCES =

# some addons need resources to be copied to the bin/data folder of the project
# specify here any files that need to be copied, you can use wildcards like * and ?
# ADDON_DATA =

# when parsing the file system looking for libraries exclude this for all or
# a specific platform
# ADDON_LIBS_EXCLUDE =
3 changes: 3 additions & 0 deletions addons/ofxCv/example-ar/addons.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ofxCv
ofxOpenCv
ofxGui
19 changes: 19 additions & 0 deletions addons/ofxCv/example-ar/bin/data/mbp-2011-isight.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
%YAML:1.0
cameraMatrix: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 6.6278599887122368e+02, 0., 3.1244256016006659e+02, 0.,
6.6129276875199082e+02, 2.2747179767124251e+02, 0., 0., 1. ]
imageSize_width: 640
imageSize_height: 480
sensorSize_width: 0
sensorSize_height: 0
distCoeffs: !!opencv-matrix
rows: 5
cols: 1
dt: d
data: [ -1.8848338341464690e-01, 1.0721890419183855e+00,
-3.5244467228016116e-03, -7.0195032848241403e-04,
-2.0412827999027101e+00 ]
reprojectionError: 2.1723265945911407e-01
6 changes: 6 additions & 0 deletions addons/ofxCv/example-ar/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "ofApp.h"

int main() {
ofSetupOpenGL(640, 480, OF_WINDOW);
ofRunApp(new ofApp());
}
62 changes: 62 additions & 0 deletions addons/ofxCv/example-ar/src/ofApp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
#include "ofApp.h"

using namespace ofxCv;
using namespace cv;

void ofApp::setup() {
ofSetVerticalSync(true);
cam.setup(640, 480);

calibration.load("mbp-2011-isight.yml");
patternSize = calibration.getPatternSize();
objectPoints = Calibration::createObjectPoints(patternSize, 1., CHESSBOARD);
found = false;

light.enable();
light.setPosition(500, 0, 0);
}

void ofApp::update() {
cam.update();
if(cam.isFrameNew()) {
found = calibration.findBoard(toCv(cam), imagePoints);
if(found) {
Mat cameraMatrix = calibration.getDistortedIntrinsics().getCameraMatrix();
Mat rvec, tvec;
solvePnP(Mat(objectPoints), Mat(imagePoints), cameraMatrix, calibration.getDistCoeffs(), rvec, tvec);
modelMatrix = makeMatrix(rvec, tvec);
}
}
}

void ofApp::draw() {
ofSetColor(255);
cam.draw(0, 0);
if(found) {
calibration.getDistortedIntrinsics().loadProjectionMatrix();
applyMatrix(modelMatrix);

ofMesh mesh;
mesh.setMode(OF_PRIMITIVE_POINTS);
for(int i = 0; i < objectPoints.size(); i++) {
mesh.addVertex(toOf(objectPoints[i]));
}
glPointSize(3);
ofSetColor(magentaPrint);
mesh.drawVertices();

ofEnableLighting();
ofSetColor(255);
glEnable(GL_DEPTH_TEST);
ofTranslate(.5, .5, -.5);
for(int i = 0; i < patternSize.width / 2; i++) {
for(int j = 0; j < patternSize.height / 2; j++) {
for(int k = 0; k < 3; k++) {
ofBox(2 * i, 2 * j, -2 * k, 1);
}
}
}
glDisable(GL_DEPTH_TEST);
ofDisableLighting();
}
}
20 changes: 20 additions & 0 deletions addons/ofxCv/example-ar/src/ofApp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#pragma once

#include "ofMain.h"
#include "ofxCv.h"

class ofApp : public ofBaseApp {
public:
void setup();
void update();
void draw();

ofVideoGrabber cam;
ofxCv::Calibration calibration;
vector<cv::Point3f> objectPoints;
vector<cv::Point2f> imagePoints;
ofMatrix4x4 modelMatrix;
bool found;
cv::Size patternSize;
ofLight light;
};
3 changes: 3 additions & 0 deletions addons/ofxCv/example-background/addons.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ofxCv
ofxOpenCv
ofxGui
6 changes: 6 additions & 0 deletions addons/ofxCv/example-background/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "ofApp.h"

int main() {
ofSetupOpenGL(640 * 2, 480, OF_WINDOW);
ofRunApp(new ofApp());
}
29 changes: 29 additions & 0 deletions addons/ofxCv/example-background/src/ofApp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include "ofApp.h"

using namespace ofxCv;
using namespace cv;

void ofApp::setup() {
cam.setup(640, 480);
background.setLearningTime(900);
background.setThresholdValue(10);
}

void ofApp::update() {
cam.update();
if(cam.isFrameNew()) {
background.update(cam, thresholded);
thresholded.update();
}
}

void ofApp::draw() {
cam.draw(0, 0);
thresholded.draw(640, 0);
}

void ofApp::keyPressed(int key) {
if(key == ' ') {
background.reset();
}
}
17 changes: 17 additions & 0 deletions addons/ofxCv/example-background/src/ofApp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#pragma once

#include "ofMain.h"
#include "ofxCv.h"

class ofApp : public ofBaseApp {
public:
void setup();
void update();
void draw();

void keyPressed(int key);

ofVideoGrabber cam;
ofxCv::RunningBackground background;
ofImage thresholded;
};
3 changes: 3 additions & 0 deletions addons/ofxCv/example-bayer/addons.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ofxCv
ofxOpenCv
ofxGui
Binary file added addons/ofxCv/example-bayer/bin/data/bayer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added addons/ofxCv/example-bayer/bin/data/rgb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions addons/ofxCv/example-bayer/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "ofApp.h"

int main() {
ofSetupOpenGL(640 * 2, 480, OF_WINDOW);
ofRunApp(new ofApp());
}
47 changes: 47 additions & 0 deletions addons/ofxCv/example-bayer/src/ofApp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#include "ofApp.h"

using namespace ofxCv;
using namespace cv;

void ofApp::setup() {
ofSetVerticalSync(true);

bayer.load("bayer.png");
rgb.load("rgb.png");

bayerType = 0;
}

void ofApp::update() {
int code;
switch(bayerType) {
case 0: code = CV_BayerBG2RGB; break;
case 1: code = CV_BayerGB2RGB; break;
case 2: code = CV_BayerRG2RGB; break;
case 3: code = CV_BayerGR2RGB; break;
}

convertColor(bayer, rgb, code);
rgb.update();
}

void ofApp::draw() {
ofPushMatrix();
bayer.draw(0, 0);
ofTranslate(rgb.getWidth(), 0);
rgb.draw(0, 0);
ofTranslate(bayer.getWidth(), 0);
ofPopMatrix();

drawHighlightString("use the up/down keys: " + ofToString(bayerType), 10, 10);
}

void ofApp::keyPressed(int key) {
if(key == OF_KEY_UP) {
bayerType--;
}
if(key == OF_KEY_DOWN) {
bayerType++;
}
bayerType = ofClamp(bayerType, 0, 3);
}
15 changes: 15 additions & 0 deletions addons/ofxCv/example-bayer/src/ofApp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once

#include "ofMain.h"
#include "ofxCv.h"

class ofApp : public ofBaseApp {
public:
void setup();
void update();
void draw();
void keyPressed(int key);

ofImage bayer, rgb;
int bayerType;
};
3 changes: 3 additions & 0 deletions addons/ofxCv/example-blur/addons.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ofxCv
ofxOpenCv
ofxGui
6 changes: 6 additions & 0 deletions addons/ofxCv/example-blur/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "ofApp.h"

int main() {
ofSetupOpenGL(640, 480, OF_WINDOW);
ofRunApp(new ofApp());
}
30 changes: 30 additions & 0 deletions addons/ofxCv/example-blur/src/ofApp.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include "ofApp.h"

void ofApp::setup() {
useGaussian = false;
cam.setup(640, 480);
}

void ofApp::update() {
cam.update();
if(cam.isFrameNew()) {
ofxCv::copy(cam, img);
if(useGaussian) {
ofxCv::GaussianBlur(img, 50);
} else {
ofxCv::blur(img, 50);
}
img.update();
}
}

void ofApp::draw() {
if(img.isAllocated()) {
img.draw(0, 0);
}
ofDrawBitmapStringHighlight(useGaussian ? "GaussianBlur()" : "blur()", 10, 20);
}

void ofApp::keyPressed(int key) {
useGaussian = !useGaussian;
}
16 changes: 16 additions & 0 deletions addons/ofxCv/example-blur/src/ofApp.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

#include "ofMain.h"
#include "ofxCv.h"

class ofApp : public ofBaseApp {
public:
void setup();
void update();
void draw();
void keyPressed(int key);

ofVideoGrabber cam;
ofImage img;
bool useGaussian;
};
3 changes: 3 additions & 0 deletions addons/ofxCv/example-calibration-lcp/addons.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ofxCv
ofxOpenCv
ofxGui
6 changes: 6 additions & 0 deletions addons/ofxCv/example-calibration-lcp/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include "ofApp.h"

int main() {
ofSetupOpenGL(640 * 2, 480, OF_FULLSCREEN);
ofRunApp(new ofApp());
}
Loading