Permalink
Browse files

first commit

  • Loading branch information...
jgh- committed Feb 25, 2011
0 parents commit a87b538a666b84e15de9a1125104c4446e014b34
Showing with 56,189 additions and 0 deletions.
  1. +19 −0 CGImageWrapper.h
  2. +46 −0 CGImageWrapper.m
  3. +1,418 −0 ChatWindow.xib
  4. +53 −0 ChatWindowController.h
  5. +384 −0 ChatWindowController.m
  6. +2 −0 English.lproj/InfoPlist.strings
  7. +755 −0 English.lproj/MainMenu.xib
  8. 0 README
  9. +16 −0 STButton.h
  10. +24 −0 STButton.m
  11. +27 −0 STButtonBarView.h
  12. +126 −0 STButtonBarView.m
  13. +31 −0 STFace.h
  14. +83 −0 STFace.m
  15. +40 −0 STOCVFaceTracker.h
  16. +157 −0 STOCVFaceTracker.m
  17. +31 −0 STPictureInPictureView.h
  18. +134 −0 STPictureInPictureView.m
  19. +20 −0 STUI.h
  20. +15 −0 STWindow.h
  21. +52 −0 STWindow.m
  22. +32 −0 VideoConferenceExample-Info.plist
  23. +1,414 −0 VideoConferenceExample.xcodeproj/james.mode1v3
  24. +641 −0 VideoConferenceExample.xcodeproj/james.pbxuser
  25. +434 −0 VideoConferenceExample.xcodeproj/project.pbxproj
  26. +14 −0 VideoConferenceExampleAppDelegate.h
  27. +26 −0 VideoConferenceExampleAppDelegate.m
  28. +7 −0 VideoConferenceExample_Prefix.pch
  29. BIN build/VideoConferenceExample.build/VideoConferenceExample.pbxindex/categories.pbxbtree
  30. BIN build/VideoConferenceExample.build/VideoConferenceExample.pbxindex/cdecls.pbxbtree
  31. BIN build/VideoConferenceExample.build/VideoConferenceExample.pbxindex/decls.pbxbtree
  32. BIN build/VideoConferenceExample.build/VideoConferenceExample.pbxindex/files.pbxbtree
  33. BIN build/VideoConferenceExample.build/VideoConferenceExample.pbxindex/imports.pbxbtree
  34. BIN build/VideoConferenceExample.build/VideoConferenceExample.pbxindex/pbxindex.header
  35. BIN build/VideoConferenceExample.build/VideoConferenceExample.pbxindex/protocols.pbxbtree
  36. BIN build/VideoConferenceExample.build/VideoConferenceExample.pbxindex/refs.pbxbtree
  37. BIN build/VideoConferenceExample.build/VideoConferenceExample.pbxindex/strings.pbxstrings/control
  38. BIN build/VideoConferenceExample.build/VideoConferenceExample.pbxindex/strings.pbxstrings/strings
  39. BIN build/VideoConferenceExample.build/VideoConferenceExample.pbxindex/subclasses.pbxbtree
  40. BIN build/VideoConferenceExample.build/VideoConferenceExample.pbxindex/symbols0.pbxsymbols
  41. BIN control_pause.png
  42. BIN control_record.png
  43. BIN control_start.png
  44. BIN control_stop.png
  45. +23,550 −0 haarcascade_frontalface_alt2.xml
  46. +14 −0 main.m
  47. +1,628 −0 opencv/include/cv.h
  48. +1,087 −0 opencv/include/cv.hpp
  49. +1,622 −0 opencv/include/cvaux.h
  50. +1,832 −0 opencv/include/cvaux.hpp
  51. +1,080 −0 opencv/include/cvcompat.h
  52. +209 −0 opencv/include/cvinternal.h
  53. +371 −0 opencv/include/cvtypes.h
  54. +58 −0 opencv/include/cvver.h
  55. +1,337 −0 opencv/include/cvvidsurv.hpp
  56. +621 −0 opencv/include/cvwimage.h
  57. +1,829 −0 opencv/include/cxcore.h
  58. +2,312 −0 opencv/include/cxcore.hpp
  59. +189 −0 opencv/include/cxerror.h
  60. +220 −0 opencv/include/cxflann.h
  61. +4,662 −0 opencv/include/cxmat.hpp
  62. +535 −0 opencv/include/cxmisc.h
  63. +2,615 −0 opencv/include/cxoperations.hpp
  64. +1,791 −0 opencv/include/cxtypes.h
  65. +547 −0 opencv/include/highgui.h
  66. +134 −0 opencv/include/highgui.hpp
  67. +1,945 −0 opencv/include/ml.h
  68. BIN opencv/lib/libcv.2.1.0.dylib
  69. BIN opencv/lib/libcxcore.2.1.0.dylib
@@ -0,0 +1,19 @@
/*
* Webcam/FaceTracking/Custom Views example project - jamesghurley<at>gmail.com
* This project emulates 1-on-1 video conferencing using modern Cocoa frameworks and techniques.
*
* CGImageWrapper.h/.m - Used to pass a CGImageRef to the main thread.
*/
#import <Cocoa/Cocoa.h>
@interface CGImageWrapper : NSObject {
@public
CGImageRef image;
}
@property CGImageRef image;
-(id) initWithCGImage: (CGImageRef) _image;
-(id) initWithCVImageBufferRef: (CVImageBufferRef) _imageBuffer;
@end
@@ -0,0 +1,46 @@
/*
* Webcam/FaceTracking/Custom Views example project - jamesghurley<at>gmail.com
* This project emulates 1-on-1 video conferencing using modern Cocoa frameworks and techniques.
*
* CGImageWrapper.h/.m - Used to pass a CGImageRef to the main thread.
*/
#import "CGImageWrapper.h"
#import <CoreVideo/CoreVideo.h>
@implementation CGImageWrapper
@synthesize image;
// -----------------------------------------------------------------------------
- (id) initWithCGImage:(CGImageRef)_image{
if((self = [super init])){
image = _image;
}
return self;
}
// -----------------------------------------------------------------------------
-(id) initWithCVImageBufferRef: (CVImageBufferRef) _imageBuffer{
if((self = [super init])){
CGColorSpaceRef colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
void *baseAddr = CVPixelBufferGetBaseAddress(_imageBuffer);
size_t bytesPerRow = CVPixelBufferGetBytesPerRow(_imageBuffer);
size_t width = CVPixelBufferGetWidth(_imageBuffer);
size_t height = CVPixelBufferGetHeight(_imageBuffer);
CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, baseAddr, bytesPerRow*height, NULL);
image = CGImageCreate(width, height, 8, 24, bytesPerRow, colorSpace, kCGImageAlphaNone, provider, NULL, false, kCGRenderingIntentDefault);
CGColorSpaceRelease(colorSpace);
CGDataProviderRelease(provider);
}
return self;
}
// -----------------------------------------------------------------------------
- (void) dealloc{
CGImageRelease(image);
[super dealloc];
}
@end
Oops, something went wrong.

0 comments on commit a87b538

Please sign in to comment.