├── .gitignore ├── LICENSE ├── OpenCVHelpLibrary.h ├── OpenCVHelpLibrary.m ├── OpenCVHelpLibrary.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ └── sonson.xcuserdatad │ └── UserInterfaceState.xcuserstate ├── OpenCVHelpLibrary ├── OpenCVHelpLibrary-Info.plist ├── OpenCVHelpLibrary-Prefix.pch ├── OpenCVHelpLibraryAppDelegate.h ├── OpenCVHelpLibraryAppDelegate.m ├── OpenCVHelpLibraryViewController.h ├── OpenCVHelpLibraryViewController.m ├── Resources │ └── image │ │ ├── Default-Landscape.png │ │ ├── Default-Portrait.png │ │ ├── Default.png │ │ ├── Default@2x.png │ │ ├── icon114x114.png │ │ ├── icon57x57.png │ │ └── icon72x72.png ├── Test │ ├── test.h │ ├── test.m │ ├── testTool.h │ └── testTool.m ├── en.lproj │ ├── InfoPlist.strings │ ├── MainWindow-iPad.xib │ ├── MainWindow.xib │ └── OpenCVHelpLibraryViewController.xib ├── main.m └── testImages │ ├── testImage_Gray_JPG24.jpg │ ├── testImage_Gray_PNG24.png │ ├── testImage_Gray_PNG24Alpha.png │ ├── testImage_Gray_PNG8.png │ ├── testImage_Gray_PNG8Alpha.png │ ├── testImage_RGB_JPG24.jpg │ ├── testImage_RGB_PNG24.png │ ├── testImage_RGB_PNG24Alpha.png │ ├── testImage_RGB_PNG8.png │ └── testImage_RGB_PNG8Alpha.png └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | *~ 3 | xcuserdata 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | OpenCV Help Library Copyright (c) 2011, Yuichi Yoshida All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the docume ntation and/or other materials provided with the distribution. - Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUD ING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN N O EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR C ONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR P ROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBI LITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /OpenCVHelpLibrary.h: -------------------------------------------------------------------------------- 1 | /* 2 | * OpenCV Help Library 3 | * OpenCVHelpLibrary.h 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 11/05/08 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import 32 | 33 | #import 34 | 35 | @interface UIImage(OpenCV) 36 | 37 | - (IplImage*)createIplImage; 38 | + (UIImage*)imageWithIplImage:(IplImage*)inputImage; 39 | 40 | @end 41 | 42 | IplImage* CGCreateIplImageWithCGImage(CGImageRef imageRef, int iscolor); 43 | CGImageRef CGCreateImageWithIplImage(IplImage* inputImage); 44 | 45 | // #define CV_LOAD_IMAGE_UNCHANGED -1 46 | #define CV_LOAD_IMAGE_GRAYSCALE 0 47 | #define CV_LOAD_IMAGE_COLOR 1 48 | // #define CV_LOAD_IMAGE_ANYDEPTH 2 49 | #define CV_LOAD_IMAGE_ANYCOLOR 4 50 | 51 | IplImage* cvLoadImage(const char* filename, int iscolor); -------------------------------------------------------------------------------- /OpenCVHelpLibrary.m: -------------------------------------------------------------------------------- 1 | /* 2 | * OpenCV Help Library 3 | * OpenCVHelpLibrary.m 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 11/05/08 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import "OpenCVHelpLibrary.h" 32 | 33 | #import "QuartzHelpLibrary.h" 34 | #import 35 | 36 | @implementation UIImage(OpenCV) 37 | 38 | - (IplImage*)createIplImage { 39 | IplImage *output = CGCreateIplImageWithCGImage(self.CGImage, CV_LOAD_IMAGE_ANYCOLOR); 40 | return output; 41 | } 42 | 43 | + (UIImage*)imageWithIplImage:(IplImage*)inputImage { 44 | CGImageRef source = CGCreateImageWithIplImage(inputImage); 45 | 46 | UIImage *output = [UIImage imageWithCGImage:source]; 47 | CGImageRelease(source); 48 | return output; 49 | } 50 | 51 | @end 52 | 53 | IplImage* CGCreateIplImageWithCGImage(CGImageRef imageRef, int iscolor) { 54 | size_t bitsPerPixel_imageRef = CGImageGetBitsPerPixel(imageRef); 55 | size_t inputBytesPerPixel = bitsPerPixel_imageRef / 8; 56 | CGImageAlphaInfo bitmapInfo = CGImageGetBitmapInfo(imageRef); 57 | bitmapInfo = bitmapInfo & kCGBitmapByteOrderMask; 58 | 59 | if (inputBytesPerPixel != 1 && inputBytesPerPixel != 2 && inputBytesPerPixel != 3 && inputBytesPerPixel != 4) { 60 | printf("Not supported image type.\n"); 61 | return NULL; 62 | } 63 | 64 | if (bitmapInfo == kCGBitmapFloatComponents) { 65 | printf("Not supported image type.\n"); 66 | return NULL; 67 | } 68 | 69 | int readTypeFromCGImage = QH_PIXEL_GRAYSCALE; 70 | 71 | switch(inputBytesPerPixel) { 72 | case QH_BYTES_PER_PIXEL_8BIT: 73 | if (iscolor == CV_LOAD_IMAGE_GRAYSCALE) { 74 | readTypeFromCGImage = QH_PIXEL_GRAYSCALE; 75 | break; 76 | } 77 | else if (iscolor == CV_LOAD_IMAGE_COLOR) { 78 | readTypeFromCGImage = QH_PIXEL_GRAYSCALE; 79 | break; 80 | } 81 | else if (iscolor == CV_LOAD_IMAGE_ANYCOLOR) { 82 | readTypeFromCGImage = QH_PIXEL_GRAYSCALE; 83 | break; 84 | } 85 | goto EXCEPTION; 86 | break; 87 | case QH_BYTES_PER_PIXEL_16BIT: 88 | if (iscolor == CV_LOAD_IMAGE_GRAYSCALE) { 89 | readTypeFromCGImage = QH_PIXEL_GRAYSCALE; 90 | break; 91 | } 92 | else if (iscolor == CV_LOAD_IMAGE_COLOR) { 93 | readTypeFromCGImage = QH_PIXEL_GRAYSCALE; 94 | break; 95 | } 96 | else if (iscolor == CV_LOAD_IMAGE_ANYCOLOR) { 97 | readTypeFromCGImage = QH_PIXEL_GRAYSCALE; 98 | break; 99 | } 100 | goto EXCEPTION; 101 | break; 102 | case QH_BYTES_PER_PIXEL_24BIT: 103 | if (iscolor == CV_LOAD_IMAGE_GRAYSCALE) { 104 | readTypeFromCGImage = QH_PIXEL_GRAYSCALE; 105 | break; 106 | } 107 | else if (iscolor == CV_LOAD_IMAGE_COLOR) { 108 | readTypeFromCGImage = QH_PIXEL_COLOR; 109 | break; 110 | } 111 | else if (iscolor == CV_LOAD_IMAGE_ANYCOLOR) { 112 | readTypeFromCGImage = QH_PIXEL_COLOR; 113 | break; 114 | } 115 | goto EXCEPTION; 116 | break; 117 | case QH_BYTES_PER_PIXEL_32BIT: 118 | if (iscolor == CV_LOAD_IMAGE_GRAYSCALE) { 119 | readTypeFromCGImage = QH_PIXEL_GRAYSCALE; 120 | break; 121 | } 122 | else if (iscolor == CV_LOAD_IMAGE_COLOR) { 123 | readTypeFromCGImage = QH_PIXEL_COLOR; 124 | break; 125 | } 126 | else if (iscolor == CV_LOAD_IMAGE_ANYCOLOR) { 127 | readTypeFromCGImage = QH_PIXEL_ANYCOLOR; 128 | break; 129 | } 130 | goto EXCEPTION; 131 | break; 132 | default: 133 | break; 134 | } 135 | 136 | 137 | unsigned char *pixel = NULL; 138 | int width = 0; 139 | int height = 0; 140 | int bytesPerPixel = 0; 141 | 142 | CGCreatePixelBufferWithImage(imageRef, &pixel, &width, &height, &bytesPerPixel, readTypeFromCGImage); 143 | 144 | IplImage* output = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, bytesPerPixel); 145 | 146 | for (int y = 0; y < height; y++) { 147 | unsigned char *source = pixel + y * width * bytesPerPixel; 148 | unsigned char *destination = (unsigned char*)output->imageData + y * output->widthStep; 149 | memcpy(destination, source, sizeof(unsigned char) * width * bytesPerPixel); 150 | } 151 | 152 | free(pixel); 153 | return output; 154 | EXCEPTION: 155 | return NULL; 156 | } 157 | 158 | CGImageRef CGCreateImageWithIplImage(IplImage* inputImage) { 159 | if (inputImage->depth != IPL_DEPTH_8U) { 160 | printf("Not supported depth type.\n"); 161 | return NULL; 162 | } 163 | 164 | if (inputImage->nChannels == 1) { 165 | CGColorSpaceRef grayColorSpace = CGColorSpaceCreateDeviceGray(); 166 | CGContextRef context = CGBitmapContextCreate(inputImage->imageData, inputImage->width, inputImage->height, 8, inputImage->widthStep, grayColorSpace, kCGImageAlphaNone); 167 | CGImageRef image = CGBitmapContextCreateImage(context); 168 | CGColorSpaceRelease(grayColorSpace); 169 | return image; 170 | } 171 | else if (inputImage->nChannels == 3) { 172 | CGColorSpaceRef rgbColorSpace = CGColorSpaceCreateDeviceRGB(); 173 | 174 | unsigned char *rgbPixel = (unsigned char*)malloc(sizeof(unsigned char) * inputImage->width * inputImage->height * 4); 175 | 176 | for (int y = 0; y < inputImage->height; y++) { 177 | for (int x = 0; x < inputImage->width; x++) { 178 | rgbPixel[y * inputImage->width * 4 + 4 * x + 0] = inputImage->imageData[y * inputImage->width * 3 + 3 * x + 0]; 179 | rgbPixel[y * inputImage->width * 4 + 4 * x + 1] = inputImage->imageData[y * inputImage->width * 3 + 3 * x + 1]; 180 | rgbPixel[y * inputImage->width * 4 + 4 * x + 2] = inputImage->imageData[y * inputImage->width * 3 + 3 * x + 2]; 181 | } 182 | } 183 | 184 | CGContextRef context = CGBitmapContextCreate(rgbPixel, inputImage->width, inputImage->height, 8, inputImage->width * 4, rgbColorSpace, kCGImageAlphaNoneSkipLast | kCGBitmapByteOrder32Big); 185 | CGImageRef image = CGBitmapContextCreateImage(context); 186 | CGColorSpaceRelease(rgbColorSpace); 187 | free(rgbPixel); 188 | return image; 189 | } 190 | else if (inputImage->nChannels == 4) { 191 | CGColorSpaceRef rgbColorSpace = CGColorSpaceCreateDeviceRGB(); 192 | 193 | unsigned char *rgbPixel = (unsigned char*)malloc(sizeof(unsigned char) * inputImage->width * inputImage->height * 4); 194 | 195 | for (int y = 0; y < inputImage->height; y++) { 196 | for (int x = 0; x < inputImage->width; x++) { 197 | rgbPixel[y * inputImage->width * 4 + 4 * x + 0] = inputImage->imageData[y * inputImage->width * 4 + 4 * x + 0]; 198 | rgbPixel[y * inputImage->width * 4 + 4 * x + 1] = inputImage->imageData[y * inputImage->width * 4 + 4 * x + 1]; 199 | rgbPixel[y * inputImage->width * 4 + 4 * x + 2] = inputImage->imageData[y * inputImage->width * 4 + 4 * x + 2]; 200 | } 201 | } 202 | 203 | CGContextRef context = CGBitmapContextCreate(rgbPixel, inputImage->width, inputImage->height, 8, inputImage->width * 4, rgbColorSpace, kCGImageAlphaNoneSkipLast | kCGBitmapByteOrder32Big); 204 | CGImageRef image = CGBitmapContextCreateImage(context); 205 | CGColorSpaceRelease(rgbColorSpace); 206 | free(rgbPixel); 207 | return image; 208 | } 209 | else { 210 | printf("Not supported number of channels\n"); 211 | return NULL; 212 | } 213 | return NULL; 214 | } 215 | 216 | IplImage* cvLoadImage(const char* filename, int iscolor) { 217 | CGImageRef loadedImage = NULL; 218 | 219 | // load as JPG or PNG file 220 | loadedImage = CGImageCreateWithPNGorJPEGFilePath((CFStringRef)[NSString stringWithUTF8String:filename]); 221 | 222 | if (loadedImage == NULL) { 223 | // open other foramat, loading method here.... 224 | } 225 | 226 | // error 227 | if (loadedImage == NULL) { 228 | printf("Error, can't open file, not supported file format.\n"); 229 | return NULL; 230 | } 231 | 232 | IplImage *newImage = CGCreateIplImageWithCGImage(loadedImage, iscolor); 233 | 234 | return newImage; 235 | } -------------------------------------------------------------------------------- /OpenCVHelpLibrary.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 141B71F11376E2A5008278A1 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 141B71F01376E2A5008278A1 /* UIKit.framework */; }; 11 | 141B71F31376E2A5008278A1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 141B71F21376E2A5008278A1 /* Foundation.framework */; }; 12 | 141B71F51376E2A5008278A1 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 141B71F41376E2A5008278A1 /* CoreGraphics.framework */; }; 13 | 141B71FB1376E2A5008278A1 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 141B71F91376E2A5008278A1 /* InfoPlist.strings */; }; 14 | 141B71FE1376E2A5008278A1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 141B71FD1376E2A5008278A1 /* main.m */; }; 15 | 141B72011376E2A5008278A1 /* OpenCVHelpLibraryAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 141B72001376E2A5008278A1 /* OpenCVHelpLibraryAppDelegate.m */; }; 16 | 141B72041376E2A5008278A1 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 141B72021376E2A5008278A1 /* MainWindow.xib */; }; 17 | 141B72071376E2A5008278A1 /* OpenCVHelpLibraryViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 141B72061376E2A5008278A1 /* OpenCVHelpLibraryViewController.m */; }; 18 | 141B720A1376E2A5008278A1 /* OpenCVHelpLibraryViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 141B72081376E2A5008278A1 /* OpenCVHelpLibraryViewController.xib */; }; 19 | 143A1D01137904B200442F7A /* QuartzHelpLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 143A1D00137904B200442F7A /* QuartzHelpLibrary.m */; }; 20 | 147A4E891376F57D00732B67 /* OpenCVHelpLibrary.m in Sources */ = {isa = PBXBuildFile; fileRef = 147A4E881376F57D00732B67 /* OpenCVHelpLibrary.m */; }; 21 | 147A4E8D1376F5CC00732B67 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 147A4E8C1376F5CC00732B67 /* Accelerate.framework */; }; 22 | 147A4E981376F5DD00732B67 /* libopencv_contrib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147A4E8E1376F5DD00732B67 /* libopencv_contrib.a */; }; 23 | 147A4E991376F5DD00732B67 /* libopencv_core.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147A4E8F1376F5DD00732B67 /* libopencv_core.a */; }; 24 | 147A4E9A1376F5DD00732B67 /* libopencv_features2d.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147A4E901376F5DD00732B67 /* libopencv_features2d.a */; }; 25 | 147A4E9B1376F5DD00732B67 /* libopencv_flann.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147A4E911376F5DD00732B67 /* libopencv_flann.a */; }; 26 | 147A4E9C1376F5DD00732B67 /* libopencv_gpu.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147A4E921376F5DD00732B67 /* libopencv_gpu.a */; }; 27 | 147A4E9D1376F5DD00732B67 /* libopencv_imgproc.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147A4E931376F5DD00732B67 /* libopencv_imgproc.a */; }; 28 | 147A4E9E1376F5DD00732B67 /* libopencv_legacy.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147A4E941376F5DD00732B67 /* libopencv_legacy.a */; }; 29 | 147A4E9F1376F5DE00732B67 /* libopencv_ml.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147A4E951376F5DD00732B67 /* libopencv_ml.a */; }; 30 | 147A4EA01376F5DE00732B67 /* libopencv_objdetect.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147A4E961376F5DD00732B67 /* libopencv_objdetect.a */; }; 31 | 147A4EA11376F5DE00732B67 /* libopencv_video.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 147A4E971376F5DD00732B67 /* libopencv_video.a */; }; 32 | 14A3CE84137A4D67008001DD /* testImage_Gray_JPG24.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 14A3CE7A137A4D67008001DD /* testImage_Gray_JPG24.jpg */; }; 33 | 14A3CE85137A4D67008001DD /* testImage_Gray_PNG24.png in Resources */ = {isa = PBXBuildFile; fileRef = 14A3CE7B137A4D67008001DD /* testImage_Gray_PNG24.png */; }; 34 | 14A3CE86137A4D67008001DD /* testImage_Gray_PNG24Alpha.png in Resources */ = {isa = PBXBuildFile; fileRef = 14A3CE7C137A4D67008001DD /* testImage_Gray_PNG24Alpha.png */; }; 35 | 14A3CE87137A4D67008001DD /* testImage_Gray_PNG8.png in Resources */ = {isa = PBXBuildFile; fileRef = 14A3CE7D137A4D67008001DD /* testImage_Gray_PNG8.png */; }; 36 | 14A3CE88137A4D67008001DD /* testImage_Gray_PNG8Alpha.png in Resources */ = {isa = PBXBuildFile; fileRef = 14A3CE7E137A4D67008001DD /* testImage_Gray_PNG8Alpha.png */; }; 37 | 14A3CE89137A4D67008001DD /* testImage_RGB_JPG24.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 14A3CE7F137A4D67008001DD /* testImage_RGB_JPG24.jpg */; }; 38 | 14A3CE8A137A4D67008001DD /* testImage_RGB_PNG24.png in Resources */ = {isa = PBXBuildFile; fileRef = 14A3CE80137A4D67008001DD /* testImage_RGB_PNG24.png */; }; 39 | 14A3CE8B137A4D67008001DD /* testImage_RGB_PNG24Alpha.png in Resources */ = {isa = PBXBuildFile; fileRef = 14A3CE81137A4D67008001DD /* testImage_RGB_PNG24Alpha.png */; }; 40 | 14A3CE8C137A4D67008001DD /* testImage_RGB_PNG8.png in Resources */ = {isa = PBXBuildFile; fileRef = 14A3CE82137A4D67008001DD /* testImage_RGB_PNG8.png */; }; 41 | 14A3CE8D137A4D67008001DD /* testImage_RGB_PNG8Alpha.png in Resources */ = {isa = PBXBuildFile; fileRef = 14A3CE83137A4D67008001DD /* testImage_RGB_PNG8Alpha.png */; }; 42 | 14D85E9D1378405E004837F8 /* Default-Landscape.png in Resources */ = {isa = PBXBuildFile; fileRef = 14D85E961378405E004837F8 /* Default-Landscape.png */; }; 43 | 14D85E9E1378405E004837F8 /* Default-Portrait.png in Resources */ = {isa = PBXBuildFile; fileRef = 14D85E971378405E004837F8 /* Default-Portrait.png */; }; 44 | 14D85E9F1378405E004837F8 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 14D85E981378405E004837F8 /* Default.png */; }; 45 | 14D85EA01378405E004837F8 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 14D85E991378405E004837F8 /* Default@2x.png */; }; 46 | 14D85EA11378405E004837F8 /* icon114x114.png in Resources */ = {isa = PBXBuildFile; fileRef = 14D85E9A1378405E004837F8 /* icon114x114.png */; }; 47 | 14D85EA21378405E004837F8 /* icon57x57.png in Resources */ = {isa = PBXBuildFile; fileRef = 14D85E9B1378405E004837F8 /* icon57x57.png */; }; 48 | 14D85EA31378405E004837F8 /* icon72x72.png in Resources */ = {isa = PBXBuildFile; fileRef = 14D85E9C1378405E004837F8 /* icon72x72.png */; }; 49 | 14E3D37513862EC300097521 /* test.m in Sources */ = {isa = PBXBuildFile; fileRef = 14E3D37413862EC300097521 /* test.m */; }; 50 | 14E3D37813862F1400097521 /* testTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 14E3D37713862F1400097521 /* testTool.m */; }; 51 | /* End PBXBuildFile section */ 52 | 53 | /* Begin PBXFileReference section */ 54 | 141B71EC1376E2A4008278A1 /* OpenCVHelpLibrary.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OpenCVHelpLibrary.app; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 141B71F01376E2A5008278A1 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 56 | 141B71F21376E2A5008278A1 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 57 | 141B71F41376E2A5008278A1 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 58 | 141B71F81376E2A5008278A1 /* OpenCVHelpLibrary-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "OpenCVHelpLibrary-Info.plist"; sourceTree = ""; }; 59 | 141B71FA1376E2A5008278A1 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 60 | 141B71FC1376E2A5008278A1 /* OpenCVHelpLibrary-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "OpenCVHelpLibrary-Prefix.pch"; sourceTree = ""; }; 61 | 141B71FD1376E2A5008278A1 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 62 | 141B71FF1376E2A5008278A1 /* OpenCVHelpLibraryAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpenCVHelpLibraryAppDelegate.h; sourceTree = ""; }; 63 | 141B72001376E2A5008278A1 /* OpenCVHelpLibraryAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OpenCVHelpLibraryAppDelegate.m; sourceTree = ""; }; 64 | 141B72031376E2A5008278A1 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; 65 | 141B72051376E2A5008278A1 /* OpenCVHelpLibraryViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OpenCVHelpLibraryViewController.h; sourceTree = ""; }; 66 | 141B72061376E2A5008278A1 /* OpenCVHelpLibraryViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OpenCVHelpLibraryViewController.m; sourceTree = ""; }; 67 | 141B72091376E2A5008278A1 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/OpenCVHelpLibraryViewController.xib; sourceTree = ""; }; 68 | 143A1CFF137904B200442F7A /* QuartzHelpLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzHelpLibrary.h; path = "../Quartz-Help-Library/QuartzHelpLibrary.h"; sourceTree = ""; }; 69 | 143A1D00137904B200442F7A /* QuartzHelpLibrary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = QuartzHelpLibrary.m; path = "../Quartz-Help-Library/QuartzHelpLibrary.m"; sourceTree = ""; }; 70 | 147A4E871376F57D00732B67 /* OpenCVHelpLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenCVHelpLibrary.h; sourceTree = ""; }; 71 | 147A4E881376F57D00732B67 /* OpenCVHelpLibrary.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OpenCVHelpLibrary.m; sourceTree = ""; }; 72 | 147A4E8C1376F5CC00732B67 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; }; 73 | 147A4E8E1376F5DD00732B67 /* libopencv_contrib.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopencv_contrib.a; path = ../iOS_OpenCV_build_script/build/lib/libopencv_contrib.a; sourceTree = ""; }; 74 | 147A4E8F1376F5DD00732B67 /* libopencv_core.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopencv_core.a; path = ../iOS_OpenCV_build_script/build/lib/libopencv_core.a; sourceTree = ""; }; 75 | 147A4E901376F5DD00732B67 /* libopencv_features2d.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopencv_features2d.a; path = ../iOS_OpenCV_build_script/build/lib/libopencv_features2d.a; sourceTree = ""; }; 76 | 147A4E911376F5DD00732B67 /* libopencv_flann.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopencv_flann.a; path = ../iOS_OpenCV_build_script/build/lib/libopencv_flann.a; sourceTree = ""; }; 77 | 147A4E921376F5DD00732B67 /* libopencv_gpu.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopencv_gpu.a; path = ../iOS_OpenCV_build_script/build/lib/libopencv_gpu.a; sourceTree = ""; }; 78 | 147A4E931376F5DD00732B67 /* libopencv_imgproc.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopencv_imgproc.a; path = ../iOS_OpenCV_build_script/build/lib/libopencv_imgproc.a; sourceTree = ""; }; 79 | 147A4E941376F5DD00732B67 /* libopencv_legacy.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopencv_legacy.a; path = ../iOS_OpenCV_build_script/build/lib/libopencv_legacy.a; sourceTree = ""; }; 80 | 147A4E951376F5DD00732B67 /* libopencv_ml.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopencv_ml.a; path = ../iOS_OpenCV_build_script/build/lib/libopencv_ml.a; sourceTree = ""; }; 81 | 147A4E961376F5DD00732B67 /* libopencv_objdetect.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopencv_objdetect.a; path = ../iOS_OpenCV_build_script/build/lib/libopencv_objdetect.a; sourceTree = ""; }; 82 | 147A4E971376F5DD00732B67 /* libopencv_video.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libopencv_video.a; path = ../iOS_OpenCV_build_script/build/lib/libopencv_video.a; sourceTree = ""; }; 83 | 14A3CE7A137A4D67008001DD /* testImage_Gray_JPG24.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = testImage_Gray_JPG24.jpg; sourceTree = ""; }; 84 | 14A3CE7B137A4D67008001DD /* testImage_Gray_PNG24.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = testImage_Gray_PNG24.png; sourceTree = ""; }; 85 | 14A3CE7C137A4D67008001DD /* testImage_Gray_PNG24Alpha.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = testImage_Gray_PNG24Alpha.png; sourceTree = ""; }; 86 | 14A3CE7D137A4D67008001DD /* testImage_Gray_PNG8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = testImage_Gray_PNG8.png; sourceTree = ""; }; 87 | 14A3CE7E137A4D67008001DD /* testImage_Gray_PNG8Alpha.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = testImage_Gray_PNG8Alpha.png; sourceTree = ""; }; 88 | 14A3CE7F137A4D67008001DD /* testImage_RGB_JPG24.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = testImage_RGB_JPG24.jpg; sourceTree = ""; }; 89 | 14A3CE80137A4D67008001DD /* testImage_RGB_PNG24.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = testImage_RGB_PNG24.png; sourceTree = ""; }; 90 | 14A3CE81137A4D67008001DD /* testImage_RGB_PNG24Alpha.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = testImage_RGB_PNG24Alpha.png; sourceTree = ""; }; 91 | 14A3CE82137A4D67008001DD /* testImage_RGB_PNG8.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = testImage_RGB_PNG8.png; sourceTree = ""; }; 92 | 14A3CE83137A4D67008001DD /* testImage_RGB_PNG8Alpha.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = testImage_RGB_PNG8Alpha.png; sourceTree = ""; }; 93 | 14D85E961378405E004837F8 /* Default-Landscape.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Landscape.png"; sourceTree = ""; }; 94 | 14D85E971378405E004837F8 /* Default-Portrait.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-Portrait.png"; sourceTree = ""; }; 95 | 14D85E981378405E004837F8 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 96 | 14D85E991378405E004837F8 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 97 | 14D85E9A1378405E004837F8 /* icon114x114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon114x114.png; sourceTree = ""; }; 98 | 14D85E9B1378405E004837F8 /* icon57x57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon57x57.png; sourceTree = ""; }; 99 | 14D85E9C1378405E004837F8 /* icon72x72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon72x72.png; sourceTree = ""; }; 100 | 14E3D37313862EC300097521 /* test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = test.h; sourceTree = ""; }; 101 | 14E3D37413862EC300097521 /* test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = test.m; sourceTree = ""; }; 102 | 14E3D37613862F1400097521 /* testTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = testTool.h; sourceTree = ""; }; 103 | 14E3D37713862F1400097521 /* testTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = testTool.m; sourceTree = ""; }; 104 | /* End PBXFileReference section */ 105 | 106 | /* Begin PBXFrameworksBuildPhase section */ 107 | 141B71E91376E2A4008278A1 /* Frameworks */ = { 108 | isa = PBXFrameworksBuildPhase; 109 | buildActionMask = 2147483647; 110 | files = ( 111 | 147A4E8D1376F5CC00732B67 /* Accelerate.framework in Frameworks */, 112 | 141B71F11376E2A5008278A1 /* UIKit.framework in Frameworks */, 113 | 141B71F31376E2A5008278A1 /* Foundation.framework in Frameworks */, 114 | 141B71F51376E2A5008278A1 /* CoreGraphics.framework in Frameworks */, 115 | 147A4E981376F5DD00732B67 /* libopencv_contrib.a in Frameworks */, 116 | 147A4E991376F5DD00732B67 /* libopencv_core.a in Frameworks */, 117 | 147A4E9A1376F5DD00732B67 /* libopencv_features2d.a in Frameworks */, 118 | 147A4E9B1376F5DD00732B67 /* libopencv_flann.a in Frameworks */, 119 | 147A4E9C1376F5DD00732B67 /* libopencv_gpu.a in Frameworks */, 120 | 147A4E9D1376F5DD00732B67 /* libopencv_imgproc.a in Frameworks */, 121 | 147A4E9E1376F5DD00732B67 /* libopencv_legacy.a in Frameworks */, 122 | 147A4E9F1376F5DE00732B67 /* libopencv_ml.a in Frameworks */, 123 | 147A4EA01376F5DE00732B67 /* libopencv_objdetect.a in Frameworks */, 124 | 147A4EA11376F5DE00732B67 /* libopencv_video.a in Frameworks */, 125 | ); 126 | runOnlyForDeploymentPostprocessing = 0; 127 | }; 128 | /* End PBXFrameworksBuildPhase section */ 129 | 130 | /* Begin PBXGroup section */ 131 | 141B71E11376E2A4008278A1 = { 132 | isa = PBXGroup; 133 | children = ( 134 | 147A4E871376F57D00732B67 /* OpenCVHelpLibrary.h */, 135 | 147A4E881376F57D00732B67 /* OpenCVHelpLibrary.m */, 136 | 14E3D37213862EC300097521 /* Test */, 137 | 141B71F61376E2A5008278A1 /* OpenCVHelpLibrary */, 138 | 141B71F71376E2A5008278A1 /* Supporting Files */, 139 | 143A1CFD1379049600442F7A /* Quartz Help Library */, 140 | 14D85E941378405E004837F8 /* Resources */, 141 | 147A4E8B1376F5B500732B67 /* Libraries */, 142 | 141B71EF1376E2A4008278A1 /* Frameworks */, 143 | 141B71ED1376E2A4008278A1 /* Products */, 144 | ); 145 | sourceTree = ""; 146 | }; 147 | 141B71ED1376E2A4008278A1 /* Products */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 141B71EC1376E2A4008278A1 /* OpenCVHelpLibrary.app */, 151 | ); 152 | name = Products; 153 | sourceTree = ""; 154 | }; 155 | 141B71EF1376E2A4008278A1 /* Frameworks */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 147A4E8C1376F5CC00732B67 /* Accelerate.framework */, 159 | 141B71F01376E2A5008278A1 /* UIKit.framework */, 160 | 141B71F21376E2A5008278A1 /* Foundation.framework */, 161 | 141B71F41376E2A5008278A1 /* CoreGraphics.framework */, 162 | ); 163 | name = Frameworks; 164 | sourceTree = ""; 165 | }; 166 | 141B71F61376E2A5008278A1 /* OpenCVHelpLibrary */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | 141B72051376E2A5008278A1 /* OpenCVHelpLibraryViewController.h */, 170 | 141B72061376E2A5008278A1 /* OpenCVHelpLibraryViewController.m */, 171 | 141B72081376E2A5008278A1 /* OpenCVHelpLibraryViewController.xib */, 172 | 141B71FF1376E2A5008278A1 /* OpenCVHelpLibraryAppDelegate.h */, 173 | 141B72001376E2A5008278A1 /* OpenCVHelpLibraryAppDelegate.m */, 174 | 141B72021376E2A5008278A1 /* MainWindow.xib */, 175 | ); 176 | path = OpenCVHelpLibrary; 177 | sourceTree = ""; 178 | }; 179 | 141B71F71376E2A5008278A1 /* Supporting Files */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | 141B71F81376E2A5008278A1 /* OpenCVHelpLibrary-Info.plist */, 183 | 141B71F91376E2A5008278A1 /* InfoPlist.strings */, 184 | 141B71FC1376E2A5008278A1 /* OpenCVHelpLibrary-Prefix.pch */, 185 | 141B71FD1376E2A5008278A1 /* main.m */, 186 | ); 187 | name = "Supporting Files"; 188 | path = OpenCVHelpLibrary; 189 | sourceTree = ""; 190 | }; 191 | 143A1CFD1379049600442F7A /* Quartz Help Library */ = { 192 | isa = PBXGroup; 193 | children = ( 194 | 143A1CFF137904B200442F7A /* QuartzHelpLibrary.h */, 195 | 143A1D00137904B200442F7A /* QuartzHelpLibrary.m */, 196 | ); 197 | name = "Quartz Help Library"; 198 | sourceTree = ""; 199 | }; 200 | 147A4E8B1376F5B500732B67 /* Libraries */ = { 201 | isa = PBXGroup; 202 | children = ( 203 | 147A4E8E1376F5DD00732B67 /* libopencv_contrib.a */, 204 | 147A4E8F1376F5DD00732B67 /* libopencv_core.a */, 205 | 147A4E901376F5DD00732B67 /* libopencv_features2d.a */, 206 | 147A4E911376F5DD00732B67 /* libopencv_flann.a */, 207 | 147A4E921376F5DD00732B67 /* libopencv_gpu.a */, 208 | 147A4E931376F5DD00732B67 /* libopencv_imgproc.a */, 209 | 147A4E941376F5DD00732B67 /* libopencv_legacy.a */, 210 | 147A4E951376F5DD00732B67 /* libopencv_ml.a */, 211 | 147A4E961376F5DD00732B67 /* libopencv_objdetect.a */, 212 | 147A4E971376F5DD00732B67 /* libopencv_video.a */, 213 | ); 214 | name = Libraries; 215 | sourceTree = ""; 216 | }; 217 | 14A3CE79137A4D67008001DD /* testImages */ = { 218 | isa = PBXGroup; 219 | children = ( 220 | 14A3CE7A137A4D67008001DD /* testImage_Gray_JPG24.jpg */, 221 | 14A3CE7B137A4D67008001DD /* testImage_Gray_PNG24.png */, 222 | 14A3CE7C137A4D67008001DD /* testImage_Gray_PNG24Alpha.png */, 223 | 14A3CE7D137A4D67008001DD /* testImage_Gray_PNG8.png */, 224 | 14A3CE7E137A4D67008001DD /* testImage_Gray_PNG8Alpha.png */, 225 | 14A3CE7F137A4D67008001DD /* testImage_RGB_JPG24.jpg */, 226 | 14A3CE80137A4D67008001DD /* testImage_RGB_PNG24.png */, 227 | 14A3CE81137A4D67008001DD /* testImage_RGB_PNG24Alpha.png */, 228 | 14A3CE82137A4D67008001DD /* testImage_RGB_PNG8.png */, 229 | 14A3CE83137A4D67008001DD /* testImage_RGB_PNG8Alpha.png */, 230 | ); 231 | name = testImages; 232 | path = ../testImages; 233 | sourceTree = ""; 234 | }; 235 | 14D85E941378405E004837F8 /* Resources */ = { 236 | isa = PBXGroup; 237 | children = ( 238 | 14A3CE79137A4D67008001DD /* testImages */, 239 | 14D85E951378405E004837F8 /* image */, 240 | ); 241 | name = Resources; 242 | path = OpenCVHelpLibrary/Resources; 243 | sourceTree = ""; 244 | }; 245 | 14D85E951378405E004837F8 /* image */ = { 246 | isa = PBXGroup; 247 | children = ( 248 | 14D85E961378405E004837F8 /* Default-Landscape.png */, 249 | 14D85E971378405E004837F8 /* Default-Portrait.png */, 250 | 14D85E981378405E004837F8 /* Default.png */, 251 | 14D85E991378405E004837F8 /* Default@2x.png */, 252 | 14D85E9A1378405E004837F8 /* icon114x114.png */, 253 | 14D85E9B1378405E004837F8 /* icon57x57.png */, 254 | 14D85E9C1378405E004837F8 /* icon72x72.png */, 255 | ); 256 | path = image; 257 | sourceTree = ""; 258 | }; 259 | 14E3D37213862EC300097521 /* Test */ = { 260 | isa = PBXGroup; 261 | children = ( 262 | 14E3D37313862EC300097521 /* test.h */, 263 | 14E3D37413862EC300097521 /* test.m */, 264 | 14E3D37613862F1400097521 /* testTool.h */, 265 | 14E3D37713862F1400097521 /* testTool.m */, 266 | ); 267 | name = Test; 268 | path = OpenCVHelpLibrary/Test; 269 | sourceTree = ""; 270 | }; 271 | /* End PBXGroup section */ 272 | 273 | /* Begin PBXNativeTarget section */ 274 | 141B71EB1376E2A4008278A1 /* OpenCVHelpLibrary */ = { 275 | isa = PBXNativeTarget; 276 | buildConfigurationList = 141B720D1376E2A5008278A1 /* Build configuration list for PBXNativeTarget "OpenCVHelpLibrary" */; 277 | buildPhases = ( 278 | 141B71E81376E2A4008278A1 /* Sources */, 279 | 141B71E91376E2A4008278A1 /* Frameworks */, 280 | 141B71EA1376E2A4008278A1 /* Resources */, 281 | ); 282 | buildRules = ( 283 | ); 284 | dependencies = ( 285 | ); 286 | name = OpenCVHelpLibrary; 287 | productName = OpenCVHelpLibrary; 288 | productReference = 141B71EC1376E2A4008278A1 /* OpenCVHelpLibrary.app */; 289 | productType = "com.apple.product-type.application"; 290 | }; 291 | /* End PBXNativeTarget section */ 292 | 293 | /* Begin PBXProject section */ 294 | 141B71E31376E2A4008278A1 /* Project object */ = { 295 | isa = PBXProject; 296 | buildConfigurationList = 141B71E61376E2A4008278A1 /* Build configuration list for PBXProject "OpenCVHelpLibrary" */; 297 | compatibilityVersion = "Xcode 3.2"; 298 | developmentRegion = English; 299 | hasScannedForEncodings = 0; 300 | knownRegions = ( 301 | en, 302 | ); 303 | mainGroup = 141B71E11376E2A4008278A1; 304 | productRefGroup = 141B71ED1376E2A4008278A1 /* Products */; 305 | projectDirPath = ""; 306 | projectRoot = ""; 307 | targets = ( 308 | 141B71EB1376E2A4008278A1 /* OpenCVHelpLibrary */, 309 | ); 310 | }; 311 | /* End PBXProject section */ 312 | 313 | /* Begin PBXResourcesBuildPhase section */ 314 | 141B71EA1376E2A4008278A1 /* Resources */ = { 315 | isa = PBXResourcesBuildPhase; 316 | buildActionMask = 2147483647; 317 | files = ( 318 | 141B71FB1376E2A5008278A1 /* InfoPlist.strings in Resources */, 319 | 141B72041376E2A5008278A1 /* MainWindow.xib in Resources */, 320 | 141B720A1376E2A5008278A1 /* OpenCVHelpLibraryViewController.xib in Resources */, 321 | 14D85E9D1378405E004837F8 /* Default-Landscape.png in Resources */, 322 | 14D85E9E1378405E004837F8 /* Default-Portrait.png in Resources */, 323 | 14D85E9F1378405E004837F8 /* Default.png in Resources */, 324 | 14D85EA01378405E004837F8 /* Default@2x.png in Resources */, 325 | 14D85EA11378405E004837F8 /* icon114x114.png in Resources */, 326 | 14D85EA21378405E004837F8 /* icon57x57.png in Resources */, 327 | 14D85EA31378405E004837F8 /* icon72x72.png in Resources */, 328 | 14A3CE84137A4D67008001DD /* testImage_Gray_JPG24.jpg in Resources */, 329 | 14A3CE85137A4D67008001DD /* testImage_Gray_PNG24.png in Resources */, 330 | 14A3CE86137A4D67008001DD /* testImage_Gray_PNG24Alpha.png in Resources */, 331 | 14A3CE87137A4D67008001DD /* testImage_Gray_PNG8.png in Resources */, 332 | 14A3CE88137A4D67008001DD /* testImage_Gray_PNG8Alpha.png in Resources */, 333 | 14A3CE89137A4D67008001DD /* testImage_RGB_JPG24.jpg in Resources */, 334 | 14A3CE8A137A4D67008001DD /* testImage_RGB_PNG24.png in Resources */, 335 | 14A3CE8B137A4D67008001DD /* testImage_RGB_PNG24Alpha.png in Resources */, 336 | 14A3CE8C137A4D67008001DD /* testImage_RGB_PNG8.png in Resources */, 337 | 14A3CE8D137A4D67008001DD /* testImage_RGB_PNG8Alpha.png in Resources */, 338 | ); 339 | runOnlyForDeploymentPostprocessing = 0; 340 | }; 341 | /* End PBXResourcesBuildPhase section */ 342 | 343 | /* Begin PBXSourcesBuildPhase section */ 344 | 141B71E81376E2A4008278A1 /* Sources */ = { 345 | isa = PBXSourcesBuildPhase; 346 | buildActionMask = 2147483647; 347 | files = ( 348 | 141B71FE1376E2A5008278A1 /* main.m in Sources */, 349 | 141B72011376E2A5008278A1 /* OpenCVHelpLibraryAppDelegate.m in Sources */, 350 | 141B72071376E2A5008278A1 /* OpenCVHelpLibraryViewController.m in Sources */, 351 | 147A4E891376F57D00732B67 /* OpenCVHelpLibrary.m in Sources */, 352 | 143A1D01137904B200442F7A /* QuartzHelpLibrary.m in Sources */, 353 | 14E3D37513862EC300097521 /* test.m in Sources */, 354 | 14E3D37813862F1400097521 /* testTool.m in Sources */, 355 | ); 356 | runOnlyForDeploymentPostprocessing = 0; 357 | }; 358 | /* End PBXSourcesBuildPhase section */ 359 | 360 | /* Begin PBXVariantGroup section */ 361 | 141B71F91376E2A5008278A1 /* InfoPlist.strings */ = { 362 | isa = PBXVariantGroup; 363 | children = ( 364 | 141B71FA1376E2A5008278A1 /* en */, 365 | ); 366 | name = InfoPlist.strings; 367 | sourceTree = ""; 368 | }; 369 | 141B72021376E2A5008278A1 /* MainWindow.xib */ = { 370 | isa = PBXVariantGroup; 371 | children = ( 372 | 141B72031376E2A5008278A1 /* en */, 373 | ); 374 | name = MainWindow.xib; 375 | sourceTree = ""; 376 | }; 377 | 141B72081376E2A5008278A1 /* OpenCVHelpLibraryViewController.xib */ = { 378 | isa = PBXVariantGroup; 379 | children = ( 380 | 141B72091376E2A5008278A1 /* en */, 381 | ); 382 | name = OpenCVHelpLibraryViewController.xib; 383 | sourceTree = ""; 384 | }; 385 | /* End PBXVariantGroup section */ 386 | 387 | /* Begin XCBuildConfiguration section */ 388 | 141B720B1376E2A5008278A1 /* Debug */ = { 389 | isa = XCBuildConfiguration; 390 | buildSettings = { 391 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 392 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 393 | GCC_C_LANGUAGE_STANDARD = gnu99; 394 | GCC_OPTIMIZATION_LEVEL = 0; 395 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG; 396 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 397 | GCC_VERSION = com.apple.compilers.llvmgcc42; 398 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 399 | GCC_WARN_UNUSED_VARIABLE = YES; 400 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 401 | SDKROOT = iphoneos; 402 | }; 403 | name = Debug; 404 | }; 405 | 141B720C1376E2A5008278A1 /* Release */ = { 406 | isa = XCBuildConfiguration; 407 | buildSettings = { 408 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 409 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 410 | GCC_C_LANGUAGE_STANDARD = gnu99; 411 | GCC_VERSION = com.apple.compilers.llvmgcc42; 412 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 413 | GCC_WARN_UNUSED_VARIABLE = YES; 414 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 415 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 416 | SDKROOT = iphoneos; 417 | }; 418 | name = Release; 419 | }; 420 | 141B720E1376E2A5008278A1 /* Debug */ = { 421 | isa = XCBuildConfiguration; 422 | buildSettings = { 423 | ALWAYS_SEARCH_USER_PATHS = NO; 424 | COPY_PHASE_STRIP = NO; 425 | GCC_DYNAMIC_NO_PIC = NO; 426 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 427 | GCC_PREFIX_HEADER = "OpenCVHelpLibrary/OpenCVHelpLibrary-Prefix.pch"; 428 | HEADER_SEARCH_PATHS = "../iOS_OpenCV_build_script/build/include/**"; 429 | INFOPLIST_FILE = "OpenCVHelpLibrary/OpenCVHelpLibrary-Info.plist"; 430 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 431 | LIBRARY_SEARCH_PATHS = ( 432 | "$(inherited)", 433 | "\"$(SRCROOT)/../iOS_OpenCV_build_script/build/lib\"", 434 | ); 435 | OTHER_LDFLAGS = ( 436 | "-lstdc++", 437 | "-lz", 438 | ); 439 | PRODUCT_NAME = "$(TARGET_NAME)"; 440 | TARGETED_DEVICE_FAMILY = "1,2"; 441 | WRAPPER_EXTENSION = app; 442 | }; 443 | name = Debug; 444 | }; 445 | 141B720F1376E2A5008278A1 /* Release */ = { 446 | isa = XCBuildConfiguration; 447 | buildSettings = { 448 | ALWAYS_SEARCH_USER_PATHS = NO; 449 | COPY_PHASE_STRIP = YES; 450 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 451 | GCC_PREFIX_HEADER = "OpenCVHelpLibrary/OpenCVHelpLibrary-Prefix.pch"; 452 | HEADER_SEARCH_PATHS = "../iOS_OpenCV_build_script/build/include/**"; 453 | INFOPLIST_FILE = "OpenCVHelpLibrary/OpenCVHelpLibrary-Info.plist"; 454 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 455 | LIBRARY_SEARCH_PATHS = ( 456 | "$(inherited)", 457 | "\"$(SRCROOT)/../iOS_OpenCV_build_script/build/lib\"", 458 | ); 459 | OTHER_LDFLAGS = ( 460 | "-lstdc++", 461 | "-lz", 462 | ); 463 | PRODUCT_NAME = "$(TARGET_NAME)"; 464 | TARGETED_DEVICE_FAMILY = "1,2"; 465 | VALIDATE_PRODUCT = YES; 466 | WRAPPER_EXTENSION = app; 467 | }; 468 | name = Release; 469 | }; 470 | /* End XCBuildConfiguration section */ 471 | 472 | /* Begin XCConfigurationList section */ 473 | 141B71E61376E2A4008278A1 /* Build configuration list for PBXProject "OpenCVHelpLibrary" */ = { 474 | isa = XCConfigurationList; 475 | buildConfigurations = ( 476 | 141B720B1376E2A5008278A1 /* Debug */, 477 | 141B720C1376E2A5008278A1 /* Release */, 478 | ); 479 | defaultConfigurationIsVisible = 0; 480 | defaultConfigurationName = Release; 481 | }; 482 | 141B720D1376E2A5008278A1 /* Build configuration list for PBXNativeTarget "OpenCVHelpLibrary" */ = { 483 | isa = XCConfigurationList; 484 | buildConfigurations = ( 485 | 141B720E1376E2A5008278A1 /* Debug */, 486 | 141B720F1376E2A5008278A1 /* Release */, 487 | ); 488 | defaultConfigurationIsVisible = 0; 489 | defaultConfigurationName = Release; 490 | }; 491 | /* End XCConfigurationList section */ 492 | }; 493 | rootObject = 141B71E31376E2A4008278A1 /* Project object */; 494 | } 495 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/OpenCVHelpLibrary-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.sonson.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | NSMainNibFile 30 | MainWindow 31 | NSMainNibFile~ipad 32 | MainWindow-iPad 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | CFBundleIconFiles 40 | 41 | icon57x57.png 42 | icon114x114.png 43 | icon72x72.png 44 | 45 | UILaunchImageFile~ipad 46 | Default 47 | UIPrerenderedIcon 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/OpenCVHelpLibrary-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'OpenCVHelpLibrary' target in the 'OpenCVHelpLibrary' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/OpenCVHelpLibraryAppDelegate.h: -------------------------------------------------------------------------------- 1 | /* 2 | * OpenCV Help Library 3 | * OpenCVHelpLibraryAppDelegate.h 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 11/05/09 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import 32 | 33 | @class OpenCVHelpLibraryViewController; 34 | 35 | @interface OpenCVHelpLibraryAppDelegate : NSObject { 36 | 37 | } 38 | 39 | @property (nonatomic, retain) IBOutlet UIWindow *window; 40 | 41 | @property (nonatomic, retain) IBOutlet OpenCVHelpLibraryViewController *viewController; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/OpenCVHelpLibraryAppDelegate.m: -------------------------------------------------------------------------------- 1 | /* 2 | * OpenCV Help Library 3 | * OpenCVHelpLibraryAppDelegate.m 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 11/05/09 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import "OpenCVHelpLibraryAppDelegate.h" 32 | 33 | #import "OpenCVHelpLibraryViewController.h" 34 | 35 | #import "test.h" 36 | 37 | @implementation OpenCVHelpLibraryAppDelegate 38 | 39 | 40 | @synthesize window=_window; 41 | 42 | @synthesize viewController=_viewController; 43 | 44 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 45 | { 46 | // Override point for customization after application launch. 47 | 48 | self.window.rootViewController = self.viewController; 49 | [self.window makeKeyAndVisible]; 50 | 51 | test(); 52 | 53 | return YES; 54 | } 55 | 56 | - (void)applicationWillResignActive:(UIApplication *)application 57 | { 58 | /* 59 | Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 60 | Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 61 | */ 62 | } 63 | 64 | - (void)applicationDidEnterBackground:(UIApplication *)application 65 | { 66 | /* 67 | Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 68 | If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 69 | */ 70 | } 71 | 72 | - (void)applicationWillEnterForeground:(UIApplication *)application 73 | { 74 | /* 75 | Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 76 | */ 77 | } 78 | 79 | - (void)applicationDidBecomeActive:(UIApplication *)application 80 | { 81 | /* 82 | Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 83 | */ 84 | } 85 | 86 | - (void)applicationWillTerminate:(UIApplication *)application 87 | { 88 | /* 89 | Called when the application is about to terminate. 90 | Save data if appropriate. 91 | See also applicationDidEnterBackground:. 92 | */ 93 | } 94 | 95 | - (void)dealloc 96 | { 97 | [_window release]; 98 | [_viewController release]; 99 | [super dealloc]; 100 | } 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/OpenCVHelpLibraryViewController.h: -------------------------------------------------------------------------------- 1 | /* 2 | * OpenCV Help Library 3 | * OpenCVHelpLibraryViewController.h 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 11/05/09 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import 32 | 33 | @interface OpenCVHelpLibraryViewController : UIViewController { 34 | IBOutlet UIImageView *leftOutputImageView; 35 | IBOutlet UIImageView *rightOutputImageView; 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/OpenCVHelpLibraryViewController.m: -------------------------------------------------------------------------------- 1 | /* 2 | * OpenCV Help Library 3 | * OpenCVHelpLibraryViewController.m 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 11/05/09 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import "OpenCVHelpLibraryViewController.h" 32 | 33 | #import "OpenCVHelpLibrary.h" 34 | 35 | @implementation OpenCVHelpLibraryViewController 36 | 37 | - (void)viewDidLoad { 38 | [super viewDidLoad]; 39 | 40 | UIImage *testImageGray = [UIImage imageNamed:@"testImage_Gray_JPG24.jpg"]; 41 | UIImage *testImageRGB = [UIImage imageNamed:@"testImage_RGB_JPG24.jpg"]; 42 | 43 | IplImage *testIplImageGray = [testImageGray createIplImage]; 44 | IplImage *testIplImageRGB = [testImageRGB createIplImage]; 45 | 46 | UIImage *testImageGrayDuplicated = [UIImage imageWithIplImage:testIplImageGray]; 47 | UIImage *testImageRGBDuplicated = [UIImage imageWithIplImage:testIplImageRGB]; 48 | 49 | [leftOutputImageView setImage:testImageGrayDuplicated]; 50 | [rightOutputImageView setImage:testImageRGBDuplicated]; 51 | } 52 | 53 | - (void)dealloc { 54 | [super dealloc]; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/Resources/image/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/Resources/image/Default-Landscape.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/Resources/image/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/Resources/image/Default-Portrait.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/Resources/image/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/Resources/image/Default.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/Resources/image/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/Resources/image/Default@2x.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/Resources/image/icon114x114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/Resources/image/icon114x114.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/Resources/image/icon57x57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/Resources/image/icon57x57.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/Resources/image/icon72x72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/Resources/image/icon72x72.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/Test/test.h: -------------------------------------------------------------------------------- 1 | /* 2 | * OpenCV Help Library 3 | * test.h 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 11/05/08 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import 32 | 33 | void test(); -------------------------------------------------------------------------------- /OpenCVHelpLibrary/Test/test.m: -------------------------------------------------------------------------------- 1 | /* 2 | * OpenCV Help Library 3 | * test.m 4 | * 5 | * Copyright (c) Yuichi YOSHIDA, 11/05/08 6 | * All rights reserved. 7 | * 8 | * BSD License 9 | * 10 | * Redistribution and use in source and binary forms, with or without modification, are 11 | * permitted provided that the following conditions are met: 12 | * - Redistributions of source code must retain the above copyright notice, this list of 13 | * conditions and the following disclaimer. 14 | * - Redistributions in binary form must reproduce the above copyright notice, this list 15 | * of conditions and the following disclaimer in the documentation and/or other materia 16 | * ls provided with the distribution. 17 | * - Neither the name of the "Yuichi Yoshida" nor the names of its contributors may be u 18 | * sed to endorse or promote products derived from this software without specific prior 19 | * written permission. 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY E 21 | * XPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES O 22 | * F MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SH 23 | * ALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENT 24 | * AL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROC 25 | * UREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS I 26 | * NTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRI 27 | * CT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF T 28 | * HE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #import "test.h" 32 | 33 | #import "testTool.h" 34 | #import "QuartzHelpLibrary.h" 35 | 36 | void makeTestPixelData(unsigned char**pixel, int width, int height, int bytesPerPixel) { 37 | unsigned char* p = (unsigned char*)malloc(sizeof(unsigned char) * width * height * bytesPerPixel); 38 | // make test pattern 39 | if (bytesPerPixel == 1) { 40 | for (int y = 0; y < height; y++) { 41 | for (int x = 0; x < width; x++) { 42 | if (y <= height / 2 && x <= width / 2) { 43 | p[y * width + x] = 0; 44 | } 45 | if (y <= height / 2 && x > width / 2) { 46 | p[y * width + x] = 85; 47 | } 48 | if (y > height / 2 && x <= width / 2) { 49 | p[y * width + x] = 170; 50 | } 51 | if (y > height / 2 && x > width / 2) { 52 | p[y * width + x] = 255; 53 | } 54 | } 55 | } 56 | } 57 | else if (bytesPerPixel == 3) { 58 | for (int x = 0; x < width; x++) { 59 | for (int y = 0; y < height; y++) { 60 | if (y <= height / 2 && x <= width / 2) { 61 | p[y * width * 3 + x * 3 + 0] = 255; 62 | p[y * width * 3 + x * 3 + 1] = 0; 63 | p[y * width * 3 + x * 3 + 2] = 0; 64 | } 65 | else if (y <= height / 2 && x > width / 2) { 66 | p[y * width * 3 + x * 3 + 0] = 0; 67 | p[y * width * 3 + x * 3 + 1] = 255; 68 | p[y * width * 3 + x * 3 + 2] = 0; 69 | } 70 | else if (y > height / 2 && x <= width / 2) { 71 | p[y * width * 3 + x * 3 + 0] = 0; 72 | p[y * width * 3 + x * 3 + 1] = 0; 73 | p[y * width * 3 + x * 3 + 2] = 255; 74 | } 75 | else if (y > height / 2 && x > width / 2) { 76 | p[y * width * 3 + x * 3 + 0] = 255; 77 | p[y * width * 3 + x * 3 + 1] = 255; 78 | p[y * width * 3 + x * 3 + 2] = 255; 79 | } 80 | } 81 | } 82 | } 83 | else { 84 | 85 | } 86 | *pixel = p; 87 | } 88 | 89 | void testLoadImageWithFileNameAndAttributes(NSString *path, int input, int output) { 90 | CGImageRef cgImage = CGImageCreateWithPNGorJPEGFilePath((CFStringRef)path); 91 | 92 | unsigned char *pixel = NULL; 93 | int width = 0; 94 | int height = 0; 95 | int bytesPerPixel = 0; 96 | CGCreatePixelBufferWithImage(cgImage, &pixel, &width, &height, &bytesPerPixel, input); 97 | 98 | IplImage *original = cvLoadImage([path UTF8String], output); 99 | 100 | assert(original->depth == IPL_DEPTH_8U); 101 | 102 | unsigned char* tempIplBuff = (unsigned char*)malloc(sizeof(unsigned char) * original->width * original->height * original->nChannels); 103 | 104 | for (int y = 0; y < original->height; y++) { 105 | unsigned char *destination = (unsigned char*)tempIplBuff + y * original->width * original->nChannels; 106 | unsigned char *source = (unsigned char*)original->imageData + y * original->widthStep; 107 | memcpy(destination, source, sizeof(unsigned char) * original->width * original->nChannels); 108 | } 109 | assert(compareBuffers(pixel, tempIplBuff, original->width * original->height * original->nChannels, 2)); 110 | free(tempIplBuff); 111 | free(pixel); 112 | CGImageRelease(cgImage); 113 | cvReleaseImage(&original); 114 | } 115 | 116 | void testLoadImage() { 117 | int inputAttr[] = {QH_PIXEL_GRAYSCALE, QH_PIXEL_COLOR, QH_PIXEL_ANYCOLOR}; 118 | int outputAttr[] = {CV_LOAD_IMAGE_GRAYSCALE, CV_LOAD_IMAGE_COLOR, CV_LOAD_IMAGE_ANYCOLOR}; 119 | 120 | // rgb color scale image file 121 | { 122 | NSArray *paths = [NSArray arrayWithObjects: 123 | [[NSBundle mainBundle] pathForResource:@"testImage_Gray_PNG24.png" ofType:nil], 124 | [[NSBundle mainBundle] pathForResource:@"testImage_Gray_JPG24.jpg" ofType:nil], 125 | [[NSBundle mainBundle] pathForResource:@"testImage_Gray_PNG24.png" ofType:nil], 126 | [[NSBundle mainBundle] pathForResource:@"testImage_RGB_JPG24.jpg" ofType:nil], 127 | [[NSBundle mainBundle] pathForResource:@"testImage_RGB_PNG24.png" ofType:nil], 128 | nil]; 129 | for (NSString *path in paths) { 130 | printf("%s\n", [path UTF8String]); 131 | for (int i = 0; i < 3; i++) { 132 | testLoadImageWithFileNameAndAttributes(path, inputAttr[i], outputAttr[i]); 133 | } 134 | } 135 | } 136 | // gray scale image file 137 | { 138 | NSArray *paths = [NSArray arrayWithObjects: 139 | [[NSBundle mainBundle] pathForResource:@"testImage_Gray_PNG8.png" ofType:nil], 140 | [[NSBundle mainBundle] pathForResource:@"testImage_RGB_PNG8.png" ofType:nil], 141 | nil]; 142 | for (NSString *path in paths) { 143 | printf("%s\n", [path UTF8String]); 144 | for (int i = 0; i < 1; i++) { 145 | testLoadImageWithFileNameAndAttributes(path, inputAttr[i], outputAttr[i]); 146 | } 147 | } 148 | } 149 | 150 | printf("testLoadImage OK\n"); 151 | } 152 | 153 | void testIplImageConvert(int bytesPerPixel) { 154 | // Original pixel data 155 | int width = 32; 156 | int height = 32; 157 | int tolerance = 2; 158 | unsigned char* original = NULL; 159 | 160 | // Make image data 161 | makeTestPixelData(&original, width, height, bytesPerPixel); 162 | 163 | // Copy pixel array to IplImage(RGB) 164 | IplImage* originalSourceImage = cvCreateImage(cvSize(width, height), IPL_DEPTH_8U, bytesPerPixel); 165 | for (int y = 0; y < height; y++) { 166 | unsigned char *source = original + y * width * bytesPerPixel; 167 | unsigned char *destination = (unsigned char*)originalSourceImage->imageData + y * originalSourceImage->widthStep; 168 | memcpy(destination, source, sizeof(unsigned char) * width * 3); 169 | } 170 | 171 | // Convert to CGImageRef from IplImage 172 | CGImageRef p = CGCreateImageWithIplImage(originalSourceImage); 173 | 174 | // Convert to IplImage(RGB) from CGImageRef 175 | IplImage *duplicatedFromCGImage = CGCreateIplImageWithCGImage(p, CV_LOAD_IMAGE_COLOR); 176 | 177 | // Test 178 | assert(compareIplImage(duplicatedFromCGImage, originalSourceImage, tolerance)); 179 | 180 | // release 181 | free(original); 182 | CGImageRelease(p); 183 | cvReleaseImage(&duplicatedFromCGImage); 184 | cvReleaseImage(&originalSourceImage); 185 | 186 | printf("testIplImageConvert bytesPerPixel=%d OK\n", bytesPerPixel); 187 | } 188 | 189 | void test() { 190 | printf("OpenCV Help Library Test\n\n"); 191 | 192 | testIplImageConvert(1); 193 | testIplImageConvert(3); 194 | 195 | testLoadImage(); 196 | } -------------------------------------------------------------------------------- /OpenCVHelpLibrary/Test/testTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // testTool.h 3 | // OpenCVHelpLibrary 4 | // 5 | // Created by sonson on 11/05/20. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "OpenCVHelpLibrary.h" 12 | 13 | typedef enum { 14 | DUMP_PIXEL_HEX = 0, 15 | DUMP_PIXEL_DEC = 1 16 | }DUMP_PIXEL_FORMAT; 17 | 18 | void dumpPixelArray(unsigned char *pixel, int width, int height, int bytesPerPixel, DUMP_PIXEL_FORMAT type); 19 | int compareBuffers(unsigned char* b1, unsigned char *b2, int length, int tolerance); 20 | int compareBuffersWithXandY(unsigned char* b1, unsigned char *b2, int width, int height, int bytesPerPixel, int tolerance); 21 | int compareIplImage(IplImage *image1, IplImage *image2, int tolerance); 22 | void dumpIplImage(IplImage *image); -------------------------------------------------------------------------------- /OpenCVHelpLibrary/Test/testTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // testTool.m 3 | // OpenCVHelpLibrary 4 | // 5 | // Created by sonson on 11/05/20. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "testTool.h" 10 | 11 | void dumpPixelArray(unsigned char *pixel, int width, int height, int bytesPerPixel, DUMP_PIXEL_FORMAT type) { 12 | // make test pattern 13 | if (type == DUMP_PIXEL_HEX) { 14 | for (int y = 0; y < height; y++) { 15 | for (int x = 0; x < width; x++) { 16 | for (int i = 0; i < bytesPerPixel; i++) { 17 | printf("%02x", pixel[y * width * bytesPerPixel + x * bytesPerPixel + i]); 18 | } 19 | printf(" "); 20 | } 21 | printf("\n"); 22 | } 23 | } 24 | else { 25 | for (int y = 0; y < height; y++) { 26 | for (int x = 0; x < width/2; x++) { 27 | for (int i = 0; i < bytesPerPixel; i++) { 28 | printf("%03d", pixel[y * width * bytesPerPixel + x * bytesPerPixel + i]); 29 | } 30 | printf(" "); 31 | } 32 | printf("\n"); 33 | } 34 | } 35 | } 36 | 37 | int compareBuffers(unsigned char* b1, unsigned char *b2, int length, int tolerance) { 38 | for (int i = 0; i < length; i++) { 39 | if (abs(*(b1 + i) - *(b2 + i)) > tolerance) { 40 | printf("diff = %d (%02X) (%02X)\n", *(b1 + i) - *(b2 + i), *(b1 + i), *(b2 + i)); 41 | return 0; 42 | } 43 | } 44 | return 1; 45 | } 46 | 47 | int compareBuffersWithXandY(unsigned char* b1, unsigned char *b2, int width, int height, int bytesPerPixel, int tolerance) { 48 | for (int y = 0; y < height; y++) { 49 | for (int x = 0; x < width; x++) { 50 | for (int i = 0; i < bytesPerPixel; i++) { 51 | int offset = (y * width + x) * bytesPerPixel + i; 52 | unsigned char v1 = *(b1 + offset); 53 | unsigned char v2 = *(b2 + offset); 54 | if (abs(v1 - v2) > tolerance) { 55 | printf("%d,%d(%d)....%02x vs %02x\n", x, y, i, v1, v2); 56 | return 0; 57 | } 58 | } 59 | } 60 | } 61 | return 1; 62 | } 63 | 64 | int compareIplImage(IplImage *image1, IplImage *image2, int tolerance) { 65 | // check both image types 66 | if (image1->width != image2->width) { 67 | printf("Width not matched.\n"); 68 | return 0; 69 | } 70 | if (image1->height != image2->height) { 71 | printf("Height not matched.\n"); 72 | return 0; 73 | } 74 | if (image1->nChannels != image2->nChannels) { 75 | printf("Image channels not matched.\n"); 76 | return 0; 77 | } 78 | if (image1->depth != image2->depth) { 79 | printf("Image depth type not matched.\n"); 80 | return 0; 81 | } 82 | if (image1->nChannels != 1 && image1->nChannels !=3) { 83 | printf("Not supported number of channels.\n"); 84 | return 0; 85 | } 86 | 87 | // compare two pixel arrays 88 | if (image1->nChannels == 1) { 89 | for (int y = 0; y < image1->height; y++) { 90 | for (int x = 0; x < image1->width; x++) { 91 | unsigned char b1 = (unsigned char)*(image1->imageData + y * image1->widthStep + x); 92 | unsigned char b2 = (unsigned char)*(image2->imageData + y * image2->widthStep + x); 93 | if (abs(b1 - b2) > tolerance) { 94 | return 0; 95 | } 96 | 97 | } 98 | } 99 | } 100 | 101 | if (image1->nChannels == 3) { 102 | for (int y = 0; y < image1->height; y++) { 103 | for (int x = 0; x < image1->width; x++) { 104 | for (int k = 0; k < 3; k++) { 105 | unsigned char b1 = (unsigned char)*(image1->imageData + y * image1->widthStep + 3 * x + k); 106 | unsigned char b2 = (unsigned char)*(image2->imageData + y * image2->widthStep + 3 * x + k); 107 | if (abs(b1 - b2) > tolerance) { 108 | return 0; 109 | } 110 | } 111 | } 112 | } 113 | } 114 | return 1; 115 | } 116 | 117 | void dumpIplImage(IplImage *image) { 118 | // make test pattern 119 | 120 | if (image->depth != IPL_DEPTH_8U) { 121 | printf("Not supported depth type.\n"); 122 | return; 123 | } 124 | 125 | if (image->nChannels == 1) { 126 | for (int y = 0; y < image->height; y++) { 127 | for (int x = 0; x < image->width; x++) { 128 | printf("%02x ", (unsigned char)image->imageData[y * image->widthStep + x + 0]); 129 | } 130 | printf("\n"); 131 | } 132 | } 133 | if (image->nChannels == 3) { 134 | for (int y = 0; y < image->height; y++) { 135 | for (int x = 0; x < image->width; x++) { 136 | printf("%02x%02x%02x ", (unsigned char)image->imageData[y * image->widthStep + 3 * x + 0], (unsigned char)image->imageData[y * image->widthStep + 3 * x + 1], (unsigned char)image->imageData[y * image->widthStep + 3 * x + 2]); 137 | } 138 | printf("\n"); 139 | } 140 | } 141 | 142 | } 143 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/en.lproj/MainWindow-iPad.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1056 5 | 10J869 6 | 1306 7 | 1038.35 8 | 461.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 301 12 | 13 | 14 | YES 15 | IBUICustomObject 16 | IBUIWindow 17 | IBUIViewController 18 | IBProxyObject 19 | 20 | 21 | YES 22 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 23 | 24 | 25 | YES 26 | 27 | YES 28 | 29 | 30 | 31 | 32 | YES 33 | 34 | IBFilesOwner 35 | IBIPadFramework 36 | 37 | 38 | IBFirstResponder 39 | IBIPadFramework 40 | 41 | 42 | IBIPadFramework 43 | 44 | 45 | OpenCVHelpLibraryViewController 46 | 47 | 2 48 | 49 | 50 | 1 51 | 1 52 | 53 | IBIPadFramework 54 | NO 55 | 56 | 57 | 58 | 292 59 | {768, 1024} 60 | 61 | 1 62 | MSAxIDEAA 63 | 64 | NO 65 | NO 66 | 67 | IBIPadFramework 68 | YES 69 | 70 | 71 | 72 | 73 | YES 74 | 75 | 76 | delegate 77 | 78 | 79 | 80 | 4 81 | 82 | 83 | 84 | viewController 85 | 86 | 87 | 88 | 11 89 | 90 | 91 | 92 | window 93 | 94 | 95 | 96 | 14 97 | 98 | 99 | 100 | 101 | YES 102 | 103 | 0 104 | 105 | 106 | 107 | 108 | 109 | -1 110 | 111 | 112 | File's Owner 113 | 114 | 115 | 3 116 | 117 | 118 | OpenCVHelpLibrary App Delegate 119 | 120 | 121 | -2 122 | 123 | 124 | 125 | 126 | 10 127 | 128 | 129 | 130 | 131 | 12 132 | 133 | 134 | 135 | 136 | 137 | 138 | YES 139 | 140 | YES 141 | -1.CustomClassName 142 | -2.CustomClassName 143 | 10.CustomClassName 144 | 10.IBEditorWindowLastContentRect 145 | 10.IBLastUsedUIStatusBarStylesToTargetRuntimesMap 146 | 10.IBPluginDependency 147 | 12.IBEditorWindowLastContentRect 148 | 12.IBLastUsedUIStatusBarStylesToTargetRuntimesMap 149 | 12.IBPluginDependency 150 | 3.CustomClassName 151 | 3.IBPluginDependency 152 | 153 | 154 | YES 155 | UIApplication 156 | UIResponder 157 | OpenCVHelpLibraryViewController 158 | {{234, 376}, {320, 480}} 159 | 160 | IBCocoaTouchFramework 161 | 162 | 163 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 164 | {{525, 346}, {320, 480}} 165 | 166 | IBCocoaTouchFramework 167 | 168 | 169 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 170 | OpenCVHelpLibraryAppDelegate 171 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 172 | 173 | 174 | 175 | YES 176 | 177 | 178 | 179 | 180 | 181 | YES 182 | 183 | 184 | 185 | 186 | 15 187 | 188 | 189 | 190 | YES 191 | 192 | OpenCVHelpLibraryAppDelegate 193 | NSObject 194 | 195 | YES 196 | 197 | YES 198 | viewController 199 | window 200 | 201 | 202 | YES 203 | OpenCVHelpLibraryViewController 204 | UIWindow 205 | 206 | 207 | 208 | YES 209 | 210 | YES 211 | viewController 212 | window 213 | 214 | 215 | YES 216 | 217 | viewController 218 | OpenCVHelpLibraryViewController 219 | 220 | 221 | window 222 | UIWindow 223 | 224 | 225 | 226 | 227 | IBProjectSource 228 | ./Classes/OpenCVHelpLibraryAppDelegate.h 229 | 230 | 231 | 232 | OpenCVHelpLibraryViewController 233 | UIViewController 234 | 235 | IBProjectSource 236 | ./Classes/OpenCVHelpLibraryViewController.h 237 | 238 | 239 | 240 | 241 | 0 242 | IBIPadFramework 243 | 244 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 245 | 246 | 247 | 248 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 249 | 250 | 251 | YES 252 | 3 253 | 301 254 | 255 | 256 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/en.lproj/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1024 5 | 10D571 6 | 786 7 | 1038.29 8 | 460.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 112 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | IBCocoaTouchFramework 42 | 43 | 44 | OpenCVHelpLibraryViewController 45 | 46 | 47 | 1 48 | 49 | IBCocoaTouchFramework 50 | NO 51 | 52 | 53 | 54 | 292 55 | {320, 480} 56 | 57 | 1 58 | MSAxIDEAA 59 | 60 | NO 61 | NO 62 | 63 | IBCocoaTouchFramework 64 | YES 65 | 66 | 67 | 68 | 69 | YES 70 | 71 | 72 | delegate 73 | 74 | 75 | 76 | 4 77 | 78 | 79 | 80 | viewController 81 | 82 | 83 | 84 | 11 85 | 86 | 87 | 88 | window 89 | 90 | 91 | 92 | 14 93 | 94 | 95 | 96 | 97 | YES 98 | 99 | 0 100 | 101 | 102 | 103 | 104 | 105 | -1 106 | 107 | 108 | File's Owner 109 | 110 | 111 | 3 112 | 113 | 114 | OpenCVHelpLibrary App Delegate 115 | 116 | 117 | -2 118 | 119 | 120 | 121 | 122 | 10 123 | 124 | 125 | 126 | 127 | 12 128 | 129 | 130 | 131 | 132 | 133 | 134 | YES 135 | 136 | YES 137 | -1.CustomClassName 138 | -2.CustomClassName 139 | 10.CustomClassName 140 | 10.IBEditorWindowLastContentRect 141 | 10.IBPluginDependency 142 | 12.IBEditorWindowLastContentRect 143 | 12.IBPluginDependency 144 | 3.CustomClassName 145 | 3.IBPluginDependency 146 | 147 | 148 | YES 149 | UIApplication 150 | UIResponder 151 | OpenCVHelpLibraryViewController 152 | {{234, 376}, {320, 480}} 153 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 154 | {{525, 346}, {320, 480}} 155 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 156 | OpenCVHelpLibraryAppDelegate 157 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 158 | 159 | 160 | 161 | YES 162 | 163 | 164 | YES 165 | 166 | 167 | 168 | 169 | YES 170 | 171 | 172 | YES 173 | 174 | 175 | 176 | 15 177 | 178 | 179 | 180 | YES 181 | 182 | UIWindow 183 | UIView 184 | 185 | IBUserSource 186 | 187 | 188 | 189 | 190 | OpenCVHelpLibraryAppDelegate 191 | NSObject 192 | 193 | YES 194 | 195 | YES 196 | viewController 197 | window 198 | 199 | 200 | YES 201 | OpenCVHelpLibraryViewController 202 | UIWindow 203 | 204 | 205 | 206 | YES 207 | 208 | YES 209 | viewController 210 | window 211 | 212 | 213 | YES 214 | 215 | viewController 216 | OpenCVHelpLibraryViewController 217 | 218 | 219 | window 220 | UIWindow 221 | 222 | 223 | 224 | 225 | IBProjectSource 226 | OpenCVHelpLibraryAppDelegate.h 227 | 228 | 229 | 230 | OpenCVHelpLibraryAppDelegate 231 | NSObject 232 | 233 | IBUserSource 234 | 235 | 236 | 237 | 238 | OpenCVHelpLibraryViewController 239 | UIViewController 240 | 241 | IBProjectSource 242 | OpenCVHelpLibraryViewController.h 243 | 244 | 245 | 246 | 247 | YES 248 | 249 | NSObject 250 | 251 | IBFrameworkSource 252 | Foundation.framework/Headers/NSError.h 253 | 254 | 255 | 256 | NSObject 257 | 258 | IBFrameworkSource 259 | Foundation.framework/Headers/NSFileManager.h 260 | 261 | 262 | 263 | NSObject 264 | 265 | IBFrameworkSource 266 | Foundation.framework/Headers/NSKeyValueCoding.h 267 | 268 | 269 | 270 | NSObject 271 | 272 | IBFrameworkSource 273 | Foundation.framework/Headers/NSKeyValueObserving.h 274 | 275 | 276 | 277 | NSObject 278 | 279 | IBFrameworkSource 280 | Foundation.framework/Headers/NSKeyedArchiver.h 281 | 282 | 283 | 284 | NSObject 285 | 286 | IBFrameworkSource 287 | Foundation.framework/Headers/NSObject.h 288 | 289 | 290 | 291 | NSObject 292 | 293 | IBFrameworkSource 294 | Foundation.framework/Headers/NSRunLoop.h 295 | 296 | 297 | 298 | NSObject 299 | 300 | IBFrameworkSource 301 | Foundation.framework/Headers/NSThread.h 302 | 303 | 304 | 305 | NSObject 306 | 307 | IBFrameworkSource 308 | Foundation.framework/Headers/NSURL.h 309 | 310 | 311 | 312 | NSObject 313 | 314 | IBFrameworkSource 315 | Foundation.framework/Headers/NSURLConnection.h 316 | 317 | 318 | 319 | NSObject 320 | 321 | IBFrameworkSource 322 | UIKit.framework/Headers/UIAccessibility.h 323 | 324 | 325 | 326 | NSObject 327 | 328 | IBFrameworkSource 329 | UIKit.framework/Headers/UINibLoading.h 330 | 331 | 332 | 333 | NSObject 334 | 335 | IBFrameworkSource 336 | UIKit.framework/Headers/UIResponder.h 337 | 338 | 339 | 340 | UIApplication 341 | UIResponder 342 | 343 | IBFrameworkSource 344 | UIKit.framework/Headers/UIApplication.h 345 | 346 | 347 | 348 | UIResponder 349 | NSObject 350 | 351 | 352 | 353 | UISearchBar 354 | UIView 355 | 356 | IBFrameworkSource 357 | UIKit.framework/Headers/UISearchBar.h 358 | 359 | 360 | 361 | UISearchDisplayController 362 | NSObject 363 | 364 | IBFrameworkSource 365 | UIKit.framework/Headers/UISearchDisplayController.h 366 | 367 | 368 | 369 | UIView 370 | 371 | IBFrameworkSource 372 | UIKit.framework/Headers/UITextField.h 373 | 374 | 375 | 376 | UIView 377 | UIResponder 378 | 379 | IBFrameworkSource 380 | UIKit.framework/Headers/UIView.h 381 | 382 | 383 | 384 | UIViewController 385 | 386 | IBFrameworkSource 387 | UIKit.framework/Headers/UINavigationController.h 388 | 389 | 390 | 391 | UIViewController 392 | 393 | IBFrameworkSource 394 | UIKit.framework/Headers/UIPopoverController.h 395 | 396 | 397 | 398 | UIViewController 399 | 400 | IBFrameworkSource 401 | UIKit.framework/Headers/UISplitViewController.h 402 | 403 | 404 | 405 | UIViewController 406 | 407 | IBFrameworkSource 408 | UIKit.framework/Headers/UITabBarController.h 409 | 410 | 411 | 412 | UIViewController 413 | UIResponder 414 | 415 | IBFrameworkSource 416 | UIKit.framework/Headers/UIViewController.h 417 | 418 | 419 | 420 | UIWindow 421 | UIView 422 | 423 | IBFrameworkSource 424 | UIKit.framework/Headers/UIWindow.h 425 | 426 | 427 | 428 | 429 | 0 430 | IBCocoaTouchFramework 431 | 432 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 433 | 434 | 435 | 436 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 437 | 438 | 439 | YES 440 | OpenCVHelpLibrary.xcodeproj 441 | 3 442 | 112 443 | 444 | 445 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/en.lproj/OpenCVHelpLibraryViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1056 5 | 10J869 6 | 1306 7 | 1038.35 8 | 461.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 301 12 | 13 | 14 | YES 15 | IBUIImageView 16 | IBUIView 17 | IBUILabel 18 | IBProxyObject 19 | 20 | 21 | YES 22 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 23 | 24 | 25 | YES 26 | 27 | YES 28 | 29 | 30 | 31 | 32 | YES 33 | 34 | IBFilesOwner 35 | IBCocoaTouchFramework 36 | 37 | 38 | IBFirstResponder 39 | IBCocoaTouchFramework 40 | 41 | 42 | 43 | 274 44 | 45 | YES 46 | 47 | 48 | 256 49 | {{228, 20}, {32, 32}} 50 | 51 | 52 | 53 | NO 54 | IBCocoaTouchFramework 55 | 56 | NSImage 57 | testImage_Gray_JPG24.jpg 58 | 59 | 60 | 61 | 62 | 256 63 | {{268, 20}, {32, 32}} 64 | 65 | 66 | 67 | NO 68 | IBCocoaTouchFramework 69 | 70 | NSImage 71 | testImage_RGB_JPG24.jpg 72 | 73 | 74 | 75 | 76 | 256 77 | {{228, 61}, {32, 32}} 78 | 79 | 80 | 81 | NO 82 | IBCocoaTouchFramework 83 | 84 | 85 | 86 | 256 87 | {{268, 61}, {32, 32}} 88 | 89 | 90 | 91 | NO 92 | IBCocoaTouchFramework 93 | 94 | 95 | 96 | 292 97 | {{20, 25}, {101, 21}} 98 | 99 | 100 | 101 | NO 102 | YES 103 | 7 104 | NO 105 | IBCocoaTouchFramework 106 | Load with xib 107 | 108 | Helvetica 109 | 17 110 | 16 111 | 112 | 113 | 1 114 | MCAwIDAAA 115 | 116 | 117 | 1 118 | 10 119 | 120 | 121 | 122 | 292 123 | {{20, 66}, {136, 21}} 124 | 125 | 126 | 127 | NO 128 | YES 129 | 7 130 | NO 131 | IBCocoaTouchFramework 132 | Load via IplImage 133 | 134 | 135 | 136 | 1 137 | 10 138 | 139 | 140 | {{0, 20}, {320, 460}} 141 | 142 | 143 | 144 | 145 | 3 146 | MC43NQA 147 | 148 | 2 149 | 150 | 151 | NO 152 | 153 | IBCocoaTouchFramework 154 | 155 | 156 | 157 | 158 | YES 159 | 160 | 161 | view 162 | 163 | 164 | 165 | 7 166 | 167 | 168 | 169 | leftOutputImageView 170 | 171 | 172 | 173 | 14 174 | 175 | 176 | 177 | rightOutputImageView 178 | 179 | 180 | 181 | 15 182 | 183 | 184 | 185 | 186 | YES 187 | 188 | 0 189 | 190 | 191 | 192 | 193 | 194 | -1 195 | 196 | 197 | File's Owner 198 | 199 | 200 | -2 201 | 202 | 203 | 204 | 205 | 6 206 | 207 | 208 | YES 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 8 220 | 221 | 222 | 223 | 224 | 9 225 | 226 | 227 | 228 | 229 | 10 230 | 231 | 232 | 233 | 234 | 11 235 | 236 | 237 | 238 | 239 | 12 240 | 241 | 242 | 243 | 244 | 13 245 | 246 | 247 | 248 | 249 | 250 | 251 | YES 252 | 253 | YES 254 | -1.CustomClassName 255 | -2.CustomClassName 256 | 10.IBPluginDependency 257 | 11.IBPluginDependency 258 | 12.IBPluginDependency 259 | 13.IBPluginDependency 260 | 6.IBEditorWindowLastContentRect 261 | 6.IBPluginDependency 262 | 8.IBPluginDependency 263 | 9.IBPluginDependency 264 | 265 | 266 | YES 267 | OpenCVHelpLibraryViewController 268 | UIResponder 269 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 270 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 271 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 272 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 273 | {{239, 654}, {320, 480}} 274 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 275 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 276 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 277 | 278 | 279 | 280 | YES 281 | 282 | 283 | 284 | 285 | 286 | YES 287 | 288 | 289 | 290 | 291 | 15 292 | 293 | 294 | 295 | YES 296 | 297 | OpenCVHelpLibraryViewController 298 | UIViewController 299 | 300 | YES 301 | 302 | YES 303 | leftOutputImageView 304 | rightOutputImageView 305 | 306 | 307 | YES 308 | UIImageView 309 | UIImageView 310 | 311 | 312 | 313 | YES 314 | 315 | YES 316 | leftOutputImageView 317 | rightOutputImageView 318 | 319 | 320 | YES 321 | 322 | leftOutputImageView 323 | UIImageView 324 | 325 | 326 | rightOutputImageView 327 | UIImageView 328 | 329 | 330 | 331 | 332 | IBProjectSource 333 | ./Classes/OpenCVHelpLibraryViewController.h 334 | 335 | 336 | 337 | 338 | 0 339 | IBCocoaTouchFramework 340 | 341 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 342 | 343 | 344 | YES 345 | 3 346 | 347 | YES 348 | 349 | YES 350 | testImage_Gray_JPG24.jpg 351 | testImage_RGB_JPG24.jpg 352 | 353 | 354 | YES 355 | {32, 32} 356 | {32, 32} 357 | 358 | 359 | 301 360 | 361 | 362 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // OpenCVHelpLibrary 4 | // 5 | // Created by sonson on 11/05/08. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | -------------------------------------------------------------------------------- /OpenCVHelpLibrary/testImages/testImage_Gray_JPG24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/testImages/testImage_Gray_JPG24.jpg -------------------------------------------------------------------------------- /OpenCVHelpLibrary/testImages/testImage_Gray_PNG24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/testImages/testImage_Gray_PNG24.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/testImages/testImage_Gray_PNG24Alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/testImages/testImage_Gray_PNG24Alpha.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/testImages/testImage_Gray_PNG8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/testImages/testImage_Gray_PNG8.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/testImages/testImage_Gray_PNG8Alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/testImages/testImage_Gray_PNG8Alpha.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/testImages/testImage_RGB_JPG24.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/testImages/testImage_RGB_JPG24.jpg -------------------------------------------------------------------------------- /OpenCVHelpLibrary/testImages/testImage_RGB_PNG24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/testImages/testImage_RGB_PNG24.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/testImages/testImage_RGB_PNG24Alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/testImages/testImage_RGB_PNG24Alpha.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/testImages/testImage_RGB_PNG8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/testImages/testImage_RGB_PNG8.png -------------------------------------------------------------------------------- /OpenCVHelpLibrary/testImages/testImage_RGB_PNG8Alpha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sonsongithub/OpenCV-Help-Library/9754b75ff74b5fc304cc20a6aea883ed4c15b588/OpenCVHelpLibrary/testImages/testImage_RGB_PNG8Alpha.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | OpenCV Help Library ======= ![sample image](http://sonson.jp/wp/wp-content/uploads/2011/05/sample_image_ohl.png) This library helps OpenCV programming on iOS. Currently, it includes a mutual converter UIImage <->IplImage. You can convert them mutually without complicated codes. ### Sample code - Covert IplImage and CGImage // Convert to CGImageRef from IplImage CGImageRef p = CGCreateImageWithIplImage(originalSourceImage); // Convert to IplImage(RGB) from CGImageRef IplImage *duplicatedFromCGImage = CGCreateIplImageWithCGImage(p); ### Sample code - Load IplImage NSString *path = [[NSBundle mainBundle] pathForResource:@"testImage_Gray_PNG24.png" ofType:nil]; IplImage *original = cvLoadImage([path UTF8String], CV_LOAD_IMAGE_COLOR); License ======= * BSD license How to use ======= * Import OpenCVHelpLibrary.h/m into your project. UIImage OpenCV Help Library Additions Reference ======= + (UIImage*)imageWithIplImage:(IplImage*)inputImage; ###Parameters ###inputImage The image to be converted to UIImage. ###Return value An autoreleased new bitmap image as UIImage. ###Discussion None. - (IplImage*)createIplImage; ###Return value A new IpImage bitmap image. You are responsible for releasing this object by calling cvReleaseImage. ###Discussion Output image is 24bit color. OpenCV Help Library Reference ======= IplImage* CGCreateIplImageWithCGImage( CGImageRef imageRef, int iscolor ); ###Parameters ###inputImageRef The image to be converted to IplImage. ###iscolor Output IplImage's color type. You can use only CV\_LOAD\_IMAGE\_GRAYSCALE, CV\_LOAD\_IMAGE\_COLOR or CV\_LOAD\_IMAGE\_ANYCOLOR and MUST NOT USE(NOT SUPPORTED) any combinations of these types. Specific color type of the loaded image: if , the loaded image is forced to be a 3-channel color image; if CV\_LOAD\_IMAGE\_GRAYSCALE, the loaded image is forced to be grayscale; if , the loaded image will be loaded as is (note that in the current implementation the alpha channel, if CV\_LOAD\_IMAGE\_ANYCOLOR, is stripped from the output image, e.g. 4-channel RGBA image will be loaded as RGB). ###Return value A new IpImage bitmap image. You are responsible for releasing this object by calling cvReleaseImage. ###Discussion None. CGImageRef CGCreateImageWithIplImage( IplImage* inputImage ); ###Parameters ###inputImage The image to be converted to CGImage. ###Return value A new Quartz bitmap image. You are responsible for releasing this object by calling CGImageRelease. ###Discussion None. IplImage* cvLoadImage(const char* filename, int iscolor); ###Parameters ###filename The full or relative pathname of your image file. ###iscolor Output IplImage's color type. You can use only CV\_LOAD\_IMAGE\_GRAYSCALE, CV\_LOAD\_IMAGE\_COLOR or CV\_LOAD\_IMAGE\_ANYCOLOR and MUST NOT USE(NOT SUPPORTED) any combinations of these types. Specific color type of the loaded image: if , the loaded image is forced to be a 3-channel color image; if CV\_LOAD\_IMAGE\_GRAYSCALE, the loaded image is forced to be grayscale; if , the loaded image will be loaded as is (note that in the current implementation the alpha channel, if CV\_LOAD\_IMAGE\_ANYCOLOR, is stripped from the output image, e.g. 4-channel RGBA image will be loaded as RGB). ###Return value A new IpImage bitmap image. You are responsible for releasing this object by calling cvReleaseImage. ###Discussion This function supports the following file formats only, 1. JPEG files - JPEG, JPG, JPE 2. Portable Network Graphics - PNG Constants ======= //#define CV_LOAD_IMAGE_UNCHANGED -1 // not supported #define CV_LOAD_IMAGE_GRAYSCALE 0 #define CV_LOAD_IMAGE_COLOR 1 //#define CV_LOAD_IMAGE_ANYDEPTH 2 // not supported #define CV_LOAD_IMAGE_ANYCOLOR 4 ###CV\_LOAD\_IMAGE\_GRAYSCALE ###CV\_LOAD\_IMAGE\_COLOR ###CV\_LOAD\_IMAGE\_ANYCOLOR Blog ======= * [sonson.jp][] Sorry, Japanese only.... Dependency ======= * [Quartz Help Library][] [sonson.jp]: http://sonson.jp [Quartz Help Library]: https://github.com/sonsongithub/Quartz-Help-Library --------------------------------------------------------------------------------