├── .gitignore ├── COPYING ├── LICENSE ├── NOTICE ├── README.md └── ios app └── grabcutios-master ├── .gitignore ├── COPYING ├── GrabCutIOS ├── FIT1041 GrabCut.xcodeproj │ └── project.pbxproj ├── GrabCutIOS │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── CGRectHelper.swift │ ├── FIT1041_GrabCut-Swift.h │ ├── GrabCutIOS-Bridging-Header.h │ ├── GrabCutManager.h │ ├── GrabCutManager.mm │ ├── Image Utilities.swift │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── icon-120x120-1.png │ │ │ ├── icon-120x120.png │ │ │ ├── icon-180x180.png │ │ │ ├── icon-58x58.png │ │ │ ├── icon-80x80.png │ │ │ └── icon-87x87.png │ ├── Info.plist │ ├── Options.swift │ ├── TestData.swift │ ├── TestViewController.swift │ ├── TouchDrawView.swift │ ├── Utilities.swift │ ├── ViewController.swift │ ├── test.jpg │ ├── test1.jpeg │ ├── test2.jpeg │ ├── test3.jpeg │ └── v2_tb2 │ │ ├── v2_tb2-001.jpeg │ │ ├── v2_tb2-002.jpeg │ │ ├── v2_tb2-003.jpeg │ │ ├── v2_tb2-004.jpeg │ │ ├── v2_tb2-005.jpeg │ │ ├── v2_tb2-006.jpeg │ │ ├── v2_tb2-007.jpeg │ │ └── v2_tb2-008.jpeg ├── GrabCutIOSPrefix.pch ├── GrabCutIOSTests │ ├── GrabCutIOSTests.m │ └── Info.plist └── opencv2.framework │ ├── Headers │ ├── Resources │ ├── Versions │ ├── A │ │ ├── Headers │ │ │ ├── calib3d.hpp │ │ │ ├── calib3d │ │ │ │ ├── calib3d.hpp │ │ │ │ └── calib3d_c.h │ │ │ ├── core.hpp │ │ │ ├── core │ │ │ │ ├── affine.hpp │ │ │ │ ├── base.hpp │ │ │ │ ├── bufferpool.hpp │ │ │ │ ├── core.hpp │ │ │ │ ├── core_c.h │ │ │ │ ├── cuda.hpp │ │ │ │ ├── cuda.inl.hpp │ │ │ │ ├── cuda_stream_accessor.hpp │ │ │ │ ├── cuda_types.hpp │ │ │ │ ├── cvdef.h │ │ │ │ ├── cvstd.hpp │ │ │ │ ├── cvstd.inl.hpp │ │ │ │ ├── directx.hpp │ │ │ │ ├── eigen.hpp │ │ │ │ ├── ippasync.hpp │ │ │ │ ├── mat.hpp │ │ │ │ ├── mat.inl.hpp │ │ │ │ ├── matx.hpp │ │ │ │ ├── ocl.hpp │ │ │ │ ├── ocl_genbase.hpp │ │ │ │ ├── opengl.hpp │ │ │ │ ├── operations.hpp │ │ │ │ ├── optim.hpp │ │ │ │ ├── persistence.hpp │ │ │ │ ├── private.cuda.hpp │ │ │ │ ├── private.hpp │ │ │ │ ├── ptr.inl.hpp │ │ │ │ ├── sse_utils.hpp │ │ │ │ ├── traits.hpp │ │ │ │ ├── types.hpp │ │ │ │ ├── types_c.h │ │ │ │ ├── utility.hpp │ │ │ │ ├── version.hpp │ │ │ │ └── wimage.hpp │ │ │ ├── cvconfig.h │ │ │ ├── features2d.hpp │ │ │ ├── features2d │ │ │ │ └── features2d.hpp │ │ │ ├── flann.hpp │ │ │ ├── flann │ │ │ │ ├── all_indices.h │ │ │ │ ├── allocator.h │ │ │ │ ├── any.h │ │ │ │ ├── autotuned_index.h │ │ │ │ ├── composite_index.h │ │ │ │ ├── config.h │ │ │ │ ├── defines.h │ │ │ │ ├── dist.h │ │ │ │ ├── dummy.h │ │ │ │ ├── dynamic_bitset.h │ │ │ │ ├── flann.hpp │ │ │ │ ├── flann_base.hpp │ │ │ │ ├── general.h │ │ │ │ ├── ground_truth.h │ │ │ │ ├── hdf5.h │ │ │ │ ├── heap.h │ │ │ │ ├── hierarchical_clustering_index.h │ │ │ │ ├── index_testing.h │ │ │ │ ├── kdtree_index.h │ │ │ │ ├── kdtree_single_index.h │ │ │ │ ├── kmeans_index.h │ │ │ │ ├── linear_index.h │ │ │ │ ├── logger.h │ │ │ │ ├── lsh_index.h │ │ │ │ ├── lsh_table.h │ │ │ │ ├── matrix.h │ │ │ │ ├── miniflann.hpp │ │ │ │ ├── nn_index.h │ │ │ │ ├── object_factory.h │ │ │ │ ├── params.h │ │ │ │ ├── random.h │ │ │ │ ├── result_set.h │ │ │ │ ├── sampling.h │ │ │ │ ├── saving.h │ │ │ │ ├── simplex_downhill.h │ │ │ │ └── timer.h │ │ │ ├── hal.hpp │ │ │ ├── hal │ │ │ │ ├── defs.h │ │ │ │ ├── intrin.hpp │ │ │ │ ├── intrin_cpp.hpp │ │ │ │ ├── intrin_neon.hpp │ │ │ │ └── intrin_sse.hpp │ │ │ ├── highgui.hpp │ │ │ ├── highgui │ │ │ │ ├── highgui.hpp │ │ │ │ └── highgui_c.h │ │ │ ├── imgcodecs.hpp │ │ │ ├── imgcodecs │ │ │ │ ├── imgcodecs.hpp │ │ │ │ ├── imgcodecs_c.h │ │ │ │ └── ios.h │ │ │ ├── imgproc.hpp │ │ │ ├── imgproc │ │ │ │ ├── imgproc.hpp │ │ │ │ ├── imgproc_c.h │ │ │ │ └── types_c.h │ │ │ ├── ml.hpp │ │ │ ├── ml │ │ │ │ └── ml.hpp │ │ │ ├── objdetect.hpp │ │ │ ├── objdetect │ │ │ │ ├── detection_based_tracker.hpp │ │ │ │ ├── objdetect.hpp │ │ │ │ └── objdetect_c.h │ │ │ ├── opencv.hpp │ │ │ ├── opencv_modules.hpp │ │ │ ├── photo.hpp │ │ │ ├── photo │ │ │ │ ├── cuda.hpp │ │ │ │ ├── photo.hpp │ │ │ │ └── photo_c.h │ │ │ ├── shape.hpp │ │ │ ├── shape │ │ │ │ ├── emdL1.hpp │ │ │ │ ├── hist_cost.hpp │ │ │ │ ├── shape.hpp │ │ │ │ ├── shape_distance.hpp │ │ │ │ └── shape_transformer.hpp │ │ │ ├── stitching.hpp │ │ │ ├── stitching │ │ │ │ ├── detail │ │ │ │ │ ├── autocalib.hpp │ │ │ │ │ ├── blenders.hpp │ │ │ │ │ ├── camera.hpp │ │ │ │ │ ├── exposure_compensate.hpp │ │ │ │ │ ├── matchers.hpp │ │ │ │ │ ├── motion_estimators.hpp │ │ │ │ │ ├── seam_finders.hpp │ │ │ │ │ ├── timelapsers.hpp │ │ │ │ │ ├── util.hpp │ │ │ │ │ ├── util_inl.hpp │ │ │ │ │ ├── warpers.hpp │ │ │ │ │ └── warpers_inl.hpp │ │ │ │ └── warpers.hpp │ │ │ ├── video.hpp │ │ │ ├── video │ │ │ │ ├── background_segm.hpp │ │ │ │ ├── tracking.hpp │ │ │ │ ├── tracking_c.h │ │ │ │ └── video.hpp │ │ │ ├── videoio.hpp │ │ │ ├── videoio │ │ │ │ ├── cap_ios.h │ │ │ │ ├── videoio.hpp │ │ │ │ └── videoio_c.h │ │ │ ├── videostab.hpp │ │ │ ├── videostab │ │ │ │ ├── deblurring.hpp │ │ │ │ ├── fast_marching.hpp │ │ │ │ ├── fast_marching_inl.hpp │ │ │ │ ├── frame_source.hpp │ │ │ │ ├── global_motion.hpp │ │ │ │ ├── inpainting.hpp │ │ │ │ ├── log.hpp │ │ │ │ ├── motion_core.hpp │ │ │ │ ├── motion_stabilizing.hpp │ │ │ │ ├── optical_flow.hpp │ │ │ │ ├── outlier_rejection.hpp │ │ │ │ ├── ring_buffer.hpp │ │ │ │ ├── stabilizer.hpp │ │ │ │ └── wobble_suppression.hpp │ │ │ └── world.hpp │ │ ├── Resources │ │ │ └── Info.plist │ │ └── opencv2 │ └── Current │ └── opencv2 ├── LICENSE ├── NOTICE ├── README.md └── docs └── screenshot.png /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Jason Pan 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2016 Jason Pan. 2 | 3 | This project contains subcomponents with separate copyright notices and license terms. 4 | Your use of the source code for the these subcomponents is subject to the terms and conditions of the following licenses. 5 | 6 | ======================================================================= 7 | GrabCutIOS (https://github.com/naver/grabcutios) 8 | ======================================================================= 9 | 10 | Copyright (c) 2015 Naver Corp. 11 | @Author Eunchul Jeon 12 | 13 | Licensed under the Apache License, Version 2.0 (the "License"); 14 | you may not use this file except in compliance with the License. 15 | You may obtain a copy of the License at 16 | 17 | http://www.apache.org/licenses/LICENSE-2.0 18 | 19 | Unless required by applicable law or agreed to in writing, software 20 | distributed under the License is distributed on an "AS IS" BASIS, 21 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 22 | See the License for the specific language governing permissions and 23 | limitations under the License. 24 | 25 | ======================================================================= 26 | OpenCV (http://opencv.org/) 27 | ======================================================================= 28 | 29 | By downloading, copying, installing or using the software you agree to this license. 30 | If you do not agree to this license, do not download, install, 31 | copy or use the software. 32 | 33 | 34 | License Agreement 35 | For Open Source Computer Vision Library 36 | (3-clause BSD License) 37 | 38 | Copyright (C) 2000-2015, Intel Corporation, all rights reserved. 39 | Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 40 | Copyright (C) 2009-2015, NVIDIA Corporation, all rights reserved. 41 | Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. 42 | Copyright (C) 2015, OpenCV Foundation, all rights reserved. 43 | Copyright (C) 2015, Itseez Inc., all rights reserved. 44 | Third party copyrights are property of their respective owners. 45 | 46 | Redistribution and use in source and binary forms, with or without modification, 47 | are permitted provided that the following conditions are met: 48 | 49 | * Redistributions of source code must retain the above copyright notice, 50 | this list of conditions and the following disclaimer. 51 | 52 | * Redistributions in binary form must reproduce the above copyright notice, 53 | this list of conditions and the following disclaimer in the documentation 54 | and/or other materials provided with the distribution. 55 | 56 | * Neither the names of the copyright holders nor the names of the contributors 57 | may be used to endorse or promote products derived from this software 58 | without specific prior written permission. 59 | 60 | This software is provided by the copyright holders and contributors "as is" and 61 | any express or implied warranties, including, but not limited to, the implied 62 | warranties of merchantability and fitness for a particular purpose are disclaimed. 63 | In no event shall copyright holders or contributors be liable for any direct, 64 | indirect, incidental, special, exemplary, or consequential damages 65 | (including, but not limited to, procurement of substitute goods or services; 66 | loss of use, data, or profits; or business interruption) however caused 67 | and on any theory of liability, whether in contract, strict liability, 68 | or tort (including negligence or otherwise) arising in any way out of 69 | the use of this software, even if advised of the possibility of such damage. 70 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GrabCut iOS Application 2 | 3 | This is the iOS application made for my FIT1041 research project at Monash University. 4 | Performs automated flower segmentation from images of complex natural scenes. 5 | 6 | This project is licensed under the Apache License, Version 2.0. See [LICENSE](/LICENSE) for the full license details. 7 | 8 | 9 | Based of the work by @jsharp83: 10 | https://github.com/naver/grabcutios 11 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | .DS_Store 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | *.xcworkspace 13 | !default.xcworkspace 14 | xcuserdata 15 | profile 16 | *.moved-aside 17 | DerivedData 18 | .idea/ 19 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/COPYING: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Naver Corp. 2 | @Author Eunchul Jeon 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Jason Pan 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // 18 | // AppDelegate.swift 19 | // FIT1041 GrabCut 20 | // 21 | // Created by Jason Pan on 31/10/2016. 22 | // Copyright © 2016 Jason Pan. All rights reserved. 23 | // 24 | 25 | import UIKit 26 | 27 | @UIApplicationMain 28 | class AppDelegate: UIResponder, UIApplicationDelegate { 29 | 30 | var window: UIWindow? 31 | 32 | 33 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 34 | // Override point for customization after application launch. 35 | return true 36 | } 37 | 38 | func applicationWillResignActive(application: UIApplication) { 39 | // 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. 40 | // 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. 41 | } 42 | 43 | func applicationDidEnterBackground(application: UIApplication) { 44 | // 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. 45 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 46 | } 47 | 48 | func applicationWillEnterForeground(application: UIApplication) { 49 | // 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. 50 | } 51 | 52 | func applicationDidBecomeActive(application: UIApplication) { 53 | // 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. 54 | } 55 | 56 | func applicationWillTerminate(application: UIApplication) { 57 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 58 | } 59 | 60 | 61 | } 62 | 63 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/CGRectHelper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CGRectHelper.swift 3 | // 4 | // Created by Maximus McCann on 9/28/14. 5 | // 6 | // MIT License. Use at your own risk. 7 | 8 | import UIKit 9 | 10 | private func rX(r: CGRect) -> CGFloat { return r.origin.x } 11 | private func rY(r: CGRect) -> CGFloat { return r.origin.y } 12 | private func rH(r: CGRect) -> CGFloat { return r.size.width } 13 | private func rW(r: CGRect) -> CGFloat { return r.size.height } 14 | 15 | func CGAddSizeToSize(s1: CGSize, _ s2: CGSize) -> CGSize { return CGSizeMake(s1.width + s2.width, s1.height + s2.height) } 16 | func + (s1: CGSize, s2: CGSize) -> CGSize { return CGAddSizeToSize(s1,s2) } 17 | func += (inout s1: CGSize, s2: CGSize) { s1 = CGAddSizeToSize(s1,s2) } 18 | func CGSubSizeFromSize(s1: CGSize, _ s2: CGSize) -> CGSize { return CGSizeMake(s1.width - s2.width, s1.height - s2.height) } 19 | func - (s1: CGSize, s2: CGSize) -> CGSize { return CGSubSizeFromSize(s1,s2) } 20 | func -= (inout s1: CGSize, s2: CGSize) { s1 = CGSubSizeFromSize(s1,s2) } 21 | 22 | func CGAddPointToPoint(p1: CGPoint, _ p2: CGPoint) -> CGPoint { return CGPointMake(p1.x + p2.x, p1.y + p2.y) } 23 | func + (p1: CGPoint, p2: CGPoint) -> CGPoint { return CGAddPointToPoint(p1, p2) } 24 | func += (inout p1: CGPoint, p2: CGPoint) { p1 = CGAddPointToPoint(p1, p2) } 25 | func CGSubPointFromPoint(p1: CGPoint, _ p2: CGPoint) -> CGPoint { return CGPointMake(p1.x - p2.x, p1.y - p2.y) } 26 | func - (p1: CGPoint, p2: CGPoint) -> CGPoint { return CGSubPointFromPoint(p1, p2) } 27 | func -= (inout p1: CGPoint, p2: CGPoint) { p1 = CGSubPointFromPoint(p1, p2) } 28 | 29 | func CGRectSetWidth(r: CGRect, _ w: CGFloat) -> CGRect { return CGRectMake(rX(r), rY(r), w, rH(r)) } 30 | func CGRectAddWidth(r: CGRect, _ w: CGFloat) -> CGRect { return CGRectSetWidth(r, rW(r) + w) } 31 | 32 | func CGRectSetHeight(r: CGRect, _ h: CGFloat) -> CGRect { return CGRectMake(rX(r), rY(r), rW(r), h) } 33 | func CGRectAddHeight(r: CGRect, _ h: CGFloat) -> CGRect { return CGRectSetHeight(r, rH(r) + h) } 34 | 35 | func CGRectSetSize(r: CGRect, _ s: CGSize) -> CGRect { return CGRectMake(rX(r), rY(r), s.width, s.height) } 36 | func CGRectAddSize(r: CGRect, _ s: CGSize) -> CGRect { return CGRectSetSize(r, CGAddSizeToSize(r.size, s)) } 37 | func CGRectSubSize(r: CGRect, _ s: CGSize) -> CGRect { return CGRectSetSize(r, CGSubSizeFromSize(r.size, s)) } 38 | 39 | func CGRectSetX(r: CGRect, _ x: CGFloat) -> CGRect { return CGRectMake(x, rY(r), rW(r), rH(r)) } 40 | func CGRectAddX(r: CGRect, _ x: CGFloat) -> CGRect { return CGRectSetX(r, rX(r) + x) } 41 | 42 | func CGRectSetY(r: CGRect, _ y: CGFloat) -> CGRect { return CGRectMake(rX(r), y, rW(r), rH(r)) } 43 | func CGRectAddY(r: CGRect, _ y: CGFloat) -> CGRect { return CGRectSetY(r, rY(r) + y) } 44 | 45 | func CGRectSetOrigin(r: CGRect, _ o: CGPoint) -> CGRect { return CGRectMake(o.x, o.y, rW(r), rH(r)) } 46 | func CGRectAddOrigin(r: CGRect, _ o: CGPoint) -> CGRect { return CGRectSetOrigin(r, CGAddPointToPoint(r.origin, o)) } 47 | func CGRectSubOrigin(r: CGRect, _ o: CGPoint) -> CGRect { return CGRectSetOrigin(r, CGSubPointFromPoint(r.origin, o)) } 48 | 49 | func CGRectRightX(r: CGRect) -> CGFloat { return rX(r) + rW(r) } 50 | func CGRectBottomY(r: CGRect) -> CGFloat { return rY(r) + rH(r) } 51 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/FIT1041_GrabCut-Swift.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Jason Pan 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // 18 | // FIT1041_GrabCut-Swift.h 19 | // FIT1041 GrabCut 20 | // 21 | // Created by Jason @ Monash on 31/10/2016. 22 | // Copyright © 2016 Jason Pan. All rights reserved. 23 | // 24 | 25 | #ifndef FIT1041_GrabCut_Swift_h 26 | #define FIT1041_GrabCut_Swift_h 27 | 28 | 29 | #endif /* FIT1041_GrabCut_Swift_h */ 30 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/GrabCutIOS-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Use this file to import your target's public headers that you would like to expose to Swift. 3 | // 4 | 5 | #import "GrabCutManager.h" 6 | //#import 7 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/GrabCutManager.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Jason Pan 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // 18 | // GrabCutManager.h 19 | // OpenCVTest 20 | // 21 | // Created by EunchulJeon on 2015. 8. 29.. 22 | // Copyright (c) 2015 Naver Corp. 23 | // @Author Eunchul Jeon, Jason Pan 24 | // 25 | // Originally written by Eunchul Jeon, Naver Corp. 26 | // https://github.com/naver/grabcutios 27 | // 28 | 29 | #import 30 | #import 31 | 32 | 33 | /// This class is a wrapper that exposes the GrabCut APIs from the OpenCV C++ framework, 34 | /// providing an interface for the Swift compiler to use. 35 | @interface GrabCutManager : NSObject 36 | 37 | /** 38 | @brief Runs the GrabCut algorithm. Operation mode is GC_INIT_WITH_RECT, which performs the 'initial segmentation'. 39 | The function implements the [GrabCut image segmentation algorithm](http://en.wikipedia.org/wiki/GrabCut). 40 | 41 | @param sourceImage Input 8-bit 3-channel image. 42 | 43 | @param foregroundBound ROI containing a segmented object. The pixels outside of the ROI are marked as 44 | "obvious background". The parameter is only used when mode==GC_INIT_WITH_RECT . 45 | 46 | @param iterationCount Number of iterations the algorithm should make before returning the result. Note 47 | that the result can be refined with further calls with mode==GC_INIT_WITH_MASK or 48 | mode==GC_EVAL . 49 | 50 | @return A binary mask image with foreground marked in black, and background marked in white. 51 | */ 52 | -(UIImage*) doGrabCut:(UIImage*)sourceImage foregroundBound:(CGRect) rect iterationCount:(int)iterCount; 53 | 54 | /** 55 | @brief Runs the GrabCut algorithm. Operation mode is GC_INIT_WITH_RECT, which performs the 'initial segmentation'. 56 | The function implements the [GrabCut image segmentation algorithm](http://en.wikipedia.org/wiki/GrabCut). 57 | 58 | @param sourceImage Input 8-bit 3-channel image. 59 | 60 | @param maskImage Input/output 8-bit single-channel mask. The mask is initialized by the function when 61 | mode is set to GC_INIT_WITH_RECT. Its elements may have one of the cv::GrabCutClasses. 62 | 63 | @param iterationCount Number of iterations the algorithm should make before returning the result. Note 64 | that the result can be refined with further calls with mode==GC_INIT_WITH_MASK or 65 | mode==GC_EVAL . 66 | 67 | @return A binary mask image with foreground marked in black, and background marked in white. 68 | */ 69 | -(UIImage*) doGrabCutWithMask:(UIImage*)sourceImage maskImage:(UIImage*)maskImage iterationCount:(int) iterCount; 70 | 71 | /** 72 | @brief Resets the manager, discarding any previous existing models used by GrabCut. 73 | 74 | @return N/A 75 | */ 76 | -(void) resetManager; 77 | @end 78 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "icon-58x58.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "icon-87x87.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "40x40", 17 | "idiom" : "iphone", 18 | "filename" : "icon-80x80.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "icon-120x120-1.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "60x60", 29 | "idiom" : "iphone", 30 | "filename" : "icon-120x120.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "60x60", 35 | "idiom" : "iphone", 36 | "filename" : "icon-180x180.png", 37 | "scale" : "3x" 38 | } 39 | ], 40 | "info" : { 41 | "version" : 1, 42 | "author" : "xcode" 43 | } 44 | } -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/icon-120x120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JasonPan/GrabCut-iOS-Application/83e6ff7bd6c389f5e65b9815c6594a399dc116b7/ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/icon-120x120-1.png -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/icon-120x120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JasonPan/GrabCut-iOS-Application/83e6ff7bd6c389f5e65b9815c6594a399dc116b7/ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/icon-120x120.png -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/icon-180x180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JasonPan/GrabCut-iOS-Application/83e6ff7bd6c389f5e65b9815c6594a399dc116b7/ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/icon-180x180.png -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/icon-58x58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JasonPan/GrabCut-iOS-Application/83e6ff7bd6c389f5e65b9815c6594a399dc116b7/ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/icon-58x58.png -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/icon-80x80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JasonPan/GrabCut-iOS-Application/83e6ff7bd6c389f5e65b9815c6594a399dc116b7/ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/icon-80x80.png -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/icon-87x87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JasonPan/GrabCut-iOS-Application/83e6ff7bd6c389f5e65b9815c6594a399dc116b7/ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Images.xcassets/AppIcon.appiconset/icon-87x87.png -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 0.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0.100621 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Options.swift: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Jason Pan 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // 18 | // Options.swift 19 | // FIT1041 GrabCut 20 | // 21 | // Created by Jason Pan on 31/10/2016. 22 | // Copyright © 2016 Jason Pan. All rights reserved. 23 | // 24 | 25 | import Foundation 26 | 27 | // Saves results to local application folder. This is usually used for the simulator (since the folder is easily accessible). 28 | // The file path will be printed in the console when the app starts up. 29 | let shouldSaveResults: Bool = true 30 | 31 | let shouldIsolateGreen: Bool = true 32 | let shouldIsolateNeutrals: Bool = false // This tends to be unstable. Further testing required. You have been warned. 33 | 34 | let shouldLogDebugOutput: Bool = false // Log debug output 35 | //@objc public class Options: NSObject { 36 | // @objc public static let shouldLogGrabCutOutput: Bool = false // Log GrabCut output 37 | // 38 | // @objc public class func test() -> Bool { 39 | // return false 40 | // } 41 | // 42 | // override init() { 43 | // super.init() 44 | // } 45 | // 46 | //} 47 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/TestData.swift: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Jason Pan 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // 18 | // TestData.swift 19 | // FIT1041 GrabCut 20 | // 21 | // Created by Jason Pan on 31/10/2016. 22 | // Copyright © 2016 Jason Pan. All rights reserved. 23 | // 24 | 25 | import Foundation 26 | 27 | class TestImageSequenceData { 28 | 29 | //********************************************************************************************************* 30 | // MARK: - Test data serialization 31 | //********************************************************************************************************* 32 | 33 | static let selectedDataFormat: Int = 1 34 | 35 | // Specify the data formats used for testing. 36 | // 37 | // @param sequenceCount The number of images in the sequence 38 | // @param prefixIdentifier The prefix that identifies the images that belong to a sequence. 39 | // @param indexIndentifier An identifier, in '#'s, that indicates the index of an image in a sequence. 40 | // 41 | // Example: Image sequence consisting of 4 images with filenames: 42 | // 43 | // 'test-data01.png', 44 | // 'test-data02.png', 45 | // 'test-data03.png', 46 | // 'test-data04.png'. 47 | // 48 | // Format: (4, "test-data", "##", "png") 49 | // 50 | // NOTE: All image sequences are assumed strictly sequential and start with an index of 1. 51 | // 52 | typealias DataFormat = (sequenceCount: Int, prefixIdentifier: String, indexIndentifier: String, fileExtension:String) 53 | static let dataFormats: [DataFormat] = [(3, "test", "#", "jpeg"), 54 | (8, "v2_tb2-", "###", "jpeg")] 55 | 56 | static var numberOfImages: Int { 57 | return dataFormats[selectedDataFormat].0 58 | } 59 | 60 | static var filenameFormat: String { 61 | let format: DataFormat = dataFormats[selectedDataFormat] 62 | return "\(format.1)\(filenameIndexSpecifier).\(format.fileExtension)" 63 | } 64 | 65 | // Used to find the index of a particular image in a sequence, represented by '#'s. 66 | static var filenameIndexSpecifier: String { 67 | return dataFormats[selectedDataFormat].2 68 | 69 | } 70 | 71 | static func filenameIndexWithIndex(index: Int) -> String { 72 | return String(format: "%0\(filenameIndexSpecifier.characters.count)d", index) 73 | } 74 | 75 | static func filename(index: Int) -> String { 76 | if shouldLogDebugOutput { print("test 5542a: \(filenameIndexWithIndex(index))") } 77 | let retVal = filenameFormat.stringByReplacingOccurrencesOfString(filenameIndexSpecifier, withString: filenameIndexWithIndex(index)) 78 | if shouldLogDebugOutput { print(retVal) } 79 | return retVal 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOS/Utilities.swift: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 Jason Pan 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // 18 | // Utilities.swift 19 | // FIT1041 GrabCut 20 | // 21 | // Created by Jason Pan on 6/10/2016. 22 | // Copyright © 2016 Jason Pan. All rights reserved. 23 | // 24 | 25 | import Foundation 26 | 27 | func getDocumentsDirectory() -> NSURL { 28 | let paths = NSFileManager.defaultManager().URLsForDirectory(.DocumentDirectory, inDomains: .UserDomainMask) 29 | let documentsDirectory = paths[0] 30 | return documentsDirectory 31 | } 32 | 33 | // based on https://gist.github.com/samuel-mellert/20b3c99dec168255a046 34 | // which is based on https://gist.github.com/szhernovoy/276e69eb90a0de84dd90 35 | // Updated to work on Swift 2.2 36 | 37 | func randomString(length: Int) -> String { 38 | let charactersString = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" 39 | let charactersArray : [Character] = Array(charactersString.characters) 40 | 41 | var string = "" 42 | for _ in 0.. 18 | #endif 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOSTests/GrabCutIOSTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // GrabCutIOSTests.m 3 | // GrabCutIOSTests 4 | // 5 | // Created by EunchulJeon on 2015. 8. 29.. 6 | // Copyright (c) 2015년 EunchulJeon. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface GrabCutIOSTests : XCTestCase 13 | 14 | @end 15 | 16 | @implementation GrabCutIOSTests 17 | 18 | - (void)setUp { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | [super tearDown]; 26 | } 27 | 28 | - (void)testExample { 29 | // This is an example of a functional test case. 30 | XCTAssert(YES, @"Pass"); 31 | } 32 | 33 | - (void)testPerformanceExample { 34 | // This is an example of a performance test case. 35 | [self measureBlock:^{ 36 | // Put the code you want to measure the time of here. 37 | }]; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/GrabCutIOSTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/calib3d/calib3d.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/calib3d.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/core/bufferpool.hpp: -------------------------------------------------------------------------------- 1 | // This file is part of OpenCV project. 2 | // It is subject to the license terms in the LICENSE file found in the top-level directory 3 | // of this distribution and at http://opencv.org/license.html. 4 | // 5 | // Copyright (C) 2014, Advanced Micro Devices, Inc., all rights reserved. 6 | 7 | #ifndef __OPENCV_CORE_BUFFER_POOL_HPP__ 8 | #define __OPENCV_CORE_BUFFER_POOL_HPP__ 9 | 10 | namespace cv 11 | { 12 | 13 | //! @addtogroup core 14 | //! @{ 15 | 16 | class BufferPoolController 17 | { 18 | protected: 19 | ~BufferPoolController() { } 20 | public: 21 | virtual size_t getReservedSize() const = 0; 22 | virtual size_t getMaxReservedSize() const = 0; 23 | virtual void setMaxReservedSize(size_t size) = 0; 24 | virtual void freeAllReservedBuffers() = 0; 25 | }; 26 | 27 | //! @} 28 | 29 | } 30 | 31 | #endif // __OPENCV_CORE_BUFFER_POOL_HPP__ 32 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/core/core.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/core.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/core/cuda_stream_accessor.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_CORE_CUDA_STREAM_ACCESSOR_HPP__ 44 | #define __OPENCV_CORE_CUDA_STREAM_ACCESSOR_HPP__ 45 | 46 | #ifndef __cplusplus 47 | # error cuda_stream_accessor.hpp header must be compiled as C++ 48 | #endif 49 | 50 | /** @file cuda_stream_accessor.hpp 51 | * This is only header file that depends on CUDA Runtime API. All other headers are independent. 52 | */ 53 | 54 | #include 55 | #include "opencv2/core/cvdef.h" 56 | 57 | namespace cv 58 | { 59 | namespace cuda 60 | { 61 | 62 | //! @addtogroup cudacore_struct 63 | //! @{ 64 | 65 | class Stream; 66 | class Event; 67 | 68 | /** @brief Class that enables getting cudaStream_t from cuda::Stream 69 | */ 70 | struct StreamAccessor 71 | { 72 | CV_EXPORTS static cudaStream_t getStream(const Stream& stream); 73 | }; 74 | 75 | /** @brief Class that enables getting cudaEvent_t from cuda::Event 76 | */ 77 | struct EventAccessor 78 | { 79 | CV_EXPORTS static cudaEvent_t getEvent(const Event& event); 80 | }; 81 | 82 | //! @} 83 | 84 | } 85 | } 86 | 87 | #endif /* __OPENCV_CORE_CUDA_STREAM_ACCESSOR_HPP__ */ 88 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/core/directx.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of the copyright holders may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors as is and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the copyright holders or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef __OPENCV_CORE_DIRECTX_HPP__ 43 | #define __OPENCV_CORE_DIRECTX_HPP__ 44 | 45 | #include "mat.hpp" 46 | #include "ocl.hpp" 47 | 48 | #if !defined(__d3d11_h__) 49 | struct ID3D11Device; 50 | struct ID3D11Texture2D; 51 | #endif 52 | 53 | #if !defined(__d3d10_h__) 54 | struct ID3D10Device; 55 | struct ID3D10Texture2D; 56 | #endif 57 | 58 | #if !defined(_D3D9_H_) 59 | struct IDirect3DDevice9; 60 | struct IDirect3DDevice9Ex; 61 | struct IDirect3DSurface9; 62 | #endif 63 | 64 | 65 | namespace cv { namespace directx { 66 | 67 | namespace ocl { 68 | using namespace cv::ocl; 69 | 70 | //! @addtogroup core_directx 71 | //! @{ 72 | 73 | // TODO static functions in the Context class 74 | CV_EXPORTS Context& initializeContextFromD3D11Device(ID3D11Device* pD3D11Device); 75 | CV_EXPORTS Context& initializeContextFromD3D10Device(ID3D10Device* pD3D10Device); 76 | CV_EXPORTS Context& initializeContextFromDirect3DDevice9Ex(IDirect3DDevice9Ex* pDirect3DDevice9Ex); 77 | CV_EXPORTS Context& initializeContextFromDirect3DDevice9(IDirect3DDevice9* pDirect3DDevice9); 78 | 79 | //! @} 80 | 81 | } // namespace cv::directx::ocl 82 | 83 | //! @addtogroup core_directx 84 | //! @{ 85 | 86 | CV_EXPORTS void convertToD3D11Texture2D(InputArray src, ID3D11Texture2D* pD3D11Texture2D); 87 | CV_EXPORTS void convertFromD3D11Texture2D(ID3D11Texture2D* pD3D11Texture2D, OutputArray dst); 88 | 89 | CV_EXPORTS void convertToD3D10Texture2D(InputArray src, ID3D10Texture2D* pD3D10Texture2D); 90 | CV_EXPORTS void convertFromD3D10Texture2D(ID3D10Texture2D* pD3D10Texture2D, OutputArray dst); 91 | 92 | CV_EXPORTS void convertToDirect3DSurface9(InputArray src, IDirect3DSurface9* pDirect3DSurface9, void* surfaceSharedHandle = NULL); 93 | CV_EXPORTS void convertFromDirect3DSurface9(IDirect3DSurface9* pDirect3DSurface9, OutputArray dst, void* surfaceSharedHandle = NULL); 94 | 95 | // Get OpenCV type from DirectX type, return -1 if there is no equivalent 96 | CV_EXPORTS int getTypeFromDXGI_FORMAT(const int iDXGI_FORMAT); // enum DXGI_FORMAT for D3D10/D3D11 97 | 98 | // Get OpenCV type from DirectX type, return -1 if there is no equivalent 99 | CV_EXPORTS int getTypeFromD3DFORMAT(const int iD3DFORMAT); // enum D3DTYPE for D3D9 100 | 101 | //! @} 102 | 103 | } } // namespace cv::directx 104 | 105 | #endif // __OPENCV_CORE_DIRECTX_HPP__ 106 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/core/ocl_genbase.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 14 | // Third party copyrights are property of their respective owners. 15 | // 16 | // Redistribution and use in source and binary forms, with or without modification, 17 | // are permitted provided that the following conditions are met: 18 | // 19 | // * Redistribution's of source code must retain the above copyright notice, 20 | // this list of conditions and the following disclaimer. 21 | // 22 | // * Redistribution's in binary form must reproduce the above copyright notice, 23 | // this list of conditions and the following disclaimer in the documentation 24 | // and/or other materials provided with the distribution. 25 | // 26 | // * The name of the copyright holders may not be used to endorse or promote products 27 | // derived from this software without specific prior written permission. 28 | // 29 | // This software is provided by the copyright holders and contributors "as is" and 30 | // any express or implied warranties, including, but not limited to, the implied 31 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 32 | // In no event shall the OpenCV Foundation or contributors be liable for any direct, 33 | // indirect, incidental, special, exemplary, or consequential damages 34 | // (including, but not limited to, procurement of substitute goods or services; 35 | // loss of use, data, or profits; or business interruption) however caused 36 | // and on any theory of liability, whether in contract, strict liability, 37 | // or tort (including negligence or otherwise) arising in any way out of 38 | // the use of this software, even if advised of the possibility of such damage. 39 | // 40 | //M*/ 41 | 42 | #ifndef __OPENCV_OPENCL_GENBASE_HPP__ 43 | #define __OPENCV_OPENCL_GENBASE_HPP__ 44 | 45 | namespace cv 46 | { 47 | namespace ocl 48 | { 49 | 50 | //! @cond IGNORED 51 | 52 | struct ProgramEntry 53 | { 54 | const char* name; 55 | const char* programStr; 56 | const char* programHash; 57 | }; 58 | 59 | //! @endcond 60 | 61 | } 62 | } 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/core/version.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // Intel License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright( C) 2000-2015, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2011-2013, NVIDIA Corporation, all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Copyright (C) 2015, Itseez Inc., all rights reserved. 17 | // Third party copyrights are property of their respective owners. 18 | // 19 | // Redistribution and use in source and binary forms, with or without modification, 20 | // are permitted provided that the following conditions are met: 21 | // 22 | // * Redistribution's of source code must retain the above copyright notice, 23 | // this list of conditions and the following disclaimer. 24 | // 25 | // * Redistribution's in binary form must reproduce the above copyright notice, 26 | // this list of conditions and the following disclaimer in the documentation 27 | // and/or other materials provided with the distribution. 28 | // 29 | // * The name of Intel Corporation may not be used to endorse or promote products 30 | // derived from this software without specific prior written permission. 31 | // 32 | // This software is provided by the copyright holders and contributors "as is" and 33 | // any express or implied warranties, including, but not limited to, the implied 34 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 35 | // In no event shall the Intel Corporation or contributors be liable for any direct, 36 | // indirect, incidental, special, exemplary, or consequential damages 37 | //(including, but not limited to, procurement of substitute goods or services; 38 | // loss of use, data, or profits; or business interruption) however caused 39 | // and on any theory of liability, whether in contract, strict liability, 40 | // or tort(including negligence or otherwise) arising in any way out of 41 | // the use of this software, even if advised of the possibility of such damage. 42 | // 43 | //M*/ 44 | 45 | /* 46 | definition of the current version of OpenCV 47 | Usefull to test in user programs 48 | */ 49 | 50 | #ifndef __OPENCV_VERSION_HPP__ 51 | #define __OPENCV_VERSION_HPP__ 52 | 53 | #define CV_VERSION_MAJOR 3 54 | #define CV_VERSION_MINOR 0 55 | #define CV_VERSION_REVISION 0 56 | #define CV_VERSION_STATUS "" 57 | 58 | #define CVAUX_STR_EXP(__A) #__A 59 | #define CVAUX_STR(__A) CVAUX_STR_EXP(__A) 60 | 61 | #define CVAUX_STRW_EXP(__A) L#__A 62 | #define CVAUX_STRW(__A) CVAUX_STRW_EXP(__A) 63 | 64 | #define CV_VERSION CVAUX_STR(CV_VERSION_MAJOR) "." CVAUX_STR(CV_VERSION_MINOR) "." CVAUX_STR(CV_VERSION_REVISION) CV_VERSION_STATUS 65 | 66 | /* old style version constants*/ 67 | #define CV_MAJOR_VERSION CV_VERSION_MAJOR 68 | #define CV_MINOR_VERSION CV_VERSION_MINOR 69 | #define CV_SUBMINOR_VERSION CV_VERSION_REVISION 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/cvconfig.h: -------------------------------------------------------------------------------- 1 | /* OpenCV compiled as static or dynamic libs */ 2 | /* #undef BUILD_SHARED_LIBS */ 3 | 4 | /* Compile for 'real' NVIDIA GPU architectures */ 5 | #define CUDA_ARCH_BIN "" 6 | 7 | /* Create PTX or BIN for 1.0 compute capability */ 8 | /* #undef CUDA_ARCH_BIN_OR_PTX_10 */ 9 | 10 | /* NVIDIA GPU features are used */ 11 | #define CUDA_ARCH_FEATURES "" 12 | 13 | /* Compile for 'virtual' NVIDIA PTX architectures */ 14 | #define CUDA_ARCH_PTX "" 15 | 16 | /* AVFoundation video libraries */ 17 | #define HAVE_AVFOUNDATION 18 | 19 | /* V4L capturing support */ 20 | /* #undef HAVE_CAMV4L */ 21 | 22 | /* V4L2 capturing support */ 23 | /* #undef HAVE_CAMV4L2 */ 24 | 25 | /* Carbon windowing environment */ 26 | /* #undef HAVE_CARBON */ 27 | 28 | /* AMD's Basic Linear Algebra Subprograms Library*/ 29 | /* #undef HAVE_CLAMDBLAS */ 30 | 31 | /* AMD's OpenCL Fast Fourier Transform Library*/ 32 | /* #undef HAVE_CLAMDFFT */ 33 | 34 | /* Clp support */ 35 | /* #undef HAVE_CLP */ 36 | 37 | /* Cocoa API */ 38 | /* #undef HAVE_COCOA */ 39 | 40 | /* C= */ 41 | /* #undef HAVE_CSTRIPES */ 42 | 43 | /* NVidia Cuda Basic Linear Algebra Subprograms (BLAS) API*/ 44 | /* #undef HAVE_CUBLAS */ 45 | 46 | /* NVidia Cuda Runtime API*/ 47 | /* #undef HAVE_CUDA */ 48 | 49 | /* NVidia Cuda Fast Fourier Transform (FFT) API*/ 50 | /* #undef HAVE_CUFFT */ 51 | 52 | /* IEEE1394 capturing support */ 53 | /* #undef HAVE_DC1394 */ 54 | 55 | /* IEEE1394 capturing support - libdc1394 v2.x */ 56 | /* #undef HAVE_DC1394_2 */ 57 | 58 | /* DirectX */ 59 | /* #undef HAVE_DIRECTX */ 60 | /* #undef HAVE_D3D11 */ 61 | /* #undef HAVE_D3D10 */ 62 | /* #undef HAVE_D3D9 */ 63 | 64 | /* DirectShow Video Capture library */ 65 | /* #undef HAVE_DSHOW */ 66 | 67 | /* Eigen Matrix & Linear Algebra Library */ 68 | /* #undef HAVE_EIGEN */ 69 | 70 | /* FFMpeg video library */ 71 | /* #undef HAVE_FFMPEG */ 72 | 73 | /* ffmpeg's libswscale */ 74 | /* #undef HAVE_FFMPEG_SWSCALE */ 75 | 76 | /* ffmpeg in Gentoo */ 77 | /* #undef HAVE_GENTOO_FFMPEG */ 78 | 79 | /* Geospatial Data Abstraction Library */ 80 | /* #undef HAVE_GDAL */ 81 | 82 | /* GStreamer multimedia framework */ 83 | /* #undef HAVE_GSTREAMER */ 84 | 85 | /* GTK+ 2.0 Thread support */ 86 | /* #undef HAVE_GTHREAD */ 87 | 88 | /* GTK+ 2.x toolkit */ 89 | /* #undef HAVE_GTK */ 90 | 91 | /* Define to 1 if you have the header file. */ 92 | /* #undef HAVE_INTTYPES_H */ 93 | 94 | /* Intel Perceptual Computing SDK library */ 95 | /* #undef HAVE_INTELPERC */ 96 | 97 | /* Intel Integrated Performance Primitives */ 98 | /* #undef HAVE_IPP */ 99 | /* #undef HAVE_IPP_ICV_ONLY */ 100 | 101 | /* Intel IPP Async */ 102 | /* #undef HAVE_IPP_A */ 103 | 104 | /* JPEG-2000 codec */ 105 | /* #undef HAVE_JASPER */ 106 | 107 | /* IJG JPEG codec */ 108 | #define HAVE_JPEG 109 | 110 | /* libpng/png.h needs to be included */ 111 | /* #undef HAVE_LIBPNG_PNG_H */ 112 | 113 | /* V4L/V4L2 capturing support via libv4l */ 114 | /* #undef HAVE_LIBV4L */ 115 | 116 | /* Microsoft Media Foundation Capture library */ 117 | /* #undef HAVE_MSMF */ 118 | 119 | /* NVidia Video Decoding API*/ 120 | /* #undef HAVE_NVCUVID */ 121 | 122 | /* OpenCL Support */ 123 | /* #undef HAVE_OPENCL */ 124 | /* #undef HAVE_OPENCL_STATIC */ 125 | /* #undef HAVE_OPENCL_SVM */ 126 | 127 | /* OpenEXR codec */ 128 | /* #undef HAVE_OPENEXR */ 129 | 130 | /* OpenGL support*/ 131 | /* #undef HAVE_OPENGL */ 132 | 133 | /* OpenNI library */ 134 | /* #undef HAVE_OPENNI */ 135 | 136 | /* OpenNI library */ 137 | /* #undef HAVE_OPENNI2 */ 138 | 139 | /* PNG codec */ 140 | #define HAVE_PNG 141 | 142 | /* Qt support */ 143 | /* #undef HAVE_QT */ 144 | 145 | /* Qt OpenGL support */ 146 | /* #undef HAVE_QT_OPENGL */ 147 | 148 | /* QuickTime video libraries */ 149 | /* #undef HAVE_QUICKTIME */ 150 | 151 | /* QTKit video libraries */ 152 | /* #undef HAVE_QTKIT */ 153 | 154 | /* Intel Threading Building Blocks */ 155 | /* #undef HAVE_TBB */ 156 | 157 | /* TIFF codec */ 158 | /* #undef HAVE_TIFF */ 159 | 160 | /* Unicap video capture library */ 161 | /* #undef HAVE_UNICAP */ 162 | 163 | /* Video for Windows support */ 164 | /* #undef HAVE_VFW */ 165 | 166 | /* V4L2 capturing support in videoio.h */ 167 | /* #undef HAVE_VIDEOIO */ 168 | 169 | /* Win32 UI */ 170 | /* #undef HAVE_WIN32UI */ 171 | 172 | /* XIMEA camera support */ 173 | /* #undef HAVE_XIMEA */ 174 | 175 | /* Xine video library */ 176 | /* #undef HAVE_XINE */ 177 | 178 | /* Define if your processor stores words with the most significant byte 179 | first (like Motorola and SPARC, unlike Intel and VAX). */ 180 | /* #undef WORDS_BIGENDIAN */ 181 | 182 | /* gPhoto2 library */ 183 | /* #undef HAVE_GPHOTO2 */ 184 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/features2d/features2d.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/features2d.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/config.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2011 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2011 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | *************************************************************************/ 28 | 29 | 30 | #ifndef OPENCV_FLANN_CONFIG_H_ 31 | #define OPENCV_FLANN_CONFIG_H_ 32 | 33 | #ifdef FLANN_VERSION_ 34 | #undef FLANN_VERSION_ 35 | #endif 36 | #define FLANN_VERSION_ "1.6.10" 37 | 38 | #endif /* OPENCV_FLANN_CONFIG_H_ */ 39 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/dummy.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef OPENCV_FLANN_DUMMY_H_ 3 | #define OPENCV_FLANN_DUMMY_H_ 4 | 5 | namespace cvflann 6 | { 7 | 8 | #if (defined WIN32 || defined _WIN32 || defined WINCE) && defined CVAPI_EXPORTS 9 | __declspec(dllexport) 10 | #endif 11 | void dummyfunc(); 12 | 13 | } 14 | 15 | 16 | #endif /* OPENCV_FLANN_DUMMY_H_ */ 17 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/flann.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/flann.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/general.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_GENERAL_H_ 32 | #define OPENCV_FLANN_GENERAL_H_ 33 | 34 | #include "opencv2/core.hpp" 35 | 36 | namespace cvflann 37 | { 38 | 39 | class FLANNException : public cv::Exception 40 | { 41 | public: 42 | FLANNException(const char* message) : cv::Exception(0, message, "", __FILE__, __LINE__) { } 43 | 44 | FLANNException(const cv::String& message) : cv::Exception(0, message, "", __FILE__, __LINE__) { } 45 | }; 46 | 47 | } 48 | 49 | 50 | #endif /* OPENCV_FLANN_GENERAL_H_ */ 51 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/ground_truth.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_GROUND_TRUTH_H_ 32 | #define OPENCV_FLANN_GROUND_TRUTH_H_ 33 | 34 | #include "dist.h" 35 | #include "matrix.h" 36 | 37 | 38 | namespace cvflann 39 | { 40 | 41 | template 42 | void find_nearest(const Matrix& dataset, typename Distance::ElementType* query, int* matches, int nn, 43 | int skip = 0, Distance distance = Distance()) 44 | { 45 | typedef typename Distance::ResultType DistanceType; 46 | int n = nn + skip; 47 | 48 | std::vector match(n); 49 | std::vector dists(n); 50 | 51 | dists[0] = distance(dataset[0], query, dataset.cols); 52 | match[0] = 0; 53 | int dcnt = 1; 54 | 55 | for (size_t i=1; i=1 && dists[j] 83 | void compute_ground_truth(const Matrix& dataset, const Matrix& testset, Matrix& matches, 84 | int skip=0, Distance d = Distance()) 85 | { 86 | for (size_t i=0; i(dataset, testset[i], matches[i], (int)matches.cols, skip, d); 88 | } 89 | } 90 | 91 | 92 | } 93 | 94 | #endif //OPENCV_FLANN_GROUND_TRUTH_H_ 95 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/heap.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_HEAP_H_ 32 | #define OPENCV_FLANN_HEAP_H_ 33 | 34 | #include 35 | #include 36 | 37 | namespace cvflann 38 | { 39 | 40 | /** 41 | * Priority Queue Implementation 42 | * 43 | * The priority queue is implemented with a heap. A heap is a complete 44 | * (full) binary tree in which each parent is less than both of its 45 | * children, but the order of the children is unspecified. 46 | */ 47 | template 48 | class Heap 49 | { 50 | 51 | /** 52 | * Storage array for the heap. 53 | * Type T must be comparable. 54 | */ 55 | std::vector heap; 56 | int length; 57 | 58 | /** 59 | * Number of element in the heap 60 | */ 61 | int count; 62 | 63 | 64 | 65 | public: 66 | /** 67 | * Constructor. 68 | * 69 | * Params: 70 | * sz = heap size 71 | */ 72 | 73 | Heap(int sz) 74 | { 75 | length = sz; 76 | heap.reserve(length); 77 | count = 0; 78 | } 79 | 80 | /** 81 | * 82 | * Returns: heap size 83 | */ 84 | int size() 85 | { 86 | return count; 87 | } 88 | 89 | /** 90 | * Tests if the heap is empty 91 | * 92 | * Returns: true is heap empty, false otherwise 93 | */ 94 | bool empty() 95 | { 96 | return size()==0; 97 | } 98 | 99 | /** 100 | * Clears the heap. 101 | */ 102 | void clear() 103 | { 104 | heap.clear(); 105 | count = 0; 106 | } 107 | 108 | struct CompareT 109 | { 110 | bool operator()(const T& t_1, const T& t_2) const 111 | { 112 | return t_2 < t_1; 113 | } 114 | }; 115 | 116 | /** 117 | * Insert a new element in the heap. 118 | * 119 | * We select the next empty leaf node, and then keep moving any larger 120 | * parents down until the right location is found to store this element. 121 | * 122 | * Params: 123 | * value = the new element to be inserted in the heap 124 | */ 125 | void insert(T value) 126 | { 127 | /* If heap is full, then return without adding this element. */ 128 | if (count == length) { 129 | return; 130 | } 131 | 132 | heap.push_back(value); 133 | static CompareT compareT; 134 | std::push_heap(heap.begin(), heap.end(), compareT); 135 | ++count; 136 | } 137 | 138 | 139 | 140 | /** 141 | * Returns the node of minimum value from the heap (top of the heap). 142 | * 143 | * Params: 144 | * value = out parameter used to return the min element 145 | * Returns: false if heap empty 146 | */ 147 | bool popMin(T& value) 148 | { 149 | if (count == 0) { 150 | return false; 151 | } 152 | 153 | value = heap[0]; 154 | static CompareT compareT; 155 | std::pop_heap(heap.begin(), heap.end(), compareT); 156 | heap.pop_back(); 157 | --count; 158 | 159 | return true; /* Return old last node. */ 160 | } 161 | }; 162 | 163 | } 164 | 165 | #endif //OPENCV_FLANN_HEAP_H_ 166 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/linear_index.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_LINEAR_INDEX_H_ 32 | #define OPENCV_FLANN_LINEAR_INDEX_H_ 33 | 34 | #include "general.h" 35 | #include "nn_index.h" 36 | 37 | namespace cvflann 38 | { 39 | 40 | struct LinearIndexParams : public IndexParams 41 | { 42 | LinearIndexParams() 43 | { 44 | (* this)["algorithm"] = FLANN_INDEX_LINEAR; 45 | } 46 | }; 47 | 48 | template 49 | class LinearIndex : public NNIndex 50 | { 51 | public: 52 | 53 | typedef typename Distance::ElementType ElementType; 54 | typedef typename Distance::ResultType DistanceType; 55 | 56 | 57 | LinearIndex(const Matrix& inputData, const IndexParams& params = LinearIndexParams(), 58 | Distance d = Distance()) : 59 | dataset_(inputData), index_params_(params), distance_(d) 60 | { 61 | } 62 | 63 | LinearIndex(const LinearIndex&); 64 | LinearIndex& operator=(const LinearIndex&); 65 | 66 | flann_algorithm_t getType() const 67 | { 68 | return FLANN_INDEX_LINEAR; 69 | } 70 | 71 | 72 | size_t size() const 73 | { 74 | return dataset_.rows; 75 | } 76 | 77 | size_t veclen() const 78 | { 79 | return dataset_.cols; 80 | } 81 | 82 | 83 | int usedMemory() const 84 | { 85 | return 0; 86 | } 87 | 88 | void buildIndex() 89 | { 90 | /* nothing to do here for linear search */ 91 | } 92 | 93 | void saveIndex(FILE*) 94 | { 95 | /* nothing to do here for linear search */ 96 | } 97 | 98 | 99 | void loadIndex(FILE*) 100 | { 101 | /* nothing to do here for linear search */ 102 | 103 | index_params_["algorithm"] = getType(); 104 | } 105 | 106 | void findNeighbors(ResultSet& resultSet, const ElementType* vec, const SearchParams& /*searchParams*/) 107 | { 108 | ElementType* data = dataset_.data; 109 | for (size_t i = 0; i < dataset_.rows; ++i, data += dataset_.cols) { 110 | DistanceType dist = distance_(data, vec, dataset_.cols); 111 | resultSet.addPoint(dist, (int)i); 112 | } 113 | } 114 | 115 | IndexParams getParameters() const 116 | { 117 | return index_params_; 118 | } 119 | 120 | private: 121 | /** The dataset */ 122 | const Matrix dataset_; 123 | /** Index parameters */ 124 | IndexParams index_params_; 125 | /** Index distance */ 126 | Distance distance_; 127 | 128 | }; 129 | 130 | } 131 | 132 | #endif // OPENCV_FLANN_LINEAR_INDEX_H_ 133 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/logger.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_LOGGER_H 32 | #define OPENCV_FLANN_LOGGER_H 33 | 34 | #include 35 | #include 36 | 37 | #include "defines.h" 38 | 39 | 40 | namespace cvflann 41 | { 42 | 43 | class Logger 44 | { 45 | Logger() : stream(stdout), logLevel(FLANN_LOG_WARN) {} 46 | 47 | ~Logger() 48 | { 49 | if ((stream!=NULL)&&(stream!=stdout)) { 50 | fclose(stream); 51 | } 52 | } 53 | 54 | static Logger& instance() 55 | { 56 | static Logger logger; 57 | return logger; 58 | } 59 | 60 | void _setDestination(const char* name) 61 | { 62 | if (name==NULL) { 63 | stream = stdout; 64 | } 65 | else { 66 | stream = fopen(name,"w"); 67 | if (stream == NULL) { 68 | stream = stdout; 69 | } 70 | } 71 | } 72 | 73 | int _log(int level, const char* fmt, va_list arglist) 74 | { 75 | if (level > logLevel ) return -1; 76 | int ret = vfprintf(stream, fmt, arglist); 77 | return ret; 78 | } 79 | 80 | public: 81 | /** 82 | * Sets the logging level. All messages with lower priority will be ignored. 83 | * @param level Logging level 84 | */ 85 | static void setLevel(int level) { instance().logLevel = level; } 86 | 87 | /** 88 | * Sets the logging destination 89 | * @param name Filename or NULL for console 90 | */ 91 | static void setDestination(const char* name) { instance()._setDestination(name); } 92 | 93 | /** 94 | * Print log message 95 | * @param level Log level 96 | * @param fmt Message format 97 | * @return 98 | */ 99 | static int log(int level, const char* fmt, ...) 100 | { 101 | va_list arglist; 102 | va_start(arglist, fmt); 103 | int ret = instance()._log(level,fmt,arglist); 104 | va_end(arglist); 105 | return ret; 106 | } 107 | 108 | #define LOG_METHOD(NAME,LEVEL) \ 109 | static int NAME(const char* fmt, ...) \ 110 | { \ 111 | va_list ap; \ 112 | va_start(ap, fmt); \ 113 | int ret = instance()._log(LEVEL, fmt, ap); \ 114 | va_end(ap); \ 115 | return ret; \ 116 | } 117 | 118 | LOG_METHOD(fatal, FLANN_LOG_FATAL) 119 | LOG_METHOD(error, FLANN_LOG_ERROR) 120 | LOG_METHOD(warn, FLANN_LOG_WARN) 121 | LOG_METHOD(info, FLANN_LOG_INFO) 122 | 123 | private: 124 | FILE* stream; 125 | int logLevel; 126 | }; 127 | 128 | } 129 | 130 | #endif //OPENCV_FLANN_LOGGER_H 131 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/matrix.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_DATASET_H_ 32 | #define OPENCV_FLANN_DATASET_H_ 33 | 34 | #include 35 | 36 | #include "general.h" 37 | 38 | namespace cvflann 39 | { 40 | 41 | /** 42 | * Class that implements a simple rectangular matrix stored in a memory buffer and 43 | * provides convenient matrix-like access using the [] operators. 44 | */ 45 | template 46 | class Matrix 47 | { 48 | public: 49 | typedef T type; 50 | 51 | size_t rows; 52 | size_t cols; 53 | size_t stride; 54 | T* data; 55 | 56 | Matrix() : rows(0), cols(0), stride(0), data(NULL) 57 | { 58 | } 59 | 60 | Matrix(T* data_, size_t rows_, size_t cols_, size_t stride_ = 0) : 61 | rows(rows_), cols(cols_), stride(stride_), data(data_) 62 | { 63 | if (stride==0) stride = cols; 64 | } 65 | 66 | /** 67 | * Convenience function for deallocating the storage data. 68 | */ 69 | FLANN_DEPRECATED void free() 70 | { 71 | fprintf(stderr, "The cvflann::Matrix::free() method is deprecated " 72 | "and it does not do any memory deallocation any more. You are" 73 | "responsible for deallocating the matrix memory (by doing" 74 | "'delete[] matrix.data' for example)"); 75 | } 76 | 77 | /** 78 | * Operator that return a (pointer to a) row of the data. 79 | */ 80 | T* operator[](size_t index) const 81 | { 82 | return data+index*stride; 83 | } 84 | }; 85 | 86 | 87 | class UntypedMatrix 88 | { 89 | public: 90 | size_t rows; 91 | size_t cols; 92 | void* data; 93 | flann_datatype_t type; 94 | 95 | UntypedMatrix(void* data_, long rows_, long cols_) : 96 | rows(rows_), cols(cols_), data(data_) 97 | { 98 | } 99 | 100 | ~UntypedMatrix() 101 | { 102 | } 103 | 104 | 105 | template 106 | Matrix as() 107 | { 108 | return Matrix((T*)data, rows, cols); 109 | } 110 | }; 111 | 112 | 113 | 114 | } 115 | 116 | #endif //OPENCV_FLANN_DATASET_H_ 117 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/object_factory.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_OBJECT_FACTORY_H_ 32 | #define OPENCV_FLANN_OBJECT_FACTORY_H_ 33 | 34 | #include 35 | 36 | namespace cvflann 37 | { 38 | 39 | class CreatorNotFound 40 | { 41 | }; 42 | 43 | template 46 | class ObjectFactory 47 | { 48 | typedef ObjectFactory ThisClass; 49 | typedef std::map ObjectRegistry; 50 | 51 | // singleton class, private constructor 52 | ObjectFactory() {} 53 | 54 | public: 55 | 56 | bool subscribe(UniqueIdType id, ObjectCreator creator) 57 | { 58 | if (object_registry.find(id) != object_registry.end()) return false; 59 | 60 | object_registry[id] = creator; 61 | return true; 62 | } 63 | 64 | bool unregister(UniqueIdType id) 65 | { 66 | return object_registry.erase(id) == 1; 67 | } 68 | 69 | ObjectCreator create(UniqueIdType id) 70 | { 71 | typename ObjectRegistry::const_iterator iter = object_registry.find(id); 72 | 73 | if (iter == object_registry.end()) { 74 | throw CreatorNotFound(); 75 | } 76 | 77 | return iter->second; 78 | } 79 | 80 | static ThisClass& instance() 81 | { 82 | static ThisClass the_factory; 83 | return the_factory; 84 | } 85 | private: 86 | ObjectRegistry object_registry; 87 | }; 88 | 89 | } 90 | 91 | #endif /* OPENCV_FLANN_OBJECT_FACTORY_H_ */ 92 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/params.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2011 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2011 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | *************************************************************************/ 28 | 29 | 30 | #ifndef OPENCV_FLANN_PARAMS_H_ 31 | #define OPENCV_FLANN_PARAMS_H_ 32 | 33 | #include "any.h" 34 | #include "general.h" 35 | #include 36 | #include 37 | 38 | 39 | namespace cvflann 40 | { 41 | 42 | typedef std::map IndexParams; 43 | 44 | struct SearchParams : public IndexParams 45 | { 46 | SearchParams(int checks = 32, float eps = 0, bool sorted = true ) 47 | { 48 | // how many leafs to visit when searching for neighbours (-1 for unlimited) 49 | (*this)["checks"] = checks; 50 | // search for eps-approximate neighbours (default: 0) 51 | (*this)["eps"] = eps; 52 | // only for radius search, require neighbours sorted by distance (default: true) 53 | (*this)["sorted"] = sorted; 54 | } 55 | }; 56 | 57 | 58 | template 59 | T get_param(const IndexParams& params, cv::String name, const T& default_value) 60 | { 61 | IndexParams::const_iterator it = params.find(name); 62 | if (it != params.end()) { 63 | return it->second.cast(); 64 | } 65 | else { 66 | return default_value; 67 | } 68 | } 69 | 70 | template 71 | T get_param(const IndexParams& params, cv::String name) 72 | { 73 | IndexParams::const_iterator it = params.find(name); 74 | if (it != params.end()) { 75 | return it->second.cast(); 76 | } 77 | else { 78 | throw FLANNException(cv::String("Missing parameter '")+name+cv::String("' in the parameters given")); 79 | } 80 | } 81 | 82 | inline void print_params(const IndexParams& params, std::ostream& stream) 83 | { 84 | IndexParams::const_iterator it; 85 | 86 | for(it=params.begin(); it!=params.end(); ++it) { 87 | stream << it->first << " : " << it->second << std::endl; 88 | } 89 | } 90 | 91 | inline void print_params(const IndexParams& params) 92 | { 93 | print_params(params, std::cout); 94 | } 95 | 96 | } 97 | 98 | 99 | #endif /* OPENCV_FLANN_PARAMS_H_ */ 100 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/random.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * THE BSD LICENSE 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 13 | * 1. Redistributions of source code must retain the above copyright 14 | * notice, this list of conditions and the following disclaimer. 15 | * 2. Redistributions in binary form must reproduce the above copyright 16 | * notice, this list of conditions and the following disclaimer in the 17 | * documentation and/or other materials provided with the distribution. 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | *************************************************************************/ 30 | 31 | #ifndef OPENCV_FLANN_RANDOM_H 32 | #define OPENCV_FLANN_RANDOM_H 33 | 34 | #include 35 | #include 36 | #include 37 | 38 | #include "general.h" 39 | 40 | namespace cvflann 41 | { 42 | 43 | /** 44 | * Seeds the random number generator 45 | * @param seed Random seed 46 | */ 47 | inline void seed_random(unsigned int seed) 48 | { 49 | srand(seed); 50 | } 51 | 52 | /* 53 | * Generates a random double value. 54 | */ 55 | /** 56 | * Generates a random double value. 57 | * @param high Upper limit 58 | * @param low Lower limit 59 | * @return Random double value 60 | */ 61 | inline double rand_double(double high = 1.0, double low = 0) 62 | { 63 | return low + ((high-low) * (std::rand() / (RAND_MAX + 1.0))); 64 | } 65 | 66 | /** 67 | * Generates a random integer value. 68 | * @param high Upper limit 69 | * @param low Lower limit 70 | * @return Random integer value 71 | */ 72 | inline int rand_int(int high = RAND_MAX, int low = 0) 73 | { 74 | return low + (int) ( double(high-low) * (std::rand() / (RAND_MAX + 1.0))); 75 | } 76 | 77 | /** 78 | * Random number generator that returns a distinct number from 79 | * the [0,n) interval each time. 80 | */ 81 | class UniqueRandom 82 | { 83 | std::vector vals_; 84 | int size_; 85 | int counter_; 86 | 87 | public: 88 | /** 89 | * Constructor. 90 | * @param n Size of the interval from which to generate 91 | * @return 92 | */ 93 | UniqueRandom(int n) 94 | { 95 | init(n); 96 | } 97 | 98 | /** 99 | * Initializes the number generator. 100 | * @param n the size of the interval from which to generate random numbers. 101 | */ 102 | void init(int n) 103 | { 104 | // create and initialize an array of size n 105 | vals_.resize(n); 106 | size_ = n; 107 | for (int i = 0; i < size_; ++i) vals_[i] = i; 108 | 109 | // shuffle the elements in the array 110 | std::random_shuffle(vals_.begin(), vals_.end()); 111 | 112 | counter_ = 0; 113 | } 114 | 115 | /** 116 | * Return a distinct random integer in greater or equal to 0 and less 117 | * than 'n' on each call. It should be called maximum 'n' times. 118 | * Returns: a random integer 119 | */ 120 | int next() 121 | { 122 | if (counter_ == size_) { 123 | return -1; 124 | } 125 | else { 126 | return vals_[counter_++]; 127 | } 128 | } 129 | }; 130 | 131 | } 132 | 133 | #endif //OPENCV_FLANN_RANDOM_H 134 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/flann/sampling.h: -------------------------------------------------------------------------------- 1 | /*********************************************************************** 2 | * Software License Agreement (BSD License) 3 | * 4 | * Copyright 2008-2009 Marius Muja (mariusm@cs.ubc.ca). All rights reserved. 5 | * Copyright 2008-2009 David G. Lowe (lowe@cs.ubc.ca). All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | *************************************************************************/ 28 | 29 | 30 | #ifndef OPENCV_FLANN_SAMPLING_H_ 31 | #define OPENCV_FLANN_SAMPLING_H_ 32 | 33 | #include "matrix.h" 34 | #include "random.h" 35 | 36 | namespace cvflann 37 | { 38 | 39 | template 40 | Matrix random_sample(Matrix& srcMatrix, long size, bool remove = false) 41 | { 42 | Matrix newSet(new T[size * srcMatrix.cols], size,srcMatrix.cols); 43 | 44 | T* src,* dest; 45 | for (long i=0; i 63 | Matrix random_sample(const Matrix& srcMatrix, size_t size) 64 | { 65 | UniqueRandom rand((int)srcMatrix.rows); 66 | Matrix newSet(new T[size * srcMatrix.cols], size,srcMatrix.cols); 67 | 68 | T* src,* dest; 69 | for (size_t i=0; i 35 | #include "opencv2/core.hpp" 36 | #include "opencv2/core/utility.hpp" 37 | 38 | namespace cvflann 39 | { 40 | 41 | /** 42 | * A start-stop timer class. 43 | * 44 | * Can be used to time portions of code. 45 | */ 46 | class StartStopTimer 47 | { 48 | int64 startTime; 49 | 50 | public: 51 | /** 52 | * Value of the timer. 53 | */ 54 | double value; 55 | 56 | 57 | /** 58 | * Constructor. 59 | */ 60 | StartStopTimer() 61 | { 62 | reset(); 63 | } 64 | 65 | /** 66 | * Starts the timer. 67 | */ 68 | void start() 69 | { 70 | startTime = cv::getTickCount(); 71 | } 72 | 73 | /** 74 | * Stops the timer and updates timer value. 75 | */ 76 | void stop() 77 | { 78 | int64 stopTime = cv::getTickCount(); 79 | value += ( (double)stopTime - startTime) / cv::getTickFrequency(); 80 | } 81 | 82 | /** 83 | * Resets the timer value to 0. 84 | */ 85 | void reset() 86 | { 87 | value = 0; 88 | } 89 | 90 | }; 91 | 92 | } 93 | 94 | #endif // FLANN_TIMER_H 95 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/hal.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Copyright (C) 2015, Itseez Inc., all rights reserved. 17 | // Third party copyrights are property of their respective owners. 18 | // 19 | // Redistribution and use in source and binary forms, with or without modification, 20 | // are permitted provided that the following conditions are met: 21 | // 22 | // * Redistribution's of source code must retain the above copyright notice, 23 | // this list of conditions and the following disclaimer. 24 | // 25 | // * Redistribution's in binary form must reproduce the above copyright notice, 26 | // this list of conditions and the following disclaimer in the documentation 27 | // and/or other materials provided with the distribution. 28 | // 29 | // * The name of the copyright holders may not be used to endorse or promote products 30 | // derived from this software without specific prior written permission. 31 | // 32 | // This software is provided by the copyright holders and contributors "as is" and 33 | // any express or implied warranties, including, but not limited to, the implied 34 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 35 | // In no event shall the Intel Corporation or contributors be liable for any direct, 36 | // indirect, incidental, special, exemplary, or consequential damages 37 | // (including, but not limited to, procurement of substitute goods or services; 38 | // loss of use, data, or profits; or business interruption) however caused 39 | // and on any theory of liability, whether in contract, strict liability, 40 | // or tort (including negligence or otherwise) arising in any way out of 41 | // the use of this software, even if advised of the possibility of such damage. 42 | // 43 | //M*/ 44 | 45 | #ifndef __OPENCV_HAL_HPP__ 46 | #define __OPENCV_HAL_HPP__ 47 | 48 | #include "opencv2/hal/defs.h" 49 | 50 | /** 51 | @defgroup hal Hardware Acceleration Layer 52 | */ 53 | 54 | namespace cv { namespace hal { 55 | 56 | namespace Error { 57 | 58 | enum 59 | { 60 | Ok = 0, 61 | Unknown = -1 62 | }; 63 | 64 | } 65 | 66 | int normHamming(const uchar* a, int n); 67 | int normHamming(const uchar* a, const uchar* b, int n); 68 | 69 | int normHamming(const uchar* a, int n, int cellSize); 70 | int normHamming(const uchar* a, const uchar* b, int n, int cellSize); 71 | 72 | //////////////////////////////// low-level functions //////////////////////////////// 73 | 74 | int LU(float* A, size_t astep, int m, float* b, size_t bstep, int n); 75 | int LU(double* A, size_t astep, int m, double* b, size_t bstep, int n); 76 | bool Cholesky(float* A, size_t astep, int m, float* b, size_t bstep, int n); 77 | bool Cholesky(double* A, size_t astep, int m, double* b, size_t bstep, int n); 78 | 79 | int normL1_(const uchar* a, const uchar* b, int n); 80 | float normL1_(const float* a, const float* b, int n); 81 | float normL2Sqr_(const float* a, const float* b, int n); 82 | 83 | void exp(const float* src, float* dst, int n); 84 | void exp(const double* src, double* dst, int n); 85 | void log(const float* src, float* dst, int n); 86 | void log(const double* src, double* dst, int n); 87 | 88 | void fastAtan2(const float* y, const float* x, float* dst, int n, bool angleInDegrees); 89 | void magnitude(const float* x, const float* y, float* dst, int n); 90 | void magnitude(const double* x, const double* y, double* dst, int n); 91 | void sqrt(const float* src, float* dst, int len); 92 | void sqrt(const double* src, double* dst, int len); 93 | void invSqrt(const float* src, float* dst, int len); 94 | void invSqrt(const double* src, double* dst, int len); 95 | 96 | }} //cv::hal 97 | 98 | #endif //__OPENCV_HAL_HPP__ 99 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/highgui/highgui.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/highgui.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/imgcodecs/imgcodecs.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/imgcodecs.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/imgcodecs/ios.h: -------------------------------------------------------------------------------- 1 | 2 | /*M/////////////////////////////////////////////////////////////////////////////////////// 3 | // 4 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 5 | // 6 | // By downloading, copying, installing or using the software you agree to this license. 7 | // If you do not agree to this license, do not download, install, 8 | // copy or use the software. 9 | // 10 | // 11 | // License Agreement 12 | // For Open Source Computer Vision Library 13 | // 14 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 15 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #import 45 | #import 46 | #import 47 | #import 48 | #include "opencv2/core/core.hpp" 49 | 50 | //! @addtogroup imgcodecs_ios 51 | //! @{ 52 | 53 | UIImage* MatToUIImage(const cv::Mat& image); 54 | void UIImageToMat(const UIImage* image, 55 | cv::Mat& m, bool alphaExist = false); 56 | 57 | //! @} 58 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/imgproc/imgproc.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/imgproc.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/ml/ml.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/ml.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/objdetect/objdetect.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/objdetect.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/opencv.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2010, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_ALL_HPP__ 44 | #define __OPENCV_ALL_HPP__ 45 | 46 | #include "opencv2/core.hpp" 47 | #include "opencv2/imgproc.hpp" 48 | #include "opencv2/photo.hpp" 49 | #include "opencv2/video.hpp" 50 | #include "opencv2/features2d.hpp" 51 | #include "opencv2/objdetect.hpp" 52 | #include "opencv2/calib3d.hpp" 53 | #include "opencv2/imgcodecs.hpp" 54 | #include "opencv2/videoio.hpp" 55 | #include "opencv2/highgui.hpp" 56 | #include "opencv2/ml.hpp" 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/opencv_modules.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * ** File generated automatically, do not modify ** 3 | * 4 | * This file defines the list of modules available in current build configuration 5 | * 6 | * 7 | */ 8 | 9 | #define HAVE_OPENCV_CALIB3D 10 | #define HAVE_OPENCV_CORE 11 | #define HAVE_OPENCV_FEATURES2D 12 | #define HAVE_OPENCV_FLANN 13 | #define HAVE_OPENCV_HAL 14 | #define HAVE_OPENCV_HIGHGUI 15 | #define HAVE_OPENCV_IMGCODECS 16 | #define HAVE_OPENCV_IMGPROC 17 | #define HAVE_OPENCV_ML 18 | #define HAVE_OPENCV_OBJDETECT 19 | #define HAVE_OPENCV_PHOTO 20 | #define HAVE_OPENCV_SHAPE 21 | #define HAVE_OPENCV_STITCHING 22 | #define HAVE_OPENCV_VIDEO 23 | #define HAVE_OPENCV_VIDEOIO 24 | #define HAVE_OPENCV_VIDEOSTAB 25 | #define HAVE_OPENCV_WORLD 26 | 27 | 28 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/photo/photo.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/photo.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/photo/photo_c.h: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2008-2012, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_PHOTO_C_H__ 44 | #define __OPENCV_PHOTO_C_H__ 45 | 46 | #include "opencv2/core/core_c.h" 47 | 48 | #ifdef __cplusplus 49 | extern "C" { 50 | #endif 51 | 52 | /** @addtogroup photo_c 53 | @{ 54 | */ 55 | 56 | /* Inpainting algorithms */ 57 | enum InpaintingModes 58 | { 59 | CV_INPAINT_NS =0, 60 | CV_INPAINT_TELEA =1 61 | }; 62 | 63 | 64 | /* Inpaints the selected region in the image */ 65 | CVAPI(void) cvInpaint( const CvArr* src, const CvArr* inpaint_mask, 66 | CvArr* dst, double inpaintRange, int flags ); 67 | 68 | /** @} */ 69 | 70 | #ifdef __cplusplus 71 | } //extern "C" 72 | #endif 73 | 74 | #endif //__OPENCV_PHOTO_C_H__ 75 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/shape.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2012, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_SHAPE_HPP__ 44 | #define __OPENCV_SHAPE_HPP__ 45 | 46 | #include "opencv2/shape/emdL1.hpp" 47 | #include "opencv2/shape/shape_transformer.hpp" 48 | #include "opencv2/shape/hist_cost.hpp" 49 | #include "opencv2/shape/shape_distance.hpp" 50 | 51 | /** 52 | @defgroup shape Shape Distance and Matching 53 | */ 54 | 55 | #endif 56 | 57 | /* End of file. */ 58 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/shape/emdL1.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2012, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_EMD_L1_HPP__ 44 | #define __OPENCV_EMD_L1_HPP__ 45 | 46 | #include "opencv2/core.hpp" 47 | 48 | namespace cv 49 | { 50 | /****************************************************************************************\ 51 | * EMDL1 Function * 52 | \****************************************************************************************/ 53 | 54 | //! @addtogroup shape 55 | //! @{ 56 | 57 | /** @brief Computes the "minimal work" distance between two weighted point configurations base on the papers 58 | "EMD-L1: An efficient and Robust Algorithm for comparing histogram-based descriptors", by Haibin 59 | Ling and Kazunori Okuda; and "The Earth Mover's Distance is the Mallows Distance: Some Insights from 60 | Statistics", by Elizaveta Levina and Peter Bickel. 61 | 62 | @param signature1 First signature, a single column floating-point matrix. Each row is the value of 63 | the histogram in each bin. 64 | @param signature2 Second signature of the same format and size as signature1. 65 | */ 66 | CV_EXPORTS float EMDL1(InputArray signature1, InputArray signature2); 67 | 68 | //! @} 69 | 70 | }//namespace cv 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/shape/hist_cost.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifndef __OPENCV_HIST_COST_HPP__ 45 | #define __OPENCV_HIST_COST_HPP__ 46 | 47 | #include "opencv2/imgproc.hpp" 48 | 49 | namespace cv 50 | { 51 | 52 | //! @addtogroup shape 53 | //! @{ 54 | 55 | /** @brief Abstract base class for histogram cost algorithms. 56 | */ 57 | class CV_EXPORTS_W HistogramCostExtractor : public Algorithm 58 | { 59 | public: 60 | CV_WRAP virtual void buildCostMatrix(InputArray descriptors1, InputArray descriptors2, OutputArray costMatrix) = 0; 61 | 62 | CV_WRAP virtual void setNDummies(int nDummies) = 0; 63 | CV_WRAP virtual int getNDummies() const = 0; 64 | 65 | CV_WRAP virtual void setDefaultCost(float defaultCost) = 0; 66 | CV_WRAP virtual float getDefaultCost() const = 0; 67 | }; 68 | 69 | /** @brief A norm based cost extraction. : 70 | */ 71 | class CV_EXPORTS_W NormHistogramCostExtractor : public HistogramCostExtractor 72 | { 73 | public: 74 | CV_WRAP virtual void setNormFlag(int flag) = 0; 75 | CV_WRAP virtual int getNormFlag() const = 0; 76 | }; 77 | 78 | CV_EXPORTS_W Ptr 79 | createNormHistogramCostExtractor(int flag=DIST_L2, int nDummies=25, float defaultCost=0.2f); 80 | 81 | /** @brief An EMD based cost extraction. : 82 | */ 83 | class CV_EXPORTS_W EMDHistogramCostExtractor : public HistogramCostExtractor 84 | { 85 | public: 86 | CV_WRAP virtual void setNormFlag(int flag) = 0; 87 | CV_WRAP virtual int getNormFlag() const = 0; 88 | }; 89 | 90 | CV_EXPORTS_W Ptr 91 | createEMDHistogramCostExtractor(int flag=DIST_L2, int nDummies=25, float defaultCost=0.2f); 92 | 93 | /** @brief An Chi based cost extraction. : 94 | */ 95 | class CV_EXPORTS_W ChiHistogramCostExtractor : public HistogramCostExtractor 96 | {}; 97 | 98 | CV_EXPORTS_W Ptr createChiHistogramCostExtractor(int nDummies=25, float defaultCost=0.2f); 99 | 100 | /** @brief An EMD-L1 based cost extraction. : 101 | */ 102 | class CV_EXPORTS_W EMDL1HistogramCostExtractor : public HistogramCostExtractor 103 | {}; 104 | 105 | CV_EXPORTS_W Ptr 106 | createEMDL1HistogramCostExtractor(int nDummies=25, float defaultCost=0.2f); 107 | 108 | //! @} 109 | 110 | } // cv 111 | #endif 112 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/shape/shape.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/shape.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/stitching/detail/autocalib.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_STITCHING_AUTOCALIB_HPP__ 44 | #define __OPENCV_STITCHING_AUTOCALIB_HPP__ 45 | 46 | #include "opencv2/core.hpp" 47 | #include "matchers.hpp" 48 | 49 | namespace cv { 50 | namespace detail { 51 | 52 | //! @addtogroup stitching_autocalib 53 | //! @{ 54 | 55 | /** @brief Tries to estimate focal lengths from the given homography under the assumption that the camera 56 | undergoes rotations around its centre only. 57 | 58 | @param H Homography. 59 | @param f0 Estimated focal length along X axis. 60 | @param f1 Estimated focal length along Y axis. 61 | @param f0_ok True, if f0 was estimated successfully, false otherwise. 62 | @param f1_ok True, if f1 was estimated successfully, false otherwise. 63 | 64 | See "Construction of Panoramic Image Mosaics with Global and Local Alignment" 65 | by Heung-Yeung Shum and Richard Szeliski. 66 | */ 67 | void CV_EXPORTS focalsFromHomography(const Mat &H, double &f0, double &f1, bool &f0_ok, bool &f1_ok); 68 | 69 | /** @brief Estimates focal lengths for each given camera. 70 | 71 | @param features Features of images. 72 | @param pairwise_matches Matches between all image pairs. 73 | @param focals Estimated focal lengths for each camera. 74 | */ 75 | void CV_EXPORTS estimateFocal(const std::vector &features, 76 | const std::vector &pairwise_matches, 77 | std::vector &focals); 78 | 79 | bool CV_EXPORTS calibrateRotatingCamera(const std::vector &Hs, Mat &K); 80 | 81 | //! @} stitching_autocalib 82 | 83 | } // namespace detail 84 | } // namespace cv 85 | 86 | #endif // __OPENCV_STITCHING_AUTOCALIB_HPP__ 87 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/stitching/detail/camera.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_STITCHING_CAMERA_HPP__ 44 | #define __OPENCV_STITCHING_CAMERA_HPP__ 45 | 46 | #include "opencv2/core.hpp" 47 | 48 | namespace cv { 49 | namespace detail { 50 | 51 | //! @addtogroup stitching 52 | //! @{ 53 | 54 | /** @brief Describes camera parameters. 55 | 56 | @note Translation is assumed to be zero during the whole stitching pipeline. : 57 | */ 58 | struct CV_EXPORTS CameraParams 59 | { 60 | CameraParams(); 61 | CameraParams(const CameraParams& other); 62 | const CameraParams& operator =(const CameraParams& other); 63 | Mat K() const; 64 | 65 | double focal; // Focal length 66 | double aspect; // Aspect ratio 67 | double ppx; // Principal point X 68 | double ppy; // Principal point Y 69 | Mat R; // Rotation 70 | Mat t; // Translation 71 | }; 72 | 73 | //! @} 74 | 75 | } // namespace detail 76 | } // namespace cv 77 | 78 | #endif // #ifndef __OPENCV_STITCHING_CAMERA_HPP__ 79 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/stitching/detail/timelapsers.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | 44 | #ifndef __OPENCV_STITCHING_TIMELAPSERS_HPP__ 45 | #define __OPENCV_STITCHING_TIMELAPSERS_HPP__ 46 | 47 | #include "opencv2/core.hpp" 48 | 49 | namespace cv { 50 | namespace detail { 51 | 52 | //! @addtogroup stitching 53 | //! @{ 54 | 55 | // Base Timelapser class, takes a sequence of images, applies appropriate shift, stores result in dst_. 56 | 57 | class CV_EXPORTS Timelapser 58 | { 59 | public: 60 | 61 | enum {AS_IS, CROP}; 62 | 63 | virtual ~Timelapser() {} 64 | 65 | static Ptr createDefault(int type); 66 | 67 | virtual void initialize(const std::vector &corners, const std::vector &sizes); 68 | virtual void process(InputArray img, InputArray mask, Point tl); 69 | virtual const UMat& getDst() {return dst_;} 70 | 71 | protected: 72 | 73 | virtual bool test_point(Point pt); 74 | 75 | UMat dst_; 76 | Rect dst_roi_; 77 | }; 78 | 79 | 80 | class CV_EXPORTS TimelapserCrop : public Timelapser 81 | { 82 | public: 83 | virtual void initialize(const std::vector &corners, const std::vector &sizes); 84 | }; 85 | 86 | //! @} 87 | 88 | } // namespace detail 89 | } // namespace cv 90 | 91 | #endif // __OPENCV_STITCHING_TIMELAPSERS_HPP__ 92 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/stitching/detail/util_inl.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_STITCHING_UTIL_INL_HPP__ 44 | #define __OPENCV_STITCHING_UTIL_INL_HPP__ 45 | 46 | #include 47 | #include "opencv2/core.hpp" 48 | #include "util.hpp" // Make your IDE see declarations 49 | 50 | //! @cond IGNORED 51 | 52 | namespace cv { 53 | namespace detail { 54 | 55 | template 56 | B Graph::forEach(B body) const 57 | { 58 | for (int i = 0; i < numVertices(); ++i) 59 | { 60 | std::list::const_iterator edge = edges_[i].begin(); 61 | for (; edge != edges_[i].end(); ++edge) 62 | body(*edge); 63 | } 64 | return body; 65 | } 66 | 67 | 68 | template 69 | B Graph::walkBreadthFirst(int from, B body) const 70 | { 71 | std::vector was(numVertices(), false); 72 | std::queue vertices; 73 | 74 | was[from] = true; 75 | vertices.push(from); 76 | 77 | while (!vertices.empty()) 78 | { 79 | int vertex = vertices.front(); 80 | vertices.pop(); 81 | 82 | std::list::const_iterator edge = edges_[vertex].begin(); 83 | for (; edge != edges_[vertex].end(); ++edge) 84 | { 85 | if (!was[edge->to]) 86 | { 87 | body(*edge); 88 | was[edge->to] = true; 89 | vertices.push(edge->to); 90 | } 91 | } 92 | } 93 | 94 | return body; 95 | } 96 | 97 | 98 | ////////////////////////////////////////////////////////////////////////////// 99 | // Some auxiliary math functions 100 | 101 | static inline 102 | float normL2(const Point3f& a) 103 | { 104 | return a.x * a.x + a.y * a.y + a.z * a.z; 105 | } 106 | 107 | 108 | static inline 109 | float normL2(const Point3f& a, const Point3f& b) 110 | { 111 | return normL2(a - b); 112 | } 113 | 114 | 115 | static inline 116 | double normL2sq(const Mat &r) 117 | { 118 | return r.dot(r); 119 | } 120 | 121 | 122 | static inline int sqr(int x) { return x * x; } 123 | static inline float sqr(float x) { return x * x; } 124 | static inline double sqr(double x) { return x * x; } 125 | 126 | } // namespace detail 127 | } // namespace cv 128 | 129 | //! @endcond 130 | 131 | #endif // __OPENCV_STITCHING_UTIL_INL_HPP__ 132 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/video.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifndef __OPENCV_VIDEO_HPP__ 45 | #define __OPENCV_VIDEO_HPP__ 46 | 47 | /** 48 | @defgroup video Video Analysis 49 | @{ 50 | @defgroup video_motion Motion Analysis 51 | @defgroup video_track Object Tracking 52 | @defgroup video_c C API 53 | @} 54 | */ 55 | 56 | #include "opencv2/video/tracking.hpp" 57 | #include "opencv2/video/background_segm.hpp" 58 | 59 | #ifndef DISABLE_OPENCV_24_COMPATIBILITY 60 | #include "opencv2/video/tracking_c.h" 61 | #endif 62 | 63 | #endif //__OPENCV_VIDEO_HPP__ 64 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/video/video.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/video.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/videoio/videoio.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved. 15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved. 16 | // Third party copyrights are property of their respective owners. 17 | // 18 | // Redistribution and use in source and binary forms, with or without modification, 19 | // are permitted provided that the following conditions are met: 20 | // 21 | // * Redistribution's of source code must retain the above copyright notice, 22 | // this list of conditions and the following disclaimer. 23 | // 24 | // * Redistribution's in binary form must reproduce the above copyright notice, 25 | // this list of conditions and the following disclaimer in the documentation 26 | // and/or other materials provided with the distribution. 27 | // 28 | // * The name of the copyright holders may not be used to endorse or promote products 29 | // derived from this software without specific prior written permission. 30 | // 31 | // This software is provided by the copyright holders and contributors "as is" and 32 | // any express or implied warranties, including, but not limited to, the implied 33 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 34 | // In no event shall the Intel Corporation or contributors be liable for any direct, 35 | // indirect, incidental, special, exemplary, or consequential damages 36 | // (including, but not limited to, procurement of substitute goods or services; 37 | // loss of use, data, or profits; or business interruption) however caused 38 | // and on any theory of liability, whether in contract, strict liability, 39 | // or tort (including negligence or otherwise) arising in any way out of 40 | // the use of this software, even if advised of the possibility of such damage. 41 | // 42 | //M*/ 43 | 44 | #ifdef __OPENCV_BUILD 45 | #error this is a compatibility header which should not be used inside the OpenCV library 46 | #endif 47 | 48 | #include "opencv2/videoio.hpp" 49 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/videostab.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEOSTAB_HPP__ 44 | #define __OPENCV_VIDEOSTAB_HPP__ 45 | 46 | /** 47 | @defgroup videostab Video Stabilization 48 | 49 | The video stabilization module contains a set of functions and classes that can be used to solve the 50 | problem of video stabilization. There are a few methods implemented, most of them are descibed in 51 | the papers @cite OF06 and @cite G11 . However, there are some extensions and deviations from the orginal 52 | paper methods. 53 | 54 | ### References 55 | 56 | 1. "Full-Frame Video Stabilization with Motion Inpainting" 57 | Yasuyuki Matsushita, Eyal Ofek, Weina Ge, Xiaoou Tang, Senior Member, and Heung-Yeung Shum 58 | 2. "Auto-Directed Video Stabilization with Robust L1 Optimal Camera Paths" 59 | Matthias Grundmann, Vivek Kwatra, Irfan Essa 60 | 61 | @{ 62 | @defgroup videostab_motion Global Motion Estimation 63 | 64 | The video stabilization module contains a set of functions and classes for global motion estimation 65 | between point clouds or between images. In the last case features are extracted and matched 66 | internally. For the sake of convenience the motion estimation functions are wrapped into classes. 67 | Both the functions and the classes are available. 68 | 69 | @defgroup videostab_marching Fast Marching Method 70 | 71 | The Fast Marching Method @cite Telea04 is used in of the video stabilization routines to do motion and 72 | color inpainting. The method is implemented is a flexible way and it's made public for other users. 73 | 74 | @} 75 | 76 | */ 77 | 78 | #include "opencv2/videostab/stabilizer.hpp" 79 | #include "opencv2/videostab/ring_buffer.hpp" 80 | 81 | #endif 82 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/videostab/deblurring.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEOSTAB_DEBLURRING_HPP__ 44 | #define __OPENCV_VIDEOSTAB_DEBLURRING_HPP__ 45 | 46 | #include 47 | #include "opencv2/core.hpp" 48 | 49 | namespace cv 50 | { 51 | namespace videostab 52 | { 53 | 54 | //! @addtogroup videostab 55 | //! @{ 56 | 57 | CV_EXPORTS float calcBlurriness(const Mat &frame); 58 | 59 | class CV_EXPORTS DeblurerBase 60 | { 61 | public: 62 | DeblurerBase() : radius_(0), frames_(0), motions_(0), blurrinessRates_(0) {} 63 | 64 | virtual ~DeblurerBase() {} 65 | 66 | virtual void setRadius(int val) { radius_ = val; } 67 | virtual int radius() const { return radius_; } 68 | 69 | virtual void deblur(int idx, Mat &frame) = 0; 70 | 71 | 72 | // data from stabilizer 73 | 74 | virtual void setFrames(const std::vector &val) { frames_ = &val; } 75 | virtual const std::vector& frames() const { return *frames_; } 76 | 77 | virtual void setMotions(const std::vector &val) { motions_ = &val; } 78 | virtual const std::vector& motions() const { return *motions_; } 79 | 80 | virtual void setBlurrinessRates(const std::vector &val) { blurrinessRates_ = &val; } 81 | virtual const std::vector& blurrinessRates() const { return *blurrinessRates_; } 82 | 83 | protected: 84 | int radius_; 85 | const std::vector *frames_; 86 | const std::vector *motions_; 87 | const std::vector *blurrinessRates_; 88 | }; 89 | 90 | class CV_EXPORTS NullDeblurer : public DeblurerBase 91 | { 92 | public: 93 | virtual void deblur(int /*idx*/, Mat &/*frame*/) {} 94 | }; 95 | 96 | class CV_EXPORTS WeightingDeblurer : public DeblurerBase 97 | { 98 | public: 99 | WeightingDeblurer(); 100 | 101 | void setSensitivity(float val) { sensitivity_ = val; } 102 | float sensitivity() const { return sensitivity_; } 103 | 104 | virtual void deblur(int idx, Mat &frame); 105 | 106 | private: 107 | float sensitivity_; 108 | Mat_ bSum_, gSum_, rSum_, wSum_; 109 | }; 110 | 111 | //! @} 112 | 113 | } // namespace videostab 114 | } // namespace cv 115 | 116 | #endif 117 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/videostab/fast_marching.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEOSTAB_FAST_MARCHING_HPP__ 44 | #define __OPENCV_VIDEOSTAB_FAST_MARCHING_HPP__ 45 | 46 | #include 47 | #include 48 | #include 49 | #include "opencv2/core.hpp" 50 | 51 | namespace cv 52 | { 53 | namespace videostab 54 | { 55 | 56 | //! @addtogroup videostab_marching 57 | //! @{ 58 | 59 | /** @brief Describes the Fast Marching Method implementation. 60 | 61 | See http://iwi.eldoc.ub.rug.nl/FILES/root/2004/JGraphToolsTelea/2004JGraphToolsTelea.pdf 62 | */ 63 | class CV_EXPORTS FastMarchingMethod 64 | { 65 | public: 66 | FastMarchingMethod() : inf_(1e6f) {} 67 | 68 | /** @brief Template method that runs the Fast Marching Method. 69 | 70 | @param mask Image mask. 0 value indicates that the pixel value must be inpainted, 255 indicates 71 | that the pixel value is known, other values aren't acceptable. 72 | @param inpaint Inpainting functor that overloads void operator ()(int x, int y). 73 | @return Inpainting functor. 74 | */ 75 | template 76 | Inpaint run(const Mat &mask, Inpaint inpaint); 77 | 78 | /** 79 | @return Distance map that's created during working of the method. 80 | */ 81 | Mat distanceMap() const { return dist_; } 82 | 83 | private: 84 | enum { INSIDE = 0, BAND = 1, KNOWN = 255 }; 85 | 86 | struct DXY 87 | { 88 | float dist; 89 | int x, y; 90 | 91 | DXY() : dist(0), x(0), y(0) {} 92 | DXY(float _dist, int _x, int _y) : dist(_dist), x(_x), y(_y) {} 93 | bool operator <(const DXY &dxy) const { return dist < dxy.dist; } 94 | }; 95 | 96 | float solve(int x1, int y1, int x2, int y2) const; 97 | int& indexOf(const DXY &dxy) { return index_(dxy.y, dxy.x); } 98 | 99 | void heapUp(int idx); 100 | void heapDown(int idx); 101 | void heapAdd(const DXY &dxy); 102 | void heapRemoveMin(); 103 | 104 | float inf_; 105 | 106 | cv::Mat_ flag_; // flag map 107 | cv::Mat_ dist_; // distance map 108 | 109 | cv::Mat_ index_; // index of point in the narrow band 110 | std::vector narrowBand_; // narrow band heap 111 | int size_; // narrow band size 112 | }; 113 | 114 | //! @} 115 | 116 | } // namespace videostab 117 | } // namespace cv 118 | 119 | #include "fast_marching_inl.hpp" 120 | 121 | #endif 122 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/videostab/frame_source.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEOSTAB_FRAME_SOURCE_HPP__ 44 | #define __OPENCV_VIDEOSTAB_FRAME_SOURCE_HPP__ 45 | 46 | #include 47 | #include "opencv2/core.hpp" 48 | 49 | namespace cv 50 | { 51 | namespace videostab 52 | { 53 | 54 | //! @addtogroup videostab 55 | //! @{ 56 | 57 | class CV_EXPORTS IFrameSource 58 | { 59 | public: 60 | virtual ~IFrameSource() {} 61 | virtual void reset() = 0; 62 | virtual Mat nextFrame() = 0; 63 | }; 64 | 65 | class CV_EXPORTS NullFrameSource : public IFrameSource 66 | { 67 | public: 68 | virtual void reset() {} 69 | virtual Mat nextFrame() { return Mat(); } 70 | }; 71 | 72 | class CV_EXPORTS VideoFileSource : public IFrameSource 73 | { 74 | public: 75 | VideoFileSource(const String &path, bool volatileFrame = false); 76 | 77 | virtual void reset(); 78 | virtual Mat nextFrame(); 79 | 80 | int width(); 81 | int height(); 82 | int count(); 83 | double fps(); 84 | 85 | private: 86 | Ptr impl; 87 | }; 88 | 89 | //! @} 90 | 91 | } // namespace videostab 92 | } // namespace cv 93 | 94 | #endif 95 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/videostab/log.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEOSTAB_LOG_HPP__ 44 | #define __OPENCV_VIDEOSTAB_LOG_HPP__ 45 | 46 | #include "opencv2/core.hpp" 47 | 48 | namespace cv 49 | { 50 | namespace videostab 51 | { 52 | 53 | //! @addtogroup videostab 54 | //! @{ 55 | 56 | class CV_EXPORTS ILog 57 | { 58 | public: 59 | virtual ~ILog() {} 60 | virtual void print(const char *format, ...) = 0; 61 | }; 62 | 63 | class CV_EXPORTS NullLog : public ILog 64 | { 65 | public: 66 | virtual void print(const char * /*format*/, ...) {} 67 | }; 68 | 69 | class CV_EXPORTS LogToStdout : public ILog 70 | { 71 | public: 72 | virtual void print(const char *format, ...); 73 | }; 74 | 75 | //! @} 76 | 77 | } // namespace videostab 78 | } // namespace cv 79 | 80 | #endif 81 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/videostab/motion_core.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEOSTAB_MOTION_CORE_HPP__ 44 | #define __OPENCV_VIDEOSTAB_MOTION_CORE_HPP__ 45 | 46 | #include 47 | #include "opencv2/core.hpp" 48 | 49 | namespace cv 50 | { 51 | namespace videostab 52 | { 53 | 54 | //! @addtogroup videostab_motion 55 | //! @{ 56 | 57 | /** @brief Describes motion model between two point clouds. 58 | */ 59 | enum MotionModel 60 | { 61 | MM_TRANSLATION = 0, 62 | MM_TRANSLATION_AND_SCALE = 1, 63 | MM_ROTATION = 2, 64 | MM_RIGID = 3, 65 | MM_SIMILARITY = 4, 66 | MM_AFFINE = 5, 67 | MM_HOMOGRAPHY = 6, 68 | MM_UNKNOWN = 7 69 | }; 70 | 71 | /** @brief Describes RANSAC method parameters. 72 | */ 73 | struct CV_EXPORTS RansacParams 74 | { 75 | int size; //!< subset size 76 | float thresh; //!< max error to classify as inlier 77 | float eps; //!< max outliers ratio 78 | float prob; //!< probability of success 79 | 80 | RansacParams() : size(0), thresh(0), eps(0), prob(0) {} 81 | /** @brief Constructor 82 | @param size Subset size. 83 | @param thresh Maximum re-projection error value to classify as inlier. 84 | @param eps Maximum ratio of incorrect correspondences. 85 | @param prob Required success probability. 86 | */ 87 | RansacParams(int size, float thresh, float eps, float prob); 88 | 89 | /** 90 | @return Number of iterations that'll be performed by RANSAC method. 91 | */ 92 | int niters() const 93 | { 94 | return static_cast( 95 | std::ceil(std::log(1 - prob) / std::log(1 - std::pow(1 - eps, size)))); 96 | } 97 | 98 | /** 99 | @param model Motion model. See cv::videostab::MotionModel. 100 | @return Default RANSAC method parameters for the given motion model. 101 | */ 102 | static RansacParams default2dMotion(MotionModel model) 103 | { 104 | CV_Assert(model < MM_UNKNOWN); 105 | if (model == MM_TRANSLATION) 106 | return RansacParams(1, 0.5f, 0.5f, 0.99f); 107 | if (model == MM_TRANSLATION_AND_SCALE) 108 | return RansacParams(2, 0.5f, 0.5f, 0.99f); 109 | if (model == MM_ROTATION) 110 | return RansacParams(1, 0.5f, 0.5f, 0.99f); 111 | if (model == MM_RIGID) 112 | return RansacParams(2, 0.5f, 0.5f, 0.99f); 113 | if (model == MM_SIMILARITY) 114 | return RansacParams(2, 0.5f, 0.5f, 0.99f); 115 | if (model == MM_AFFINE) 116 | return RansacParams(3, 0.5f, 0.5f, 0.99f); 117 | return RansacParams(4, 0.5f, 0.5f, 0.99f); 118 | } 119 | }; 120 | 121 | inline RansacParams::RansacParams(int _size, float _thresh, float _eps, float _prob) 122 | : size(_size), thresh(_thresh), eps(_eps), prob(_prob) {} 123 | 124 | //! @} 125 | 126 | } // namespace videostab 127 | } // namespace cv 128 | 129 | #endif 130 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/videostab/outlier_rejection.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEOSTAB_OUTLIER_REJECTION_HPP__ 44 | #define __OPENCV_VIDEOSTAB_OUTLIER_REJECTION_HPP__ 45 | 46 | #include 47 | #include "opencv2/core.hpp" 48 | #include "opencv2/videostab/motion_core.hpp" 49 | 50 | namespace cv 51 | { 52 | namespace videostab 53 | { 54 | 55 | //! @addtogroup videostab 56 | //! @{ 57 | 58 | class CV_EXPORTS IOutlierRejector 59 | { 60 | public: 61 | virtual ~IOutlierRejector() {} 62 | 63 | virtual void process( 64 | Size frameSize, InputArray points0, InputArray points1, OutputArray mask) = 0; 65 | }; 66 | 67 | class CV_EXPORTS NullOutlierRejector : public IOutlierRejector 68 | { 69 | public: 70 | virtual void process( 71 | Size frameSize, InputArray points0, InputArray points1, OutputArray mask); 72 | }; 73 | 74 | class CV_EXPORTS TranslationBasedLocalOutlierRejector : public IOutlierRejector 75 | { 76 | public: 77 | TranslationBasedLocalOutlierRejector(); 78 | 79 | void setCellSize(Size val) { cellSize_ = val; } 80 | Size cellSize() const { return cellSize_; } 81 | 82 | void setRansacParams(RansacParams val) { ransacParams_ = val; } 83 | RansacParams ransacParams() const { return ransacParams_; } 84 | 85 | virtual void process( 86 | Size frameSize, InputArray points0, InputArray points1, OutputArray mask); 87 | 88 | private: 89 | Size cellSize_; 90 | RansacParams ransacParams_; 91 | 92 | typedef std::vector Cell; 93 | std::vector grid_; 94 | }; 95 | 96 | //! @} 97 | 98 | } // namespace videostab 99 | } // namespace cv 100 | 101 | #endif 102 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/videostab/ring_buffer.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_VIDEOSTAB_RING_BUFFER_HPP__ 44 | #define __OPENCV_VIDEOSTAB_RING_BUFFER_HPP__ 45 | 46 | #include 47 | #include "opencv2/imgproc.hpp" 48 | 49 | namespace cv 50 | { 51 | namespace videostab 52 | { 53 | 54 | //! @addtogroup videostab 55 | //! @{ 56 | 57 | template inline T& at(int idx, std::vector &items) 58 | { 59 | return items[cv::borderInterpolate(idx, static_cast(items.size()), cv::BORDER_WRAP)]; 60 | } 61 | 62 | template inline const T& at(int idx, const std::vector &items) 63 | { 64 | return items[cv::borderInterpolate(idx, static_cast(items.size()), cv::BORDER_WRAP)]; 65 | } 66 | 67 | //! @} 68 | 69 | } // namespace videostab 70 | } // namespace cv 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Headers/world.hpp: -------------------------------------------------------------------------------- 1 | /*M/////////////////////////////////////////////////////////////////////////////////////// 2 | // 3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. 4 | // 5 | // By downloading, copying, installing or using the software you agree to this license. 6 | // If you do not agree to this license, do not download, install, 7 | // copy or use the software. 8 | // 9 | // 10 | // License Agreement 11 | // For Open Source Computer Vision Library 12 | // 13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved. 14 | // Copyright (C) 2009-2010, Willow Garage Inc., all rights reserved. 15 | // Third party copyrights are property of their respective owners. 16 | // 17 | // Redistribution and use in source and binary forms, with or without modification, 18 | // are permitted provided that the following conditions are met: 19 | // 20 | // * Redistribution's of source code must retain the above copyright notice, 21 | // this list of conditions and the following disclaimer. 22 | // 23 | // * Redistribution's in binary form must reproduce the above copyright notice, 24 | // this list of conditions and the following disclaimer in the documentation 25 | // and/or other materials provided with the distribution. 26 | // 27 | // * The name of the copyright holders may not be used to endorse or promote products 28 | // derived from this software without specific prior written permission. 29 | // 30 | // This software is provided by the copyright holders and contributors "as is" and 31 | // any express or implied warranties, including, but not limited to, the implied 32 | // warranties of merchantability and fitness for a particular purpose are disclaimed. 33 | // In no event shall the Intel Corporation or contributors be liable for any direct, 34 | // indirect, incidental, special, exemplary, or consequential damages 35 | // (including, but not limited to, procurement of substitute goods or services; 36 | // loss of use, data, or profits; or business interruption) however caused 37 | // and on any theory of liability, whether in contract, strict liability, 38 | // or tort (including negligence or otherwise) arising in any way out of 39 | // the use of this software, even if advised of the possibility of such damage. 40 | // 41 | //M*/ 42 | 43 | #ifndef __OPENCV_WORLD_HPP__ 44 | #define __OPENCV_WORLD_HPP__ 45 | 46 | #include "opencv2/core.hpp" 47 | 48 | #ifdef __cplusplus 49 | namespace cv 50 | { 51 | 52 | CV_EXPORTS_W bool initAll(); 53 | 54 | } 55 | 56 | #endif 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleName 6 | OpenCV 7 | CFBundleIdentifier 8 | org.opencv 9 | CFBundleVersion 10 | 3.0.0 11 | CFBundleShortVersionString 12 | 3.0.0 13 | CFBundleSignature 14 | ???? 15 | CFBundlePackageType 16 | FMWK 17 | 18 | 19 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/opencv2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JasonPan/GrabCut-iOS-Application/83e6ff7bd6c389f5e65b9815c6594a399dc116b7/ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/A/opencv2 -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /ios app/grabcutios-master/GrabCutIOS/opencv2.framework/opencv2: -------------------------------------------------------------------------------- 1 | Versions/Current/opencv2 -------------------------------------------------------------------------------- /ios app/grabcutios-master/NOTICE: -------------------------------------------------------------------------------- 1 | GrabCutIOS 2 | Copyright 2015 NAVER Corp. 3 | 4 | This project contains subcomponents with separate copyright notices and license terms. 5 | Your use of the source code for the these subcomponents is subject to the terms and conditions of the following licenses. 6 | 7 | ======================================================================= 8 | OpenCV (http://opencv.org/) 9 | ======================================================================= 10 | 11 | By downloading, copying, installing or using the software you agree to this license. 12 | If you do not agree to this license, do not download, install, 13 | copy or use the software. 14 | 15 | 16 | License Agreement 17 | For Open Source Computer Vision Library 18 | (3-clause BSD License) 19 | 20 | Copyright (C) 2000-2015, Intel Corporation, all rights reserved. 21 | Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved. 22 | Copyright (C) 2009-2015, NVIDIA Corporation, all rights reserved. 23 | Copyright (C) 2010-2013, Advanced Micro Devices, Inc., all rights reserved. 24 | Copyright (C) 2015, OpenCV Foundation, all rights reserved. 25 | Copyright (C) 2015, Itseez Inc., all rights reserved. 26 | Third party copyrights are property of their respective owners. 27 | 28 | Redistribution and use in source and binary forms, with or without modification, 29 | are permitted provided that the following conditions are met: 30 | 31 | * Redistributions of source code must retain the above copyright notice, 32 | this list of conditions and the following disclaimer. 33 | 34 | * Redistributions in binary form must reproduce the above copyright notice, 35 | this list of conditions and the following disclaimer in the documentation 36 | and/or other materials provided with the distribution. 37 | 38 | * Neither the names of the copyright holders nor the names of the contributors 39 | may be used to endorse or promote products derived from this software 40 | without specific prior written permission. 41 | 42 | This software is provided by the copyright holders and contributors "as is" and 43 | any express or implied warranties, including, but not limited to, the implied 44 | warranties of merchantability and fitness for a particular purpose are disclaimed. 45 | In no event shall copyright holders or contributors be liable for any direct, 46 | indirect, incidental, special, exemplary, or consequential damages 47 | (including, but not limited to, procurement of substitute goods or services; 48 | loss of use, data, or profits; or business interruption) however caused 49 | and on any theory of liability, whether in contract, strict liability, 50 | or tort (including negligence or otherwise) arising in any way out of 51 | the use of this software, even if advised of the possibility of such damage. 52 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/README.md: -------------------------------------------------------------------------------- 1 | # GrabCutIOS 2 | Image segmentation using GrabCut algorithm in IOS 3 | 4 | ## Overview 5 | GrabCut is an image segmentation method based on graph cuts. The algorithm was designed by Carsten Rother, Vladimir Kolmogorov & Andrew Blake from Microsoft Research Cambridge, UK. in their paper, "GrabCut": interactive foreground extraction using iterated graph cuts . An algorithm was needed for foreground extraction with minimal user interaction, and the result was GrabCut. 6 | 7 | ## Screenshot 8 | ![screenshot.png](/docs/screenshot.png) 9 | 10 | ## Requirement 11 | 1. OpenCV Framework 12 | 13 | ## Usage 14 | 1. Import GrabCutManager 15 | ```objectiveC 16 | #import "GrabCutManager.h" 17 | GrabCutManager* grabcut = [[GrabCutManager alloc] init]; 18 | ``` 19 | 20 | 2. Set foreground boundary with a rect. 21 | ```objectiveC 22 | -(UIImage*) doGrabCut:(UIImage*)sourceImage foregroundBound:(CGRect) rect iterationCount:(int)iterCount; 23 | ``` 24 | ```objectiveC 25 | -(void) doGrabcut{ 26 | __weak typeof(self)weakSelf = self; 27 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 28 | (unsigned long)NULL), ^(void) { 29 | UIImage* resultImage= [weakSelf.grabcut doGrabCut:weakSelf.resizedImage foregroundBound:weakSelf.grabRect iterationCount:5]; 30 | resultImage = [weakSelf masking:weakSelf.originalImage mask:[weakSelf resizeImage:resultImage size:weakSelf.originalImage.size]]; 31 | dispatch_async(dispatch_get_main_queue(), ^(void) { 32 | [weakSelf.resultImageView setImage:resultImage]; 33 | }); 34 | }); 35 | } 36 | ``` 37 | 38 | 3. Make masking image with the adding or removing parts from result. 39 | ```objectiveC 40 | -(UIImage*) doGrabCutWithMask:(UIImage*)sourceImage maskImage:(UIImage*)maskImage iterationCount:(int) iterCount; 41 | ``` 42 | ```objectiveC 43 | -(void) doGrabcutWithMaskImage:(UIImage*)image{ 44 | __weak typeof(self)weakSelf = self; 45 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 46 | (unsigned long)NULL), ^(void) { 47 | UIImage* resultImage= [weakSelf.grabcut doGrabCutWithMask:weakSelf.resizedImage maskImage:[weakSelf resizeImage:image size:weakSelf.resizedImage.size] iterationCount:5]; 48 | resultImage = [weakSelf masking:weakSelf.originalImage mask:[weakSelf resizeImage:resultImage size:weakSelf.originalImage.size]]; 49 | dispatch_async(dispatch_get_main_queue(), ^(void) { 50 | [weakSelf.resultImageView setImage:resultImage]; 51 | }); 52 | }); 53 | } 54 | ``` 55 | 56 | ## Limitation 57 | This program use OpenCV library. 58 | It is not use GPU in IOS. it is obviously more slower than library that it use GPU. 59 | So I want to improve this code to use GPU like GPUImage. 60 | 61 | This algorithm is based on color value distribution. 62 | There is a limitation when foreground and background color are similar. 63 | 64 | ## References 65 | * C. Rother, V. Kolmogorov, and A. Blake, GrabCut: Interactive foreground extraction using iterated graph cuts, ACM Trans. Graph., vol. 23, pp. 309–314, 2004. 66 | * http://docs.opencv.org/master/d8/d83/tutorial_py_grabcut.html#gsc.tab=0 67 | 68 | ## License 69 | GrabCutIOS is licensed under the Apache License, Version 2.0. 70 | See [LICENSE](/LICENSE) for full license text. 71 | 72 | Copyright (c) 2015 Naver Corp. 73 | @Author Eunchul Jeon 74 | 75 | Licensed under the Apache License, Version 2.0 (the "License"); 76 | you may not use this file except in compliance with the License. 77 | You may obtain a copy of the License at 78 | 79 | http://www.apache.org/licenses/LICENSE-2.0 80 | 81 | Unless required by applicable law or agreed to in writing, software 82 | distributed under the License is distributed on an "AS IS" BASIS, 83 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 84 | See the License for the specific language governing permissions and 85 | limitations under the License. 86 | 87 | -------------------------------------------------------------------------------- /ios app/grabcutios-master/docs/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JasonPan/GrabCut-iOS-Application/83e6ff7bd6c389f5e65b9815c6594a399dc116b7/ios app/grabcutios-master/docs/screenshot.png --------------------------------------------------------------------------------