├── .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