This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Application extends Observable | |
self = @initialize() | |
@static | |
stack: [] | |
@property | |
delegate: | |
defaults: null | |
@property | |
processes: | |
attributes: readonly clones bindable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Derive dimensions of the capture device input. | |
AVCaptureInputPort *captureDeviceInputPort = nil; | |
for (AVCaptureInputPort *port in [captureDeviceInput ports]) { | |
if ([[port mediaType] isEqualToString:AVMediaTypeVideo]) { | |
captureDeviceInputPort = port; | |
break; | |
} | |
} | |
if (!captureDeviceInputPort) { | |
NSLog(@"Capture device input port of video media type was " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Derive dimensions of the capture device input. | |
AVCaptureInputPort *captureDeviceInputPort = nil; | |
for (AVCaptureInputPort *port in [captureDeviceInput ports]) { | |
if ([[port mediaType] isEqualToString:AVMediaTypeVideo]) { | |
captureDeviceInputPort = port; | |
break; | |
} | |
} | |
if (!captureDeviceInputPort) { | |
CFXLogError(@"Capture device input port of video media type was " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (CGPoint)pointForPointOfInterest:(CGPoint)pointOfInterest | |
{ | |
CGPoint point; | |
if ([previewLayer respondsToSelector: | |
@selector(pointForCaptureDevicePointOfInterest:)]) { | |
// Use the native method if available (available on iOS 6 or above.) | |
point = [previewLayer pointForCaptureDevicePointOfInterest:pointOfInterest]; | |
} else { | |
// Otherwise manually convert the point from point-of-interest coordinates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <typename I, typename O, typename Iterator> | |
inline void transform_image( | |
const cv::Mat_<I>& input, | |
cv::Mat_<O> *output, | |
Iterator iterator) { | |
if (input.size != output->size) { | |
DR_LOGE("Dimensions of input and output images must be identical."); | |
DR_LOGD("Skipping the rest."); | |
return; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>BuildMachineOSBuild</key> | |
<string>11B26</string> | |
<key>CFBundleDevelopmentRegion</key> | |
<string>English</string> | |
<key>CFBundleExecutable</key> | |
<string>CoffeeScript</string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<languageVersion: 1.0;> | |
kernel TransparentizeGreenChannel | |
< namespace : "Sgss"; | |
vendor : "Matsuda Shota"; | |
version : 1; | |
description : "Recovers transparency of grayscale image with key channel"; > | |
{ | |
input image4 sourceImage; | |
output float4 destinationColor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Length | |
self = @ | |
@_pattern : /^\s*([+\-]?\s*[\d.]+(?:e[+\-]\d+)?)\s*([^\s]+)?\s*$/ | |
@_units: | |
pixel : 'pixel' | |
millimeter : 'millimeter' |