├── .gitignore
├── .idea
├── .gitignore
├── compiler.xml
├── deploymentTargetSelector.xml
├── gradle.xml
├── jarRepositories.xml
├── kotlinc.xml
├── migrations.xml
├── misc.xml
└── runConfigurations.xml
├── LICENSE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── debug
│ ├── ic_launcher-playstore.png
│ └── res
│ │ ├── drawable
│ │ └── ic_launcher_foreground.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ └── ic_launcher_background.xml
│ └── main
│ ├── AndroidManifest.xml
│ ├── cpp
│ ├── CMakeLists.txt
│ └── timelapse.cpp
│ ├── ic_launcher-playstore.png
│ ├── java
│ └── com
│ │ └── dan
│ │ └── timelapse
│ │ ├── MainActivity.kt
│ │ ├── filters
│ │ ├── AddFramesFilter.kt
│ │ ├── AlignFramesFilter.kt
│ │ ├── AverageFramesFilter.kt
│ │ ├── AverageWeightedForLastFramesFilter.kt
│ │ ├── AverageWeightedForLightFramesFilter.kt
│ │ ├── DarkestPixelsFramesFilter.kt
│ │ ├── EndlessAddFramesFilter.kt
│ │ ├── EndlessAverageFramesFilter.kt
│ │ ├── EndlessAverageWeightedForLastFramesFilter.kt
│ │ ├── EndlessAverageWeightedForLightFramesFilter.kt
│ │ ├── EndlessDarkestPixelsFramesFilter.kt
│ │ ├── EndlessLightestPixelsFramesFilter.kt
│ │ ├── FramesConsumer.kt
│ │ ├── FramesFilter.kt
│ │ ├── HDRFramesFilter.kt
│ │ ├── LightestPixelsFramesFilter.kt
│ │ ├── MultiFramesFilter.kt
│ │ ├── SampleFramesFilter.kt
│ │ ├── ScaleFramesFilter.kt
│ │ ├── SumFramesFilter.kt
│ │ └── TransitionFramesFilter.kt
│ │ ├── framesinput
│ │ ├── FramesInput.kt
│ │ ├── ImagesFramesInput.kt
│ │ └── VideoFramesInput.kt
│ │ ├── images
│ │ ├── ImageTools.kt
│ │ └── ImageWriter.kt
│ │ ├── screens
│ │ ├── AppFragment.kt
│ │ ├── BusyDialog.kt
│ │ ├── MainFragment.kt
│ │ ├── MaskEditFragment.kt
│ │ └── SettingsFragment.kt
│ │ ├── utils
│ │ ├── OutputParams.kt
│ │ ├── Settings.kt
│ │ └── UriFile.kt
│ │ ├── video
│ │ ├── VideoEncoder.kt
│ │ ├── VideoTools.kt
│ │ └── VideoWriter.kt
│ │ └── widgets
│ │ └── TouchImageView.kt
│ └── res
│ ├── drawable-v24
│ └── ic_launcher_foreground.xml
│ ├── drawable
│ ├── ic_launcher_background.xml
│ └── ic_launcher_foreground.xml
│ ├── layout
│ ├── activity_main.xml
│ ├── busy_dialog.xml
│ ├── main_fragment.xml
│ ├── mask_edit_fragment.xml
│ └── settings_fragment.xml
│ ├── menu
│ └── app_menu.xml
│ ├── mipmap-anydpi-v26
│ ├── ic_launcher.xml
│ └── ic_launcher_round.xml
│ ├── mipmap-hdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-mdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── mipmap-xxxhdpi
│ ├── ic_launcher.png
│ └── ic_launcher_round.png
│ ├── values-night
│ └── themes.xml
│ └── values
│ ├── colors.xml
│ ├── ic_launcher_background.xml
│ ├── strings.xml
│ └── themes.xml
├── build.gradle
├── examples
├── other
│ ├── endless-lightest-pixels.gif
│ └── simple.gif
├── smooth
│ └── original_vs_smooth_10x.gif
└── transition
│ ├── crop.gif
│ ├── input_1.jpg
│ ├── input_2.jpg
│ ├── input_3.jpg
│ ├── input_4.jpg
│ └── no-crop.gif
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── opencv
├── build.gradle
└── src
│ └── main
│ ├── AndroidManifest.xml
│ ├── aidl
│ └── org
│ │ └── opencv
│ │ └── engine
│ │ └── OpenCVEngineInterface.aidl
│ ├── cpp
│ └── include
│ │ └── opencv2
│ │ ├── calib3d.hpp
│ │ ├── calib3d
│ │ ├── calib3d.hpp
│ │ └── calib3d_c.h
│ │ ├── core.hpp
│ │ ├── core
│ │ ├── affine.hpp
│ │ ├── async.hpp
│ │ ├── base.hpp
│ │ ├── bindings_utils.hpp
│ │ ├── bufferpool.hpp
│ │ ├── check.hpp
│ │ ├── core.hpp
│ │ ├── core_c.h
│ │ ├── cuda.hpp
│ │ ├── cuda.inl.hpp
│ │ ├── cuda
│ │ │ ├── block.hpp
│ │ │ ├── border_interpolate.hpp
│ │ │ ├── color.hpp
│ │ │ ├── common.hpp
│ │ │ ├── datamov_utils.hpp
│ │ │ ├── detail
│ │ │ │ ├── color_detail.hpp
│ │ │ │ ├── reduce.hpp
│ │ │ │ ├── reduce_key_val.hpp
│ │ │ │ ├── transform_detail.hpp
│ │ │ │ ├── type_traits_detail.hpp
│ │ │ │ └── vec_distance_detail.hpp
│ │ │ ├── dynamic_smem.hpp
│ │ │ ├── emulation.hpp
│ │ │ ├── filters.hpp
│ │ │ ├── funcattrib.hpp
│ │ │ ├── functional.hpp
│ │ │ ├── limits.hpp
│ │ │ ├── reduce.hpp
│ │ │ ├── saturate_cast.hpp
│ │ │ ├── scan.hpp
│ │ │ ├── simd_functions.hpp
│ │ │ ├── transform.hpp
│ │ │ ├── type_traits.hpp
│ │ │ ├── utility.hpp
│ │ │ ├── vec_distance.hpp
│ │ │ ├── vec_math.hpp
│ │ │ ├── vec_traits.hpp
│ │ │ ├── warp.hpp
│ │ │ ├── warp_reduce.hpp
│ │ │ └── warp_shuffle.hpp
│ │ ├── cuda_stream_accessor.hpp
│ │ ├── cuda_types.hpp
│ │ ├── cv_cpu_dispatch.h
│ │ ├── cv_cpu_helper.h
│ │ ├── cvdef.h
│ │ ├── cvstd.hpp
│ │ ├── cvstd.inl.hpp
│ │ ├── cvstd_wrapper.hpp
│ │ ├── detail
│ │ │ ├── async_promise.hpp
│ │ │ ├── dispatch_helper.impl.hpp
│ │ │ └── exception_ptr.hpp
│ │ ├── directx.hpp
│ │ ├── dualquaternion.hpp
│ │ ├── dualquaternion.inl.hpp
│ │ ├── eigen.hpp
│ │ ├── fast_math.hpp
│ │ ├── hal
│ │ │ ├── hal.hpp
│ │ │ ├── interface.h
│ │ │ ├── intrin.hpp
│ │ │ ├── intrin_avx.hpp
│ │ │ ├── intrin_avx512.hpp
│ │ │ ├── intrin_cpp.hpp
│ │ │ ├── intrin_forward.hpp
│ │ │ ├── intrin_msa.hpp
│ │ │ ├── intrin_neon.hpp
│ │ │ ├── intrin_rvv.hpp
│ │ │ ├── intrin_rvv071.hpp
│ │ │ ├── intrin_sse.hpp
│ │ │ ├── intrin_sse_em.hpp
│ │ │ ├── intrin_vsx.hpp
│ │ │ ├── intrin_wasm.hpp
│ │ │ ├── msa_macros.h
│ │ │ └── simd_utils.impl.hpp
│ │ ├── mat.hpp
│ │ ├── mat.inl.hpp
│ │ ├── matx.hpp
│ │ ├── neon_utils.hpp
│ │ ├── ocl.hpp
│ │ ├── ocl_genbase.hpp
│ │ ├── opencl
│ │ │ ├── ocl_defs.hpp
│ │ │ ├── opencl_info.hpp
│ │ │ ├── opencl_svm.hpp
│ │ │ └── runtime
│ │ │ │ ├── autogenerated
│ │ │ │ ├── opencl_clblas.hpp
│ │ │ │ ├── opencl_clfft.hpp
│ │ │ │ ├── opencl_core.hpp
│ │ │ │ ├── opencl_core_wrappers.hpp
│ │ │ │ ├── opencl_gl.hpp
│ │ │ │ └── opencl_gl_wrappers.hpp
│ │ │ │ ├── opencl_clblas.hpp
│ │ │ │ ├── opencl_clfft.hpp
│ │ │ │ ├── opencl_core.hpp
│ │ │ │ ├── opencl_core_wrappers.hpp
│ │ │ │ ├── opencl_gl.hpp
│ │ │ │ ├── opencl_gl_wrappers.hpp
│ │ │ │ ├── opencl_svm_20.hpp
│ │ │ │ ├── opencl_svm_definitions.hpp
│ │ │ │ └── opencl_svm_hsa_extension.hpp
│ │ ├── opengl.hpp
│ │ ├── operations.hpp
│ │ ├── optim.hpp
│ │ ├── ovx.hpp
│ │ ├── parallel
│ │ │ ├── backend
│ │ │ │ ├── parallel_for.openmp.hpp
│ │ │ │ └── parallel_for.tbb.hpp
│ │ │ └── parallel_backend.hpp
│ │ ├── persistence.hpp
│ │ ├── quaternion.hpp
│ │ ├── quaternion.inl.hpp
│ │ ├── saturate.hpp
│ │ ├── simd_intrinsics.hpp
│ │ ├── softfloat.hpp
│ │ ├── sse_utils.hpp
│ │ ├── traits.hpp
│ │ ├── types.hpp
│ │ ├── types_c.h
│ │ ├── utility.hpp
│ │ ├── utils
│ │ │ ├── allocator_stats.hpp
│ │ │ ├── allocator_stats.impl.hpp
│ │ │ ├── filesystem.hpp
│ │ │ ├── fp_control_utils.hpp
│ │ │ ├── instrumentation.hpp
│ │ │ ├── logger.defines.hpp
│ │ │ ├── logger.hpp
│ │ │ ├── logtag.hpp
│ │ │ ├── tls.hpp
│ │ │ └── trace.hpp
│ │ ├── va_intel.hpp
│ │ ├── version.hpp
│ │ └── vsx_utils.hpp
│ │ ├── cvconfig.h
│ │ ├── features2d.hpp
│ │ ├── features2d
│ │ ├── features2d.hpp
│ │ └── hal
│ │ │ └── interface.h
│ │ ├── 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
│ │ ├── imgcodecs.hpp
│ │ ├── imgcodecs
│ │ ├── imgcodecs.hpp
│ │ ├── imgcodecs_c.h
│ │ ├── ios.h
│ │ ├── legacy
│ │ │ └── constants_c.h
│ │ └── macosx.h
│ │ ├── imgproc.hpp
│ │ ├── imgproc
│ │ ├── bindings.hpp
│ │ ├── detail
│ │ │ └── gcgraph.hpp
│ │ ├── hal
│ │ │ ├── hal.hpp
│ │ │ └── interface.h
│ │ ├── imgproc.hpp
│ │ ├── imgproc_c.h
│ │ ├── segmentation.hpp
│ │ └── types_c.h
│ │ ├── opencv.hpp
│ │ ├── opencv_modules.hpp
│ │ ├── photo.hpp
│ │ └── photo
│ │ ├── cuda.hpp
│ │ ├── legacy
│ │ └── constants_c.h
│ │ └── photo.hpp
│ ├── java
│ └── org
│ │ └── opencv
│ │ ├── android
│ │ ├── AsyncServiceHelper.java
│ │ ├── BaseLoaderCallback.java
│ │ ├── Camera2Renderer.java
│ │ ├── CameraActivity.java
│ │ ├── CameraBridgeViewBase.java
│ │ ├── CameraGLRendererBase.java
│ │ ├── CameraGLSurfaceView.java
│ │ ├── CameraRenderer.java
│ │ ├── FpsMeter.java
│ │ ├── InstallCallbackInterface.java
│ │ ├── JavaCamera2View.java
│ │ ├── JavaCameraView.java
│ │ ├── LoaderCallbackInterface.java
│ │ ├── OpenCVLoader.java
│ │ ├── StaticHelper.java
│ │ └── Utils.java
│ │ ├── calib3d
│ │ ├── Calib3d.java
│ │ ├── StereoBM.java
│ │ ├── StereoMatcher.java
│ │ ├── StereoSGBM.java
│ │ └── UsacParams.java
│ │ ├── core
│ │ ├── Algorithm.java
│ │ ├── Core.java
│ │ ├── CvException.java
│ │ ├── CvType.java
│ │ ├── DMatch.java
│ │ ├── KeyPoint.java
│ │ ├── Mat.java
│ │ ├── MatAt.kt
│ │ ├── MatMatMul.kt
│ │ ├── MatOfByte.java
│ │ ├── MatOfDMatch.java
│ │ ├── MatOfDouble.java
│ │ ├── MatOfFloat.java
│ │ ├── MatOfFloat4.java
│ │ ├── MatOfFloat6.java
│ │ ├── MatOfInt.java
│ │ ├── MatOfInt4.java
│ │ ├── MatOfKeyPoint.java
│ │ ├── MatOfPoint.java
│ │ ├── MatOfPoint2f.java
│ │ ├── MatOfPoint3.java
│ │ ├── MatOfPoint3f.java
│ │ ├── MatOfRect.java
│ │ ├── MatOfRect2d.java
│ │ ├── MatOfRotatedRect.java
│ │ ├── Point.java
│ │ ├── Point3.java
│ │ ├── Range.java
│ │ ├── Rect.java
│ │ ├── Rect2d.java
│ │ ├── RotatedRect.java
│ │ ├── Scalar.java
│ │ ├── Size.java
│ │ ├── TermCriteria.java
│ │ └── TickMeter.java
│ │ ├── engine
│ │ └── OpenCVEngineInterface.aidl
│ │ ├── features2d
│ │ ├── AKAZE.java
│ │ ├── AffineFeature.java
│ │ ├── AgastFeatureDetector.java
│ │ ├── BFMatcher.java
│ │ ├── BOWImgDescriptorExtractor.java
│ │ ├── BOWKMeansTrainer.java
│ │ ├── BOWTrainer.java
│ │ ├── BRISK.java
│ │ ├── DescriptorMatcher.java
│ │ ├── FastFeatureDetector.java
│ │ ├── Feature2D.java
│ │ ├── Features2d.java
│ │ ├── FlannBasedMatcher.java
│ │ ├── GFTTDetector.java
│ │ ├── KAZE.java
│ │ ├── MSER.java
│ │ ├── ORB.java
│ │ ├── SIFT.java
│ │ ├── SimpleBlobDetector.java
│ │ └── SimpleBlobDetector_Params.java
│ │ ├── imgcodecs
│ │ └── Imgcodecs.java
│ │ ├── imgproc
│ │ ├── CLAHE.java
│ │ ├── GeneralizedHough.java
│ │ ├── GeneralizedHoughBallard.java
│ │ ├── GeneralizedHoughGuil.java
│ │ ├── Imgproc.java
│ │ ├── IntelligentScissorsMB.java
│ │ ├── LineSegmentDetector.java
│ │ ├── Moments.java
│ │ └── Subdiv2D.java
│ │ ├── photo
│ │ ├── AlignExposures.java
│ │ ├── AlignMTB.java
│ │ ├── CalibrateCRF.java
│ │ ├── CalibrateDebevec.java
│ │ ├── CalibrateRobertson.java
│ │ ├── MergeDebevec.java
│ │ ├── MergeExposures.java
│ │ ├── MergeMertens.java
│ │ ├── MergeMertensForPipeline.java
│ │ ├── MergeRobertson.java
│ │ ├── Photo.java
│ │ ├── Tonemap.java
│ │ ├── TonemapDrago.java
│ │ ├── TonemapMantiuk.java
│ │ └── TonemapReinhard.java
│ │ ├── utils
│ │ └── Converters.java
│ │ ├── video
│ │ ├── BackgroundSubtractor.java
│ │ ├── BackgroundSubtractorKNN.java
│ │ ├── BackgroundSubtractorMOG2.java
│ │ ├── DISOpticalFlow.java
│ │ ├── DenseOpticalFlow.java
│ │ ├── FarnebackOpticalFlow.java
│ │ ├── KalmanFilter.java
│ │ ├── SparseOpticalFlow.java
│ │ ├── SparsePyrLKOpticalFlow.java
│ │ ├── Tracker.java
│ │ ├── TrackerDaSiamRPN.java
│ │ ├── TrackerDaSiamRPN_Params.java
│ │ ├── TrackerGOTURN.java
│ │ ├── TrackerGOTURN_Params.java
│ │ ├── TrackerMIL.java
│ │ ├── TrackerMIL_Params.java
│ │ ├── VariationalRefinement.java
│ │ └── Video.java
│ │ └── videoio
│ │ ├── VideoCapture.java
│ │ ├── VideoWriter.java
│ │ └── Videoio.java
│ ├── jniLibs
│ └── arm64-v8a
│ │ ├── libc++_shared.so
│ │ └── libopencv_java4.so
│ └── res
│ └── values
│ └── attrs.xml
├── screenshots
├── input-info.jpg
├── main-screen.jpg
├── media.jpg
├── parameters.jpg
└── toolbar.jpg
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/caches
5 | /.idea/libraries
6 | /.idea/modules.xml
7 | /.idea/workspace.xml
8 | /.idea/navEditor.xml
9 | /.idea/assetWizardSettings.xml
10 | /.idea/vcs.xml
11 | /.idea/codeStyles/*
12 | .DS_Store
13 | /build
14 | /captures
15 | .externalNativeBuild
16 | .cxx
17 | local.properties
18 | /app/keystore.config
19 | /app/release/output-metadata.json
20 | /app/release/app-release.apk
21 | /opencv/build
22 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | # Default ignored files
2 | /shelf/
3 | /workspace.xml
4 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/deploymentTargetSelector.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
20 |
21 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/.idea/kotlinc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/migrations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Dan
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # TimeLapse
2 |
3 | Create timelapse videos from another video or a series of photos (the photos will be sorted alphabetically).
4 |
5 | * [Main screen](#main-screen)
6 | * [Toolbar](#toolbar)
7 | * [Parameters](#parameters)
8 | * [Media](#media)
9 | * [Examples](#examples)
10 | * [Smooth](#smooth)
11 | * [Transition](#transition)
12 | * [Other](#other)
13 |
14 | ## Main screen
15 | 
16 |
17 |
18 | ### Toolbar
19 | 
20 |
21 | In order:
22 | * Open a video file
23 | * Save the generated video
24 | * ... contains
25 | * Open a series of images
26 | * Open an images folder
27 | * Save the last frame a image (full size)
28 | * Settings
29 |
30 | ### Parameters
31 | 
32 |
33 | * Speed: allow to sub-sample input frames (keep only one of "speed" frames). Example: 3x means use only one of 3 frames. 1x means use all frames.
34 | * Align: allow to align frame (for still). If needed you can create a mask.
35 | * Effect: You can select one from the list. Some effect have an extra parameter. For example for Average, 2x means it will output an average of 2 consecutive frames in a sliding window. Ex: 0 and 1, then 1 and 2 ... . It's better to experiment.
36 | * Output FPS: by default it will match the input but can be changed.
37 | * Duration: you can generate a smaller video to test it before creating the full one.
38 | * Orientation: auto (landscape or portrait, depends on the input), landscape or portrait
39 |
40 | ### Media
41 | 
42 |
43 | In order:
44 | * Play the original video (don't works if the input is a series of images)
45 | * Play the generated video (it will generate it if needed)
46 | * Stop the player
47 |
48 | ## Examples
49 |
50 | ### Smooth
51 |
52 | Original on left vs smooth 10x on right.
53 |
54 | 
55 |
56 | ### Transition
57 |
58 | Input images
59 | 1 | 2 | 3 | 4
60 | -- | -- | -- | --
61 |  |  |  | 
62 |
63 | Crop | No Crop
64 | -- | --
65 |  | 
66 |
67 | ### Other
68 |
69 | Normal | Endless Lightest Pixels
70 | -- | --
71 |  | 
72 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
23 | -keepclassmembers class com.dan.timelapse.utils.Settings {
24 | public *;
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/debug/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/debug/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/debug/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/debug/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/debug/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/debug/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/debug/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/debug/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/debug/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/debug/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/debug/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/debug/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/debug/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/debug/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3700B3
4 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
6 |
7 |
8 |
16 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/app/src/main/cpp/CMakeLists.txt:
--------------------------------------------------------------------------------
1 |
2 | # For more information about using CMake with Android Studio, read the
3 | # documentation: https://d.android.com/studio/projects/add-native-code.html
4 |
5 | # Sets the minimum version of CMake required to build the native library.
6 |
7 | cmake_minimum_required(VERSION 3.18.1)
8 |
9 | # Declares and names the project.
10 |
11 | project("timelapse")
12 |
13 | # Creates and names a library, sets it as either STATIC
14 | # or SHARED, and provides the relative paths to its source code.
15 | # You can define multiple libraries, and CMake builds them for you.
16 | # Gradle automatically packages shared libraries with your APK.
17 |
18 | add_library( # Sets the name of the library.
19 | timelapse
20 |
21 | # Sets the library as a shared library.
22 | SHARED
23 |
24 | # Provides a relative path to your source file(s).
25 | timelapse.cpp )
26 |
27 | # Searches for a specified prebuilt library and stores the path as a
28 | # variable. Because CMake includes system libraries in the search path by
29 | # default, you only need to specify the name of the public NDK library
30 | # you want to add. CMake verifies that the library exists before
31 | # completing its build.
32 |
33 | find_library( # Sets the name of the path variable.
34 | log-lib
35 |
36 | # Specifies the name of the NDK library that
37 | # you want CMake to locate.
38 | log )
39 |
40 | # Specifies libraries CMake should link to your target library. You
41 | # can link multiple libraries, such as libraries you define in this
42 | # build script, prebuilt third-party libraries, or system libraries.
43 |
44 | target_link_libraries( # Specifies the target library.
45 | timelapse
46 |
47 | # Links the target library to the log library
48 | # included in the NDK.
49 | -L../../../../../opencv/src/main/jniLibs/${ANDROID_ABI}
50 | opencv_java4
51 | ${log-lib} )
52 |
53 | include_directories(../../../../opencv/src/main/cpp/include)
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-playstore.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/main/ic_launcher-playstore.png
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/AddFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Core
4 | import org.opencv.core.Mat
5 |
6 | class AddFramesFilter(size: Int, nextConsumer: FramesConsumer)
7 | : MultiFramesFilter(size, true, nextConsumer) {
8 |
9 | private val sum = Mat()
10 |
11 | override fun stopFilter() {
12 | sum.release()
13 | super.stopFilter()
14 | }
15 |
16 | override fun consume(index: Int, removedFrame: Mat, frames: List) {
17 | val firstFrame = frames.first()
18 |
19 | if (sum.empty()) sum.create(firstFrame.size(), firstFrame.type())
20 |
21 | firstFrame.copyTo(sum)
22 | for( frameIndex in 1 until frames.size) {
23 | Core.add(sum, frames[frameIndex], sum)
24 | }
25 |
26 | next(index, sum)
27 | }
28 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/AverageFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.CvType.CV_8UC3
4 | import org.opencv.core.Mat
5 |
6 | class AverageFramesFilter(size: Int, nextConsumer: FramesConsumer)
7 | : SumFramesFilter(size, nextConsumer) {
8 | private val outputFrame = Mat()
9 |
10 | override fun stopFilter() {
11 | outputFrame.release()
12 | super.stopFilter()
13 | }
14 |
15 | override fun consumeSum(index: Int, sum: Mat, frames: List) {
16 | sum.convertTo(outputFrame, CV_8UC3, 1.0 / frames.size)
17 | next(index, outputFrame)
18 | }
19 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/AverageWeightedForLastFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Core
4 | import org.opencv.core.CvType
5 | import org.opencv.core.Mat
6 |
7 |
8 | class AverageWeightedForLastFramesFilter(size: Int, nextConsumer: FramesConsumer)
9 | : SumFramesFilter(size, nextConsumer) {
10 | private val extraSum = Mat()
11 | private val outputFrame = Mat()
12 |
13 | override fun stopFilter() {
14 | outputFrame.release()
15 | extraSum.release()
16 | super.stopFilter()
17 | }
18 |
19 | override fun consumeSum(index: Int, sum: Mat, frames: List) {
20 | val extra = frames.size / 2
21 | Core.addWeighted( sum, 1.0, frames.last(), extra.toDouble(), 0.0, extraSum, sum.type() )
22 | extraSum.convertTo(outputFrame, CvType.CV_8UC3, 1.0 / (frames.size + extra))
23 | next(index, outputFrame)
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/AverageWeightedForLightFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Core
4 | import org.opencv.core.CvType
5 | import org.opencv.core.Mat
6 |
7 |
8 | class AverageWeightedForLightFramesFilter(private val size: Int, nextConsumer: FramesConsumer)
9 | : MultiFramesFilter(size, true, nextConsumer) {
10 |
11 | companion object {
12 | private const val POWER = 6.0
13 | }
14 |
15 | private val power = Mat()
16 | private val sumWeighted = Mat()
17 | private val outputFrame = Mat()
18 |
19 | override fun stopFilter() {
20 | sumWeighted.release()
21 | power.release()
22 | outputFrame.release()
23 | super.stopFilter()
24 | }
25 |
26 | override fun consume(index: Int, removedFrame: Mat, frames: List) {
27 | frames.last().convertTo(power, CvType.CV_64FC3)
28 | Core.pow(power, POWER, power)
29 |
30 | if (sumWeighted.empty()) {
31 | sumWeighted.create(power.size(), power.type())
32 | power.copyTo(sumWeighted)
33 | } else {
34 | Core.add( sumWeighted, power, sumWeighted)
35 | }
36 |
37 | if (!removedFrame.empty()) {
38 | removedFrame.convertTo(power, CvType.CV_64FC3)
39 | Core.pow(power, POWER, power)
40 | Core.subtract( sumWeighted, power, sumWeighted)
41 | }
42 |
43 | if (frames.size >= size) {
44 | sumWeighted.convertTo(power, sumWeighted.type(), 1.0 / frames.size)
45 | Core.pow(power, 1.0 / POWER, power)
46 | power.convertTo(outputFrame, CvType.CV_8UC3)
47 | next(index, outputFrame)
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/DarkestPixelsFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import com.dan.timelapse.images.ImageTools
4 | import org.opencv.core.Mat
5 |
6 | class DarkestPixelsFramesFilter(val size: Int, nextConsumer: FramesConsumer)
7 | : MultiFramesFilter(size, false, nextConsumer) {
8 |
9 | private val outputFrame = Mat()
10 |
11 | override fun stopFilter() {
12 | outputFrame.release()
13 | super.stopFilter()
14 | }
15 |
16 | override fun consume(index: Int, removedFrame: Mat, frames: List) {
17 | ImageTools.mergeDarkestPixels(frames, outputFrame)
18 | next(index, outputFrame)
19 | }
20 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/EndlessAddFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Core
4 | import org.opencv.core.Mat
5 |
6 | class EndlessAddFramesFilter(nextConsumer: FramesConsumer) : FramesFilter(nextConsumer) {
7 | private val sum = Mat()
8 |
9 | override fun consume(index: Int, frame: Mat) {
10 | if (sum.empty()) {
11 | sum.create(frame.size(), frame.type())
12 | frame.copyTo(sum)
13 | } else {
14 | Core.add(sum, frame, sum)
15 | }
16 |
17 | next(index, sum)
18 | }
19 |
20 | override fun stopFilter() {
21 | sum.release()
22 | super.stopFilter()
23 | }
24 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/EndlessAverageFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Core
4 | import org.opencv.core.CvType
5 | import org.opencv.core.Mat
6 |
7 | class EndlessAverageFramesFilter(nextConsumer: FramesConsumer) : FramesFilter(nextConsumer) {
8 | private val sum = Mat()
9 | private val outputFrame = Mat()
10 | private var frameCounter = 0
11 |
12 | override fun consume(index: Int, frame: Mat) {
13 | frameCounter++
14 |
15 | if (sum.empty()) {
16 | frame.convertTo(sum, CvType.CV_32SC3)
17 | next(index, frame)
18 | return
19 | }
20 |
21 | Core.add( sum, frame, sum, Mat(), CvType.CV_32SC3)
22 | sum.convertTo(outputFrame, CvType.CV_8UC3, 1.0 / frameCounter)
23 | next(index, outputFrame)
24 | }
25 |
26 | override fun stopFilter() {
27 | frameCounter = 0
28 | sum.release()
29 | outputFrame.release()
30 | super.stopFilter()
31 | }
32 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/EndlessAverageWeightedForLastFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Core
4 | import org.opencv.core.CvType
5 | import org.opencv.core.Mat
6 |
7 |
8 | class EndlessAverageWeightedForLastFramesFilter(nextConsumer: FramesConsumer) : FramesFilter(nextConsumer) {
9 | private val sum = Mat()
10 | private val sumWeighted = Mat()
11 | private val outputFrame = Mat()
12 | private var size = 0
13 |
14 | override fun consume(index: Int, frame: Mat) {
15 | size++
16 |
17 | if (sum.empty()) {
18 | frame.convertTo(sum, CvType.CV_32SC3)
19 | next(index, frame)
20 | return
21 | }
22 |
23 | Core.add( sum, frame, sum, Mat(), CvType.CV_32SC3)
24 |
25 | val extra = size / 2
26 | Core.addWeighted( sum, 1.0, frame, extra.toDouble(), 0.0, sumWeighted, sum.type())
27 |
28 | sumWeighted.convertTo(outputFrame, CvType.CV_8UC3, 1.0 / (size + extra))
29 | next(index, outputFrame)
30 | }
31 |
32 | override fun stopFilter() {
33 | sum.release()
34 | sumWeighted.release()
35 | outputFrame.release()
36 | size = 0
37 | super.stopFilter()
38 | }
39 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/EndlessAverageWeightedForLightFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Core
4 | import org.opencv.core.CvType
5 | import org.opencv.core.Mat
6 |
7 | class EndlessAverageWeightedForLightFramesFilter(nextConsumer: FramesConsumer): FramesFilter(nextConsumer) {
8 |
9 | companion object {
10 | private const val POWER = 6.0
11 | }
12 |
13 | private val power = Mat()
14 | private val sumWeighted = Mat()
15 | private val outputFrame = Mat()
16 | private var size = 0
17 |
18 | override fun stopFilter() {
19 | sumWeighted.release()
20 | power.release()
21 | outputFrame.release()
22 | size = 0
23 | super.stopFilter()
24 | }
25 |
26 | override fun consume(index: Int, frame: Mat) {
27 | size++
28 |
29 | frame.convertTo(power, CvType.CV_64FC3)
30 | Core.pow(power, POWER, power)
31 |
32 | if (sumWeighted.empty()) {
33 | sumWeighted.create(power.size(), power.type())
34 | power.copyTo(sumWeighted)
35 | next(index, frame)
36 | return
37 | }
38 |
39 | Core.add( sumWeighted, power, sumWeighted)
40 | sumWeighted.convertTo(power, sumWeighted.type(), 1.0 / size)
41 | Core.pow(power, 1.0 / POWER, power)
42 | power.convertTo(outputFrame, CvType.CV_8UC3)
43 | next(index, outputFrame)
44 | }
45 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/EndlessDarkestPixelsFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import com.dan.timelapse.images.ImageTools
4 | import org.opencv.core.Mat
5 |
6 | class EndlessDarkestPixelsFramesFilter(nextConsumer: FramesConsumer): FramesFilter(nextConsumer) {
7 | private val outputFrame = Mat()
8 |
9 | override fun stopFilter() {
10 | outputFrame.release()
11 | super.stopFilter()
12 | }
13 |
14 | override fun consume(index: Int, frame: Mat) {
15 | if (outputFrame.empty()) {
16 | outputFrame.create(frame.size(), frame.type())
17 | frame.copyTo(outputFrame)
18 | next(index, frame)
19 | return
20 | }
21 |
22 | ImageTools.mergeDarkestPixels(listOf(outputFrame, frame), outputFrame)
23 | next(index, outputFrame)
24 | }
25 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/EndlessLightestPixelsFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import com.dan.timelapse.images.ImageTools
4 | import org.opencv.core.Mat
5 |
6 | class EndlessLightestPixelsFramesFilter(nextConsumer: FramesConsumer): FramesFilter(nextConsumer) {
7 | private val outputFrame = Mat()
8 |
9 | override fun stopFilter() {
10 | outputFrame.release()
11 | super.stopFilter()
12 | }
13 |
14 | override fun consume(index: Int, frame: Mat) {
15 | if (outputFrame.empty()) {
16 | outputFrame.create(frame.size(), frame.type())
17 | frame.copyTo(outputFrame)
18 | next(index, frame)
19 | return
20 | }
21 |
22 | ImageTools.mergeLightestPixels(listOf(outputFrame, frame), outputFrame)
23 | next(index, outputFrame)
24 | }
25 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/FramesConsumer.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Mat
4 |
5 | interface FramesConsumer {
6 | fun start()
7 | fun stop(canceled: Boolean)
8 | fun consume(index: Int, frame: Mat)
9 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/FramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Mat
4 |
5 | abstract class FramesFilter(private val nextConsumer: FramesConsumer) : FramesConsumer {
6 | open fun startFilter() {}
7 | open fun stopFilter() {}
8 |
9 | fun next(index: Int, frame: Mat) {
10 | nextConsumer.consume(index, frame)
11 | }
12 |
13 | override fun start() {
14 | startFilter()
15 | nextConsumer.start()
16 | }
17 |
18 | override fun stop(canceled: Boolean) {
19 | nextConsumer.stop(canceled)
20 | stopFilter()
21 | }
22 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/HDRFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Mat
4 | import org.opencv.photo.Photo
5 |
6 | class HDRFramesFilter(private val size: Int, nextConsumer: FramesConsumer)
7 | : MultiFramesFilter(size, true, nextConsumer) {
8 | private val hdrFrame = Mat()
9 | private val outputFrame = Mat()
10 | private val mergeMertens = Photo.createMergeMertensForPipeline()
11 |
12 | override fun stopFilter() {
13 | hdrFrame.release()
14 | outputFrame.release()
15 | mergeMertens.release()
16 | super.stopFilter()
17 | }
18 |
19 | override fun consume(index: Int, removedFrame: Mat, frames: List) {
20 | mergeMertens.push(frames.last())
21 | if (!removedFrame.empty()) mergeMertens.pop()
22 |
23 | if (frames.size < size) return
24 |
25 | mergeMertens.process(hdrFrame)
26 |
27 | if (!hdrFrame.empty()) {
28 | hdrFrame.convertTo(outputFrame, frames[0].type(), 255.0)
29 | next(index, outputFrame)
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/LightestPixelsFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import com.dan.timelapse.images.ImageTools
4 | import org.opencv.core.Mat
5 |
6 | class LightestPixelsFramesFilter(val size: Int, nextConsumer: FramesConsumer)
7 | : MultiFramesFilter(size, false, nextConsumer) {
8 |
9 | private val outputFrame = Mat()
10 |
11 | override fun stopFilter() {
12 | outputFrame.release()
13 | super.stopFilter()
14 | }
15 |
16 | override fun consume(index: Int, removedFrame: Mat, frames: List) {
17 | ImageTools.mergeLightestPixels(frames, outputFrame)
18 | next(index, outputFrame)
19 | }
20 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/MultiFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Mat
4 |
5 | abstract class MultiFramesFilter(private val size: Int, private val notifyOnPartial: Boolean, nextConsumer: FramesConsumer)
6 | : FramesFilter(nextConsumer) {
7 |
8 | private val frames = mutableListOf()
9 |
10 | abstract fun consume(index: Int, removedFrame: Mat, frames: List)
11 |
12 | override fun consume(index: Int, frame: Mat) {
13 | frames.add(frame.clone())
14 |
15 | val removedFrame = if (frames.size > size) frames.removeFirst() else Mat()
16 |
17 | if (frames.size >= size || notifyOnPartial) {
18 | consume(index, removedFrame, frames)
19 | }
20 |
21 | removedFrame.release() //force to free memory immediately
22 | }
23 |
24 | override fun stopFilter() {
25 | frames.forEach{ frame -> frame.release() } //force to free memory immediately
26 | frames.clear()
27 |
28 | super.stopFilter()
29 | }
30 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/SampleFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Mat
4 |
5 | class SampleFramesFilter(private val sample: Int, nextConsumer: FramesConsumer): FramesFilter(nextConsumer) {
6 | private var counter = 0
7 |
8 | override fun startFilter() {
9 | counter = 0
10 | super.startFilter()
11 | }
12 |
13 | override fun consume(index: Int, frame: Mat) {
14 | if (0 == counter) next(index, frame)
15 | counter++
16 | if (counter >= sample) counter = 0
17 | }
18 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/SumFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Core
4 | import org.opencv.core.CvType
5 | import org.opencv.core.Mat
6 |
7 |
8 | abstract class SumFramesFilter(private val size: Int, nextConsumer: FramesConsumer)
9 | : MultiFramesFilter(size, true, nextConsumer) {
10 | private val sum = Mat()
11 |
12 | override fun stopFilter() {
13 | sum.release()
14 | super.stopFilter()
15 | }
16 |
17 | abstract fun consumeSum(index: Int, sum: Mat, frames: List)
18 |
19 | override fun consume(index: Int, removedFrame: Mat, frames: List) {
20 | val newFrame = frames.last()
21 |
22 | if (sum.empty()) {
23 | newFrame.convertTo(sum, CvType.CV_16UC3)
24 | } else {
25 | Core.add( sum, newFrame, sum, Mat(), CvType.CV_16UC3)
26 | }
27 |
28 | if (!removedFrame.empty()) {
29 | Core.subtract( sum, removedFrame, sum, Mat(), CvType.CV_16UC3)
30 | }
31 |
32 | if (frames.size >= size) {
33 | consumeSum(index, sum, frames)
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/filters/TransitionFramesFilter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.filters
2 |
3 | import org.opencv.core.Core.addWeighted
4 | import org.opencv.core.Mat
5 |
6 | class TransitionFramesFilter(private val size: Int, nextConsumer: FramesConsumer)
7 | : FramesFilter(nextConsumer) {
8 | private val outputFrame = Mat()
9 | private var prevFrame = Mat()
10 |
11 | override fun stopFilter() {
12 | outputFrame.release()
13 | prevFrame.release()
14 | super.stopFilter()
15 | }
16 |
17 | override fun consume(index: Int, frame: Mat) {
18 | if (!prevFrame.empty()) {
19 | for(step in 1 until size) {
20 | val lastFrameWeight = (size - step).toDouble() / size
21 | addWeighted(prevFrame, lastFrameWeight, frame, 1.0 - lastFrameWeight, 0.0, outputFrame)
22 | next(index, outputFrame)
23 | }
24 | prevFrame.release()
25 | }
26 |
27 | next(index, frame)
28 | prevFrame = frame.clone()
29 | }
30 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/framesinput/FramesInput.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.framesinput
2 |
3 | import android.net.Uri
4 | import org.opencv.core.Mat
5 |
6 | abstract class FramesInput {
7 | companion object {
8 | fun fixName(original: String?): String {
9 | if (null == original) return "unknown"
10 | return original.split('.')[0]
11 | }
12 | }
13 |
14 | abstract val fps: Int
15 | abstract val name: String
16 | abstract val width: Int
17 | abstract val height: Int
18 | abstract val size: Int
19 | abstract val videoUri: Uri?
20 |
21 | abstract fun forEachFrame(callback: (Int, Int, Mat)->Boolean)
22 |
23 | fun firstFrame(): Mat {
24 | var firstFrame = Mat()
25 | forEachFrame { _, _, frame ->
26 | firstFrame = frame.clone()
27 | false
28 | }
29 | return firstFrame
30 | }
31 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/images/ImageTools.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.images
2 |
3 | import org.opencv.core.Mat
4 | import org.opencv.utils.Converters
5 |
6 | class ImageTools {
7 | companion object {
8 | fun mergeLightestPixels(images: List, output: Mat) {
9 | val imagesMat = Converters.vector_Mat_to_Mat(images)
10 | mergeLightestPixelsNative(imagesMat.nativeObj, output.nativeObj)
11 | }
12 |
13 | fun mergeDarkestPixels(images: List, output: Mat) {
14 | val imagesMat = Converters.vector_Mat_to_Mat(images)
15 | mergeDarkestPixelsNative(imagesMat.nativeObj, output.nativeObj)
16 | }
17 |
18 | private external fun mergeLightestPixelsNative(images: Long, output: Long)
19 | private external fun mergeDarkestPixelsNative(images: Long, output: Long)
20 | }
21 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/images/ImageWriter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.images
2 |
3 | import android.graphics.Bitmap
4 | import com.dan.timelapse.filters.FramesConsumer
5 | import org.opencv.android.Utils
6 | import org.opencv.core.Mat
7 | import java.io.File
8 |
9 | class ImageWriter(private val file: File, private val jpegQuality: Int)
10 | : FramesConsumer {
11 |
12 | private var lastFrame = Mat()
13 | private var _success = false
14 |
15 | val success: Boolean
16 | get() = _success
17 |
18 | override fun start() {
19 | }
20 |
21 | override fun stop(canceled: Boolean) {
22 | if (!canceled && !lastFrame.empty()) {
23 | val bitmap = Bitmap.createBitmap(
24 | lastFrame.width(),
25 | lastFrame.height(),
26 | Bitmap.Config.ARGB_8888
27 | )
28 |
29 | Utils.matToBitmap( lastFrame, bitmap)
30 |
31 | try {
32 | val outputStream = file.outputStream()
33 | bitmap.compress(Bitmap.CompressFormat.JPEG, jpegQuality, outputStream)
34 | outputStream.close()
35 | _success = true
36 | } catch (e: Exception) {
37 | e.printStackTrace()
38 | }
39 | }
40 |
41 | lastFrame.release()
42 | }
43 |
44 | override fun consume(index: Int, frame: Mat) {
45 | lastFrame.create(frame.size(), frame.type())
46 | frame.copyTo(lastFrame)
47 | }
48 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/screens/AppFragment.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.screens
2 |
3 | import androidx.fragment.app.Fragment
4 | import com.dan.timelapse.MainActivity
5 |
6 | open class AppFragment(val activity: MainActivity) : Fragment() {
7 |
8 | val settings = activity.settings
9 |
10 | fun runOnUiThread(action: ()->Unit) {
11 | activity.runOnUiThread(action)
12 | }
13 |
14 | open fun onBack(homeButton: Boolean) {
15 | }
16 |
17 | fun showToast(message: String) {
18 | runOnUiThread {
19 | activity.showToast(message)
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/utils/OutputParams.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.utils
2 |
3 | class OutputParams {
4 | companion object {
5 | const val VALUE_UNKNOWN = Int.MIN_VALUE
6 |
7 | const val COMPARE_NOT_CHANGED = 0
8 | const val COMPARE_CHANGED_ONLY_FPS = 1
9 | const val COMPARE_CHANGED = 2
10 |
11 | const val KEY_H265 = "H265"
12 | const val KEY_CROP = "CROP"
13 | const val KEY_FPS = "FPS"
14 | const val KEY_SPEED = "SPEED"
15 | const val KEY_ALIGN = "ALIGN"
16 | const val KEY_EFFECT = "EFFECT"
17 | const val KEY_EFFECT_SIZE = "EFFECT-SIZE"
18 | const val KEY_DURATION = "DURATION"
19 | const val KEY_WIDTH = "WIDTH"
20 | const val KEY_HEIGHT = "HEIGHT"
21 |
22 | private fun compare(a: Map, b: Map): Int {
23 | var fpsChanged = false
24 |
25 | a.forEach { (key, value) ->
26 | if (value != b.getOrDefault(key, VALUE_UNKNOWN)) {
27 | if (KEY_FPS == key) {
28 | fpsChanged = true
29 | } else {
30 | return COMPARE_CHANGED
31 | }
32 | }
33 | }
34 |
35 | return if (fpsChanged) COMPARE_CHANGED_ONLY_FPS else COMPARE_NOT_CHANGED
36 | }
37 | }
38 |
39 | private val _params = mutableMapOf()
40 |
41 | fun set(key: String, value: Int) {
42 | _params[key] = value
43 | }
44 |
45 | fun get(key: String): Int {
46 | return _params.getOrDefault(key, VALUE_UNKNOWN)
47 | }
48 |
49 | fun compareWith(other: OutputParams?): Int {
50 | if (null == other) return COMPARE_CHANGED
51 |
52 | val compare1 = compare(_params, other._params)
53 | if (COMPARE_CHANGED == compare1) return COMPARE_CHANGED
54 |
55 | val compare2 = compare(other._params, _params)
56 | if (COMPARE_CHANGED == compare2) return COMPARE_CHANGED
57 |
58 | if (COMPARE_CHANGED_ONLY_FPS == compare1 || COMPARE_CHANGED_ONLY_FPS == compare2) return COMPARE_CHANGED_ONLY_FPS
59 | return COMPARE_NOT_CHANGED
60 | }
61 | }
--------------------------------------------------------------------------------
/app/src/main/java/com/dan/timelapse/video/VideoWriter.kt:
--------------------------------------------------------------------------------
1 | package com.dan.timelapse.video
2 |
3 | import com.dan.timelapse.filters.FramesConsumer
4 | import org.opencv.core.Mat
5 |
6 | class VideoWriter(
7 | private val path: String,
8 | private val fps: Int,
9 | private val h265: Boolean)
10 | : FramesConsumer {
11 |
12 | private var encoder: VideoEncoder? = null
13 |
14 | override fun start() {
15 |
16 | }
17 |
18 | override fun stop(canceled: Boolean) {
19 | encoder?.let {
20 | it.release()
21 | encoder = null
22 | }
23 | }
24 |
25 | override fun consume(index: Int, frame: Mat) {
26 | if (null == encoder) {
27 | encoder = VideoEncoder.create(path, fps, frame.width(), frame.height(), 0, h265)
28 | }
29 |
30 | encoder?.write(frame)
31 | }
32 | }
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
11 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/busy_dialog.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
14 |
15 |
22 |
23 |
33 |
34 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/app/src/main/res/menu/app_menu.xml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values-night/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFBB86FC
4 | #FF6200EE
5 | #FF3700B3
6 | #FF03DAC5
7 | #FF018786
8 | #FF000000
9 | #FFFFFFFF
10 |
--------------------------------------------------------------------------------
/app/src/main/res/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3700B3
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | TimeLapse
3 |
4 | - None
5 | - Average
6 | - Endless average
7 | - Average weighted for last
8 | - Endless average weighted for last
9 | - Average weighted for light
10 | - Endless average weighted for light
11 | - Lightest pixels
12 | - Endless lightest pixels
13 | - Add
14 | - Endless add
15 | - HDR
16 | - Transition
17 | - Darkest pixels
18 | - Endless darkest pixels
19 |
20 |
21 | - Auto
22 | - Landscape
23 | - Portrait
24 |
25 |
--------------------------------------------------------------------------------
/app/src/main/res/values/themes.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
16 |
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 | buildscript {
3 | ext.kotlin_version = '1.5.10'
4 | repositories {
5 | google()
6 | jcenter()
7 | }
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.1.3'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 |
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 | }
22 | }
23 |
24 | task clean(type: Delete) {
25 | delete rootProject.buildDir
26 | }
--------------------------------------------------------------------------------
/examples/other/endless-lightest-pixels.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/examples/other/endless-lightest-pixels.gif
--------------------------------------------------------------------------------
/examples/other/simple.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/examples/other/simple.gif
--------------------------------------------------------------------------------
/examples/smooth/original_vs_smooth_10x.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/examples/smooth/original_vs_smooth_10x.gif
--------------------------------------------------------------------------------
/examples/transition/crop.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/examples/transition/crop.gif
--------------------------------------------------------------------------------
/examples/transition/input_1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/examples/transition/input_1.jpg
--------------------------------------------------------------------------------
/examples/transition/input_2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/examples/transition/input_2.jpg
--------------------------------------------------------------------------------
/examples/transition/input_3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/examples/transition/input_3.jpg
--------------------------------------------------------------------------------
/examples/transition/input_4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/examples/transition/input_4.jpg
--------------------------------------------------------------------------------
/examples/transition/no-crop.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/examples/transition/no-crop.gif
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app"s APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 | # Kotlin code style for this project: "official" or "obsolete":
21 | kotlin.code.style=official
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Jun 30 15:02:00 CEST 2022
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
7 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/opencv/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 |
3 | android {
4 | compileSdkVersion 30
5 |
6 | defaultConfig {
7 | minSdkVersion 29
8 | targetSdkVersion 30
9 | }
10 |
11 | buildTypes {
12 | release {
13 | minifyEnabled false
14 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
15 | }
16 | }
17 | sourceSets {
18 | main {
19 | jni {
20 | srcDirs 'src/main/jni', 'src/main/jnilibs'
21 | }
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/opencv/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
--------------------------------------------------------------------------------
/opencv/src/main/aidl/org/opencv/engine/OpenCVEngineInterface.aidl:
--------------------------------------------------------------------------------
1 | package org.opencv.engine;
2 |
3 | /**
4 | * Class provides a Java interface for OpenCV Engine Service. It's synchronous with native OpenCVEngine class.
5 | */
6 | interface OpenCVEngineInterface
7 | {
8 | /**
9 | * @return Returns service version.
10 | */
11 | int getEngineVersion();
12 |
13 | /**
14 | * Finds an installed OpenCV library.
15 | * @param OpenCV version.
16 | * @return Returns path to OpenCV native libs or an empty string if OpenCV can not be found.
17 | */
18 | String getLibPathByVersion(String version);
19 |
20 | /**
21 | * Tries to install defined version of OpenCV from Google Play Market.
22 | * @param OpenCV version.
23 | * @return Returns true if installation was successful or OpenCV package has been already installed.
24 | */
25 | boolean installVersion(String version);
26 |
27 | /**
28 | * Returns list of libraries in loading order, separated by semicolon.
29 | * @param OpenCV version.
30 | * @return Returns names of OpenCV libraries, separated by semicolon.
31 | */
32 | String getLibraryList(String version);
33 | }
34 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/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 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/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 | #ifdef _MSC_VER
11 | #pragma warning(push)
12 | #pragma warning(disable: 4265)
13 | #endif
14 |
15 | namespace cv
16 | {
17 |
18 | //! @addtogroup core
19 | //! @{
20 |
21 | class BufferPoolController
22 | {
23 | protected:
24 | ~BufferPoolController() { }
25 | public:
26 | virtual size_t getReservedSize() const = 0;
27 | virtual size_t getMaxReservedSize() const = 0;
28 | virtual void setMaxReservedSize(size_t size) = 0;
29 | virtual void freeAllReservedBuffers() = 0;
30 | };
31 |
32 | //! @}
33 |
34 | }
35 |
36 | #ifdef _MSC_VER
37 | #pragma warning(pop)
38 | #endif
39 |
40 | #endif // OPENCV_CORE_BUFFER_POOL_HPP
41 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/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 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/detail/async_promise.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 | #ifndef OPENCV_CORE_ASYNC_PROMISE_HPP
6 | #define OPENCV_CORE_ASYNC_PROMISE_HPP
7 |
8 | #include "../async.hpp"
9 |
10 | #include "exception_ptr.hpp"
11 |
12 | namespace cv {
13 |
14 | /** @addtogroup core_async
15 | @{
16 | */
17 |
18 |
19 | /** @brief Provides result of asynchronous operations
20 |
21 | */
22 | class CV_EXPORTS AsyncPromise
23 | {
24 | public:
25 | ~AsyncPromise() CV_NOEXCEPT;
26 | AsyncPromise() CV_NOEXCEPT;
27 | explicit AsyncPromise(const AsyncPromise& o) CV_NOEXCEPT;
28 | AsyncPromise& operator=(const AsyncPromise& o) CV_NOEXCEPT;
29 | void release() CV_NOEXCEPT;
30 |
31 | /** Returns associated AsyncArray
32 | @note Can be called once
33 | */
34 | AsyncArray getArrayResult();
35 |
36 | /** Stores asynchronous result.
37 | @param[in] value result
38 | */
39 | void setValue(InputArray value);
40 |
41 | // TODO "move" setters
42 |
43 | #if CV__EXCEPTION_PTR
44 | /** Stores exception.
45 | @param[in] exception exception to be raised in AsyncArray
46 | */
47 | void setException(std::exception_ptr exception);
48 | #endif
49 |
50 | /** Stores exception.
51 | @param[in] exception exception to be raised in AsyncArray
52 | */
53 | void setException(const cv::Exception& exception);
54 |
55 | #ifdef CV_CXX11
56 | explicit AsyncPromise(AsyncPromise&& o) { p = o.p; o.p = NULL; }
57 | AsyncPromise& operator=(AsyncPromise&& o) CV_NOEXCEPT { std::swap(p, o.p); return *this; }
58 | #endif
59 |
60 |
61 | // PImpl
62 | typedef struct AsyncArray::Impl Impl; friend struct AsyncArray::Impl;
63 | inline void* _getImpl() const CV_NOEXCEPT { return p; }
64 | protected:
65 | Impl* p;
66 | };
67 |
68 |
69 | //! @}
70 | } // namespace
71 | #endif // OPENCV_CORE_ASYNC_PROMISE_HPP
72 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/detail/dispatch_helper.impl.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 | #ifndef OPENCV_CORE_DETAIL_DISPATCH_HELPER_IMPL_HPP
6 | #define OPENCV_CORE_DETAIL_DISPATCH_HELPER_IMPL_HPP
7 |
8 | //! @cond IGNORED
9 |
10 | namespace cv {
11 | namespace detail {
12 |
13 | template class Functor, typename... Args>
14 | static inline void depthDispatch(const int depth, Args&&... args)
15 | {
16 | switch (depth)
17 | {
18 | case CV_8U:
19 | Functor{}(std::forward(args)...);
20 | break;
21 | case CV_8S:
22 | Functor{}(std::forward(args)...);
23 | break;
24 | case CV_16U:
25 | Functor{}(std::forward(args)...);
26 | break;
27 | case CV_16S:
28 | Functor{}(std::forward(args)...);
29 | break;
30 | case CV_32S:
31 | Functor{}(std::forward(args)...);
32 | break;
33 | case CV_32F:
34 | Functor{}(std::forward(args)...);
35 | break;
36 | case CV_64F:
37 | Functor{}(std::forward(args)...);
38 | break;
39 | case CV_16F:
40 | default:
41 | CV_Error(cv::Error::BadDepth, "Unsupported matrix type.");
42 | };
43 | }
44 |
45 | }}
46 |
47 | //! @endcond
48 |
49 | #endif //OPENCV_CORE_DETAIL_DISPATCH_HELPER_IMPL_HPP
50 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/detail/exception_ptr.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 | #ifndef OPENCV_CORE_DETAILS_EXCEPTION_PTR_H
6 | #define OPENCV_CORE_DETAILS_EXCEPTION_PTR_H
7 |
8 | #ifndef CV__EXCEPTION_PTR
9 | # if defined(__ANDROID__) && defined(ATOMIC_INT_LOCK_FREE) && ATOMIC_INT_LOCK_FREE < 2
10 | # define CV__EXCEPTION_PTR 0 // Not supported, details: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58938
11 | # elif defined(CV_CXX11)
12 | # define CV__EXCEPTION_PTR 1
13 | # elif defined(_MSC_VER)
14 | # define CV__EXCEPTION_PTR (_MSC_VER >= 1600)
15 | # elif defined(__clang__)
16 | # define CV__EXCEPTION_PTR 0 // C++11 only (see above)
17 | # elif defined(__GNUC__) && defined(__GXX_EXPERIMENTAL_CXX0X__)
18 | # define CV__EXCEPTION_PTR (__GXX_EXPERIMENTAL_CXX0X__ > 0)
19 | # endif
20 | #endif
21 | #ifndef CV__EXCEPTION_PTR
22 | # define CV__EXCEPTION_PTR 0
23 | #elif CV__EXCEPTION_PTR
24 | # include // std::exception_ptr
25 | #endif
26 |
27 | #endif // OPENCV_CORE_DETAILS_EXCEPTION_PTR_H
28 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/opencl/runtime/opencl_clblas.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 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_CORE_OCL_RUNTIME_CLAMDBLAS_HPP
43 | #define OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP
44 |
45 | #ifdef HAVE_CLAMDBLAS
46 |
47 | #include "opencl_core.hpp"
48 |
49 | #include "autogenerated/opencl_clblas.hpp"
50 |
51 | #endif // HAVE_CLAMDBLAS
52 |
53 | #endif // OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP
54 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/opencl/runtime/opencl_clfft.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 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_CORE_OCL_RUNTIME_CLAMDFFT_HPP
43 | #define OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP
44 |
45 | #ifdef HAVE_CLAMDFFT
46 |
47 | #include "opencl_core.hpp"
48 |
49 | #include "autogenerated/opencl_clfft.hpp"
50 |
51 | #endif // HAVE_CLAMDFFT
52 |
53 | #endif // OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP
54 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/opencl/runtime/opencl_core_wrappers.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 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_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP
43 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP
44 |
45 | #include "autogenerated/opencl_core_wrappers.hpp"
46 |
47 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_WRAPPERS_HPP
48 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/opencl/runtime/opencl_gl.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 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_CORE_OCL_RUNTIME_OPENCL_GL_HPP
43 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_HPP
44 |
45 | #if defined HAVE_OPENCL && defined HAVE_OPENGL
46 |
47 | #include "opencl_core.hpp"
48 |
49 | #include "autogenerated/opencl_gl.hpp"
50 |
51 | #endif // defined HAVE_OPENCL && defined HAVE_OPENGL
52 |
53 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_HPP
54 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/opencl/runtime/opencl_gl_wrappers.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 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_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP
43 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP
44 |
45 | #include "autogenerated/opencl_gl_wrappers.hpp"
46 |
47 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_GL_WRAPPERS_HPP
48 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/opencl/runtime/opencl_svm_definitions.hpp:
--------------------------------------------------------------------------------
1 | /* See LICENSE file in the root OpenCV directory */
2 |
3 | #ifndef OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_DEFINITIONS_HPP
4 | #define OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_DEFINITIONS_HPP
5 |
6 | #if defined(HAVE_OPENCL_SVM)
7 | #if defined(CL_VERSION_2_0)
8 |
9 | // OpenCL 2.0 contains SVM definitions
10 |
11 | #else
12 |
13 | typedef cl_bitfield cl_device_svm_capabilities;
14 | typedef cl_bitfield cl_svm_mem_flags;
15 | typedef cl_uint cl_kernel_exec_info;
16 |
17 | //
18 | // TODO Add real values after OpenCL 2.0 release
19 | //
20 |
21 | #ifndef CL_DEVICE_SVM_CAPABILITIES
22 | #define CL_DEVICE_SVM_CAPABILITIES 0x1053
23 |
24 | #define CL_DEVICE_SVM_COARSE_GRAIN_BUFFER (1 << 0)
25 | #define CL_DEVICE_SVM_FINE_GRAIN_BUFFER (1 << 1)
26 | #define CL_DEVICE_SVM_FINE_GRAIN_SYSTEM (1 << 2)
27 | #define CL_DEVICE_SVM_ATOMICS (1 << 3)
28 | #endif
29 |
30 | #ifndef CL_MEM_SVM_FINE_GRAIN_BUFFER
31 | #define CL_MEM_SVM_FINE_GRAIN_BUFFER (1 << 10)
32 | #endif
33 |
34 | #ifndef CL_MEM_SVM_ATOMICS
35 | #define CL_MEM_SVM_ATOMICS (1 << 11)
36 | #endif
37 |
38 |
39 | #endif // CL_VERSION_2_0
40 | #endif // HAVE_OPENCL_SVM
41 |
42 | #endif // OPENCV_CORE_OCL_RUNTIME_OPENCL_SVM_DEFINITIONS_HPP
43 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/ovx.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) 2016, Intel Corporation, all rights reserved.
6 | // Third party copyrights are property of their respective owners.
7 |
8 | // OpenVX related definitions and declarations
9 |
10 | #pragma once
11 | #ifndef OPENCV_OVX_HPP
12 | #define OPENCV_OVX_HPP
13 |
14 | #include "cvdef.h"
15 |
16 | namespace cv
17 | {
18 | /// Check if use of OpenVX is possible
19 | CV_EXPORTS_W bool haveOpenVX();
20 |
21 | /// Check if use of OpenVX is enabled
22 | CV_EXPORTS_W bool useOpenVX();
23 |
24 | /// Enable/disable use of OpenVX
25 | CV_EXPORTS_W void setUseOpenVX(bool flag);
26 | } // namespace cv
27 |
28 | #endif // OPENCV_OVX_HPP
29 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/parallel/backend/parallel_for.openmp.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 | #ifndef OPENCV_CORE_PARALLEL_FOR_OPENMP_HPP
6 | #define OPENCV_CORE_PARALLEL_FOR_OPENMP_HPP
7 |
8 | #include "opencv2/core/parallel/parallel_backend.hpp"
9 |
10 | #if !defined(_OPENMP) && !defined(OPENCV_SKIP_OPENMP_PRESENSE_CHECK)
11 | #error "This file must be compiled with enabled OpenMP"
12 | #endif
13 |
14 | #include
15 |
16 | namespace cv { namespace parallel { namespace openmp {
17 |
18 | /** OpenMP parallel_for API implementation
19 | *
20 | * @sa setParallelForBackend
21 | * @ingroup core_parallel_backend
22 | */
23 | class ParallelForBackend : public ParallelForAPI
24 | {
25 | protected:
26 | int numThreads;
27 | int numThreadsMax;
28 | public:
29 | ParallelForBackend()
30 | {
31 | numThreads = 0;
32 | numThreadsMax = omp_get_max_threads();
33 | }
34 |
35 | virtual ~ParallelForBackend() {}
36 |
37 | virtual void parallel_for(int tasks, FN_parallel_for_body_cb_t body_callback, void* callback_data) CV_OVERRIDE
38 | {
39 | #pragma omp parallel for schedule(dynamic) num_threads(numThreads > 0 ? numThreads : numThreadsMax)
40 | for (int i = 0; i < tasks; ++i)
41 | body_callback(i, i + 1, callback_data);
42 | }
43 |
44 | virtual int getThreadNum() const CV_OVERRIDE
45 | {
46 | return omp_get_thread_num();
47 | }
48 |
49 | virtual int getNumThreads() const CV_OVERRIDE
50 | {
51 | return numThreads > 0
52 | ? numThreads
53 | : numThreadsMax;
54 | }
55 |
56 | virtual int setNumThreads(int nThreads) CV_OVERRIDE
57 | {
58 | int oldNumThreads = numThreads;
59 | numThreads = nThreads;
60 | // nothing needed as numThreads is used in #pragma omp parallel for directly
61 | return oldNumThreads;
62 | }
63 |
64 | const char* getName() const CV_OVERRIDE
65 | {
66 | return "openmp";
67 | }
68 | };
69 |
70 | }}} // namespace
71 |
72 | #endif // OPENCV_CORE_PARALLEL_FOR_OPENMP_HPP
73 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/utils/allocator_stats.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 | #ifndef OPENCV_CORE_ALLOCATOR_STATS_HPP
6 | #define OPENCV_CORE_ALLOCATOR_STATS_HPP
7 |
8 | #include "../cvdef.h"
9 |
10 | namespace cv { namespace utils {
11 |
12 | class AllocatorStatisticsInterface
13 | {
14 | protected:
15 | AllocatorStatisticsInterface() {}
16 | virtual ~AllocatorStatisticsInterface() {}
17 | public:
18 | virtual uint64_t getCurrentUsage() const = 0;
19 | virtual uint64_t getTotalUsage() const = 0;
20 | virtual uint64_t getNumberOfAllocations() const = 0;
21 | virtual uint64_t getPeakUsage() const = 0;
22 |
23 | /** set peak usage = current usage */
24 | virtual void resetPeakUsage() = 0;
25 | };
26 |
27 | }} // namespace
28 |
29 | #endif // OPENCV_CORE_ALLOCATOR_STATS_HPP
30 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/utils/fp_control_utils.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 | #ifndef OPENCV_CORE_FP_CONTROL_UTILS_HPP
6 | #define OPENCV_CORE_FP_CONTROL_UTILS_HPP
7 |
8 | namespace cv {
9 |
10 | namespace details {
11 |
12 | struct FPDenormalsModeState
13 | {
14 | uint32_t reserved[16]; // 64-bytes
15 | }; // FPDenormalsModeState
16 |
17 | CV_EXPORTS void setFPDenormalsIgnoreHint(bool ignore, CV_OUT FPDenormalsModeState& state);
18 | CV_EXPORTS int saveFPDenormalsState(CV_OUT FPDenormalsModeState& state);
19 | CV_EXPORTS bool restoreFPDenormalsState(const FPDenormalsModeState& state);
20 |
21 | class FPDenormalsIgnoreHintScope
22 | {
23 | public:
24 | inline explicit FPDenormalsIgnoreHintScope(bool ignore = true)
25 | {
26 | details::setFPDenormalsIgnoreHint(ignore, saved_state);
27 | }
28 |
29 | inline explicit FPDenormalsIgnoreHintScope(const FPDenormalsModeState& state)
30 | {
31 | details::saveFPDenormalsState(saved_state);
32 | details::restoreFPDenormalsState(state);
33 | }
34 |
35 | inline ~FPDenormalsIgnoreHintScope()
36 | {
37 | details::restoreFPDenormalsState(saved_state);
38 | }
39 |
40 | protected:
41 | FPDenormalsModeState saved_state;
42 | }; // FPDenormalsIgnoreHintScope
43 |
44 | class FPDenormalsIgnoreHintScopeNOOP
45 | {
46 | public:
47 | inline FPDenormalsIgnoreHintScopeNOOP(bool ignore = true) { CV_UNUSED(ignore); }
48 | inline FPDenormalsIgnoreHintScopeNOOP(const FPDenormalsModeState& state) { CV_UNUSED(state); }
49 | inline ~FPDenormalsIgnoreHintScopeNOOP() { }
50 | }; // FPDenormalsIgnoreHintScopeNOOP
51 |
52 | } // namespace details
53 |
54 |
55 | // Should depend on target compilation architecture only
56 | // Note: previously added archs should NOT be removed to preserve ABI compatibility
57 | #if defined(OPENCV_SUPPORTS_FP_DENORMALS_HINT)
58 | // preserve configuration overloading through ports
59 | #elif defined(__i386__) || defined(__x86_64__) || defined(_M_X64) || defined(_X86_)
60 | typedef details::FPDenormalsIgnoreHintScope FPDenormalsIgnoreHintScope;
61 | #define OPENCV_SUPPORTS_FP_DENORMALS_HINT 1
62 | #else
63 | #define OPENCV_SUPPORTS_FP_DENORMALS_HINT 0
64 | typedef details::FPDenormalsIgnoreHintScopeNOOP FPDenormalsIgnoreHintScope;
65 | #endif
66 |
67 | } // namespace cv
68 |
69 | #endif // OPENCV_CORE_FP_CONTROL_UTILS_HPP
70 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/utils/logger.defines.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 | #ifndef OPENCV_LOGGER_DEFINES_HPP
6 | #define OPENCV_LOGGER_DEFINES_HPP
7 |
8 | //! @addtogroup core_logging
9 | //! @{
10 |
11 | // Supported logging levels and their semantic
12 | #define CV_LOG_LEVEL_SILENT 0 //!< for using in setLogLevel() call
13 | #define CV_LOG_LEVEL_FATAL 1 //!< Fatal (critical) error (unrecoverable internal error)
14 | #define CV_LOG_LEVEL_ERROR 2 //!< Error message
15 | #define CV_LOG_LEVEL_WARN 3 //!< Warning message
16 | #define CV_LOG_LEVEL_INFO 4 //!< Info message
17 | #define CV_LOG_LEVEL_DEBUG 5 //!< Debug message. Disabled in the "Release" build.
18 | #define CV_LOG_LEVEL_VERBOSE 6 //!< Verbose (trace) messages. Requires verbosity level. Disabled in the "Release" build.
19 |
20 | namespace cv {
21 | namespace utils {
22 | namespace logging {
23 |
24 | //! Supported logging levels and their semantic
25 | enum LogLevel {
26 | LOG_LEVEL_SILENT = 0, //!< for using in setLogVevel() call
27 | LOG_LEVEL_FATAL = 1, //!< Fatal (critical) error (unrecoverable internal error)
28 | LOG_LEVEL_ERROR = 2, //!< Error message
29 | LOG_LEVEL_WARNING = 3, //!< Warning message
30 | LOG_LEVEL_INFO = 4, //!< Info message
31 | LOG_LEVEL_DEBUG = 5, //!< Debug message. Disabled in the "Release" build.
32 | LOG_LEVEL_VERBOSE = 6, //!< Verbose (trace) messages. Requires verbosity level. Disabled in the "Release" build.
33 | #ifndef CV_DOXYGEN
34 | ENUM_LOG_LEVEL_FORCE_INT = INT_MAX
35 | #endif
36 | };
37 |
38 | }}} // namespace
39 |
40 | //! @}
41 |
42 | #endif // OPENCV_LOGGER_DEFINES_HPP
43 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/utils/logtag.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 | #ifndef OPENCV_CORE_LOGTAG_HPP
6 | #define OPENCV_CORE_LOGTAG_HPP
7 |
8 | #include "opencv2/core/cvstd.hpp"
9 | #include "logger.defines.hpp"
10 |
11 | namespace cv {
12 | namespace utils {
13 | namespace logging {
14 |
15 | struct LogTag
16 | {
17 | const char* name;
18 | LogLevel level;
19 |
20 | inline LogTag(const char* _name, LogLevel _level)
21 | : name(_name)
22 | , level(_level)
23 | {}
24 | };
25 |
26 | }}}
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/core/version.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 | #ifndef OPENCV_VERSION_HPP
6 | #define OPENCV_VERSION_HPP
7 |
8 | #define CV_VERSION_MAJOR 4
9 | #define CV_VERSION_MINOR 5
10 | #define CV_VERSION_REVISION 5
11 | #define CV_VERSION_STATUS "-dev"
12 |
13 | #define CVAUX_STR_EXP(__A) #__A
14 | #define CVAUX_STR(__A) CVAUX_STR_EXP(__A)
15 |
16 | #define CVAUX_STRW_EXP(__A) L ## #__A
17 | #define CVAUX_STRW(__A) CVAUX_STRW_EXP(__A)
18 |
19 | #define CV_VERSION CVAUX_STR(CV_VERSION_MAJOR) "." CVAUX_STR(CV_VERSION_MINOR) "." CVAUX_STR(CV_VERSION_REVISION) CV_VERSION_STATUS
20 |
21 | /* old style version constants*/
22 | #define CV_MAJOR_VERSION CV_VERSION_MAJOR
23 | #define CV_MINOR_VERSION CV_VERSION_MINOR
24 | #define CV_SUBMINOR_VERSION CV_VERSION_REVISION
25 |
26 | #endif // OPENCV_VERSION_HPP
27 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/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 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/features2d/hal/interface.h:
--------------------------------------------------------------------------------
1 | #ifndef OPENCV_FEATURE2D_HAL_INTERFACE_H
2 | #define OPENCV_FEATURE2D_HAL_INTERFACE_H
3 |
4 | #include "opencv2/core/cvdef.h"
5 | //! @addtogroup features2d_hal_interface
6 | //! @{
7 |
8 | //! @name Fast feature detector types
9 | //! @sa cv::FastFeatureDetector
10 | //! @{
11 | #define CV_HAL_TYPE_5_8 0
12 | #define CV_HAL_TYPE_7_12 1
13 | #define CV_HAL_TYPE_9_16 2
14 | //! @}
15 |
16 | //! @name Key point
17 | //! @sa cv::KeyPoint
18 | //! @{
19 | struct CV_EXPORTS cvhalKeyPoint
20 | {
21 | float x;
22 | float y;
23 | float size;
24 | float angle;
25 | float response;
26 | int octave;
27 | int class_id;
28 | };
29 | //! @}
30 |
31 | //! @}
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/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 | //! @cond IGNORED
34 |
35 | #ifdef FLANN_VERSION_
36 | #undef FLANN_VERSION_
37 | #endif
38 | #define FLANN_VERSION_ "1.6.10"
39 |
40 | //! @endcond
41 |
42 | #endif /* OPENCV_FLANN_CONFIG_H_ */
43 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/flann/dummy.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef OPENCV_FLANN_DUMMY_H_
3 | #define OPENCV_FLANN_DUMMY_H_
4 |
5 | //! @cond IGNORED
6 |
7 | namespace cvflann
8 | {
9 |
10 | CV_DEPRECATED inline void dummyfunc() {}
11 |
12 | }
13 |
14 | //! @endcond
15 |
16 | #endif /* OPENCV_FLANN_DUMMY_H_ */
17 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/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 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/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 | #if CV_VERSION_MAJOR <= 4
35 |
36 | //! @cond IGNORED
37 |
38 | #include "opencv2/core.hpp"
39 |
40 | namespace cvflann
41 | {
42 |
43 | class FLANNException : public cv::Exception
44 | {
45 | public:
46 | FLANNException(const char* message) : cv::Exception(0, message, "", __FILE__, __LINE__) { }
47 |
48 | FLANNException(const cv::String& message) : cv::Exception(0, message, "", __FILE__, __LINE__) { }
49 | };
50 |
51 | }
52 |
53 | #define FLANN_THROW(TYPE, STR) throw FLANNException(STR)
54 |
55 | #else
56 |
57 | #define FLANN_THROW(TYPE, STR) CV_Error(TYPE, STR)
58 |
59 | #endif
60 |
61 | //! @endcond
62 |
63 | #endif /* OPENCV_FLANN_GENERAL_H_ */
64 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/imgcodecs/imgcodecs.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved.
16 | // Third party copyrights are property of their respective owners.
17 | //
18 | // Redistribution and use in source and binary forms, with or without modification,
19 | // are permitted provided that the following conditions are met:
20 | //
21 | // * Redistribution's of source code must retain the above copyright notice,
22 | // this list of conditions and the following disclaimer.
23 | //
24 | // * Redistribution's in binary form must reproduce the above copyright notice,
25 | // this list of conditions and the following disclaimer in the documentation
26 | // and/or other materials provided with the distribution.
27 | //
28 | // * The name of the copyright holders may not be used to endorse or promote products
29 | // derived from this software without specific prior written permission.
30 | //
31 | // This software is provided by the copyright holders and contributors "as is" and
32 | // any express or implied warranties, including, but not limited to, the implied
33 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
34 | // In no event shall the Intel Corporation or contributors be liable for any direct,
35 | // indirect, incidental, special, exemplary, or consequential damages
36 | // (including, but not limited to, procurement of substitute goods or services;
37 | // loss of use, data, or profits; or business interruption) however caused
38 | // and on any theory of liability, whether in contract, strict liability,
39 | // or tort (including negligence or otherwise) arising in any way out of
40 | // the use of this software, even if advised of the possibility of such damage.
41 | //
42 | //M*/
43 |
44 | #ifdef __OPENCV_BUILD
45 | #error this is a compatibility header which should not be used inside the OpenCV library
46 | #endif
47 |
48 | #include "opencv2/imgcodecs.hpp"
49 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/imgcodecs/imgcodecs_c.h:
--------------------------------------------------------------------------------
1 | #error "This header with legacy C API declarations has been removed from OpenCV. Legacy constants are available from legacy/constants_c.h file."
2 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/imgcodecs/legacy/constants_c.h:
--------------------------------------------------------------------------------
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 | #ifndef OPENCV_IMGCODECS_LEGACY_CONSTANTS_H
6 | #define OPENCV_IMGCODECS_LEGACY_CONSTANTS_H
7 |
8 | /* duplicate of "ImreadModes" enumeration for better compatibility with OpenCV 3.x */
9 | enum
10 | {
11 | /* 8bit, color or not */
12 | CV_LOAD_IMAGE_UNCHANGED =-1,
13 | /* 8bit, gray */
14 | CV_LOAD_IMAGE_GRAYSCALE =0,
15 | /* ?, color */
16 | CV_LOAD_IMAGE_COLOR =1,
17 | /* any depth, ? */
18 | CV_LOAD_IMAGE_ANYDEPTH =2,
19 | /* ?, any color */
20 | CV_LOAD_IMAGE_ANYCOLOR =4,
21 | /* ?, no rotate */
22 | CV_LOAD_IMAGE_IGNORE_ORIENTATION =128
23 | };
24 |
25 | /* duplicate of "ImwriteFlags" enumeration for better compatibility with OpenCV 3.x */
26 | enum
27 | {
28 | CV_IMWRITE_JPEG_QUALITY =1,
29 | CV_IMWRITE_JPEG_PROGRESSIVE =2,
30 | CV_IMWRITE_JPEG_OPTIMIZE =3,
31 | CV_IMWRITE_JPEG_RST_INTERVAL =4,
32 | CV_IMWRITE_JPEG_LUMA_QUALITY =5,
33 | CV_IMWRITE_JPEG_CHROMA_QUALITY =6,
34 | CV_IMWRITE_PNG_COMPRESSION =16,
35 | CV_IMWRITE_PNG_STRATEGY =17,
36 | CV_IMWRITE_PNG_BILEVEL =18,
37 | CV_IMWRITE_PNG_STRATEGY_DEFAULT =0,
38 | CV_IMWRITE_PNG_STRATEGY_FILTERED =1,
39 | CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY =2,
40 | CV_IMWRITE_PNG_STRATEGY_RLE =3,
41 | CV_IMWRITE_PNG_STRATEGY_FIXED =4,
42 | CV_IMWRITE_PXM_BINARY =32,
43 | CV_IMWRITE_EXR_TYPE = 48,
44 | CV_IMWRITE_WEBP_QUALITY =64,
45 | CV_IMWRITE_PAM_TUPLETYPE = 128,
46 | CV_IMWRITE_PAM_FORMAT_NULL = 0,
47 | CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE = 1,
48 | CV_IMWRITE_PAM_FORMAT_GRAYSCALE = 2,
49 | CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA = 3,
50 | CV_IMWRITE_PAM_FORMAT_RGB = 4,
51 | CV_IMWRITE_PAM_FORMAT_RGB_ALPHA = 5,
52 | };
53 |
54 | #endif // OPENCV_IMGCODECS_LEGACY_CONSTANTS_H
55 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/imgcodecs/macosx.h:
--------------------------------------------------------------------------------
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 | #if !defined(__APPLE__) || !defined(__MACH__)
6 | #error This header should be used in macOS ObjC/Swift projects.
7 | #endif
8 |
9 | #import
10 | #include "opencv2/core.hpp"
11 |
12 | //! @addtogroup imgcodecs_macosx
13 | //! @{
14 |
15 | CV_EXPORTS CGImageRef MatToCGImage(const cv::Mat& image) CF_RETURNS_RETAINED;
16 | CV_EXPORTS void CGImageToMat(const CGImageRef image, cv::Mat& m, bool alphaExist = false);
17 | CV_EXPORTS NSImage* MatToNSImage(const cv::Mat& image);
18 | CV_EXPORTS void NSImageToMat(const NSImage* image, cv::Mat& m, bool alphaExist = false);
19 |
20 | //! @}
21 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/imgproc/bindings.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 | #ifndef OPENCV_IMGPROC_BINDINGS_HPP
6 | #define OPENCV_IMGPROC_BINDINGS_HPP
7 |
8 | // This file contains special overloads for OpenCV bindings
9 | // No need to use these functions in C++ code.
10 |
11 | namespace cv {
12 |
13 | /** @brief Finds lines in a binary image using the standard Hough transform and get accumulator.
14 | *
15 | * @note This function is for bindings use only. Use original function in C++ code
16 | *
17 | * @sa HoughLines
18 | */
19 | CV_WRAP static inline
20 | void HoughLinesWithAccumulator(
21 | InputArray image, OutputArray lines,
22 | double rho, double theta, int threshold,
23 | double srn = 0, double stn = 0,
24 | double min_theta = 0, double max_theta = CV_PI
25 | )
26 | {
27 | std::vector lines_acc;
28 | HoughLines(image, lines_acc, rho, theta, threshold, srn, stn, min_theta, max_theta);
29 | Mat(lines_acc).copyTo(lines);
30 | }
31 |
32 | } // namespace
33 |
34 | #endif // OPENCV_IMGPROC_BINDINGS_HPP
35 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/imgproc/hal/interface.h:
--------------------------------------------------------------------------------
1 | #ifndef OPENCV_IMGPROC_HAL_INTERFACE_H
2 | #define OPENCV_IMGPROC_HAL_INTERFACE_H
3 |
4 | //! @addtogroup imgproc_hal_interface
5 | //! @{
6 |
7 | //! @name Interpolation modes
8 | //! @sa cv::InterpolationFlags
9 | //! @{
10 | #define CV_HAL_INTER_NEAREST 0
11 | #define CV_HAL_INTER_LINEAR 1
12 | #define CV_HAL_INTER_CUBIC 2
13 | #define CV_HAL_INTER_AREA 3
14 | #define CV_HAL_INTER_LANCZOS4 4
15 | //! @}
16 |
17 | //! @name Morphology operations
18 | //! @sa cv::MorphTypes
19 | //! @{
20 | #define CV_HAL_MORPH_ERODE 0
21 | #define CV_HAL_MORPH_DILATE 1
22 | //! @}
23 |
24 | //! @name Threshold types
25 | //! @sa cv::ThresholdTypes
26 | //! @{
27 | #define CV_HAL_THRESH_BINARY 0
28 | #define CV_HAL_THRESH_BINARY_INV 1
29 | #define CV_HAL_THRESH_TRUNC 2
30 | #define CV_HAL_THRESH_TOZERO 3
31 | #define CV_HAL_THRESH_TOZERO_INV 4
32 | #define CV_HAL_THRESH_MASK 7
33 | #define CV_HAL_THRESH_OTSU 8
34 | #define CV_HAL_THRESH_TRIANGLE 16
35 | //! @}
36 |
37 | //! @name Adaptive threshold algorithm
38 | //! @sa cv::AdaptiveThresholdTypes
39 | //! @{
40 | #define CV_HAL_ADAPTIVE_THRESH_MEAN_C 0
41 | #define CV_HAL_ADAPTIVE_THRESH_GAUSSIAN_C 1
42 | //! @}
43 |
44 | //! @}
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/imgproc/imgproc.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved.
16 | // Third party copyrights are property of their respective owners.
17 | //
18 | // Redistribution and use in source and binary forms, with or without modification,
19 | // are permitted provided that the following conditions are met:
20 | //
21 | // * Redistribution's of source code must retain the above copyright notice,
22 | // this list of conditions and the following disclaimer.
23 | //
24 | // * Redistribution's in binary form must reproduce the above copyright notice,
25 | // this list of conditions and the following disclaimer in the documentation
26 | // and/or other materials provided with the distribution.
27 | //
28 | // * The name of the copyright holders may not be used to endorse or promote products
29 | // derived from this software without specific prior written permission.
30 | //
31 | // This software is provided by the copyright holders and contributors "as is" and
32 | // any express or implied warranties, including, but not limited to, the implied
33 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
34 | // In no event shall the Intel Corporation or contributors be liable for any direct,
35 | // indirect, incidental, special, exemplary, or consequential damages
36 | // (including, but not limited to, procurement of substitute goods or services;
37 | // loss of use, data, or profits; or business interruption) however caused
38 | // and on any theory of liability, whether in contract, strict liability,
39 | // or tort (including negligence or otherwise) arising in any way out of
40 | // the use of this software, even if advised of the possibility of such damage.
41 | //
42 | //M*/
43 |
44 | #ifdef __OPENCV_BUILD
45 | #error this is a compatibility header which should not be used inside the OpenCV library
46 | #endif
47 |
48 | #include "opencv2/imgproc.hpp"
49 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/opencv_modules.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * ** File generated automatically, do not modify **
3 | *
4 | * This file defines the list of modules available in current build configuration
5 | *
6 | *
7 | */
8 |
9 | // This definition means that OpenCV is built with enabled non-free code.
10 | // For example, patented algorithms for non-profit/non-commercial use only.
11 | /* #undef OPENCV_ENABLE_NONFREE */
12 |
13 | #define HAVE_OPENCV_CALIB3D
14 | #define HAVE_OPENCV_CORE
15 | #define HAVE_OPENCV_FEATURES2D
16 | #define HAVE_OPENCV_FLANN
17 | #define HAVE_OPENCV_IMGCODECS
18 | #define HAVE_OPENCV_IMGPROC
19 | #define HAVE_OPENCV_PHOTO
20 | #define HAVE_OPENCV_STITCHING
21 | #define HAVE_OPENCV_XPHOTO
22 |
23 |
24 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/photo/legacy/constants_c.h:
--------------------------------------------------------------------------------
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 | #ifndef OPENCV_PHOTO_LEGACY_CONSTANTS_H
6 | #define OPENCV_PHOTO_LEGACY_CONSTANTS_H
7 |
8 | enum InpaintingModes
9 | {
10 | CV_INPAINT_NS =0,
11 | CV_INPAINT_TELEA =1
12 | };
13 |
14 | #endif // OPENCV_PHOTO_LEGACY_CONSTANTS_H
15 |
--------------------------------------------------------------------------------
/opencv/src/main/cpp/include/opencv2/photo/photo.hpp:
--------------------------------------------------------------------------------
1 | /*M///////////////////////////////////////////////////////////////////////////////////////
2 | //
3 | // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 | //
5 | // By downloading, copying, installing or using the software you agree to this license.
6 | // If you do not agree to this license, do not download, install,
7 | // copy or use the software.
8 | //
9 | //
10 | // License Agreement
11 | // For Open Source Computer Vision Library
12 | //
13 | // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
14 | // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
15 | // Copyright (C) 2013, OpenCV Foundation, all rights reserved.
16 | // Third party copyrights are property of their respective owners.
17 | //
18 | // Redistribution and use in source and binary forms, with or without modification,
19 | // are permitted provided that the following conditions are met:
20 | //
21 | // * Redistribution's of source code must retain the above copyright notice,
22 | // this list of conditions and the following disclaimer.
23 | //
24 | // * Redistribution's in binary form must reproduce the above copyright notice,
25 | // this list of conditions and the following disclaimer in the documentation
26 | // and/or other materials provided with the distribution.
27 | //
28 | // * The name of the copyright holders may not be used to endorse or promote products
29 | // derived from this software without specific prior written permission.
30 | //
31 | // This software is provided by the copyright holders and contributors "as is" and
32 | // any express or implied warranties, including, but not limited to, the implied
33 | // warranties of merchantability and fitness for a particular purpose are disclaimed.
34 | // In no event shall the Intel Corporation or contributors be liable for any direct,
35 | // indirect, incidental, special, exemplary, or consequential damages
36 | // (including, but not limited to, procurement of substitute goods or services;
37 | // loss of use, data, or profits; or business interruption) however caused
38 | // and on any theory of liability, whether in contract, strict liability,
39 | // or tort (including negligence or otherwise) arising in any way out of
40 | // the use of this software, even if advised of the possibility of such damage.
41 | //
42 | //M*/
43 |
44 | #ifdef __OPENCV_BUILD
45 | #error this is a compatibility header which should not be used inside the OpenCV library
46 | #endif
47 |
48 | #include "opencv2/photo.hpp"
49 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/android/CameraActivity.java:
--------------------------------------------------------------------------------
1 | package org.opencv.android;
2 |
3 | import android.annotation.TargetApi;
4 | import android.app.Activity;
5 | import android.content.Context;
6 | import android.content.pm.PackageManager;
7 | import android.os.Build;
8 | import android.util.AttributeSet;
9 | import android.view.View;
10 |
11 | import java.util.ArrayList;
12 | import java.util.List;
13 |
14 | import static android.Manifest.permission.CAMERA;
15 |
16 | public class CameraActivity extends Activity {
17 |
18 | private static final int CAMERA_PERMISSION_REQUEST_CODE = 200;
19 |
20 | protected List extends CameraBridgeViewBase> getCameraViewList() {
21 | return new ArrayList();
22 | }
23 |
24 | protected void onCameraPermissionGranted() {
25 | List extends CameraBridgeViewBase> cameraViews = getCameraViewList();
26 | if (cameraViews == null) {
27 | return;
28 | }
29 | for (CameraBridgeViewBase cameraBridgeViewBase: cameraViews) {
30 | if (cameraBridgeViewBase != null) {
31 | cameraBridgeViewBase.setCameraPermissionGranted();
32 | }
33 | }
34 | }
35 |
36 | @Override
37 | protected void onStart() {
38 | super.onStart();
39 | boolean havePermission = true;
40 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
41 | if (checkSelfPermission(CAMERA) != PackageManager.PERMISSION_GRANTED) {
42 | requestPermissions(new String[]{CAMERA}, CAMERA_PERMISSION_REQUEST_CODE);
43 | havePermission = false;
44 | }
45 | }
46 | if (havePermission) {
47 | onCameraPermissionGranted();
48 | }
49 | }
50 |
51 | @Override
52 | @TargetApi(Build.VERSION_CODES.M)
53 | public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
54 | if (requestCode == CAMERA_PERMISSION_REQUEST_CODE && grantResults.length > 0
55 | && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
56 | onCameraPermissionGranted();
57 | }
58 | super.onRequestPermissionsResult(requestCode, permissions, grantResults);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/android/FpsMeter.java:
--------------------------------------------------------------------------------
1 | package org.opencv.android;
2 |
3 | import java.text.DecimalFormat;
4 |
5 | import org.opencv.core.Core;
6 |
7 | import android.graphics.Canvas;
8 | import android.graphics.Color;
9 | import android.graphics.Paint;
10 | import android.util.Log;
11 |
12 | public class FpsMeter {
13 | private static final String TAG = "FpsMeter";
14 | private static final int STEP = 20;
15 | private static final DecimalFormat FPS_FORMAT = new DecimalFormat("0.00");
16 |
17 | private int mFramesCounter;
18 | private double mFrequency;
19 | private long mprevFrameTime;
20 | private String mStrfps;
21 | Paint mPaint;
22 | boolean mIsInitialized = false;
23 | int mWidth = 0;
24 | int mHeight = 0;
25 |
26 | public void init() {
27 | mFramesCounter = 0;
28 | mFrequency = Core.getTickFrequency();
29 | mprevFrameTime = Core.getTickCount();
30 | mStrfps = "";
31 |
32 | mPaint = new Paint();
33 | mPaint.setColor(Color.BLUE);
34 | mPaint.setTextSize(20);
35 | }
36 |
37 | public void measure() {
38 | if (!mIsInitialized) {
39 | init();
40 | mIsInitialized = true;
41 | } else {
42 | mFramesCounter++;
43 | if (mFramesCounter % STEP == 0) {
44 | long time = Core.getTickCount();
45 | double fps = STEP * mFrequency / (time - mprevFrameTime);
46 | mprevFrameTime = time;
47 | if (mWidth != 0 && mHeight != 0)
48 | mStrfps = FPS_FORMAT.format(fps) + " FPS@" + Integer.valueOf(mWidth) + "x" + Integer.valueOf(mHeight);
49 | else
50 | mStrfps = FPS_FORMAT.format(fps) + " FPS";
51 | Log.i(TAG, mStrfps);
52 | }
53 | }
54 | }
55 |
56 | public void setResolution(int width, int height) {
57 | mWidth = width;
58 | mHeight = height;
59 | }
60 |
61 | public void draw(Canvas canvas, float offsetx, float offsety) {
62 | Log.d(TAG, mStrfps);
63 | canvas.drawText(mStrfps, offsetx, offsety, mPaint);
64 | }
65 |
66 | }
67 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/android/InstallCallbackInterface.java:
--------------------------------------------------------------------------------
1 | package org.opencv.android;
2 |
3 | /**
4 | * Installation callback interface.
5 | */
6 | public interface InstallCallbackInterface
7 | {
8 | /**
9 | * New package installation is required.
10 | */
11 | static final int NEW_INSTALLATION = 0;
12 | /**
13 | * Current package installation is in progress.
14 | */
15 | static final int INSTALLATION_PROGRESS = 1;
16 |
17 | /**
18 | * Target package name.
19 | * @return Return target package name.
20 | */
21 | public String getPackageName();
22 | /**
23 | * Installation is approved.
24 | */
25 | public void install();
26 | /**
27 | * Installation is canceled.
28 | */
29 | public void cancel();
30 | /**
31 | * Wait for package installation.
32 | */
33 | public void wait_install();
34 | };
35 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/android/LoaderCallbackInterface.java:
--------------------------------------------------------------------------------
1 | package org.opencv.android;
2 |
3 | /**
4 | * Interface for callback object in case of asynchronous initialization of OpenCV.
5 | */
6 | public interface LoaderCallbackInterface
7 | {
8 | /**
9 | * OpenCV initialization finished successfully.
10 | */
11 | static final int SUCCESS = 0;
12 | /**
13 | * Google Play Market cannot be invoked.
14 | */
15 | static final int MARKET_ERROR = 2;
16 | /**
17 | * OpenCV library installation has been canceled by the user.
18 | */
19 | static final int INSTALL_CANCELED = 3;
20 | /**
21 | * This version of OpenCV Manager Service is incompatible with the app. Possibly, a service update is required.
22 | */
23 | static final int INCOMPATIBLE_MANAGER_VERSION = 4;
24 | /**
25 | * OpenCV library initialization has failed.
26 | */
27 | static final int INIT_FAILED = 0xff;
28 |
29 | /**
30 | * Callback method, called after OpenCV library initialization.
31 | * @param status status of initialization (see initialization status constants).
32 | */
33 | public void onManagerConnected(int status);
34 |
35 | /**
36 | * Callback method, called in case the package installation is needed.
37 | * @param callback answer object with approve and cancel methods and the package description.
38 | */
39 | public void onPackageInstall(final int operation, InstallCallbackInterface callback);
40 | };
41 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/CvException.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | public class CvException extends RuntimeException {
4 |
5 | private static final long serialVersionUID = 1L;
6 |
7 | public CvException(String msg) {
8 | super(msg);
9 | }
10 |
11 | @Override
12 | public String toString() {
13 | return "CvException [" + super.toString() + "]";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/DMatch.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | //C++: class DMatch
4 |
5 | /**
6 | * Structure for matching: query descriptor index, train descriptor index, train
7 | * image index and distance between descriptors.
8 | */
9 | public class DMatch {
10 |
11 | /**
12 | * Query descriptor index.
13 | */
14 | public int queryIdx;
15 | /**
16 | * Train descriptor index.
17 | */
18 | public int trainIdx;
19 | /**
20 | * Train image index.
21 | */
22 | public int imgIdx;
23 |
24 | // javadoc: DMatch::distance
25 | public float distance;
26 |
27 | // javadoc: DMatch::DMatch()
28 | public DMatch() {
29 | this(-1, -1, Float.MAX_VALUE);
30 | }
31 |
32 | // javadoc: DMatch::DMatch(_queryIdx, _trainIdx, _distance)
33 | public DMatch(int _queryIdx, int _trainIdx, float _distance) {
34 | queryIdx = _queryIdx;
35 | trainIdx = _trainIdx;
36 | imgIdx = -1;
37 | distance = _distance;
38 | }
39 |
40 | // javadoc: DMatch::DMatch(_queryIdx, _trainIdx, _imgIdx, _distance)
41 | public DMatch(int _queryIdx, int _trainIdx, int _imgIdx, float _distance) {
42 | queryIdx = _queryIdx;
43 | trainIdx = _trainIdx;
44 | imgIdx = _imgIdx;
45 | distance = _distance;
46 | }
47 |
48 | public boolean lessThan(DMatch it) {
49 | return distance < it.distance;
50 | }
51 |
52 | @Override
53 | public String toString() {
54 | return "DMatch [queryIdx=" + queryIdx + ", trainIdx=" + trainIdx
55 | + ", imgIdx=" + imgIdx + ", distance=" + distance + "]";
56 | }
57 |
58 | }
59 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/KeyPoint.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | import org.opencv.core.Point;
4 |
5 | //javadoc: KeyPoint
6 | public class KeyPoint {
7 |
8 | /**
9 | * Coordinates of the keypoint.
10 | */
11 | public Point pt;
12 | /**
13 | * Diameter of the useful keypoint adjacent area.
14 | */
15 | public float size;
16 | /**
17 | * Computed orientation of the keypoint (-1 if not applicable).
18 | */
19 | public float angle;
20 | /**
21 | * The response, by which the strongest keypoints have been selected. Can
22 | * be used for further sorting or subsampling.
23 | */
24 | public float response;
25 | /**
26 | * Octave (pyramid layer), from which the keypoint has been extracted.
27 | */
28 | public int octave;
29 | /**
30 | * Object ID, that can be used to cluster keypoints by an object they
31 | * belong to.
32 | */
33 | public int class_id;
34 |
35 | // javadoc:KeyPoint::KeyPoint(x,y,_size,_angle,_response,_octave,_class_id)
36 | public KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave, int _class_id) {
37 | pt = new Point(x, y);
38 | size = _size;
39 | angle = _angle;
40 | response = _response;
41 | octave = _octave;
42 | class_id = _class_id;
43 | }
44 |
45 | // javadoc: KeyPoint::KeyPoint()
46 | public KeyPoint() {
47 | this(0, 0, 0, -1, 0, 0, -1);
48 | }
49 |
50 | // javadoc: KeyPoint::KeyPoint(x, y, _size, _angle, _response, _octave)
51 | public KeyPoint(float x, float y, float _size, float _angle, float _response, int _octave) {
52 | this(x, y, _size, _angle, _response, _octave, -1);
53 | }
54 |
55 | // javadoc: KeyPoint::KeyPoint(x, y, _size, _angle, _response)
56 | public KeyPoint(float x, float y, float _size, float _angle, float _response) {
57 | this(x, y, _size, _angle, _response, 0, -1);
58 | }
59 |
60 | // javadoc: KeyPoint::KeyPoint(x, y, _size, _angle)
61 | public KeyPoint(float x, float y, float _size, float _angle) {
62 | this(x, y, _size, _angle, 0, 0, -1);
63 | }
64 |
65 | // javadoc: KeyPoint::KeyPoint(x, y, _size)
66 | public KeyPoint(float x, float y, float _size) {
67 | this(x, y, _size, -1, 0, 0, -1);
68 | }
69 |
70 | @Override
71 | public String toString() {
72 | return "KeyPoint [pt=" + pt + ", size=" + size + ", angle=" + angle
73 | + ", response=" + response + ", octave=" + octave
74 | + ", class_id=" + class_id + "]";
75 | }
76 |
77 | }
78 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/MatMatMul.kt:
--------------------------------------------------------------------------------
1 | package org.opencv.core
2 |
3 | operator fun Mat.times(other: Mat): Mat = this.matMul(other)
4 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/MatOfDouble.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 | public class MatOfDouble extends Mat {
7 | // 64FC(x)
8 | private static final int _depth = CvType.CV_64F;
9 | private static final int _channels = 1;
10 |
11 | public MatOfDouble() {
12 | super();
13 | }
14 |
15 | protected MatOfDouble(long addr) {
16 | super(addr);
17 | if( !empty() && checkVector(_channels, _depth) < 0 )
18 | throw new IllegalArgumentException("Incompatible Mat");
19 | //FIXME: do we need release() here?
20 | }
21 |
22 | public static MatOfDouble fromNativeAddr(long addr) {
23 | return new MatOfDouble(addr);
24 | }
25 |
26 | public MatOfDouble(Mat m) {
27 | super(m, Range.all());
28 | if( !empty() && checkVector(_channels, _depth) < 0 )
29 | throw new IllegalArgumentException("Incompatible Mat");
30 | //FIXME: do we need release() here?
31 | }
32 |
33 | public MatOfDouble(double...a) {
34 | super();
35 | fromArray(a);
36 | }
37 |
38 | public void alloc(int elemNumber) {
39 | if(elemNumber>0)
40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
41 | }
42 |
43 | public void fromArray(double...a) {
44 | if(a==null || a.length==0)
45 | return;
46 | int num = a.length / _channels;
47 | alloc(num);
48 | put(0, 0, a); //TODO: check ret val!
49 | }
50 |
51 | public double[] toArray() {
52 | int num = checkVector(_channels, _depth);
53 | if(num < 0)
54 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
55 | double[] a = new double[num * _channels];
56 | if(num == 0)
57 | return a;
58 | get(0, 0, a); //TODO: check ret val!
59 | return a;
60 | }
61 |
62 | public void fromList(List lb) {
63 | if(lb==null || lb.size()==0)
64 | return;
65 | Double ab[] = lb.toArray(new Double[0]);
66 | double a[] = new double[ab.length];
67 | for(int i=0; i toList() {
73 | double[] a = toArray();
74 | Double ab[] = new Double[a.length];
75 | for(int i=0; i0)
40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
41 | }
42 |
43 | public void fromArray(float...a) {
44 | if(a==null || a.length==0)
45 | return;
46 | int num = a.length / _channels;
47 | alloc(num);
48 | put(0, 0, a); //TODO: check ret val!
49 | }
50 |
51 | public float[] toArray() {
52 | int num = checkVector(_channels, _depth);
53 | if(num < 0)
54 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
55 | float[] a = new float[num * _channels];
56 | if(num == 0)
57 | return a;
58 | get(0, 0, a); //TODO: check ret val!
59 | return a;
60 | }
61 |
62 | public void fromList(List lb) {
63 | if(lb==null || lb.size()==0)
64 | return;
65 | Float ab[] = lb.toArray(new Float[0]);
66 | float a[] = new float[ab.length];
67 | for(int i=0; i toList() {
73 | float[] a = toArray();
74 | Float ab[] = new Float[a.length];
75 | for(int i=0; i0)
40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
41 | }
42 |
43 | public void fromArray(float...a) {
44 | if(a==null || a.length==0)
45 | return;
46 | int num = a.length / _channels;
47 | alloc(num);
48 | put(0, 0, a); //TODO: check ret val!
49 | }
50 |
51 | public float[] toArray() {
52 | int num = checkVector(_channels, _depth);
53 | if(num < 0)
54 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
55 | float[] a = new float[num * _channels];
56 | if(num == 0)
57 | return a;
58 | get(0, 0, a); //TODO: check ret val!
59 | return a;
60 | }
61 |
62 | public void fromList(List lb) {
63 | if(lb==null || lb.size()==0)
64 | return;
65 | Float ab[] = lb.toArray(new Float[0]);
66 | float a[] = new float[ab.length];
67 | for(int i=0; i toList() {
73 | float[] a = toArray();
74 | Float ab[] = new Float[a.length];
75 | for(int i=0; i0)
40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
41 | }
42 |
43 | public void fromArray(float...a) {
44 | if(a==null || a.length==0)
45 | return;
46 | int num = a.length / _channels;
47 | alloc(num);
48 | put(0, 0, a); //TODO: check ret val!
49 | }
50 |
51 | public float[] toArray() {
52 | int num = checkVector(_channels, _depth);
53 | if(num < 0)
54 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
55 | float[] a = new float[num * _channels];
56 | if(num == 0)
57 | return a;
58 | get(0, 0, a); //TODO: check ret val!
59 | return a;
60 | }
61 |
62 | public void fromList(List lb) {
63 | if(lb==null || lb.size()==0)
64 | return;
65 | Float ab[] = lb.toArray(new Float[0]);
66 | float a[] = new float[ab.length];
67 | for(int i=0; i toList() {
73 | float[] a = toArray();
74 | Float ab[] = new Float[a.length];
75 | for(int i=0; i0)
41 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
42 | }
43 |
44 | public void fromArray(int...a) {
45 | if(a==null || a.length==0)
46 | return;
47 | int num = a.length / _channels;
48 | alloc(num);
49 | put(0, 0, a); //TODO: check ret val!
50 | }
51 |
52 | public int[] toArray() {
53 | int num = checkVector(_channels, _depth);
54 | if(num < 0)
55 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
56 | int[] a = new int[num * _channels];
57 | if(num == 0)
58 | return a;
59 | get(0, 0, a); //TODO: check ret val!
60 | return a;
61 | }
62 |
63 | public void fromList(List lb) {
64 | if(lb==null || lb.size()==0)
65 | return;
66 | Integer ab[] = lb.toArray(new Integer[0]);
67 | int a[] = new int[ab.length];
68 | for(int i=0; i toList() {
74 | int[] a = toArray();
75 | Integer ab[] = new Integer[a.length];
76 | for(int i=0; i0)
41 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
42 | }
43 |
44 | public void fromArray(int...a) {
45 | if(a==null || a.length==0)
46 | return;
47 | int num = a.length / _channels;
48 | alloc(num);
49 | put(0, 0, a); //TODO: check ret val!
50 | }
51 |
52 | public int[] toArray() {
53 | int num = checkVector(_channels, _depth);
54 | if(num < 0)
55 | throw new RuntimeException("Native Mat has unexpected type or size: " + toString());
56 | int[] a = new int[num * _channels];
57 | if(num == 0)
58 | return a;
59 | get(0, 0, a); //TODO: check ret val!
60 | return a;
61 | }
62 |
63 | public void fromList(List lb) {
64 | if(lb==null || lb.size()==0)
65 | return;
66 | Integer ab[] = lb.toArray(new Integer[0]);
67 | int a[] = new int[ab.length];
68 | for(int i=0; i toList() {
74 | int[] a = toArray();
75 | Integer ab[] = new Integer[a.length];
76 | for(int i=0; i0)
40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
41 | }
42 |
43 | public void fromArray(Point...a) {
44 | if(a==null || a.length==0)
45 | return;
46 | int num = a.length;
47 | alloc(num);
48 | int buff[] = new int[num * _channels];
49 | for(int i=0; i lp) {
70 | Point ap[] = lp.toArray(new Point[0]);
71 | fromArray(ap);
72 | }
73 |
74 | public List toList() {
75 | Point[] ap = toArray();
76 | return Arrays.asList(ap);
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/MatOfPoint2f.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 | public class MatOfPoint2f extends Mat {
7 | // 32FC2
8 | private static final int _depth = CvType.CV_32F;
9 | private static final int _channels = 2;
10 |
11 | public MatOfPoint2f() {
12 | super();
13 | }
14 |
15 | protected MatOfPoint2f(long addr) {
16 | super(addr);
17 | if( !empty() && checkVector(_channels, _depth) < 0 )
18 | throw new IllegalArgumentException("Incompatible Mat");
19 | //FIXME: do we need release() here?
20 | }
21 |
22 | public static MatOfPoint2f fromNativeAddr(long addr) {
23 | return new MatOfPoint2f(addr);
24 | }
25 |
26 | public MatOfPoint2f(Mat m) {
27 | super(m, Range.all());
28 | if( !empty() && checkVector(_channels, _depth) < 0 )
29 | throw new IllegalArgumentException("Incompatible Mat");
30 | //FIXME: do we need release() here?
31 | }
32 |
33 | public MatOfPoint2f(Point...a) {
34 | super();
35 | fromArray(a);
36 | }
37 |
38 | public void alloc(int elemNumber) {
39 | if(elemNumber>0)
40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
41 | }
42 |
43 | public void fromArray(Point...a) {
44 | if(a==null || a.length==0)
45 | return;
46 | int num = a.length;
47 | alloc(num);
48 | float buff[] = new float[num * _channels];
49 | for(int i=0; i lp) {
70 | Point ap[] = lp.toArray(new Point[0]);
71 | fromArray(ap);
72 | }
73 |
74 | public List toList() {
75 | Point[] ap = toArray();
76 | return Arrays.asList(ap);
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/MatOfPoint3.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 | public class MatOfPoint3 extends Mat {
7 | // 32SC3
8 | private static final int _depth = CvType.CV_32S;
9 | private static final int _channels = 3;
10 |
11 | public MatOfPoint3() {
12 | super();
13 | }
14 |
15 | protected MatOfPoint3(long addr) {
16 | super(addr);
17 | if( !empty() && checkVector(_channels, _depth) < 0 )
18 | throw new IllegalArgumentException("Incompatible Mat");
19 | //FIXME: do we need release() here?
20 | }
21 |
22 | public static MatOfPoint3 fromNativeAddr(long addr) {
23 | return new MatOfPoint3(addr);
24 | }
25 |
26 | public MatOfPoint3(Mat m) {
27 | super(m, Range.all());
28 | if( !empty() && checkVector(_channels, _depth) < 0 )
29 | throw new IllegalArgumentException("Incompatible Mat");
30 | //FIXME: do we need release() here?
31 | }
32 |
33 | public MatOfPoint3(Point3...a) {
34 | super();
35 | fromArray(a);
36 | }
37 |
38 | public void alloc(int elemNumber) {
39 | if(elemNumber>0)
40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
41 | }
42 |
43 | public void fromArray(Point3...a) {
44 | if(a==null || a.length==0)
45 | return;
46 | int num = a.length;
47 | alloc(num);
48 | int buff[] = new int[num * _channels];
49 | for(int i=0; i lp) {
71 | Point3 ap[] = lp.toArray(new Point3[0]);
72 | fromArray(ap);
73 | }
74 |
75 | public List toList() {
76 | Point3[] ap = toArray();
77 | return Arrays.asList(ap);
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/MatOfPoint3f.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 | public class MatOfPoint3f extends Mat {
7 | // 32FC3
8 | private static final int _depth = CvType.CV_32F;
9 | private static final int _channels = 3;
10 |
11 | public MatOfPoint3f() {
12 | super();
13 | }
14 |
15 | protected MatOfPoint3f(long addr) {
16 | super(addr);
17 | if( !empty() && checkVector(_channels, _depth) < 0 )
18 | throw new IllegalArgumentException("Incompatible Mat");
19 | //FIXME: do we need release() here?
20 | }
21 |
22 | public static MatOfPoint3f fromNativeAddr(long addr) {
23 | return new MatOfPoint3f(addr);
24 | }
25 |
26 | public MatOfPoint3f(Mat m) {
27 | super(m, Range.all());
28 | if( !empty() && checkVector(_channels, _depth) < 0 )
29 | throw new IllegalArgumentException("Incompatible Mat");
30 | //FIXME: do we need release() here?
31 | }
32 |
33 | public MatOfPoint3f(Point3...a) {
34 | super();
35 | fromArray(a);
36 | }
37 |
38 | public void alloc(int elemNumber) {
39 | if(elemNumber>0)
40 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
41 | }
42 |
43 | public void fromArray(Point3...a) {
44 | if(a==null || a.length==0)
45 | return;
46 | int num = a.length;
47 | alloc(num);
48 | float buff[] = new float[num * _channels];
49 | for(int i=0; i lp) {
71 | Point3 ap[] = lp.toArray(new Point3[0]);
72 | fromArray(ap);
73 | }
74 |
75 | public List toList() {
76 | Point3[] ap = toArray();
77 | return Arrays.asList(ap);
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/MatOfRect.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 |
7 | public class MatOfRect extends Mat {
8 | // 32SC4
9 | private static final int _depth = CvType.CV_32S;
10 | private static final int _channels = 4;
11 |
12 | public MatOfRect() {
13 | super();
14 | }
15 |
16 | protected MatOfRect(long addr) {
17 | super(addr);
18 | if( !empty() && checkVector(_channels, _depth) < 0 )
19 | throw new IllegalArgumentException("Incompatible Mat");
20 | //FIXME: do we need release() here?
21 | }
22 |
23 | public static MatOfRect fromNativeAddr(long addr) {
24 | return new MatOfRect(addr);
25 | }
26 |
27 | public MatOfRect(Mat m) {
28 | super(m, Range.all());
29 | if( !empty() && checkVector(_channels, _depth) < 0 )
30 | throw new IllegalArgumentException("Incompatible Mat");
31 | //FIXME: do we need release() here?
32 | }
33 |
34 | public MatOfRect(Rect...a) {
35 | super();
36 | fromArray(a);
37 | }
38 |
39 | public void alloc(int elemNumber) {
40 | if(elemNumber>0)
41 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
42 | }
43 |
44 | public void fromArray(Rect...a) {
45 | if(a==null || a.length==0)
46 | return;
47 | int num = a.length;
48 | alloc(num);
49 | int buff[] = new int[num * _channels];
50 | for(int i=0; i lr) {
73 | Rect ap[] = lr.toArray(new Rect[0]);
74 | fromArray(ap);
75 | }
76 |
77 | public List toList() {
78 | Rect[] ar = toArray();
79 | return Arrays.asList(ar);
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/MatOfRect2d.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | import java.util.Arrays;
4 | import java.util.List;
5 |
6 |
7 | public class MatOfRect2d extends Mat {
8 | // 64FC4
9 | private static final int _depth = CvType.CV_64F;
10 | private static final int _channels = 4;
11 |
12 | public MatOfRect2d() {
13 | super();
14 | }
15 |
16 | protected MatOfRect2d(long addr) {
17 | super(addr);
18 | if( !empty() && checkVector(_channels, _depth) < 0 )
19 | throw new IllegalArgumentException("Incompatible Mat");
20 | //FIXME: do we need release() here?
21 | }
22 |
23 | public static MatOfRect2d fromNativeAddr(long addr) {
24 | return new MatOfRect2d(addr);
25 | }
26 |
27 | public MatOfRect2d(Mat m) {
28 | super(m, Range.all());
29 | if( !empty() && checkVector(_channels, _depth) < 0 )
30 | throw new IllegalArgumentException("Incompatible Mat");
31 | //FIXME: do we need release() here?
32 | }
33 |
34 | public MatOfRect2d(Rect2d...a) {
35 | super();
36 | fromArray(a);
37 | }
38 |
39 | public void alloc(int elemNumber) {
40 | if(elemNumber>0)
41 | super.create(elemNumber, 1, CvType.makeType(_depth, _channels));
42 | }
43 |
44 | public void fromArray(Rect2d...a) {
45 | if(a==null || a.length==0)
46 | return;
47 | int num = a.length;
48 | alloc(num);
49 | double buff[] = new double[num * _channels];
50 | for(int i=0; i lr) {
73 | Rect2d ap[] = lr.toArray(new Rect2d[0]);
74 | fromArray(ap);
75 | }
76 |
77 | public List toList() {
78 | Rect2d[] ar = toArray();
79 | return Arrays.asList(ar);
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/Point.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | //javadoc:Point_
4 | public class Point {
5 |
6 | public double x, y;
7 |
8 | public Point(double x, double y) {
9 | this.x = x;
10 | this.y = y;
11 | }
12 |
13 | public Point() {
14 | this(0, 0);
15 | }
16 |
17 | public Point(double[] vals) {
18 | this();
19 | set(vals);
20 | }
21 |
22 | public void set(double[] vals) {
23 | if (vals != null) {
24 | x = vals.length > 0 ? vals[0] : 0;
25 | y = vals.length > 1 ? vals[1] : 0;
26 | } else {
27 | x = 0;
28 | y = 0;
29 | }
30 | }
31 |
32 | public Point clone() {
33 | return new Point(x, y);
34 | }
35 |
36 | public double dot(Point p) {
37 | return x * p.x + y * p.y;
38 | }
39 |
40 | @Override
41 | public int hashCode() {
42 | final int prime = 31;
43 | int result = 1;
44 | long temp;
45 | temp = Double.doubleToLongBits(x);
46 | result = prime * result + (int) (temp ^ (temp >>> 32));
47 | temp = Double.doubleToLongBits(y);
48 | result = prime * result + (int) (temp ^ (temp >>> 32));
49 | return result;
50 | }
51 |
52 | @Override
53 | public boolean equals(Object obj) {
54 | if (this == obj) return true;
55 | if (!(obj instanceof Point)) return false;
56 | Point it = (Point) obj;
57 | return x == it.x && y == it.y;
58 | }
59 |
60 | public boolean inside(Rect r) {
61 | return r.contains(this);
62 | }
63 |
64 | @Override
65 | public String toString() {
66 | return "{" + x + ", " + y + "}";
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/Point3.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | //javadoc:Point3_
4 | public class Point3 {
5 |
6 | public double x, y, z;
7 |
8 | public Point3(double x, double y, double z) {
9 | this.x = x;
10 | this.y = y;
11 | this.z = z;
12 | }
13 |
14 | public Point3() {
15 | this(0, 0, 0);
16 | }
17 |
18 | public Point3(Point p) {
19 | x = p.x;
20 | y = p.y;
21 | z = 0;
22 | }
23 |
24 | public Point3(double[] vals) {
25 | this();
26 | set(vals);
27 | }
28 |
29 | public void set(double[] vals) {
30 | if (vals != null) {
31 | x = vals.length > 0 ? vals[0] : 0;
32 | y = vals.length > 1 ? vals[1] : 0;
33 | z = vals.length > 2 ? vals[2] : 0;
34 | } else {
35 | x = 0;
36 | y = 0;
37 | z = 0;
38 | }
39 | }
40 |
41 | public Point3 clone() {
42 | return new Point3(x, y, z);
43 | }
44 |
45 | public double dot(Point3 p) {
46 | return x * p.x + y * p.y + z * p.z;
47 | }
48 |
49 | public Point3 cross(Point3 p) {
50 | return new Point3(y * p.z - z * p.y, z * p.x - x * p.z, x * p.y - y * p.x);
51 | }
52 |
53 | @Override
54 | public int hashCode() {
55 | final int prime = 31;
56 | int result = 1;
57 | long temp;
58 | temp = Double.doubleToLongBits(x);
59 | result = prime * result + (int) (temp ^ (temp >>> 32));
60 | temp = Double.doubleToLongBits(y);
61 | result = prime * result + (int) (temp ^ (temp >>> 32));
62 | temp = Double.doubleToLongBits(z);
63 | result = prime * result + (int) (temp ^ (temp >>> 32));
64 | return result;
65 | }
66 |
67 | @Override
68 | public boolean equals(Object obj) {
69 | if (this == obj) return true;
70 | if (!(obj instanceof Point3)) return false;
71 | Point3 it = (Point3) obj;
72 | return x == it.x && y == it.y && z == it.z;
73 | }
74 |
75 | @Override
76 | public String toString() {
77 | return "{" + x + ", " + y + ", " + z + "}";
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/Range.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | //javadoc:Range
4 | public class Range {
5 |
6 | public int start, end;
7 |
8 | public Range(int s, int e) {
9 | this.start = s;
10 | this.end = e;
11 | }
12 |
13 | public Range() {
14 | this(0, 0);
15 | }
16 |
17 | public Range(double[] vals) {
18 | set(vals);
19 | }
20 |
21 | public void set(double[] vals) {
22 | if (vals != null) {
23 | start = vals.length > 0 ? (int) vals[0] : 0;
24 | end = vals.length > 1 ? (int) vals[1] : 0;
25 | } else {
26 | start = 0;
27 | end = 0;
28 | }
29 |
30 | }
31 |
32 | public int size() {
33 | return empty() ? 0 : end - start;
34 | }
35 |
36 | public boolean empty() {
37 | return end <= start;
38 | }
39 |
40 | public static Range all() {
41 | return new Range(Integer.MIN_VALUE, Integer.MAX_VALUE);
42 | }
43 |
44 | public Range intersection(Range r1) {
45 | Range r = new Range(Math.max(r1.start, this.start), Math.min(r1.end, this.end));
46 | r.end = Math.max(r.end, r.start);
47 | return r;
48 | }
49 |
50 | public Range shift(int delta) {
51 | return new Range(start + delta, end + delta);
52 | }
53 |
54 | public Range clone() {
55 | return new Range(start, end);
56 | }
57 |
58 | @Override
59 | public int hashCode() {
60 | final int prime = 31;
61 | int result = 1;
62 | long temp;
63 | temp = Double.doubleToLongBits(start);
64 | result = prime * result + (int) (temp ^ (temp >>> 32));
65 | temp = Double.doubleToLongBits(end);
66 | result = prime * result + (int) (temp ^ (temp >>> 32));
67 | return result;
68 | }
69 |
70 | @Override
71 | public boolean equals(Object obj) {
72 | if (this == obj) return true;
73 | if (!(obj instanceof Range)) return false;
74 | Range it = (Range) obj;
75 | return start == it.start && end == it.end;
76 | }
77 |
78 | @Override
79 | public String toString() {
80 | return "[" + start + ", " + end + ")";
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/core/Size.java:
--------------------------------------------------------------------------------
1 | package org.opencv.core;
2 |
3 | //javadoc:Size_
4 | public class Size {
5 |
6 | public double width, height;
7 |
8 | public Size(double width, double height) {
9 | this.width = width;
10 | this.height = height;
11 | }
12 |
13 | public Size() {
14 | this(0, 0);
15 | }
16 |
17 | public Size(Point p) {
18 | width = p.x;
19 | height = p.y;
20 | }
21 |
22 | public Size(double[] vals) {
23 | set(vals);
24 | }
25 |
26 | public void set(double[] vals) {
27 | if (vals != null) {
28 | width = vals.length > 0 ? vals[0] : 0;
29 | height = vals.length > 1 ? vals[1] : 0;
30 | } else {
31 | width = 0;
32 | height = 0;
33 | }
34 | }
35 |
36 | public double area() {
37 | return width * height;
38 | }
39 |
40 | public boolean empty() {
41 | return width <= 0 || height <= 0;
42 | }
43 |
44 | public Size clone() {
45 | return new Size(width, height);
46 | }
47 |
48 | @Override
49 | public int hashCode() {
50 | final int prime = 31;
51 | int result = 1;
52 | long temp;
53 | temp = Double.doubleToLongBits(height);
54 | result = prime * result + (int) (temp ^ (temp >>> 32));
55 | temp = Double.doubleToLongBits(width);
56 | result = prime * result + (int) (temp ^ (temp >>> 32));
57 | return result;
58 | }
59 |
60 | @Override
61 | public boolean equals(Object obj) {
62 | if (this == obj) return true;
63 | if (!(obj instanceof Size)) return false;
64 | Size it = (Size) obj;
65 | return width == it.width && height == it.height;
66 | }
67 |
68 | @Override
69 | public String toString() {
70 | return (int)width + "x" + (int)height;
71 | }
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/engine/OpenCVEngineInterface.aidl:
--------------------------------------------------------------------------------
1 | package org.opencv.engine;
2 |
3 | /**
4 | * Class provides a Java interface for OpenCV Engine Service. It's synchronous with native OpenCVEngine class.
5 | */
6 | interface OpenCVEngineInterface
7 | {
8 | /**
9 | * @return Returns service version.
10 | */
11 | int getEngineVersion();
12 |
13 | /**
14 | * Finds an installed OpenCV library.
15 | * @param OpenCV version.
16 | * @return Returns path to OpenCV native libs or an empty string if OpenCV can not be found.
17 | */
18 | String getLibPathByVersion(String version);
19 |
20 | /**
21 | * Tries to install defined version of OpenCV from Google Play Market.
22 | * @param OpenCV version.
23 | * @return Returns true if installation was successful or OpenCV package has been already installed.
24 | */
25 | boolean installVersion(String version);
26 |
27 | /**
28 | * Returns list of libraries in loading order, separated by semicolon.
29 | * @param OpenCV version.
30 | * @return Returns names of OpenCV libraries, separated by semicolon.
31 | */
32 | String getLibraryList(String version);
33 | }
34 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/features2d/FlannBasedMatcher.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.features2d;
5 |
6 | import org.opencv.features2d.DescriptorMatcher;
7 | import org.opencv.features2d.FlannBasedMatcher;
8 |
9 | // C++: class FlannBasedMatcher
10 | /**
11 | * Flann-based descriptor matcher.
12 | *
13 | * This matcher trains cv::flann::Index on a train descriptor collection and calls its nearest search
14 | * methods to find the best matches. So, this matcher may be faster when matching a large train
15 | * collection than the brute force matcher. FlannBasedMatcher does not support masking permissible
16 | * matches of descriptor sets because flann::Index does not support this. :
17 | */
18 | public class FlannBasedMatcher extends DescriptorMatcher {
19 |
20 | protected FlannBasedMatcher(long addr) { super(addr); }
21 |
22 | // internal usage only
23 | public static FlannBasedMatcher __fromPtr__(long addr) { return new FlannBasedMatcher(addr); }
24 |
25 | //
26 | // C++: cv::FlannBasedMatcher::FlannBasedMatcher(Ptr_flann_IndexParams indexParams = makePtr(), Ptr_flann_SearchParams searchParams = makePtr())
27 | //
28 |
29 | public FlannBasedMatcher() {
30 | super(FlannBasedMatcher_0());
31 | }
32 |
33 |
34 | //
35 | // C++: static Ptr_FlannBasedMatcher cv::FlannBasedMatcher::create()
36 | //
37 |
38 | public static FlannBasedMatcher create() {
39 | return FlannBasedMatcher.__fromPtr__(create_0());
40 | }
41 |
42 |
43 | @Override
44 | protected void finalize() throws Throwable {
45 | delete(nativeObj);
46 | }
47 |
48 |
49 |
50 | // C++: cv::FlannBasedMatcher::FlannBasedMatcher(Ptr_flann_IndexParams indexParams = makePtr(), Ptr_flann_SearchParams searchParams = makePtr())
51 | private static native long FlannBasedMatcher_0();
52 |
53 | // C++: static Ptr_FlannBasedMatcher cv::FlannBasedMatcher::create()
54 | private static native long create_0();
55 |
56 | // native support for java finalize()
57 | private static native void delete(long nativeObj);
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/imgproc/GeneralizedHoughBallard.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.imgproc;
5 |
6 | import org.opencv.imgproc.GeneralizedHough;
7 |
8 | // C++: class GeneralizedHoughBallard
9 | /**
10 | * finds arbitrary template in the grayscale image using Generalized Hough Transform
11 | *
12 | * Detects position only without translation and rotation CITE: Ballard1981 .
13 | */
14 | public class GeneralizedHoughBallard extends GeneralizedHough {
15 |
16 | protected GeneralizedHoughBallard(long addr) { super(addr); }
17 |
18 | // internal usage only
19 | public static GeneralizedHoughBallard __fromPtr__(long addr) { return new GeneralizedHoughBallard(addr); }
20 |
21 | //
22 | // C++: void cv::GeneralizedHoughBallard::setLevels(int levels)
23 | //
24 |
25 | public void setLevels(int levels) {
26 | setLevels_0(nativeObj, levels);
27 | }
28 |
29 |
30 | //
31 | // C++: int cv::GeneralizedHoughBallard::getLevels()
32 | //
33 |
34 | public int getLevels() {
35 | return getLevels_0(nativeObj);
36 | }
37 |
38 |
39 | //
40 | // C++: void cv::GeneralizedHoughBallard::setVotesThreshold(int votesThreshold)
41 | //
42 |
43 | public void setVotesThreshold(int votesThreshold) {
44 | setVotesThreshold_0(nativeObj, votesThreshold);
45 | }
46 |
47 |
48 | //
49 | // C++: int cv::GeneralizedHoughBallard::getVotesThreshold()
50 | //
51 |
52 | public int getVotesThreshold() {
53 | return getVotesThreshold_0(nativeObj);
54 | }
55 |
56 |
57 | @Override
58 | protected void finalize() throws Throwable {
59 | delete(nativeObj);
60 | }
61 |
62 |
63 |
64 | // C++: void cv::GeneralizedHoughBallard::setLevels(int levels)
65 | private static native void setLevels_0(long nativeObj, int levels);
66 |
67 | // C++: int cv::GeneralizedHoughBallard::getLevels()
68 | private static native int getLevels_0(long nativeObj);
69 |
70 | // C++: void cv::GeneralizedHoughBallard::setVotesThreshold(int votesThreshold)
71 | private static native void setVotesThreshold_0(long nativeObj, int votesThreshold);
72 |
73 | // C++: int cv::GeneralizedHoughBallard::getVotesThreshold()
74 | private static native int getVotesThreshold_0(long nativeObj);
75 |
76 | // native support for java finalize()
77 | private static native void delete(long nativeObj);
78 |
79 | }
80 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/photo/AlignExposures.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.photo;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 | import org.opencv.core.Algorithm;
9 | import org.opencv.core.Mat;
10 | import org.opencv.utils.Converters;
11 |
12 | // C++: class AlignExposures
13 | /**
14 | * The base class for algorithms that align images of the same scene with different exposures
15 | */
16 | public class AlignExposures extends Algorithm {
17 |
18 | protected AlignExposures(long addr) { super(addr); }
19 |
20 | // internal usage only
21 | public static AlignExposures __fromPtr__(long addr) { return new AlignExposures(addr); }
22 |
23 | //
24 | // C++: void cv::AlignExposures::process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
25 | //
26 |
27 | /**
28 | * Aligns images
29 | *
30 | * @param src vector of input images
31 | * @param dst vector of aligned images
32 | * @param times vector of exposure time values for each image
33 | * @param response 256x1 matrix with inverse camera response function for each pixel value, it should
34 | * have the same number of channels as images.
35 | */
36 | public void process(List src, List dst, Mat times, Mat response) {
37 | Mat src_mat = Converters.vector_Mat_to_Mat(src);
38 | Mat dst_mat = Converters.vector_Mat_to_Mat(dst);
39 | process_0(nativeObj, src_mat.nativeObj, dst_mat.nativeObj, times.nativeObj, response.nativeObj);
40 | }
41 |
42 |
43 | @Override
44 | protected void finalize() throws Throwable {
45 | delete(nativeObj);
46 | }
47 |
48 |
49 |
50 | // C++: void cv::AlignExposures::process(vector_Mat src, vector_Mat dst, Mat times, Mat response)
51 | private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_mat_nativeObj, long times_nativeObj, long response_nativeObj);
52 |
53 | // native support for java finalize()
54 | private static native void delete(long nativeObj);
55 |
56 | }
57 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/photo/CalibrateCRF.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.photo;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 | import org.opencv.core.Algorithm;
9 | import org.opencv.core.Mat;
10 | import org.opencv.utils.Converters;
11 |
12 | // C++: class CalibrateCRF
13 | /**
14 | * The base class for camera response calibration algorithms.
15 | */
16 | public class CalibrateCRF extends Algorithm {
17 |
18 | protected CalibrateCRF(long addr) { super(addr); }
19 |
20 | // internal usage only
21 | public static CalibrateCRF __fromPtr__(long addr) { return new CalibrateCRF(addr); }
22 |
23 | //
24 | // C++: void cv::CalibrateCRF::process(vector_Mat src, Mat& dst, Mat times)
25 | //
26 |
27 | /**
28 | * Recovers inverse camera response.
29 | *
30 | * @param src vector of input images
31 | * @param dst 256x1 matrix with inverse camera response function
32 | * @param times vector of exposure time values for each image
33 | */
34 | public void process(List src, Mat dst, Mat times) {
35 | Mat src_mat = Converters.vector_Mat_to_Mat(src);
36 | process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
37 | }
38 |
39 |
40 | @Override
41 | protected void finalize() throws Throwable {
42 | delete(nativeObj);
43 | }
44 |
45 |
46 |
47 | // C++: void cv::CalibrateCRF::process(vector_Mat src, Mat& dst, Mat times)
48 | private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj);
49 |
50 | // native support for java finalize()
51 | private static native void delete(long nativeObj);
52 |
53 | }
54 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/photo/MergeDebevec.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.photo;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 | import org.opencv.core.Mat;
9 | import org.opencv.photo.MergeExposures;
10 | import org.opencv.utils.Converters;
11 |
12 | // C++: class MergeDebevec
13 | /**
14 | * The resulting HDR image is calculated as weighted average of the exposures considering exposure
15 | * values and camera response.
16 | *
17 | * For more information see CITE: DM97 .
18 | */
19 | public class MergeDebevec extends MergeExposures {
20 |
21 | protected MergeDebevec(long addr) { super(addr); }
22 |
23 | // internal usage only
24 | public static MergeDebevec __fromPtr__(long addr) { return new MergeDebevec(addr); }
25 |
26 | //
27 | // C++: void cv::MergeDebevec::process(vector_Mat src, Mat& dst, Mat times, Mat response)
28 | //
29 |
30 | public void process(List src, Mat dst, Mat times, Mat response) {
31 | Mat src_mat = Converters.vector_Mat_to_Mat(src);
32 | process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
33 | }
34 |
35 |
36 | //
37 | // C++: void cv::MergeDebevec::process(vector_Mat src, Mat& dst, Mat times)
38 | //
39 |
40 | public void process(List src, Mat dst, Mat times) {
41 | Mat src_mat = Converters.vector_Mat_to_Mat(src);
42 | process_1(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
43 | }
44 |
45 |
46 | @Override
47 | protected void finalize() throws Throwable {
48 | delete(nativeObj);
49 | }
50 |
51 |
52 |
53 | // C++: void cv::MergeDebevec::process(vector_Mat src, Mat& dst, Mat times, Mat response)
54 | private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj);
55 |
56 | // C++: void cv::MergeDebevec::process(vector_Mat src, Mat& dst, Mat times)
57 | private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj);
58 |
59 | // native support for java finalize()
60 | private static native void delete(long nativeObj);
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/photo/MergeExposures.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.photo;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 | import org.opencv.core.Algorithm;
9 | import org.opencv.core.Mat;
10 | import org.opencv.utils.Converters;
11 |
12 | // C++: class MergeExposures
13 | /**
14 | * The base class algorithms that can merge exposure sequence to a single image.
15 | */
16 | public class MergeExposures extends Algorithm {
17 |
18 | protected MergeExposures(long addr) { super(addr); }
19 |
20 | // internal usage only
21 | public static MergeExposures __fromPtr__(long addr) { return new MergeExposures(addr); }
22 |
23 | //
24 | // C++: void cv::MergeExposures::process(vector_Mat src, Mat& dst, Mat times, Mat response)
25 | //
26 |
27 | /**
28 | * Merges images.
29 | *
30 | * @param src vector of input images
31 | * @param dst result image
32 | * @param times vector of exposure time values for each image
33 | * @param response 256x1 matrix with inverse camera response function for each pixel value, it should
34 | * have the same number of channels as images.
35 | */
36 | public void process(List src, Mat dst, Mat times, Mat response) {
37 | Mat src_mat = Converters.vector_Mat_to_Mat(src);
38 | process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
39 | }
40 |
41 |
42 | @Override
43 | protected void finalize() throws Throwable {
44 | delete(nativeObj);
45 | }
46 |
47 |
48 |
49 | // C++: void cv::MergeExposures::process(vector_Mat src, Mat& dst, Mat times, Mat response)
50 | private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj);
51 |
52 | // native support for java finalize()
53 | private static native void delete(long nativeObj);
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/photo/MergeMertensForPipeline.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.photo;
5 |
6 | import org.opencv.core.Mat;
7 |
8 | // C++: class MergeMertensForPipeline
9 |
10 | public class MergeMertensForPipeline {
11 |
12 | protected final long nativeObj;
13 | protected MergeMertensForPipeline(long addr) { nativeObj = addr; }
14 |
15 | public long getNativeObjAddr() { return nativeObj; }
16 |
17 | // internal usage only
18 | public static MergeMertensForPipeline __fromPtr__(long addr) { return new MergeMertensForPipeline(addr); }
19 |
20 | //
21 | // C++: void cv::MergeMertensForPipeline::push(Mat image)
22 | //
23 |
24 | public void push(Mat image) {
25 | push_0(nativeObj, image.nativeObj);
26 | }
27 |
28 |
29 | //
30 | // C++: void cv::MergeMertensForPipeline::pop()
31 | //
32 |
33 | public void pop() {
34 | pop_0(nativeObj);
35 | }
36 |
37 |
38 | //
39 | // C++: void cv::MergeMertensForPipeline::process(Mat& dst)
40 | //
41 |
42 | public void process(Mat dst) {
43 | process_0(nativeObj, dst.nativeObj);
44 | }
45 |
46 |
47 | //
48 | // C++: void cv::MergeMertensForPipeline::release()
49 | //
50 |
51 | public void release() {
52 | release_0(nativeObj);
53 | }
54 |
55 |
56 | @Override
57 | protected void finalize() throws Throwable {
58 | delete(nativeObj);
59 | }
60 |
61 |
62 |
63 | // C++: void cv::MergeMertensForPipeline::push(Mat image)
64 | private static native void push_0(long nativeObj, long image_nativeObj);
65 |
66 | // C++: void cv::MergeMertensForPipeline::pop()
67 | private static native void pop_0(long nativeObj);
68 |
69 | // C++: void cv::MergeMertensForPipeline::process(Mat& dst)
70 | private static native void process_0(long nativeObj, long dst_nativeObj);
71 |
72 | // C++: void cv::MergeMertensForPipeline::release()
73 | private static native void release_0(long nativeObj);
74 |
75 | // native support for java finalize()
76 | private static native void delete(long nativeObj);
77 |
78 | }
79 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/photo/MergeRobertson.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.photo;
5 |
6 | import java.util.ArrayList;
7 | import java.util.List;
8 | import org.opencv.core.Mat;
9 | import org.opencv.photo.MergeExposures;
10 | import org.opencv.utils.Converters;
11 |
12 | // C++: class MergeRobertson
13 | /**
14 | * The resulting HDR image is calculated as weighted average of the exposures considering exposure
15 | * values and camera response.
16 | *
17 | * For more information see CITE: RB99 .
18 | */
19 | public class MergeRobertson extends MergeExposures {
20 |
21 | protected MergeRobertson(long addr) { super(addr); }
22 |
23 | // internal usage only
24 | public static MergeRobertson __fromPtr__(long addr) { return new MergeRobertson(addr); }
25 |
26 | //
27 | // C++: void cv::MergeRobertson::process(vector_Mat src, Mat& dst, Mat times, Mat response)
28 | //
29 |
30 | public void process(List src, Mat dst, Mat times, Mat response) {
31 | Mat src_mat = Converters.vector_Mat_to_Mat(src);
32 | process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj);
33 | }
34 |
35 |
36 | //
37 | // C++: void cv::MergeRobertson::process(vector_Mat src, Mat& dst, Mat times)
38 | //
39 |
40 | public void process(List src, Mat dst, Mat times) {
41 | Mat src_mat = Converters.vector_Mat_to_Mat(src);
42 | process_1(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj);
43 | }
44 |
45 |
46 | @Override
47 | protected void finalize() throws Throwable {
48 | delete(nativeObj);
49 | }
50 |
51 |
52 |
53 | // C++: void cv::MergeRobertson::process(vector_Mat src, Mat& dst, Mat times, Mat response)
54 | private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj);
55 |
56 | // C++: void cv::MergeRobertson::process(vector_Mat src, Mat& dst, Mat times)
57 | private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj);
58 |
59 | // native support for java finalize()
60 | private static native void delete(long nativeObj);
61 |
62 | }
63 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/photo/Tonemap.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.photo;
5 |
6 | import org.opencv.core.Algorithm;
7 | import org.opencv.core.Mat;
8 |
9 | // C++: class Tonemap
10 | /**
11 | * Base class for tonemapping algorithms - tools that are used to map HDR image to 8-bit range.
12 | */
13 | public class Tonemap extends Algorithm {
14 |
15 | protected Tonemap(long addr) { super(addr); }
16 |
17 | // internal usage only
18 | public static Tonemap __fromPtr__(long addr) { return new Tonemap(addr); }
19 |
20 | //
21 | // C++: void cv::Tonemap::process(Mat src, Mat& dst)
22 | //
23 |
24 | /**
25 | * Tonemaps image
26 | *
27 | * @param src source image - CV_32FC3 Mat (float 32 bits 3 channels)
28 | * @param dst destination image - CV_32FC3 Mat with values in [0, 1] range
29 | */
30 | public void process(Mat src, Mat dst) {
31 | process_0(nativeObj, src.nativeObj, dst.nativeObj);
32 | }
33 |
34 |
35 | //
36 | // C++: float cv::Tonemap::getGamma()
37 | //
38 |
39 | public float getGamma() {
40 | return getGamma_0(nativeObj);
41 | }
42 |
43 |
44 | //
45 | // C++: void cv::Tonemap::setGamma(float gamma)
46 | //
47 |
48 | public void setGamma(float gamma) {
49 | setGamma_0(nativeObj, gamma);
50 | }
51 |
52 |
53 | @Override
54 | protected void finalize() throws Throwable {
55 | delete(nativeObj);
56 | }
57 |
58 |
59 |
60 | // C++: void cv::Tonemap::process(Mat src, Mat& dst)
61 | private static native void process_0(long nativeObj, long src_nativeObj, long dst_nativeObj);
62 |
63 | // C++: float cv::Tonemap::getGamma()
64 | private static native float getGamma_0(long nativeObj);
65 |
66 | // C++: void cv::Tonemap::setGamma(float gamma)
67 | private static native void setGamma_0(long nativeObj, float gamma);
68 |
69 | // native support for java finalize()
70 | private static native void delete(long nativeObj);
71 |
72 | }
73 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/photo/TonemapDrago.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.photo;
5 |
6 | import org.opencv.photo.Tonemap;
7 |
8 | // C++: class TonemapDrago
9 | /**
10 | * Adaptive logarithmic mapping is a fast global tonemapping algorithm that scales the image in
11 | * logarithmic domain.
12 | *
13 | * Since it's a global operator the same function is applied to all the pixels, it is controlled by the
14 | * bias parameter.
15 | *
16 | * Optional saturation enhancement is possible as described in CITE: FL02 .
17 | *
18 | * For more information see CITE: DM03 .
19 | */
20 | public class TonemapDrago extends Tonemap {
21 |
22 | protected TonemapDrago(long addr) { super(addr); }
23 |
24 | // internal usage only
25 | public static TonemapDrago __fromPtr__(long addr) { return new TonemapDrago(addr); }
26 |
27 | //
28 | // C++: float cv::TonemapDrago::getSaturation()
29 | //
30 |
31 | public float getSaturation() {
32 | return getSaturation_0(nativeObj);
33 | }
34 |
35 |
36 | //
37 | // C++: void cv::TonemapDrago::setSaturation(float saturation)
38 | //
39 |
40 | public void setSaturation(float saturation) {
41 | setSaturation_0(nativeObj, saturation);
42 | }
43 |
44 |
45 | //
46 | // C++: float cv::TonemapDrago::getBias()
47 | //
48 |
49 | public float getBias() {
50 | return getBias_0(nativeObj);
51 | }
52 |
53 |
54 | //
55 | // C++: void cv::TonemapDrago::setBias(float bias)
56 | //
57 |
58 | public void setBias(float bias) {
59 | setBias_0(nativeObj, bias);
60 | }
61 |
62 |
63 | @Override
64 | protected void finalize() throws Throwable {
65 | delete(nativeObj);
66 | }
67 |
68 |
69 |
70 | // C++: float cv::TonemapDrago::getSaturation()
71 | private static native float getSaturation_0(long nativeObj);
72 |
73 | // C++: void cv::TonemapDrago::setSaturation(float saturation)
74 | private static native void setSaturation_0(long nativeObj, float saturation);
75 |
76 | // C++: float cv::TonemapDrago::getBias()
77 | private static native float getBias_0(long nativeObj);
78 |
79 | // C++: void cv::TonemapDrago::setBias(float bias)
80 | private static native void setBias_0(long nativeObj, float bias);
81 |
82 | // native support for java finalize()
83 | private static native void delete(long nativeObj);
84 |
85 | }
86 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/photo/TonemapMantiuk.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.photo;
5 |
6 | import org.opencv.photo.Tonemap;
7 |
8 | // C++: class TonemapMantiuk
9 | /**
10 | * This algorithm transforms image to contrast using gradients on all levels of gaussian pyramid,
11 | * transforms contrast values to HVS response and scales the response. After this the image is
12 | * reconstructed from new contrast values.
13 | *
14 | * For more information see CITE: MM06 .
15 | */
16 | public class TonemapMantiuk extends Tonemap {
17 |
18 | protected TonemapMantiuk(long addr) { super(addr); }
19 |
20 | // internal usage only
21 | public static TonemapMantiuk __fromPtr__(long addr) { return new TonemapMantiuk(addr); }
22 |
23 | //
24 | // C++: float cv::TonemapMantiuk::getScale()
25 | //
26 |
27 | public float getScale() {
28 | return getScale_0(nativeObj);
29 | }
30 |
31 |
32 | //
33 | // C++: void cv::TonemapMantiuk::setScale(float scale)
34 | //
35 |
36 | public void setScale(float scale) {
37 | setScale_0(nativeObj, scale);
38 | }
39 |
40 |
41 | //
42 | // C++: float cv::TonemapMantiuk::getSaturation()
43 | //
44 |
45 | public float getSaturation() {
46 | return getSaturation_0(nativeObj);
47 | }
48 |
49 |
50 | //
51 | // C++: void cv::TonemapMantiuk::setSaturation(float saturation)
52 | //
53 |
54 | public void setSaturation(float saturation) {
55 | setSaturation_0(nativeObj, saturation);
56 | }
57 |
58 |
59 | @Override
60 | protected void finalize() throws Throwable {
61 | delete(nativeObj);
62 | }
63 |
64 |
65 |
66 | // C++: float cv::TonemapMantiuk::getScale()
67 | private static native float getScale_0(long nativeObj);
68 |
69 | // C++: void cv::TonemapMantiuk::setScale(float scale)
70 | private static native void setScale_0(long nativeObj, float scale);
71 |
72 | // C++: float cv::TonemapMantiuk::getSaturation()
73 | private static native float getSaturation_0(long nativeObj);
74 |
75 | // C++: void cv::TonemapMantiuk::setSaturation(float saturation)
76 | private static native void setSaturation_0(long nativeObj, float saturation);
77 |
78 | // native support for java finalize()
79 | private static native void delete(long nativeObj);
80 |
81 | }
82 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/video/DenseOpticalFlow.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.video;
5 |
6 | import org.opencv.core.Algorithm;
7 | import org.opencv.core.Mat;
8 |
9 | // C++: class DenseOpticalFlow
10 | /**
11 | * Base class for dense optical flow algorithms
12 | */
13 | public class DenseOpticalFlow extends Algorithm {
14 |
15 | protected DenseOpticalFlow(long addr) { super(addr); }
16 |
17 | // internal usage only
18 | public static DenseOpticalFlow __fromPtr__(long addr) { return new DenseOpticalFlow(addr); }
19 |
20 | //
21 | // C++: void cv::DenseOpticalFlow::calc(Mat I0, Mat I1, Mat& flow)
22 | //
23 |
24 | /**
25 | * Calculates an optical flow.
26 | *
27 | * @param I0 first 8-bit single-channel input image.
28 | * @param I1 second input image of the same size and the same type as prev.
29 | * @param flow computed flow image that has the same size as prev and type CV_32FC2.
30 | */
31 | public void calc(Mat I0, Mat I1, Mat flow) {
32 | calc_0(nativeObj, I0.nativeObj, I1.nativeObj, flow.nativeObj);
33 | }
34 |
35 |
36 | //
37 | // C++: void cv::DenseOpticalFlow::collectGarbage()
38 | //
39 |
40 | /**
41 | * Releases all inner buffers.
42 | */
43 | public void collectGarbage() {
44 | collectGarbage_0(nativeObj);
45 | }
46 |
47 |
48 | @Override
49 | protected void finalize() throws Throwable {
50 | delete(nativeObj);
51 | }
52 |
53 |
54 |
55 | // C++: void cv::DenseOpticalFlow::calc(Mat I0, Mat I1, Mat& flow)
56 | private static native void calc_0(long nativeObj, long I0_nativeObj, long I1_nativeObj, long flow_nativeObj);
57 |
58 | // C++: void cv::DenseOpticalFlow::collectGarbage()
59 | private static native void collectGarbage_0(long nativeObj);
60 |
61 | // native support for java finalize()
62 | private static native void delete(long nativeObj);
63 |
64 | }
65 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/video/TrackerDaSiamRPN.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.video;
5 |
6 | import org.opencv.video.Tracker;
7 | import org.opencv.video.TrackerDaSiamRPN;
8 | import org.opencv.video.TrackerDaSiamRPN_Params;
9 |
10 | // C++: class TrackerDaSiamRPN
11 |
12 | public class TrackerDaSiamRPN extends Tracker {
13 |
14 | protected TrackerDaSiamRPN(long addr) { super(addr); }
15 |
16 | // internal usage only
17 | public static TrackerDaSiamRPN __fromPtr__(long addr) { return new TrackerDaSiamRPN(addr); }
18 |
19 | //
20 | // C++: static Ptr_TrackerDaSiamRPN cv::TrackerDaSiamRPN::create(TrackerDaSiamRPN_Params parameters = TrackerDaSiamRPN::Params())
21 | //
22 |
23 | /**
24 | * Constructor
25 | * @param parameters DaSiamRPN parameters TrackerDaSiamRPN::Params
26 | * @return automatically generated
27 | */
28 | public static TrackerDaSiamRPN create(TrackerDaSiamRPN_Params parameters) {
29 | return TrackerDaSiamRPN.__fromPtr__(create_0(parameters.nativeObj));
30 | }
31 |
32 | /**
33 | * Constructor
34 | * @return automatically generated
35 | */
36 | public static TrackerDaSiamRPN create() {
37 | return TrackerDaSiamRPN.__fromPtr__(create_1());
38 | }
39 |
40 |
41 | //
42 | // C++: float cv::TrackerDaSiamRPN::getTrackingScore()
43 | //
44 |
45 | /**
46 | * Return tracking score
47 | * @return automatically generated
48 | */
49 | public float getTrackingScore() {
50 | return getTrackingScore_0(nativeObj);
51 | }
52 |
53 |
54 | @Override
55 | protected void finalize() throws Throwable {
56 | delete(nativeObj);
57 | }
58 |
59 |
60 |
61 | // C++: static Ptr_TrackerDaSiamRPN cv::TrackerDaSiamRPN::create(TrackerDaSiamRPN_Params parameters = TrackerDaSiamRPN::Params())
62 | private static native long create_0(long parameters_nativeObj);
63 | private static native long create_1();
64 |
65 | // C++: float cv::TrackerDaSiamRPN::getTrackingScore()
66 | private static native float getTrackingScore_0(long nativeObj);
67 |
68 | // native support for java finalize()
69 | private static native void delete(long nativeObj);
70 |
71 | }
72 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/video/TrackerGOTURN_Params.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.video;
5 |
6 |
7 |
8 | // C++: class Params
9 |
10 | public class TrackerGOTURN_Params {
11 |
12 | protected final long nativeObj;
13 | protected TrackerGOTURN_Params(long addr) { nativeObj = addr; }
14 |
15 | public long getNativeObjAddr() { return nativeObj; }
16 |
17 | // internal usage only
18 | public static TrackerGOTURN_Params __fromPtr__(long addr) { return new TrackerGOTURN_Params(addr); }
19 |
20 | //
21 | // C++: cv::TrackerGOTURN::Params::Params()
22 | //
23 |
24 | public TrackerGOTURN_Params() {
25 | nativeObj = TrackerGOTURN_Params_0();
26 | }
27 |
28 |
29 | //
30 | // C++: string TrackerGOTURN_Params::modelTxt
31 | //
32 |
33 | public String get_modelTxt() {
34 | return get_modelTxt_0(nativeObj);
35 | }
36 |
37 |
38 | //
39 | // C++: void TrackerGOTURN_Params::modelTxt
40 | //
41 |
42 | public void set_modelTxt(String modelTxt) {
43 | set_modelTxt_0(nativeObj, modelTxt);
44 | }
45 |
46 |
47 | //
48 | // C++: string TrackerGOTURN_Params::modelBin
49 | //
50 |
51 | public String get_modelBin() {
52 | return get_modelBin_0(nativeObj);
53 | }
54 |
55 |
56 | //
57 | // C++: void TrackerGOTURN_Params::modelBin
58 | //
59 |
60 | public void set_modelBin(String modelBin) {
61 | set_modelBin_0(nativeObj, modelBin);
62 | }
63 |
64 |
65 | @Override
66 | protected void finalize() throws Throwable {
67 | delete(nativeObj);
68 | }
69 |
70 |
71 |
72 | // C++: cv::TrackerGOTURN::Params::Params()
73 | private static native long TrackerGOTURN_Params_0();
74 |
75 | // C++: string TrackerGOTURN_Params::modelTxt
76 | private static native String get_modelTxt_0(long nativeObj);
77 |
78 | // C++: void TrackerGOTURN_Params::modelTxt
79 | private static native void set_modelTxt_0(long nativeObj, String modelTxt);
80 |
81 | // C++: string TrackerGOTURN_Params::modelBin
82 | private static native String get_modelBin_0(long nativeObj);
83 |
84 | // C++: void TrackerGOTURN_Params::modelBin
85 | private static native void set_modelBin_0(long nativeObj, String modelBin);
86 |
87 | // native support for java finalize()
88 | private static native void delete(long nativeObj);
89 |
90 | }
91 |
--------------------------------------------------------------------------------
/opencv/src/main/java/org/opencv/video/TrackerMIL.java:
--------------------------------------------------------------------------------
1 | //
2 | // This file is auto-generated. Please don't modify it!
3 | //
4 | package org.opencv.video;
5 |
6 | import org.opencv.video.Tracker;
7 | import org.opencv.video.TrackerMIL;
8 | import org.opencv.video.TrackerMIL_Params;
9 |
10 | // C++: class TrackerMIL
11 | /**
12 | * The MIL algorithm trains a classifier in an online manner to separate the object from the
13 | * background.
14 | *
15 | * Multiple Instance Learning avoids the drift problem for a robust tracking. The implementation is
16 | * based on CITE: MIL .
17 | *
18 | * Original code can be found here <http://vision.ucsd.edu/~bbabenko/project_miltrack.shtml>
19 | */
20 | public class TrackerMIL extends Tracker {
21 |
22 | protected TrackerMIL(long addr) { super(addr); }
23 |
24 | // internal usage only
25 | public static TrackerMIL __fromPtr__(long addr) { return new TrackerMIL(addr); }
26 |
27 | //
28 | // C++: static Ptr_TrackerMIL cv::TrackerMIL::create(TrackerMIL_Params parameters = TrackerMIL::Params())
29 | //
30 |
31 | /**
32 | * Create MIL tracker instance
33 | * @param parameters MIL parameters TrackerMIL::Params
34 | * @return automatically generated
35 | */
36 | public static TrackerMIL create(TrackerMIL_Params parameters) {
37 | return TrackerMIL.__fromPtr__(create_0(parameters.nativeObj));
38 | }
39 |
40 | /**
41 | * Create MIL tracker instance
42 | * @return automatically generated
43 | */
44 | public static TrackerMIL create() {
45 | return TrackerMIL.__fromPtr__(create_1());
46 | }
47 |
48 |
49 | @Override
50 | protected void finalize() throws Throwable {
51 | delete(nativeObj);
52 | }
53 |
54 |
55 |
56 | // C++: static Ptr_TrackerMIL cv::TrackerMIL::create(TrackerMIL_Params parameters = TrackerMIL::Params())
57 | private static native long create_0(long parameters_nativeObj);
58 | private static native long create_1();
59 |
60 | // native support for java finalize()
61 | private static native void delete(long nativeObj);
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/opencv/src/main/jniLibs/arm64-v8a/libc++_shared.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/opencv/src/main/jniLibs/arm64-v8a/libc++_shared.so
--------------------------------------------------------------------------------
/opencv/src/main/jniLibs/arm64-v8a/libopencv_java4.so:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/opencv/src/main/jniLibs/arm64-v8a/libopencv_java4.so
--------------------------------------------------------------------------------
/opencv/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/screenshots/input-info.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/screenshots/input-info.jpg
--------------------------------------------------------------------------------
/screenshots/main-screen.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/screenshots/main-screen.jpg
--------------------------------------------------------------------------------
/screenshots/media.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/screenshots/media.jpg
--------------------------------------------------------------------------------
/screenshots/parameters.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/screenshots/parameters.jpg
--------------------------------------------------------------------------------
/screenshots/toolbar.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/danopdev/TimeLapse/660f23911c644bdcb278e3929dcff3569f52a884/screenshots/toolbar.jpg
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 | rootProject.name = "TimeLapse"
3 | include ':opencv'
4 |
--------------------------------------------------------------------------------