diff --git a/.gitignore b/.gitignore
index 6ed87a3f8..789f2728f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -44,7 +44,7 @@ selfdrive/sensord/_gpsd
selfdrive/sensord/_sensord
selfdrive/camerad/camerad
selfdrive/modeld/_modeld
-selfdrive/modeld/_monitoringd
+selfdrive/modeld/_dmonitoringmodeld
/src/
one
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 738679aca..b4cccc2da 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,3 +29,12 @@ Code is automatically check for style by travis as part of the automated tests.
We've released a [Model Port guide](https://medium.com/@comma_ai/openpilot-port-guide-for-toyota-models-e5467f4b5fe6) for porting to Toyota/Lexus models.
If you port openpilot to a substantially new car brand, see this more generic [Brand Port guide](https://medium.com/@comma_ai/how-to-write-a-car-port-for-openpilot-7ce0785eda84). You might also be eligible for a bounty. See our bounties at [comma.ai/bounties.html](https://comma.ai/bounties.html)
+
+## Pull Requests
+
+Pull requests should be against the master branch. Before running master on in-car hardware, you'll need to run
+```
+git submodule init
+git submodule update
+```
+in order to pull down the submodules, such as `panda` and `opendbc`.
diff --git a/Dockerfile.openpilot b/Dockerfile.openpilot
deleted file mode 100644
index 9faa5c282..000000000
--- a/Dockerfile.openpilot
+++ /dev/null
@@ -1,84 +0,0 @@
-FROM ubuntu:16.04
-ENV PYTHONUNBUFFERED 1
-
-RUN apt-get update && apt-get install -y \
- autoconf \
- build-essential \
- bzip2 \
- clang \
- cmake \
- curl \
- ffmpeg \
- git \
- libarchive-dev \
- libbz2-dev \
- libcurl4-openssl-dev \
- libeigen3-dev \
- libffi-dev \
- libglew-dev \
- libgles2-mesa-dev \
- libglfw3-dev \
- libglib2.0-0 \
- liblzma-dev \
- libmysqlclient-dev \
- libomp-dev \
- libopencv-dev \
- libssl-dev \
- libsqlite3-dev \
- libtool \
- libusb-1.0-0-dev \
- libzmq5-dev \
- locales \
- ocl-icd-libopencl1 \
- ocl-icd-opencl-dev \
- opencl-headers \
- python-dev \
- python-pip \
- screen \
- sudo \
- vim \
- wget
-
-
-RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && locale-gen
-ENV LANG en_US.UTF-8
-ENV LANGUAGE en_US:en
-ENV LC_ALL en_US.UTF-8
-
-RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
-
-ENV PATH="/root/.pyenv/bin:/root/.pyenv/shims:${PATH}"
-RUN pyenv install 3.7.3
-RUN pyenv global 3.7.3
-RUN pyenv rehash
-
-RUN pip install pipenv==2018.11.26
-
-COPY Pipfile /tmp/
-COPY Pipfile.lock /tmp/
-
-RUN python --version
-RUN cd /tmp && pipenv install --system --deploy
-
-# Install subset of dev dependencies needed for CI
-RUN pip install matplotlib==3.1.1 dictdiffer==0.8.0 fastcluster==1.1.25 aenum==2.2.1 scipy==1.3.1 lru-dict==1.1.6 tenacity==5.1.1 azure-common==1.1.23 azure-nspkg==3.0.2 azure-storage-blob==2.1.0 azure-storage-common==2.1.0 azure-storage-nspkg==3.1.0 pycurl==7.43.0.3
-
-COPY phonelibs/install_capnp.sh /tmp/install_capnp.sh
-RUN /tmp/install_capnp.sh
-
-RUN git clone --branch v0.7 https://github.com/commaai/openpilot-tools.git /tmp/openpilot/tools
-
-ENV PYTHONPATH /tmp/openpilot:${PYTHONPATH}
-COPY ./.pylintrc /tmp/openpilot/.pylintrc
-COPY ./common /tmp/openpilot/common
-COPY ./cereal /tmp/openpilot/cereal
-COPY ./opendbc /tmp/openpilot/opendbc
-COPY ./selfdrive /tmp/openpilot/selfdrive
-COPY ./phonelibs /tmp/openpilot/phonelibs
-COPY ./pyextra /tmp/openpilot/pyextra
-COPY ./panda /tmp/openpilot/panda
-
-COPY SConstruct /tmp/openpilot/SConstruct
-
-RUN mkdir -p /tmp/openpilot/selfdrive/test/out
-RUN cd /tmp/openpilot && scons -j$(nproc)
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 4f690b2e7..000000000
--- a/Makefile
+++ /dev/null
@@ -1,9 +0,0 @@
-
-code_dir := $(shell pwd)
-
-# TODO: Add a global build system
-
-.PHONY: all
-all:
- cd selfdrive && PYTHONPATH=$(code_dir) PREPAREONLY=1 ./manager.py
-
diff --git a/Pipfile b/Pipfile
deleted file mode 100644
index 4d3e046de..000000000
--- a/Pipfile
+++ /dev/null
@@ -1,128 +0,0 @@
-[[source]]
-name = "pypi"
-url = "https://pypi.org/simple"
-verify_ssl = true
-
-[dev-packages]
-opencv-python= "==3.4.2.17"
-PyQt5 = "*"
-ipython = "*"
-networkx = "==2.3"
-azure-core = "==1.1.1"
-azure-common = "==1.1.24"
-azure-nspkg = "==3.0.2"
-azure-storage-blob = "==2.1.0"
-azure-storage-common = "==2.1.0"
-azure-storage-nspkg = "==3.1.0"
-boto = "*"
-"boto3" = "*"
-control = "*"
-datadog = "*"
-dlib = "*"
-elasticsearch = "*"
-future = "*"
-futures = "*"
-pycocotools = {git = "https://github.com/cocodataset/cocoapi.git",subdirectory = "PythonAPI"}
-gunicorn = "*"
-"h5py" = "*"
-hexdump = "*"
-"html5lib" = "*"
-imageio = "*"
-ipykernel = "*"
-joblib = "*"
-json-logging-py = "*"
-jupyter = "*"
-libarchive = "*"
-lru-dict = "*"
-"mpld3" = "*"
-msgpack-python = "*"
-nbstripout = "*"
-numpy = "*"
-osmium = "*"
-pbr = "*"
-percache = "*"
-pprofile = "*"
-pycurl = "*"
-git-pylint-commit-hook = "*"
-pymongo = "*"
-"pynmea2" = "*"
-pypolyline = "*"
-python-logstash = "*"
-redis = "*"
-"s2sphere" = "*"
-scikit-image = "*"
-"subprocess32" = "*"
-tenacity = "*"
-tensorflow-gpu = ""
-PyJWT = "==1.4.1"
-PyMySQL = "==0.9.2"
-Werkzeug = "*"
-"backports.lzma" = "*"
-Flask-Cors = "*"
-Flask-SocketIO = "*"
-"GeoAlchemy2" = "*"
-Pygments = "*"
-PyNaCl = "*"
-"PySDL2" = "*"
-reverse_geocoder = "*"
-Shapely = "*"
-SQLAlchemy = "*"
-scipy = "*"
-fastcluster = "*"
-backports-abc = "*"
-pygame = "*"
-simplejson = "*"
-python-logstash-async = "*"
-seaborn = "*"
-pyproj = "*"
-mock = "*"
-matplotlib = "*"
-dictdiffer = "*"
-aenum = "*"
-coverage = "*"
-azure-cli-core = "*"
-
-[packages]
-overpy = {git = "https://github.com/commaai/python-overpy.git",ref = "f86529af402d4642e1faeb146671c40284007323"}
-atomicwrites = "*"
-cffi = "*"
-crcmod = "*"
-hexdump = "*"
-libusb1 = "*"
-numpy = "*"
-psutil = "*"
-pycapnp = "*"
-cryptography = "*"
-pyserial = "*"
-python-dateutil = "*"
-pyzmq = "*"
-raven = "*"
-requests = "*"
-setproctitle = "*"
-six = "*"
-smbus2 = "*"
-sympy = "*"
-tqdm = "*"
-Cython = "*"
-PyYAML = "*"
-websocket_client = "*"
-Logentries = {git = "https://github.com/commaai/le_python.git",ref = "feaeacb48f7f4bdb02c0a8fc092326d4e101b7f2"}
-urllib3 = "*"
-chardet = "*"
-idna = "*"
-gunicorn = "*"
-utm = "*"
-json-rpc = "*"
-Flask = "*"
-PyJWT = "*"
-"Jinja2" = "*"
-nose = "*"
-flake8 = "*"
-pylint = "*"
-pycryptodome = "*"
-pillow = "*"
-scons = "*"
-cysignals = "*"
-
-[requires]
-python_version = "3.7.3"
diff --git a/Pipfile.lock b/Pipfile.lock
deleted file mode 100644
index 045857cd1..000000000
--- a/Pipfile.lock
+++ /dev/null
@@ -1,2895 +0,0 @@
-{
- "_meta": {
- "hash": {
- "sha256": "bc5d2f0b8b59443cbdf4373de05f7522ff24afa7f6e55d1aae08c3961e970beb"
- },
- "pipfile-spec": 6,
- "requires": {
- "python_version": "3.7.3"
- },
- "sources": [
- {
- "name": "pypi",
- "url": "https://pypi.org/simple",
- "verify_ssl": true
- }
- ]
- },
- "default": {
- "astroid": {
- "hashes": [
- "sha256:71ea07f44df9568a75d0f354c49143a4575d90645e9fead6dfb52c26a85ed13a",
- "sha256:840947ebfa8b58f318d42301cf8c0a20fd794a33b61cc4638e28e9e61ba32f42"
- ],
- "markers": "python_version >= '3.5'",
- "version": "==2.3.3"
- },
- "atomicwrites": {
- "hashes": [
- "sha256:03472c30eb2c5d1ba9227e4c2ca66ab8287fbfbbda3888aa93dc2e28fc6811b4",
- "sha256:75a9445bac02d8d058d5e1fe689654ba5a6556a1dfd8ce6ec55a0ed79866cfa6"
- ],
- "index": "pypi",
- "version": "==1.3.0"
- },
- "certifi": {
- "hashes": [
- "sha256:017c25db2a153ce562900032d5bc68e9f191e44e9a0f762f373977de9df1fbb3",
- "sha256:25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f"
- ],
- "version": "==2019.11.28"
- },
- "cffi": {
- "hashes": [
- "sha256:0b49274afc941c626b605fb59b59c3485c17dc776dc3cc7cc14aca74cc19cc42",
- "sha256:0e3ea92942cb1168e38c05c1d56b0527ce31f1a370f6117f1d490b8dcd6b3a04",
- "sha256:135f69aecbf4517d5b3d6429207b2dff49c876be724ac0c8bf8e1ea99df3d7e5",
- "sha256:19db0cdd6e516f13329cba4903368bff9bb5a9331d3410b1b448daaadc495e54",
- "sha256:2781e9ad0e9d47173c0093321bb5435a9dfae0ed6a762aabafa13108f5f7b2ba",
- "sha256:291f7c42e21d72144bb1c1b2e825ec60f46d0a7468f5346841860454c7aa8f57",
- "sha256:2c5e309ec482556397cb21ede0350c5e82f0eb2621de04b2633588d118da4396",
- "sha256:2e9c80a8c3344a92cb04661115898a9129c074f7ab82011ef4b612f645939f12",
- "sha256:32a262e2b90ffcfdd97c7a5e24a6012a43c61f1f5a57789ad80af1d26c6acd97",
- "sha256:3c9fff570f13480b201e9ab69453108f6d98244a7f495e91b6c654a47486ba43",
- "sha256:415bdc7ca8c1c634a6d7163d43fb0ea885a07e9618a64bda407e04b04333b7db",
- "sha256:42194f54c11abc8583417a7cf4eaff544ce0de8187abaf5d29029c91b1725ad3",
- "sha256:4424e42199e86b21fc4db83bd76909a6fc2a2aefb352cb5414833c030f6ed71b",
- "sha256:4a43c91840bda5f55249413037b7a9b79c90b1184ed504883b72c4df70778579",
- "sha256:599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346",
- "sha256:5c4fae4e9cdd18c82ba3a134be256e98dc0596af1e7285a3d2602c97dcfa5159",
- "sha256:5ecfa867dea6fabe2a58f03ac9186ea64da1386af2159196da51c4904e11d652",
- "sha256:62f2578358d3a92e4ab2d830cd1c2049c9c0d0e6d3c58322993cc341bdeac22e",
- "sha256:6471a82d5abea994e38d2c2abc77164b4f7fbaaf80261cb98394d5793f11b12a",
- "sha256:6d4f18483d040e18546108eb13b1dfa1000a089bcf8529e30346116ea6240506",
- "sha256:71a608532ab3bd26223c8d841dde43f3516aa5d2bf37b50ac410bb5e99053e8f",
- "sha256:74a1d8c85fb6ff0b30fbfa8ad0ac23cd601a138f7509dc617ebc65ef305bb98d",
- "sha256:7b93a885bb13073afb0aa73ad82059a4c41f4b7d8eb8368980448b52d4c7dc2c",
- "sha256:7d4751da932caaec419d514eaa4215eaf14b612cff66398dd51129ac22680b20",
- "sha256:7f627141a26b551bdebbc4855c1157feeef18241b4b8366ed22a5c7d672ef858",
- "sha256:8169cf44dd8f9071b2b9248c35fc35e8677451c52f795daa2bb4643f32a540bc",
- "sha256:aa00d66c0fab27373ae44ae26a66a9e43ff2a678bf63a9c7c1a9a4d61172827a",
- "sha256:ccb032fda0873254380aa2bfad2582aedc2959186cce61e3a17abc1a55ff89c3",
- "sha256:d754f39e0d1603b5b24a7f8484b22d2904fa551fe865fd0d4c3332f078d20d4e",
- "sha256:d75c461e20e29afc0aee7172a0950157c704ff0dd51613506bd7d82b718e7410",
- "sha256:dcd65317dd15bc0451f3e01c80da2216a31916bdcffd6221ca1202d96584aa25",
- "sha256:e570d3ab32e2c2861c4ebe6ffcad6a8abf9347432a37608fe1fbd157b3f0036b",
- "sha256:fd43a88e045cf992ed09fa724b5315b790525f2676883a6ea64e3263bae6549d"
- ],
- "index": "pypi",
- "version": "==1.13.2"
- },
- "chardet": {
- "hashes": [
- "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
- "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
- ],
- "index": "pypi",
- "version": "==3.0.4"
- },
- "click": {
- "hashes": [
- "sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13",
- "sha256:5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==7.0"
- },
- "crcmod": {
- "hashes": [
- "sha256:50586ab48981f11e5b117523d97bb70864a2a1af246cf6e4f5c4a21ef4611cd1",
- "sha256:69a2e5c6c36d0f096a7beb4cd34e5f882ec5fd232efb710cdb85d4ff196bd52e",
- "sha256:737fb308fa2ce9aed2e29075f0d5980d4a89bfbec48a368c607c5c63b3efb90e",
- "sha256:dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e"
- ],
- "index": "pypi",
- "version": "==1.7"
- },
- "cryptography": {
- "hashes": [
- "sha256:02079a6addc7b5140ba0825f542c0869ff4df9a69c360e339ecead5baefa843c",
- "sha256:1df22371fbf2004c6f64e927668734070a8953362cd8370ddd336774d6743595",
- "sha256:369d2346db5934345787451504853ad9d342d7f721ae82d098083e1f49a582ad",
- "sha256:3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651",
- "sha256:44ff04138935882fef7c686878e1c8fd80a723161ad6a98da31e14b7553170c2",
- "sha256:4b1030728872c59687badcca1e225a9103440e467c17d6d1730ab3d2d64bfeff",
- "sha256:58363dbd966afb4f89b3b11dfb8ff200058fbc3b947507675c19ceb46104b48d",
- "sha256:6ec280fb24d27e3d97aa731e16207d58bd8ae94ef6eab97249a2afe4ba643d42",
- "sha256:7270a6c29199adc1297776937a05b59720e8a782531f1f122f2eb8467f9aab4d",
- "sha256:73fd30c57fa2d0a1d7a49c561c40c2f79c7d6c374cc7750e9ac7c99176f6428e",
- "sha256:7f09806ed4fbea8f51585231ba742b58cbcfbfe823ea197d8c89a5e433c7e912",
- "sha256:90df0cc93e1f8d2fba8365fb59a858f51a11a394d64dbf3ef844f783844cc793",
- "sha256:971221ed40f058f5662a604bd1ae6e4521d84e6cad0b7b170564cc34169c8f13",
- "sha256:a518c153a2b5ed6b8cc03f7ae79d5ffad7315ad4569b2d5333a13c38d64bd8d7",
- "sha256:b0de590a8b0979649ebeef8bb9f54394d3a41f66c5584fff4220901739b6b2f0",
- "sha256:b43f53f29816ba1db8525f006fa6f49292e9b029554b3eb56a189a70f2a40879",
- "sha256:d31402aad60ed889c7e57934a03477b572a03af7794fa8fb1780f21ea8f6551f",
- "sha256:de96157ec73458a7f14e3d26f17f8128c959084931e8997b9e655a39c8fde9f9",
- "sha256:df6b4dca2e11865e6cfbfb708e800efb18370f5a46fd601d3755bc7f85b3a8a2",
- "sha256:ecadccc7ba52193963c0475ac9f6fa28ac01e01349a2ca48509667ef41ffd2cf",
- "sha256:fb81c17e0ebe3358486cd8cc3ad78adbae58af12fc2bf2bc0bb84e8090fa5ce8"
- ],
- "index": "pypi",
- "version": "==2.8"
- },
- "cysignals": {
- "hashes": [
- "sha256:8107b67a0c5991f74b0e000c6fa9fe8efcb2a22c7ede5b017aac4c3e20fb7db2"
- ],
- "index": "pypi",
- "version": "==1.10.2"
- },
- "cython": {
- "hashes": [
- "sha256:03f6bbb380ad0acb744fb06e42996ea217e9d00016ca0ff6f2e7d60f580d0360",
- "sha256:05e8cfd3a3a6087aec49a1ae08a89171db991956209406d1e5576f9db70ece52",
- "sha256:05eb79efc8029d487251c8a2702a909a8ba33c332e06d2f3980866541bd81253",
- "sha256:094d28a34c3fa992ae02aea1edbe6ff89b3cc5870b6ee38b5baeb805dc57b013",
- "sha256:0c70e842e52e2f50cc43bad43b5e5bc515f30821a374e544abb0e0746f2350ff",
- "sha256:1dcdaa319558eb924294a554dcf6c12383ec947acc7e779e8d3622409a7f7d28",
- "sha256:1fc5bdda28f25fec44e4721677458aa509d743cd350862270309d61aa148d6ff",
- "sha256:280573a01d9348d44a42d6a9c651d9f7eb1fe9217df72555b2a118f902996a10",
- "sha256:298ceca7b0f0da4205fcb0b7c9ac9e120e2dafffd5019ba1618e84ef89434b5a",
- "sha256:4074a8bff0040035673cc6dd365a762476d6bff4d03d8ce6904e3e53f9a25dc8",
- "sha256:41e7068e95fbf9ec94b41437f989caf9674135e770a39cdb9c00de459bafd1bc",
- "sha256:47e5e1502d52ef03387cf9d3b3241007961a84a466e58a3b74028e1dd4957f8c",
- "sha256:521340844cf388d109ceb61397f3fd5250ccb622a1a8e93559e8de76c80940a9",
- "sha256:6c53338c1811f8c6d7f8cb7abd874810b15045e719e8207f957035c9177b4213",
- "sha256:75c2dda47dcc3c77449712b1417bb6b89ec3b7b02e18c64262494dceffdf455e",
- "sha256:773c5a98e463b52f7e8197254b39b703a5ea1972aef3a94b3b921515d77dd041",
- "sha256:78c3068dcba300d473fef57cdf523e34b37de522f5a494ef9ee1ac9b4b8bbe3f",
- "sha256:7bc18fc5a170f2c1cef5387a3d997c28942918bbee0f700e73fd2178ee8d474d",
- "sha256:7f89eff20e4a7a64b55210dac17aea711ed8a3f2e78f2ff784c0e984302583dd",
- "sha256:89458b49976b1dee5d89ab4ac943da3717b4292bf624367e862e4ee172fcce99",
- "sha256:986f871c0fa649b293061236b93782d25c293a8dd8117c7ba05f8a61bdc261ae",
- "sha256:a0f495a4fe5278aab278feee35e6102efecde5176a8a74dd28c28e3fc5c8d7c7",
- "sha256:a14aa436586c41633339415de82a41164691d02d3e661038da533be5d40794a5",
- "sha256:b8ab3ab38afc47d8f4fe629b836243544351cef681b6bdb1dc869028d6fdcbfb",
- "sha256:bb487881608ebd293592553c618f0c83316f4f13a64cb18605b1d2fb9fd3da3e",
- "sha256:c0b24bfe3431b3cb7ced323bca813dbd13aca973a1475b512d3331fd0de8ec60",
- "sha256:c7894c06205166d360ab2915ae306d1f7403e9ce3d3aaeff4095eaf98e42ce66",
- "sha256:d4039bb7f234ad32267c55e72fd49fb56078ea102f9d9d8559f6ec34d4887630",
- "sha256:e4d6bb8703d0319eb04b7319b12ea41580df44fd84d83ccda13ea463c6801414",
- "sha256:e8fab9911fd2fa8e5af407057cb8bdf87762f983cba483fa3234be20a9a0af77",
- "sha256:f3818e578e687cdb21dc4aa4a3bc6278c656c9c393e9eda14dd04943f478863d",
- "sha256:fe666645493d72712c46e4fbe8bec094b06aec3c337400479e9704439c9d9586"
- ],
- "index": "pypi",
- "version": "==0.29.14"
- },
- "entrypoints": {
- "hashes": [
- "sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19",
- "sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451"
- ],
- "markers": "python_version >= '2.7'",
- "version": "==0.3"
- },
- "flake8": {
- "hashes": [
- "sha256:45681a117ecc81e870cbf1262835ae4af5e7a8b08e40b944a8a6e6b895914cfb",
- "sha256:49356e766643ad15072a789a20915d3c91dc89fd313ccd71802303fd67e4deca"
- ],
- "index": "pypi",
- "version": "==3.7.9"
- },
- "flask": {
- "hashes": [
- "sha256:13f9f196f330c7c2c5d7a5cf91af894110ca0215ac051b5844701f2bfd934d52",
- "sha256:45eb5a6fd193d6cf7e0cf5d8a5b31f83d5faae0293695626f539a823e93b13f6"
- ],
- "index": "pypi",
- "version": "==1.1.1"
- },
- "gunicorn": {
- "hashes": [
- "sha256:1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626",
- "sha256:cd4a810dd51bf497552cf3f863b575dabd73d6ad6a91075b65936b151cbf4f9c"
- ],
- "index": "pypi",
- "version": "==20.0.4"
- },
- "hexdump": {
- "hashes": [
- "sha256:d781a43b0c16ace3f9366aade73e8ad3a7bd5137d58f0b45ab2d3f54876f20db"
- ],
- "index": "pypi",
- "version": "==3.3"
- },
- "idna": {
- "hashes": [
- "sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407",
- "sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"
- ],
- "index": "pypi",
- "version": "==2.8"
- },
- "isort": {
- "hashes": [
- "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1",
- "sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==4.3.21"
- },
- "itsdangerous": {
- "hashes": [
- "sha256:321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19",
- "sha256:b12271b2047cb23eeb98c8b5622e2e5c5e9abd9784a153e9d8ef9cb4dd09d749"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.1.0"
- },
- "jinja2": {
- "hashes": [
- "sha256:74320bb91f31270f9551d46522e33af46a80c3d619f4a4bf42b3164d30b5911f",
- "sha256:9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de"
- ],
- "index": "pypi",
- "version": "==2.10.3"
- },
- "json-rpc": {
- "hashes": [
- "sha256:84b45058e5ba95f49c7b6afcf7e03ab86bee89bf2c01f3ad8dd41fe114fc1f84",
- "sha256:def0dbcf5b7084fc31d677f2f5990d988d06497f2f47f13024274cfb2d5d7589"
- ],
- "index": "pypi",
- "version": "==1.13.0"
- },
- "lazy-object-proxy": {
- "hashes": [
- "sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d",
- "sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69a4d66c3fda3449",
- "sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c92d7d697e684c08",
- "sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213697e48d3902f5a",
- "sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182447281ebf3ac50",
- "sha256:5541cada25cd173702dbd99f8e22434105456314462326f06dba3e180f203dfd",
- "sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3db7bdaabaf6239",
- "sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4dc56701c8f2ffb",
- "sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a5569eee1cc6c1b9ea",
- "sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f6d0de31a80ec3e",
- "sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c8352789e103cf3156",
- "sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a1d2799f3edd142",
- "sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75e1a7bcc250d442",
- "sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536a60af2b7797c62",
- "sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0964a0a4149e3db",
- "sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551db1edae4ad1531",
- "sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799347cfc95952383",
- "sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfabb2568bd58afc5a",
- "sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24b921398affc357",
- "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4",
- "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.4.3"
- },
- "libusb1": {
- "hashes": [
- "sha256:adf64a4f3f5c94643a1286f8153bcf4bc787c348b38934aacd7fe17fbeebc571"
- ],
- "index": "pypi",
- "version": "==1.7.1"
- },
- "logentries": {
- "git": "https://github.com/commaai/le_python.git",
- "ref": "feaeacb48f7f4bdb02c0a8fc092326d4e101b7f2",
- "version": "==0.8"
- },
- "markupsafe": {
- "hashes": [
- "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473",
- "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161",
- "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235",
- "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5",
- "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff",
- "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b",
- "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1",
- "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e",
- "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183",
- "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66",
- "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1",
- "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1",
- "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e",
- "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b",
- "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905",
- "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735",
- "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d",
- "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e",
- "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d",
- "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c",
- "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21",
- "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2",
- "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5",
- "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b",
- "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6",
- "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f",
- "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f",
- "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.1.1"
- },
- "mccabe": {
- "hashes": [
- "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42",
- "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"
- ],
- "version": "==0.6.1"
- },
- "mpmath": {
- "hashes": [
- "sha256:fc17abe05fbab3382b61a123c398508183406fa132e0223874578e20946499f6"
- ],
- "version": "==1.1.0"
- },
- "nose": {
- "hashes": [
- "sha256:9ff7c6cc443f8c51994b34a667bbcf45afd6d945be7477b52e97516fd17c53ac",
- "sha256:dadcddc0aefbf99eea214e0f1232b94f2fa9bd98fa8353711dacb112bfcbbb2a",
- "sha256:f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
- ],
- "index": "pypi",
- "version": "==1.3.7"
- },
- "numpy": {
- "hashes": [
- "sha256:1786a08236f2c92ae0e70423c45e1e62788ed33028f94ca99c4df03f5be6b3c6",
- "sha256:17aa7a81fe7599a10f2b7d95856dc5cf84a4eefa45bc96123cbbc3ebc568994e",
- "sha256:20b26aaa5b3da029942cdcce719b363dbe58696ad182aff0e5dcb1687ec946dc",
- "sha256:2d75908ab3ced4223ccba595b48e538afa5ecc37405923d1fea6906d7c3a50bc",
- "sha256:39d2c685af15d3ce682c99ce5925cc66efc824652e10990d2462dfe9b8918c6a",
- "sha256:56bc8ded6fcd9adea90f65377438f9fea8c05fcf7c5ba766bef258d0da1554aa",
- "sha256:590355aeade1a2eaba17617c19edccb7db8d78760175256e3cf94590a1a964f3",
- "sha256:70a840a26f4e61defa7bdf811d7498a284ced303dfbc35acb7be12a39b2aa121",
- "sha256:77c3bfe65d8560487052ad55c6998a04b654c2fbc36d546aef2b2e511e760971",
- "sha256:9537eecf179f566fd1c160a2e912ca0b8e02d773af0a7a1120ad4f7507cd0d26",
- "sha256:9acdf933c1fd263c513a2df3dceecea6f3ff4419d80bf238510976bf9bcb26cd",
- "sha256:ae0975f42ab1f28364dcda3dde3cf6c1ddab3e1d4b2909da0cb0191fa9ca0480",
- "sha256:b3af02ecc999c8003e538e60c89a2b37646b39b688d4e44d7373e11c2debabec",
- "sha256:b6ff59cee96b454516e47e7721098e6ceebef435e3e21ac2d6c3b8b02628eb77",
- "sha256:b765ed3930b92812aa698a455847141869ef755a87e099fddd4ccf9d81fffb57",
- "sha256:c98c5ffd7d41611407a1103ae11c8b634ad6a43606eca3e2a5a269e5d6e8eb07",
- "sha256:cf7eb6b1025d3e169989416b1adcd676624c2dbed9e3bcb7137f51bfc8cc2572",
- "sha256:d92350c22b150c1cae7ebb0ee8b5670cc84848f6359cf6b5d8f86617098a9b73",
- "sha256:e422c3152921cece8b6a2fb6b0b4d73b6579bd20ae075e7d15143e711f3ca2ca",
- "sha256:e840f552a509e3380b0f0ec977e8124d0dc34dc0e68289ca28f4d7c1d0d79474",
- "sha256:f3d0a94ad151870978fb93538e95411c83899c9dc63e6fb65542f769568ecfa5"
- ],
- "index": "pypi",
- "version": "==1.18.1"
- },
- "overpy": {
- "git": "https://github.com/commaai/python-overpy.git",
- "ref": "f86529af402d4642e1faeb146671c40284007323",
- "version": "==0.4"
- },
- "pillow": {
- "hashes": [
- "sha256:0a628977ac2e01ca96aaae247ec2bd38e729631ddf2221b4b715446fd45505be",
- "sha256:4d9ed9a64095e031435af120d3c910148067087541131e82b3e8db302f4c8946",
- "sha256:54ebae163e8412aff0b9df1e88adab65788f5f5b58e625dc5c7f51eaf14a6837",
- "sha256:5bfef0b1cdde9f33881c913af14e43db69815c7e8df429ceda4c70a5e529210f",
- "sha256:5f3546ceb08089cedb9e8ff7e3f6a7042bb5b37c2a95d392fb027c3e53a2da00",
- "sha256:5f7ae9126d16194f114435ebb79cc536b5682002a4fa57fa7bb2cbcde65f2f4d",
- "sha256:62a889aeb0a79e50ecf5af272e9e3c164148f4bd9636cc6bcfa182a52c8b0533",
- "sha256:7406f5a9b2fd966e79e6abdaf700585a4522e98d6559ce37fc52e5c955fade0a",
- "sha256:8453f914f4e5a3d828281a6628cf517832abfa13ff50679a4848926dac7c0358",
- "sha256:87269cc6ce1e3dee11f23fa515e4249ae678dbbe2704598a51cee76c52e19cda",
- "sha256:875358310ed7abd5320f21dd97351d62de4929b0426cdb1eaa904b64ac36b435",
- "sha256:8ac6ce7ff3892e5deaab7abaec763538ffd011f74dc1801d93d3c5fc541feee2",
- "sha256:91b710e3353aea6fc758cdb7136d9bbdcb26b53cefe43e2cba953ac3ee1d3313",
- "sha256:9d2ba4ed13af381233e2d810ff3bab84ef9f18430a9b336ab69eaf3cd24299ff",
- "sha256:a62ec5e13e227399be73303ff301f2865bf68657d15ea50b038d25fc41097317",
- "sha256:ab76e5580b0ed647a8d8d2d2daee170e8e9f8aad225ede314f684e297e3643c2",
- "sha256:bf4003aa538af3f4205c5fac56eacaa67a6dd81e454ffd9e9f055fff9f1bc614",
- "sha256:bf598d2e37cf8edb1a2f26ed3fb255191f5232badea4003c16301cb94ac5bdd0",
- "sha256:c18f70dc27cc5d236f10e7834236aff60aadc71346a5bc1f4f83a4b3abee6386",
- "sha256:c5ed816632204a2fc9486d784d8e0d0ae754347aba99c811458d69fcdfd2a2f9",
- "sha256:dc058b7833184970d1248135b8b0ab702e6daa833be14035179f2acb78ff5636",
- "sha256:ff3797f2f16bf9d17d53257612da84dd0758db33935777149b3334c01ff68865"
- ],
- "index": "pypi",
- "version": "==7.0.0"
- },
- "psutil": {
- "hashes": [
- "sha256:094f899ac3ef72422b7e00411b4ed174e3c5a2e04c267db6643937ddba67a05b",
- "sha256:10b7f75cc8bd676cfc6fa40cd7d5c25b3f45a0e06d43becd7c2d2871cbb5e806",
- "sha256:1b1575240ca9a90b437e5a40db662acd87bbf181f6aa02f0204978737b913c6b",
- "sha256:21231ef1c1a89728e29b98a885b8e0a8e00d09018f6da5cdc1f43f988471a995",
- "sha256:28f771129bfee9fc6b63d83a15d857663bbdcae3828e1cb926e91320a9b5b5cd",
- "sha256:70387772f84fa5c3bb6a106915a2445e20ac8f9821c5914d7cbde148f4d7ff73",
- "sha256:b560f5cd86cf8df7bcd258a851ca1ad98f0d5b8b98748e877a0aec4e9032b465",
- "sha256:b74b43fecce384a57094a83d2778cdfc2e2d9a6afaadd1ebecb2e75e0d34e10d",
- "sha256:e85f727ffb21539849e6012f47b12f6dd4c44965e56591d8dec6e8bc9ab96f4a",
- "sha256:fd2e09bb593ad9bdd7429e779699d2d47c1268cbde4dda95fcd1bd17544a0217",
- "sha256:ffad8eb2ac614518bbe3c0b8eb9dffdb3a8d2e3a7d5da51c5b974fb723a5c5aa"
- ],
- "index": "pypi",
- "version": "==5.6.7"
- },
- "pycapnp": {
- "hashes": [
- "sha256:44e14a5ace399cf1753acb8bbce558b8c895c48fd2102d266c34eaff286824cf"
- ],
- "index": "pypi",
- "version": "==0.6.4"
- },
- "pycodestyle": {
- "hashes": [
- "sha256:95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56",
- "sha256:e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==2.5.0"
- },
- "pycparser": {
- "hashes": [
- "sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3"
- ],
- "version": "==2.19"
- },
- "pycryptodome": {
- "hashes": [
- "sha256:042ae873baadd0c33b4d699a5c5b976ade3233a979d972f98ca82314632d868c",
- "sha256:0502876279772b1384b660ccc91563d04490d562799d8e2e06b411e2d81128a9",
- "sha256:2de33ed0a95855735d5a0fc0c39603314df9e78ee8bbf0baa9692fb46b3b8bbb",
- "sha256:319e568baf86620b419d53063b18c216abf924875966efdfe06891b987196a45",
- "sha256:4372ec7518727172e1605c0843cdc5375d4771e447b8148c787b860260aae151",
- "sha256:48821950ffb9c836858d8fa09d7840b6df52eadd387a3c5acece55cb387743f9",
- "sha256:4b9533d4166ca07abdd49ce9d516666b1df944997fe135d4b21ac376aa624aff",
- "sha256:54456cf85130e01674d21fb1ab89ffccacb138a8ade88d72fa2b0ac898d2798b",
- "sha256:56fdd0e425f1b8fd3a00b6d96351f86226674974814c50534864d0124d48871f",
- "sha256:57b1b707363490c495ad0eeb38bd1b0e1697c497af25fad78d3a1ebf0477fd5b",
- "sha256:5c485ed6e9718ebcaa81138fa70ace9c563d202b56a8cee119b4085b023931f5",
- "sha256:63c103a22cbe9752f6ea9f1a0de129995bad91c4d03a66c67cffcf6ee0c9f1e1",
- "sha256:68fab8455efcbfe87c5d75015476f9b606227ffe244d57bfd66269451706e899",
- "sha256:6c2720696b10ae356040e888bde1239b8957fe18885ccf5e7b4e8dec882f0856",
- "sha256:72166c2ac520a5dbd2d90208b9c279161ec0861662a621892bd52fb6ca13ab91",
- "sha256:7c52308ac5b834331b2f107a490b2c27de024a229b61df4cdc5c131d563dfe98",
- "sha256:87d8d85b4792ca5e730fb7a519fbc3ed976c59dcf79c5204589c59afd56b9926",
- "sha256:896e9b6fd0762aa07b203c993fbbee7a1f1a4674c6886afd7bfa86f3d1be98a8",
- "sha256:8a799bea3c6617736e914a2e77c409f52893d382f619f088f8a80e2e21f573c1",
- "sha256:9d9945ac8375d5d8e60bd2a2e1df5882eaa315522eedf3ca868b1546dfa34eba",
- "sha256:9ef966c727de942de3e41aa8462c4b7b4bca70f19af5a3f99e31376589c11aac",
- "sha256:a168e73879619b467072509a223282a02c8047d932a48b74fbd498f27224aa04",
- "sha256:a30f501bbb32e01a49ef9e09ca1260e5ab49bf33a257080ec553e08997acc487",
- "sha256:a8ca2450394d3699c9f15ef25e8de9a24b401933716a1e39d37fa01f5fe3c58b",
- "sha256:aec4d42deb836b8fb3ba32f2ba1ef0d33dd3dc9d430b1479ee7a914490d15b5e",
- "sha256:b4af098f2a50f8d048ab12cabb59456585c0acf43d90ee79782d2d6d0ed59dba",
- "sha256:b55c60c321ac91945c60a40ac9896ac7a3d432bb3e8c14006dfd82ad5871c331",
- "sha256:c53348358408d94869059e16fba5ff3bef8c52c25b18421472aba272b9bb450f",
- "sha256:cbfd97f9e060f0d30245cd29fa267a9a84de9da97559366fca0a3f7655acc63f",
- "sha256:d3fe3f33ad52bf0c19ee6344b695ba44ffbfa16f3c29ca61116b48d97bd970fb",
- "sha256:e3a79a30d15d9c7c284a7734036ee8abdb5ca3a6f5774d293cdc9e1358c1dc10",
- "sha256:eec0689509389f19875f66ae8dedd59f982240cdab31b9f78a8dc266011df93a"
- ],
- "index": "pypi",
- "version": "==3.9.4"
- },
- "pyflakes": {
- "hashes": [
- "sha256:17dbeb2e3f4d772725c777fabc446d5634d1038f234e77343108ce445ea69ce0",
- "sha256:d976835886f8c5b31d47970ed689944a0262b5f3afa00a5a7b4dc81e5449f8a2"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==2.1.1"
- },
- "pyjwt": {
- "hashes": [
- "sha256:5c6eca3c2940464d106b99ba83b00c6add741c9becaec087fb7ccdefea71350e",
- "sha256:8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96"
- ],
- "index": "pypi",
- "version": "==1.7.1"
- },
- "pylint": {
- "hashes": [
- "sha256:3db5468ad013380e987410a8d6956226963aed94ecb5f9d3a28acca6d9ac36cd",
- "sha256:886e6afc935ea2590b462664b161ca9a5e40168ea99e5300935f6591ad467df4"
- ],
- "index": "pypi",
- "version": "==2.4.4"
- },
- "pyserial": {
- "hashes": [
- "sha256:6e2d401fdee0eab996cf734e67773a0143b932772ca8b42451440cfed942c627",
- "sha256:e0770fadba80c31013896c7e6ef703f72e7834965954a78e71a3049488d4d7d8"
- ],
- "index": "pypi",
- "version": "==3.4"
- },
- "python-dateutil": {
- "hashes": [
- "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c",
- "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"
- ],
- "index": "pypi",
- "version": "==2.8.1"
- },
- "pyyaml": {
- "hashes": [
- "sha256:059b2ee3194d718896c0ad077dd8c043e5e909d9180f387ce42012662a4946d6",
- "sha256:1cf708e2ac57f3aabc87405f04b86354f66799c8e62c28c5fc5f88b5521b2dbf",
- "sha256:24521fa2890642614558b492b473bee0ac1f8057a7263156b02e8b14c88ce6f5",
- "sha256:4fee71aa5bc6ed9d5f116327c04273e25ae31a3020386916905767ec4fc5317e",
- "sha256:70024e02197337533eef7b85b068212420f950319cc8c580261963aefc75f811",
- "sha256:74782fbd4d4f87ff04159e986886931456a1894c61229be9eaf4de6f6e44b99e",
- "sha256:940532b111b1952befd7db542c370887a8611660d2b9becff75d39355303d82d",
- "sha256:cb1f2f5e426dc9f07a7681419fe39cee823bb74f723f36f70399123f439e9b20",
- "sha256:dbbb2379c19ed6042e8f11f2a2c66d39cceb8aeace421bfc29d085d93eda3689",
- "sha256:e3a057b7a64f1222b56e47bcff5e4b94c4f61faac04c7c4ecb1985e18caa3994",
- "sha256:e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615"
- ],
- "index": "pypi",
- "version": "==5.3"
- },
- "pyzmq": {
- "hashes": [
- "sha256:01b588911714a6696283de3904f564c550c9e12e8b4995e173f1011755e01086",
- "sha256:0573b9790aa26faff33fba40f25763657271d26f64bffb55a957a3d4165d6098",
- "sha256:0fa82b9fc3334478be95a5566f35f23109f763d1669bb762e3871a8fa2a4a037",
- "sha256:1e59b7b19396f26e360f41411a5d4603356d18871049cd7790f1a7d18f65fb2c",
- "sha256:2a294b4f44201bb21acc2c1a17ff87fbe57b82060b10ddb00ac03e57f3d7fcfa",
- "sha256:355b38d7dd6f884b8ee9771f59036bcd178d98539680c4f87e7ceb2c6fd057b6",
- "sha256:4b73d20aec63933bbda7957e30add233289d86d92a0bb9feb3f4746376f33527",
- "sha256:4ec47f2b50bdb97df58f1697470e5c58c3c5109289a623e30baf293481ff0166",
- "sha256:5541dc8cad3a8486d58bbed076cb113b65b5dd6b91eb94fb3e38a3d1d3022f20",
- "sha256:6fca7d11310430e751f9832257866a122edf9d7b635305c5d8c51f74a5174d3d",
- "sha256:7369656f89878455a5bcd5d56ca961884f5d096268f71c0750fc33d6732a25e5",
- "sha256:75d73ee7ca4b289a2a2dfe0e6bd8f854979fc13b3fe4ebc19381be3b04e37a4a",
- "sha256:80c928d5adcfa12346b08d31360988d843b54b94154575cccd628f1fe91446bc",
- "sha256:83ce18b133dc7e6789f64cb994e7376c5aa6b4aeced993048bf1d7f9a0fe6d3a",
- "sha256:8b8498ceee33a7023deb2f3db907ca41d6940321e282297327a9be41e3983792",
- "sha256:8c69a6cbfa94da29a34f6b16193e7c15f5d3220cb772d6d17425ff3faa063a6d",
- "sha256:8ff946b20d13a99dc5c21cb76f4b8b253eeddf3eceab4218df8825b0c65ab23d",
- "sha256:972d723a36ab6a60b7806faa5c18aa3c080b7d046c407e816a1d8673989e2485",
- "sha256:a6c9c42bbdba3f9c73aedbb7671815af1943ae8073e532c2b66efb72f39f4165",
- "sha256:aa3872f2ebfc5f9692ef8957fe69abe92d905a029c0608e45ebfcd451ad30ab5",
- "sha256:cf08435b14684f7f2ca2df32c9df38a79cdc17c20dc461927789216cb43d8363",
- "sha256:d30db4566177a6205ed1badb8dbbac3c043e91b12a2db5ef9171b318c5641b75",
- "sha256:d5ac84f38575a601ab20c1878818ffe0d09eb51d6cb8511b636da46d0fd8949a",
- "sha256:e37f22eb4bfbf69cd462c7000616e03b0cdc1b65f2d99334acad36ea0e4ddf6b",
- "sha256:e6549dd80de7b23b637f586217a4280facd14ac01e9410a037a13854a6977299",
- "sha256:ed6205ca0de035f252baa0fd26fdd2bc8a8f633f92f89ca866fd423ff26c6f25",
- "sha256:efdde21febb9b5d7a8e0b87ea2549d7e00fda1936459cfb27fb6fca0c36af6c1",
- "sha256:f4e72646bfe79ff3adbf1314906bbd2d67ef9ccc71a3a98b8b2ccbcca0ab7bec"
- ],
- "index": "pypi",
- "version": "==18.1.1"
- },
- "raven": {
- "hashes": [
- "sha256:3fa6de6efa2493a7c827472e984ce9b020797d0da16f1db67197bcc23c8fae54",
- "sha256:44a13f87670836e153951af9a3c80405d36b43097db869a36e92809673692ce4"
- ],
- "index": "pypi",
- "version": "==6.10.0"
- },
- "requests": {
- "hashes": [
- "sha256:11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4",
- "sha256:9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31"
- ],
- "index": "pypi",
- "version": "==2.22.0"
- },
- "scons": {
- "hashes": [
- "sha256:0f860678cd96fc943ff2294389b0f33cbe51080801591497bc652e72237f0176",
- "sha256:8aaa483c303efeb678e6f7c776c8444a482f8ddc3ad891f8b6cdd35264da9a1f"
- ],
- "index": "pypi",
- "version": "==3.1.2"
- },
- "setproctitle": {
- "hashes": [
- "sha256:6283b7a58477dd8478fbb9e76defb37968ee4ba47b05ec1c053cb39638bd7398",
- "sha256:6a035eddac62898786aed2c2eee7334c28cfc8106e8eb29fdd117cac56c6cdf0"
- ],
- "index": "pypi",
- "version": "==1.1.10"
- },
- "six": {
- "hashes": [
- "sha256:1f1b7d42e254082a9db6279deae68afb421ceba6158efa6131de7b3003ee93fd",
- "sha256:30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66"
- ],
- "index": "pypi",
- "version": "==1.13.0"
- },
- "smbus2": {
- "hashes": [
- "sha256:210e66eebe4d0b1fe836b3ec2751841942e1c4918c0b429b20a0e20a222228b4"
- ],
- "index": "pypi",
- "version": "==0.3.0"
- },
- "sympy": {
- "hashes": [
- "sha256:4880d3a351558063bd89febda302f220dc4b88de393bba81fa6539a3966f03fa",
- "sha256:d77901d748287d15281f5ffe5b0fef62dd38f357c2b827c44ff07f35695f4e7e"
- ],
- "index": "pypi",
- "version": "==1.5.1"
- },
- "tqdm": {
- "hashes": [
- "sha256:4789ccbb6fc122b5a6a85d512e4e41fc5acad77216533a6f2b8ce51e0f265c23",
- "sha256:efab950cf7cc1e4d8ee50b2bb9c8e4a89f8307b49e0b2c9cfef3ec4ca26655eb"
- ],
- "index": "pypi",
- "version": "==4.41.1"
- },
- "typed-ast": {
- "hashes": [
- "sha256:1170afa46a3799e18b4c977777ce137bb53c7485379d9706af8a59f2ea1aa161",
- "sha256:18511a0b3e7922276346bcb47e2ef9f38fb90fd31cb9223eed42c85d1312344e",
- "sha256:262c247a82d005e43b5b7f69aff746370538e176131c32dda9cb0f324d27141e",
- "sha256:2b907eb046d049bcd9892e3076c7a6456c93a25bebfe554e931620c90e6a25b0",
- "sha256:354c16e5babd09f5cb0ee000d54cfa38401d8b8891eefa878ac772f827181a3c",
- "sha256:48e5b1e71f25cfdef98b013263a88d7145879fbb2d5185f2a0c79fa7ebbeae47",
- "sha256:4e0b70c6fc4d010f8107726af5fd37921b666f5b31d9331f0bd24ad9a088e631",
- "sha256:630968c5cdee51a11c05a30453f8cd65e0cc1d2ad0d9192819df9978984529f4",
- "sha256:66480f95b8167c9c5c5c87f32cf437d585937970f3fc24386f313a4c97b44e34",
- "sha256:71211d26ffd12d63a83e079ff258ac9d56a1376a25bc80b1cdcdf601b855b90b",
- "sha256:7954560051331d003b4e2b3eb822d9dd2e376fa4f6d98fee32f452f52dd6ebb2",
- "sha256:838997f4310012cf2e1ad3803bce2f3402e9ffb71ded61b5ee22617b3a7f6b6e",
- "sha256:95bd11af7eafc16e829af2d3df510cecfd4387f6453355188342c3e79a2ec87a",
- "sha256:bc6c7d3fa1325a0c6613512a093bc2a2a15aeec350451cbdf9e1d4bffe3e3233",
- "sha256:cc34a6f5b426748a507dd5d1de4c1978f2eb5626d51326e43280941206c209e1",
- "sha256:d755f03c1e4a51e9b24d899561fec4ccaf51f210d52abdf8c07ee2849b212a36",
- "sha256:d7c45933b1bdfaf9f36c579671fec15d25b06c8398f113dab64c18ed1adda01d",
- "sha256:d896919306dd0aa22d0132f62a1b78d11aaf4c9fc5b3410d3c666b818191630a",
- "sha256:fdc1c9bbf79510b76408840e009ed65958feba92a88833cdceecff93ae8fff66",
- "sha256:ffde2fbfad571af120fcbfbbc61c72469e72f550d676c3342492a9dfdefb8f12"
- ],
- "markers": "python_version < '3.8' and implementation_name == 'cpython'",
- "version": "==1.4.0"
- },
- "urllib3": {
- "hashes": [
- "sha256:a8a318824cc77d1fd4b2bec2ded92646630d7fe8619497b142c84a9e6f5a7293",
- "sha256:f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745"
- ],
- "index": "pypi",
- "version": "==1.25.7"
- },
- "utm": {
- "hashes": [
- "sha256:07e55707ed660eec1ae983bd54a406c437962618a6261b38d70592fe30f5f508"
- ],
- "index": "pypi",
- "version": "==0.5.0"
- },
- "websocket-client": {
- "hashes": [
- "sha256:0fc45c961324d79c781bab301359d5a1b00b13ad1b10415a4780229ef71a5549",
- "sha256:d735b91d6d1692a6a181f2a8c9e0238e5f6373356f561bb9dc4c7af36f452010"
- ],
- "index": "pypi",
- "version": "==0.57.0"
- },
- "werkzeug": {
- "hashes": [
- "sha256:7280924747b5733b246fe23972186c6b348f9ae29724135a6dfc1e53cea433e7",
- "sha256:e5f4a1f98b52b18a93da705a7458e55afb26f32bff83ff5d19189f92462d65c4"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==0.16.0"
- },
- "wrapt": {
- "hashes": [
- "sha256:565a021fd19419476b9362b05eeaa094178de64f8361e44468f9e9d7843901e1"
- ],
- "version": "==1.11.2"
- }
- },
- "develop": {
- "absl-py": {
- "hashes": [
- "sha256:75e737d6ce7723d9ff9b7aa1ba3233c34be62ef18d5859e706b8fdc828989830"
- ],
- "version": "==0.9.0"
- },
- "adal": {
- "hashes": [
- "sha256:5a7f1e037c6290c6d7609cab33a9e5e988c2fbec5c51d1c4c649ee3faff37eaf",
- "sha256:fd17e5661f60634ddf96a569b95d34ccb8a98de60593d729c28bdcfe360eaad1"
- ],
- "version": "==1.2.2"
- },
- "aenum": {
- "hashes": [
- "sha256:284ddb976413d97239a932d7e5202ba58d66e5dbd81531bf3033ebb36ec30b23",
- "sha256:a4334cabf47c167d44ab5a6198837b80deec5d5bad1b5cf70c966c3a330260e8",
- "sha256:d2bb6ea7586aaae889d3a5c332eafa851eeffe6e7068807c79b6c86c4326b938"
- ],
- "index": "pypi",
- "version": "==2.2.3"
- },
- "antlr4-python3-runtime": {
- "hashes": [
- "sha256:168cdcec8fb9152e84a87ca6fd261b3d54c8f6358f42ab3b813b14a7193bb50b"
- ],
- "markers": "python_version >= '3.0'",
- "version": "==4.7.2"
- },
- "applicationinsights": {
- "hashes": [
- "sha256:30a11aafacea34f8b160fbdc35254c9029c7e325267874e3c68f6bdbcd6ed2c3",
- "sha256:b88bc5a41385d8e516489128d5e63f8c52efe597a3579b1718d1ab2f7cf150a2"
- ],
- "version": "==0.11.9"
- },
- "argcomplete": {
- "hashes": [
- "sha256:52a08b426bd0b03b6881182dd84149b2493540d1c3109ccf9f09f78e4459e387",
- "sha256:783d6a12c6c84a33653dc5bac4d6c0640ba64d1037c2662acd9dbe410c26056f"
- ],
- "version": "==1.11.0"
- },
- "astor": {
- "hashes": [
- "sha256:070a54e890cefb5b3739d19f30f5a5ec840ffc9c50ffa7d23cc9fc1a38ebbfc5",
- "sha256:6a6effda93f4e1ce9f618779b2dd1d9d84f1e32812c23a29b3fff6fd7f63fa5e"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==0.8.1"
- },
- "astroid": {
- "hashes": [
- "sha256:71ea07f44df9568a75d0f354c49143a4575d90645e9fead6dfb52c26a85ed13a",
- "sha256:840947ebfa8b58f318d42301cf8c0a20fd794a33b61cc4638e28e9e61ba32f42"
- ],
- "markers": "python_version >= '3.5'",
- "version": "==2.3.3"
- },
- "attrs": {
- "hashes": [
- "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c",
- "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==19.3.0"
- },
- "azure-cli-core": {
- "hashes": [
- "sha256:979954688c56cb76be7043e4c4ecc8433ce20dfc4d95ea42d6584b061cbafdb3",
- "sha256:bcd371210ccc83a29884a9add0fa84702538092926eefa4dfdb5075d71ccb6c2"
- ],
- "index": "pypi",
- "version": "==2.0.79"
- },
- "azure-cli-nspkg": {
- "hashes": [
- "sha256:1bde56090f548c6435bd3093995cf88e4c445fb040604df8b5b5f70780d79181",
- "sha256:9a1e4f3197183470e4afecfdd45c92320f6753555b06a70651f89972332ffaf6"
- ],
- "version": "==3.0.4"
- },
- "azure-cli-telemetry": {
- "hashes": [
- "sha256:1f239d544d309c29e827982cc20113eb57037dba16db6cdd2e0283e437e0e577",
- "sha256:7b18d7520e35e134136a0f7de38403a7dbce7b1e835065bd9e965579815ddf2f"
- ],
- "version": "==1.0.4"
- },
- "azure-common": {
- "hashes": [
- "sha256:184ad6a05a3089dfdc1ce07c1cbfa489bbc45b5f6f56e848cac0851e6443da21",
- "sha256:3d64e9ab995300f42abd5bc0ef02f02bab661321e394d4dbacb4382ea1fb2f72"
- ],
- "index": "pypi",
- "version": "==1.1.24"
- },
- "azure-core": {
- "hashes": [
- "sha256:4d047fd4e46a958c9b63f9d5cb52e6bf7dfc5c2a1c2a81b968499335a94bb5cb",
- "sha256:b44fe5b46d2bb0260cafb737ab5ee89a16d478fc1885dabe21c426c4df205502"
- ],
- "index": "pypi",
- "version": "==1.1.1"
- },
- "azure-mgmt-resource": {
- "hashes": [
- "sha256:a557a87fad2a2a5190d03e12cd7cf6307a194604e808773972c34847503b482b",
- "sha256:e04e867af9289a237cfe285995025555fcceb90de5deb420c540dca3a4c9c622"
- ],
- "version": "==6.0.0"
- },
- "azure-nspkg": {
- "hashes": [
- "sha256:1d0bbb2157cf57b1bef6c8c8e5b41133957364456c43b0a43599890023cca0a8",
- "sha256:31a060caca00ed1ebd369fc7fe01a56768c927e404ebc92268f4d9d636435e28",
- "sha256:e7d3cea6af63e667d87ba1ca4f8cd7cb4dfca678e4c55fc1cedb320760e39dd0"
- ],
- "index": "pypi",
- "version": "==3.0.2"
- },
- "azure-storage-blob": {
- "hashes": [
- "sha256:a8e91a51d4f62d11127c7fd8ba0077385c5b11022f0269f8a2a71b9fc36bef31",
- "sha256:b90323aad60f207f9f90a0c4cf94c10acc313c20b39403398dfba51f25f7b454"
- ],
- "index": "pypi",
- "version": "==2.1.0"
- },
- "azure-storage-common": {
- "hashes": [
- "sha256:b01a491a18839b9d05a4fe3421458a0ddb5ab9443c14e487f40d16f9a1dc2fbe",
- "sha256:ccedef5c67227bc4d6670ffd37cec18fb529a1b7c3a5e53e4096eb0cf23dc73f"
- ],
- "index": "pypi",
- "version": "==2.1.0"
- },
- "azure-storage-nspkg": {
- "hashes": [
- "sha256:6f3bbe8652d5f542767d8433e7f96b8df7f518774055ac7c92ed7ca85f653811",
- "sha256:7da3bd6c73b8c464a57f53ae9af8328490d2267c66430d8a7621997e52a9703e"
- ],
- "index": "pypi",
- "version": "==3.1.0"
- },
- "backcall": {
- "hashes": [
- "sha256:38ecd85be2c1e78f77fd91700c76e14667dc21e2713b63876c0eb901196e01e4",
- "sha256:bbbf4b1e5cd2bdb08f915895b51081c041bac22394fdfcfdfbe9f14b77c08bf2"
- ],
- "version": "==0.1.0"
- },
- "backports-abc": {
- "hashes": [
- "sha256:033be54514a03e255df75c5aee8f9e672f663f93abb723444caec8fe43437bde",
- "sha256:52089f97fe7a9aa0d3277b220c1d730a85aefd64e1b2664696fe35317c5470a7"
- ],
- "index": "pypi",
- "version": "==0.5"
- },
- "backports.lzma": {
- "hashes": [
- "sha256:16d8b68e4d3cd4e6c9ddb059850452946da3914c8a8e197a7f2b0954559f2df4"
- ],
- "index": "pypi",
- "version": "==0.0.14"
- },
- "bcrypt": {
- "hashes": [
- "sha256:0258f143f3de96b7c14f762c770f5fc56ccd72f8a1857a451c1cd9a655d9ac89",
- "sha256:0b0069c752ec14172c5f78208f1863d7ad6755a6fae6fe76ec2c80d13be41e42",
- "sha256:19a4b72a6ae5bb467fea018b825f0a7d917789bcfe893e53f15c92805d187294",
- "sha256:5432dd7b34107ae8ed6c10a71b4397f1c853bd39a4d6ffa7e35f40584cffd161",
- "sha256:6305557019906466fc42dbc53b46da004e72fd7a551c044a827e572c82191752",
- "sha256:69361315039878c0680be456640f8705d76cb4a3a3fe1e057e0f261b74be4b31",
- "sha256:6fe49a60b25b584e2f4ef175b29d3a83ba63b3a4df1b4c0605b826668d1b6be5",
- "sha256:74a015102e877d0ccd02cdeaa18b32aa7273746914a6c5d0456dd442cb65b99c",
- "sha256:763669a367869786bb4c8fcf731f4175775a5b43f070f50f46f0b59da45375d0",
- "sha256:8b10acde4e1919d6015e1df86d4c217d3b5b01bb7744c36113ea43d529e1c3de",
- "sha256:9fe92406c857409b70a38729dbdf6578caf9228de0aef5bc44f859ffe971a39e",
- "sha256:a190f2a5dbbdbff4b74e3103cef44344bc30e61255beb27310e2aec407766052",
- "sha256:a595c12c618119255c90deb4b046e1ca3bcfad64667c43d1166f2b04bc72db09",
- "sha256:c9457fa5c121e94a58d6505cadca8bed1c64444b83b3204928a866ca2e599105",
- "sha256:cb93f6b2ab0f6853550b74e051d297c27a638719753eb9ff66d1e4072be67133",
- "sha256:ce4e4f0deb51d38b1611a27f330426154f2980e66582dc5f438aad38b5f24fc1",
- "sha256:d7bdc26475679dd073ba0ed2766445bb5b20ca4793ca0db32b399dccc6bc84b7",
- "sha256:ff032765bb8716d9387fd5376d987a937254b0619eff0972779515b5c98820bc"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==3.1.7"
- },
- "bleach": {
- "hashes": [
- "sha256:213336e49e102af26d9cde77dd2d0397afabc5a6bf2fed985dc35b5d1e285a16",
- "sha256:3fdf7f77adcf649c9911387df51254b813185e32b2c6619f690b593a617e19fa"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==3.1.0"
- },
- "boto": {
- "hashes": [
- "sha256:147758d41ae7240dc989f0039f27da8ca0d53734be0eb869ef16e3adcfa462e8",
- "sha256:ea0d3b40a2d852767be77ca343b58a9e3a4b00d9db440efb8da74b4e58025e5a"
- ],
- "index": "pypi",
- "version": "==2.49.0"
- },
- "boto3": {
- "hashes": [
- "sha256:b3b134d8df25ba2465eb4c39b642aaa7b5342917c7810dc24c0aeb866bc6d816",
- "sha256:ff3539243b9d8fde9a1e86f8e79a5ae385ccb583ec2a1083f3a63aed078aa42d"
- ],
- "index": "pypi",
- "version": "==1.10.47"
- },
- "botocore": {
- "hashes": [
- "sha256:a5187cc5ec9558890ce5522a3c7e73c812cbae31c6d905d13a868e861a771272",
- "sha256:b7d1001208a0c514ced7b126606dae360ca5e0141cc9496d37f83a2c89ebd915"
- ],
- "version": "==1.13.47"
- },
- "cachetools": {
- "hashes": [
- "sha256:9a52dd97a85f257f4e4127f15818e71a0c7899f121b34591fcc1173ea79a0198",
- "sha256:b304586d357c43221856be51d73387f93e2a961598a9b6b6670664746f3b6c6c"
- ],
- "markers": "python_version ~= '3.5'",
- "version": "==4.0.0"
- },
- "certifi": {
- "hashes": [
- "sha256:017c25db2a153ce562900032d5bc68e9f191e44e9a0f762f373977de9df1fbb3",
- "sha256:25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f"
- ],
- "version": "==2019.11.28"
- },
- "cffi": {
- "hashes": [
- "sha256:0b49274afc941c626b605fb59b59c3485c17dc776dc3cc7cc14aca74cc19cc42",
- "sha256:0e3ea92942cb1168e38c05c1d56b0527ce31f1a370f6117f1d490b8dcd6b3a04",
- "sha256:135f69aecbf4517d5b3d6429207b2dff49c876be724ac0c8bf8e1ea99df3d7e5",
- "sha256:19db0cdd6e516f13329cba4903368bff9bb5a9331d3410b1b448daaadc495e54",
- "sha256:2781e9ad0e9d47173c0093321bb5435a9dfae0ed6a762aabafa13108f5f7b2ba",
- "sha256:291f7c42e21d72144bb1c1b2e825ec60f46d0a7468f5346841860454c7aa8f57",
- "sha256:2c5e309ec482556397cb21ede0350c5e82f0eb2621de04b2633588d118da4396",
- "sha256:2e9c80a8c3344a92cb04661115898a9129c074f7ab82011ef4b612f645939f12",
- "sha256:32a262e2b90ffcfdd97c7a5e24a6012a43c61f1f5a57789ad80af1d26c6acd97",
- "sha256:3c9fff570f13480b201e9ab69453108f6d98244a7f495e91b6c654a47486ba43",
- "sha256:415bdc7ca8c1c634a6d7163d43fb0ea885a07e9618a64bda407e04b04333b7db",
- "sha256:42194f54c11abc8583417a7cf4eaff544ce0de8187abaf5d29029c91b1725ad3",
- "sha256:4424e42199e86b21fc4db83bd76909a6fc2a2aefb352cb5414833c030f6ed71b",
- "sha256:4a43c91840bda5f55249413037b7a9b79c90b1184ed504883b72c4df70778579",
- "sha256:599a1e8ff057ac530c9ad1778293c665cb81a791421f46922d80a86473c13346",
- "sha256:5c4fae4e9cdd18c82ba3a134be256e98dc0596af1e7285a3d2602c97dcfa5159",
- "sha256:5ecfa867dea6fabe2a58f03ac9186ea64da1386af2159196da51c4904e11d652",
- "sha256:62f2578358d3a92e4ab2d830cd1c2049c9c0d0e6d3c58322993cc341bdeac22e",
- "sha256:6471a82d5abea994e38d2c2abc77164b4f7fbaaf80261cb98394d5793f11b12a",
- "sha256:6d4f18483d040e18546108eb13b1dfa1000a089bcf8529e30346116ea6240506",
- "sha256:71a608532ab3bd26223c8d841dde43f3516aa5d2bf37b50ac410bb5e99053e8f",
- "sha256:74a1d8c85fb6ff0b30fbfa8ad0ac23cd601a138f7509dc617ebc65ef305bb98d",
- "sha256:7b93a885bb13073afb0aa73ad82059a4c41f4b7d8eb8368980448b52d4c7dc2c",
- "sha256:7d4751da932caaec419d514eaa4215eaf14b612cff66398dd51129ac22680b20",
- "sha256:7f627141a26b551bdebbc4855c1157feeef18241b4b8366ed22a5c7d672ef858",
- "sha256:8169cf44dd8f9071b2b9248c35fc35e8677451c52f795daa2bb4643f32a540bc",
- "sha256:aa00d66c0fab27373ae44ae26a66a9e43ff2a678bf63a9c7c1a9a4d61172827a",
- "sha256:ccb032fda0873254380aa2bfad2582aedc2959186cce61e3a17abc1a55ff89c3",
- "sha256:d754f39e0d1603b5b24a7f8484b22d2904fa551fe865fd0d4c3332f078d20d4e",
- "sha256:d75c461e20e29afc0aee7172a0950157c704ff0dd51613506bd7d82b718e7410",
- "sha256:dcd65317dd15bc0451f3e01c80da2216a31916bdcffd6221ca1202d96584aa25",
- "sha256:e570d3ab32e2c2861c4ebe6ffcad6a8abf9347432a37608fe1fbd157b3f0036b",
- "sha256:fd43a88e045cf992ed09fa724b5315b790525f2676883a6ea64e3263bae6549d"
- ],
- "index": "pypi",
- "version": "==1.13.2"
- },
- "chardet": {
- "hashes": [
- "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae",
- "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"
- ],
- "index": "pypi",
- "version": "==3.0.4"
- },
- "click": {
- "hashes": [
- "sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13",
- "sha256:5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==7.0"
- },
- "colorama": {
- "hashes": [
- "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff",
- "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==0.4.3"
- },
- "control": {
- "hashes": [
- "sha256:1fcfdcf39f96523cb1f2cf7bf7b8ae68ec3ef8350e5c55e17e02afdb0872edbb"
- ],
- "index": "pypi",
- "version": "==0.8.3"
- },
- "coverage": {
- "hashes": [
- "sha256:189aac76d6e0d7af15572c51892e7326ee451c076c5a50a9d266406cd6c49708",
- "sha256:1bf7ba2af1d373a1750888724f84cffdfc697738f29a353c98195f98fc011509",
- "sha256:1f4ee8e2e4243971618bc16fcc4478317405205f135e95226c2496e2a3b8dbbf",
- "sha256:225e79a5d485bc1642cb7ba02281419c633c216cdc6b26c26494ba959f09e69f",
- "sha256:23688ff75adfa8bfa2a67254d889f9bdf9302c27241d746e17547c42c732d3f4",
- "sha256:28f7f73b34a05e23758e860a89a7f649b85c6749e252eff60ebb05532d180e86",
- "sha256:2d0cb9b1fe6ad0d915d45ad3d87f03a38e979093a98597e755930db1f897afae",
- "sha256:47874b4711c5aeb295c31b228a758ce3d096be83dc37bd56da48ed99efb8813b",
- "sha256:511ec0c00840e12fb4e852e4db58fa6a01ca4da72f36a9766fae344c3d502033",
- "sha256:53e7438fef0c97bc248f88ba1edd10268cd94d5609970aaf87abbe493691af87",
- "sha256:569f9ee3025682afda6e9b0f5bb14897c0db03f1a1dc088b083dd36e743f92bb",
- "sha256:593853aa1ac6dcc6405324d877544c596c9d948ef20d2e9512a0f5d2d3202356",
- "sha256:5b0a07158360d22492f9abd02a0f2ee7981b33f0646bf796598b7673f6bbab14",
- "sha256:7ca3db38a61f3655a2613ee2c190d63639215a7a736d3c64cc7bbdb002ce6310",
- "sha256:7d1cc7acc9ce55179616cf72154f9e648136ea55987edf84addbcd9886ffeba2",
- "sha256:88b51153657612aea68fa684a5b88037597925260392b7bb4509d4f9b0bdd889",
- "sha256:955ec084f549128fa2702f0b2dc696392001d986b71acd8fd47424f28289a9c3",
- "sha256:b251c7092cbb6d789d62dc9c9e7c4fb448c9138b51285c36aeb72462cad3600e",
- "sha256:bd82b684bb498c60ef47bb1541a50e6d006dde8579934dcbdbc61d67d1ea70d9",
- "sha256:bfe102659e2ec13b86c7f3b1db6c9a4e7beea4255058d006351339e6b342d5d2",
- "sha256:c1e4e39e43057396a5e9d069bfbb6ffeee892e40c5d2effbd8cd71f34ee66c4d",
- "sha256:cb2b74c123f65e8166f7e1265829a6c8ed755c3cd16d7f50e75a83456a5f3fd7",
- "sha256:cca38ded59105f7705ef6ffe1e960b8db6c7d8279c1e71654a4775ab4454ca15",
- "sha256:cf908840896f7aa62d0ec693beb53264b154f972eb8226fb864ac38975590c4f",
- "sha256:d095a7b473f8a95f7efe821f92058c8a2ecfb18f8db6677ae3819e15dc11aaae",
- "sha256:d22b4297e7e4225ccf01f1aa55e7a96412ea0796b532dd614c3fcbafa341128e",
- "sha256:d4a2b578a7a70e0c71f662705262f87a456f1e6c1e40ada7ea699abaf070a76d",
- "sha256:ddeb42a3d5419434742bf4cc71c9eaa22df3b76808e23a82bd0b0bd360f1a9f1",
- "sha256:e65a5aa1670db6263f19fdc03daee1d7dbbadb5cb67fd0a1f16033659db13c1d",
- "sha256:eaad65bd20955131bcdb3967a4dea66b4e4d4ca488efed7c00d91ee0173387e8",
- "sha256:f45fba420b94165c17896861bb0e8b27fb7abdcedfeb154895d8553df90b7b00"
- ],
- "index": "pypi",
- "version": "==5.0.2"
- },
- "cryptography": {
- "hashes": [
- "sha256:02079a6addc7b5140ba0825f542c0869ff4df9a69c360e339ecead5baefa843c",
- "sha256:1df22371fbf2004c6f64e927668734070a8953362cd8370ddd336774d6743595",
- "sha256:369d2346db5934345787451504853ad9d342d7f721ae82d098083e1f49a582ad",
- "sha256:3cda1f0ed8747339bbdf71b9f38ca74c7b592f24f65cdb3ab3765e4b02871651",
- "sha256:44ff04138935882fef7c686878e1c8fd80a723161ad6a98da31e14b7553170c2",
- "sha256:4b1030728872c59687badcca1e225a9103440e467c17d6d1730ab3d2d64bfeff",
- "sha256:58363dbd966afb4f89b3b11dfb8ff200058fbc3b947507675c19ceb46104b48d",
- "sha256:6ec280fb24d27e3d97aa731e16207d58bd8ae94ef6eab97249a2afe4ba643d42",
- "sha256:7270a6c29199adc1297776937a05b59720e8a782531f1f122f2eb8467f9aab4d",
- "sha256:73fd30c57fa2d0a1d7a49c561c40c2f79c7d6c374cc7750e9ac7c99176f6428e",
- "sha256:7f09806ed4fbea8f51585231ba742b58cbcfbfe823ea197d8c89a5e433c7e912",
- "sha256:90df0cc93e1f8d2fba8365fb59a858f51a11a394d64dbf3ef844f783844cc793",
- "sha256:971221ed40f058f5662a604bd1ae6e4521d84e6cad0b7b170564cc34169c8f13",
- "sha256:a518c153a2b5ed6b8cc03f7ae79d5ffad7315ad4569b2d5333a13c38d64bd8d7",
- "sha256:b0de590a8b0979649ebeef8bb9f54394d3a41f66c5584fff4220901739b6b2f0",
- "sha256:b43f53f29816ba1db8525f006fa6f49292e9b029554b3eb56a189a70f2a40879",
- "sha256:d31402aad60ed889c7e57934a03477b572a03af7794fa8fb1780f21ea8f6551f",
- "sha256:de96157ec73458a7f14e3d26f17f8128c959084931e8997b9e655a39c8fde9f9",
- "sha256:df6b4dca2e11865e6cfbfb708e800efb18370f5a46fd601d3755bc7f85b3a8a2",
- "sha256:ecadccc7ba52193963c0475ac9f6fa28ac01e01349a2ca48509667ef41ffd2cf",
- "sha256:fb81c17e0ebe3358486cd8cc3ad78adbae58af12fc2bf2bc0bb84e8090fa5ce8"
- ],
- "index": "pypi",
- "version": "==2.8"
- },
- "cycler": {
- "hashes": [
- "sha256:1d8a5ae1ff6c5cf9b93e8811e581232ad8920aeec647c37316ceac982b08cb2d",
- "sha256:cd7b2d1018258d7247a71425e9f26463dfb444d411c39569972f4ce586b0c9d8"
- ],
- "version": "==0.10.0"
- },
- "datadog": {
- "hashes": [
- "sha256:22d3c935e83de02b64efed635ac5fb45db26e152ac759105ec6d5a7ed8b9f6a9",
- "sha256:bce73f33a4496b004402baa502251150e3b48a48f610ff89d4cd110b366ee0ab"
- ],
- "index": "pypi",
- "version": "==0.33.0"
- },
- "decorator": {
- "hashes": [
- "sha256:54c38050039232e1db4ad7375cfce6748d7b41c29e95a081c8a6d2c30364a2ce",
- "sha256:5d19b92a3c8f7f101c8dd86afd86b0f061a8ce4540ab8cd401fa2542756bce6d"
- ],
- "version": "==4.4.1"
- },
- "defusedxml": {
- "hashes": [
- "sha256:6687150770438374ab581bb7a1b327a847dd9c5749e396102de3fad4e8a3ef93",
- "sha256:f684034d135af4c6cbb949b8a4d2ed61634515257a67299e5f940fbaa34377f5"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==0.6.0"
- },
- "dictdiffer": {
- "hashes": [
- "sha256:1adec0d67cdf6166bda96ae2934ddb5e54433998ceab63c984574d187cc563d2",
- "sha256:d79d9a39e459fe33497c858470ca0d2e93cb96621751de06d631856adfd9c390"
- ],
- "index": "pypi",
- "version": "==0.8.1"
- },
- "dlib": {
- "hashes": [
- "sha256:d0eeaca07bc4c75973ad0f739a541d8fa4003af778f0dc1c2c595d470823819a"
- ],
- "index": "pypi",
- "version": "==19.19.0"
- },
- "docutils": {
- "hashes": [
- "sha256:6c4f696463b79f1fb8ba0c594b63840ebd41f059e92b31957c46b74a4599b6d0",
- "sha256:9e4d7ecfc600058e07ba661411a2b7de2fd0fafa17d1a7f7361cd47b1175c827",
- "sha256:a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99"
- ],
- "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==0.15.2"
- },
- "elasticsearch": {
- "hashes": [
- "sha256:0140787216646e1eb7eb001f8146aff7071d7ca438854249787b6cc221ddd266",
- "sha256:283a6afa5dc08c21016c295b5237fbd9c74895b0b297ceb97c879ec7d67a5f47"
- ],
- "index": "pypi",
- "version": "==7.1.0"
- },
- "entrypoints": {
- "hashes": [
- "sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19",
- "sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451"
- ],
- "markers": "python_version >= '2.7'",
- "version": "==0.3"
- },
- "fastcluster": {
- "hashes": [
- "sha256:18988adb9bc07fcb5970a17ced626092d28806866f7914aa8079f1fe57d1fcdf",
- "sha256:3fe5102b58736ff8ed2a7944be98fbd4837b6ba4f3acbf6c06ef3b8ccdda00f1",
- "sha256:4c0d310b74bfac6121eec4b704ffe52bdca995d022b7898ce02d3609a141d7a3",
- "sha256:5026d6a69819c07a9df578529c7ed6615737e70650c42c55267c6a7c57c1b2be",
- "sha256:5045697238bc71e37177f6b6ae9d902c02e8947ee43657476227c92d84885a68",
- "sha256:67fe1890ba5f281e145cc17444056670b60e0232650d189345001f658046f46c",
- "sha256:69055a8cd51e6acafd4d0973cdeaa03620e93f548527310a2448a6d19731ef29",
- "sha256:6e421e7eda88f3140c8786da80656d85c7c73b53665439970acfa7e1f54fc699",
- "sha256:71b2f1c455aae6bb13aa1c9c1db1b0ccc0cdc336646005008d47fe5d584a07a9",
- "sha256:7cb427be975cdadf969fe62eccd5256dccb623342e80ea0fdda8870e40ac756f",
- "sha256:8dd5ef24ea7014ea2d2478627fec509a4366053bcce5b8559b72fc4f62d3990e",
- "sha256:94699ce6a452e34e1ac530823dbfb5a8b97942f00abd07231cb17b3c9f4d11fb",
- "sha256:9849b86b44d2307f52c85a92ecb8dd2c8365bc41d835fb34c859a3622fa52417",
- "sha256:a202f44a3b06f5cf9cdba3c67d6c523288922d6e6a1cdf737292f93759aa82f7",
- "sha256:aaaef36300cbf20fabea182369186e6899b122b2667e1408c981e5177a8ebc67",
- "sha256:accf6df86ce86905a9a87f10cb241d8d772d11ce77a2e8721ac731a7ad11fe8c",
- "sha256:b1d905eb21a40a8b80e678030b985f42bbff4d6eef4c3158cbd0c00c36966de9",
- "sha256:b86f22c46e8217dcd70a58a35b6134de7fa45d5986d703a8cd0812087782d900",
- "sha256:ba26b92bd991714f6edf787e2ec42f294e30d1d6b79cf0c390199cb2b5dcf952",
- "sha256:c17e9d650cefdab2f4632faf0239fe5b77d8f92cde56860a3cbdce33d2963bb9",
- "sha256:c29af2b6c2c8c39292fba4db1f988ae2328298d16b9dc2e8aa4b969020332f5b",
- "sha256:ca988e233e6aee007616af0fc7fbf5b236a3940f334a0fd176cd165151e8aea2",
- "sha256:fd1ada69e745032274632ba0ef5532c8ca631a8b1d2db819689385a5253f3129"
- ],
- "index": "pypi",
- "version": "==1.1.26"
- },
- "flask": {
- "hashes": [
- "sha256:13f9f196f330c7c2c5d7a5cf91af894110ca0215ac051b5844701f2bfd934d52",
- "sha256:45eb5a6fd193d6cf7e0cf5d8a5b31f83d5faae0293695626f539a823e93b13f6"
- ],
- "index": "pypi",
- "version": "==1.1.1"
- },
- "flask-cors": {
- "hashes": [
- "sha256:72170423eb4612f0847318afff8c247b38bd516b7737adfc10d1c2cdbb382d16",
- "sha256:f4d97201660e6bbcff2d89d082b5b6d31abee04b1b3003ee073a6fd25ad1d69a"
- ],
- "index": "pypi",
- "version": "==3.0.8"
- },
- "flask-socketio": {
- "hashes": [
- "sha256:2172dff1e42415ba480cee02c30c2fc833671ff326f1598ee3d69aa02cf768ec",
- "sha256:7ff5b2f5edde23e875a8b0abf868584e5706e11741557449bc5147df2cd78268"
- ],
- "index": "pypi",
- "version": "==4.2.1"
- },
- "future": {
- "hashes": [
- "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"
- ],
- "index": "pypi",
- "version": "==0.18.2"
- },
- "futures": {
- "hashes": [
- "sha256:3a44f286998ae64f0cc083682fcfec16c406134a81a589a5de445d7bb7c2751b",
- "sha256:51ecb45f0add83c806c68e4b06106f90db260585b25ef2abfcda0bd95c0132fd",
- "sha256:c4884a65654a7c45435063e14ae85280eb1f111d94e542396717ba9828c4337f"
- ],
- "index": "pypi",
- "version": "==3.1.1"
- },
- "gast": {
- "hashes": [
- "sha256:fe939df4583692f0512161ec1c880e0a10e71e6a232da045ab8edd3756fbadf0"
- ],
- "version": "==0.2.2"
- },
- "geoalchemy2": {
- "hashes": [
- "sha256:0d1c9ea3ec13f6a522ccc3ffd2569ac524a6c6e80bab883e8805b28c48e77143",
- "sha256:4dc4c6c2bda0fc82cccab4aaff185a6570e13a5351d85e29e12984a55d4138ee"
- ],
- "index": "pypi",
- "version": "==0.6.3"
- },
- "git-pylint-commit-hook": {
- "hashes": [
- "sha256:e1d39e7856b3ef0a0269121ca210dc3f5a97da158b322411e8e1185918a91b3c"
- ],
- "index": "pypi",
- "version": "==2.5.1"
- },
- "google-auth": {
- "hashes": [
- "sha256:7bb2034a3a290190cf4e3eb8ebf29e5025c90f0b06a00ba4d1fb94bf0c6448f7",
- "sha256:c57074e594d2c6e3e316162734e8af3e15d40252022e69414cba67de66594417"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.10.0"
- },
- "google-auth-oauthlib": {
- "hashes": [
- "sha256:88d2cd115e3391eb85e1243ac6902e76e77c5fe438b7276b297fbe68015458dd",
- "sha256:a92a0f6f41a0fb6138454fbc02674e64f89d82a244ea32f98471733c8ef0e0e1"
- ],
- "version": "==0.4.1"
- },
- "google-pasta": {
- "hashes": [
- "sha256:41bbe63bab92408452585ff2e1673ec1e35b88e163371cbed2a18510be4e8bc5",
- "sha256:644dcf3784cf7147ab01de5dc22e60a638d219d4e4a3a7464eb98997ae2fe66f",
- "sha256:713813a9f7d6589e5defdaf21e80e4392eb124662f8bd829acd51a4f8735c0cb"
- ],
- "version": "==0.1.8"
- },
- "grpcio": {
- "hashes": [
- "sha256:066630f6b62bffa291dacbee56994279a6a3682b8a11967e9ccaf3cc770fc11e",
- "sha256:07e95762ca6b18afbeb3aa2793e827c841152d5e507089b1db0b18304edda105",
- "sha256:0a0fb2f8e3a13537106bc77e4c63005bc60124a6203034304d9101921afa4e90",
- "sha256:0c61b74dcfb302613926e785cb3542a0905b9a3a86e9410d8cf5d25e25e10104",
- "sha256:13383bd70618da03684a8aafbdd9e3d9a6720bf8c07b85d0bc697afed599d8f0",
- "sha256:1c6e0f6b9d091e3717e9a58d631c8bb4898be3b261c2a01fe46371fdc271052f",
- "sha256:1cf710c04689daa5cc1e598efba00b028215700dcc1bf66fcb7b4f64f2ea5d5f",
- "sha256:2da5cee9faf17bb8daf500cd0d28a17ae881ab5500f070a6aace457f4c08cac4",
- "sha256:2f78ebf340eaf28fa09aba0f836a8b869af1716078dfe8f3b3f6ff785d8f2b0f",
- "sha256:33a07a1a8e817d733588dbd18e567caad1a6fe0d440c165619866cd490c7911a",
- "sha256:3d090c66af9c065b7228b07c3416f93173e9839b1d40bb0ce3dd2aa783645026",
- "sha256:42b903a3596a10e2a3727bae2a76f8aefd324d498424b843cfa9606847faea7b",
- "sha256:4fffbb58134c4f23e5a8312ac3412db6f5e39e961dc0eb5e3115ce5aa16bf927",
- "sha256:57be5a6c509a406fe0ffa6f8b86904314c77b5e2791be8123368ad2ebccec874",
- "sha256:5b0fa09efb33e2af4e8822b4eb8b2cbc201d562e3e185c439be7eaeee2e8b8aa",
- "sha256:5ef42dfc18f9a63a06aca938770b69470bb322e4c137cf08cf21703d1ef4ae5c",
- "sha256:6a43d2f2ff8250f200fdf7aa31fa191a997922aa9ea1182453acd705ad83ab72",
- "sha256:6d8ab28559be98b02f8b3a154b53239df1aa5b0d28ff865ae5be4f30e7ed4d3f",
- "sha256:6e47866b7dc14ca3a12d40c1d6082e7bea964670f1c5315ea0fb8b0550244d64",
- "sha256:6edda1b96541187f73aab11800d25f18ee87e53d5f96bb74473873072bf28a0e",
- "sha256:7109c8738a8a3c98cfb5dda1c45642a8d6d35dc00d257ab7a175099b2b4daecd",
- "sha256:8d866aafb08657c456a18c4a31c8526ea62de42427c242b58210b9eae6c64559",
- "sha256:9939727d9ae01690b24a2b159ac9dbca7b7e8e6edd5af6a6eb709243cae7b52b",
- "sha256:99fd873699df17cb11c542553270ae2b32c169986e475df0d68a8629b8ef4df7",
- "sha256:b6fda5674f990e15e1bcaacf026428cf50bce36e708ddcbd1de9673b14aab760",
- "sha256:bdb2f3dcb664f0c39ef1312cd6acf6bc6375252e4420cf8f36fff4cb4fa55c71",
- "sha256:bfd7d3130683a1a0a50c456273c21ec8a604f2d043b241a55235a78a0090ee06",
- "sha256:c6c2db348ac73d73afe14e0833b18abbbe920969bf2c5c03c0922719f8020d06",
- "sha256:cb7a4b41b5e2611f85c3402ac364f1d689f5d7ecbc24a55ef010eedcd6cf460f",
- "sha256:cd3d3e328f20f7c807a862620c6ee748e8d57ba2a8fc960d48337ed71c6d9d32",
- "sha256:d1a481777952e4f99b8a6956581f3ee866d7614100d70ae6d7e07327570b85ce",
- "sha256:d1d49720ed636920bb3d74cedf549382caa9ad55aea89d1de99d817068d896b2",
- "sha256:d42433f0086cccd192114343473d7dbd4aae9141794f939e2b7b83efc57543db",
- "sha256:d44c34463a7c481e076f691d8fa25d080c3486978c2c41dca09a8dd75296c2d7",
- "sha256:d7e5b7af1350e9c8c17a7baf99d575fbd2de69f7f0b0e6ebd47b57506de6493a",
- "sha256:d9542366a0917b9b48bab1fee481ac01f56bdffc52437b598c09e7840148a6a9",
- "sha256:df7cdfb40179acc9790a462c049e0b8e109481164dd7ad1a388dd67ff1528759",
- "sha256:e1a9d9d2e7224d981aea8da79260c7f6932bf31ce1f99b7ccfa5eceeb30dc5d0",
- "sha256:ed10e5fad105ecb0b12822f924e62d0deb07f46683a0b64416b17fd143daba1d",
- "sha256:f0ec5371ce2363b03531ed522bfbe691ec940f51f0e111f0500fc0f44518c69d",
- "sha256:f6580a8a4f5e701289b45fd62a8f6cb5ec41e4d77082424f8b676806dcd22564",
- "sha256:f7b83e4b2842d44fce3cdc0d54db7a7e0d169a598751bf393601efaa401c83e0",
- "sha256:ffec45b0db18a555fdfe0c6fa2d0a3fceb751b22b31e8fcd14ceed7bde05481e"
- ],
- "version": "==1.26.0"
- },
- "gunicorn": {
- "hashes": [
- "sha256:1904bb2b8a43658807108d59c3f3d56c2b6121a701161de0ddf9ad140073c626",
- "sha256:cd4a810dd51bf497552cf3f863b575dabd73d6ad6a91075b65936b151cbf4f9c"
- ],
- "index": "pypi",
- "version": "==20.0.4"
- },
- "h5py": {
- "hashes": [
- "sha256:063947eaed5f271679ed4ffa36bb96f57bc14f44dd4336a827d9a02702e6ce6b",
- "sha256:13c87efa24768a5e24e360a40e0bc4c49bcb7ce1bb13a3a7f9902cec302ccd36",
- "sha256:16ead3c57141101e3296ebeed79c9c143c32bdd0e82a61a2fc67e8e6d493e9d1",
- "sha256:3dad1730b6470fad853ef56d755d06bb916ee68a3d8272b3bab0c1ddf83bb99e",
- "sha256:51ae56894c6c93159086ffa2c94b5b3388c0400548ab26555c143e7cfa05b8e5",
- "sha256:54817b696e87eb9e403e42643305f142cd8b940fe9b3b490bbf98c3b8a894cf4",
- "sha256:549ad124df27c056b2e255ea1c44d30fb7a17d17676d03096ad5cd85edb32dc1",
- "sha256:64f74da4a1dd0d2042e7d04cf8294e04ddad686f8eba9bb79e517ae582f6668d",
- "sha256:6998be619c695910cb0effe5eb15d3a511d3d1a5d217d4bd0bebad1151ec2262",
- "sha256:6ef7ab1089e3ef53ca099038f3c0a94d03e3560e6aff0e9d6c64c55fb13fc681",
- "sha256:769e141512b54dee14ec76ed354fcacfc7d97fea5a7646b709f7400cf1838630",
- "sha256:79b23f47c6524d61f899254f5cd5e486e19868f1823298bc0c29d345c2447172",
- "sha256:7be5754a159236e95bd196419485343e2b5875e806fe68919e087b6351f40a70",
- "sha256:84412798925dc870ffd7107f045d7659e60f5d46d1c70c700375248bf6bf512d",
- "sha256:86868dc07b9cc8cb7627372a2e6636cdc7a53b7e2854ad020c9e9d8a4d3fd0f5",
- "sha256:8bb1d2de101f39743f91512a9750fb6c351c032e5cd3204b4487383e34da7f75",
- "sha256:a5f82cd4938ff8761d9760af3274acf55afc3c91c649c50ab18fcff5510a14a5",
- "sha256:aac4b57097ac29089f179bbc2a6e14102dd210618e94d77ee4831c65f82f17c0",
- "sha256:bffbc48331b4a801d2f4b7dac8a72609f0b10e6e516e5c480a3e3241e091c878",
- "sha256:c0d4b04bbf96c47b6d360cd06939e72def512b20a18a8547fa4af810258355d5",
- "sha256:c54a2c0dd4957776ace7f95879d81582298c5daf89e77fb8bee7378f132951de",
- "sha256:cbf28ae4b5af0f05aa6e7551cee304f1d317dbed1eb7ac1d827cee2f1ef97a99",
- "sha256:d35f7a3a6cefec82bfdad2785e78359a0e6a5fbb3f605dd5623ce88082ccd681",
- "sha256:d3c59549f90a891691991c17f8e58c8544060fdf3ccdea267100fa5f561ff62f",
- "sha256:d7ae7a0576b06cb8e8a1c265a8bc4b73d05fdee6429bffc9a26a6eb531e79d72",
- "sha256:ecf4d0b56ee394a0984de15bceeb97cbe1fe485f1ac205121293fc44dcf3f31f",
- "sha256:f0e25bb91e7a02efccb50aba6591d3fe2c725479e34769802fcdd4076abfa917",
- "sha256:f23951a53d18398ef1344c186fb04b26163ca6ce449ebd23404b153fd111ded9",
- "sha256:ff7d241f866b718e4584fa95f520cb19405220c501bd3a53ee11871ba5166ea2"
- ],
- "index": "pypi",
- "version": "==2.10.0"
- },
- "hexdump": {
- "hashes": [
- "sha256:d781a43b0c16ace3f9366aade73e8ad3a7bd5137d58f0b45ab2d3f54876f20db"
- ],
- "index": "pypi",
- "version": "==3.3"
- },
- "html5lib": {
- "hashes": [
- "sha256:20b159aa3badc9d5ee8f5c647e5efd02ed2a66ab8d354930bd9ff139fc1dc0a3",
- "sha256:66cb0dcfdbbc4f9c3ba1a63fdb511ffdbd4f513b2b6d81b80cd26ce6b3fb3736"
- ],
- "index": "pypi",
- "version": "==1.0.1"
- },
- "humanfriendly": {
- "hashes": [
- "sha256:23057b10ad6f782e7bc3a20e3cb6768ab919f619bbdc0dd75691121bbde5591d",
- "sha256:33ee8ceb63f1db61cce8b5c800c531e1a61023ac5488ccde2ba574a85be00a85"
- ],
- "version": "==4.18"
- },
- "idna": {
- "hashes": [
- "sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407",
- "sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c"
- ],
- "index": "pypi",
- "version": "==2.8"
- },
- "imageio": {
- "hashes": [
- "sha256:c9763e5c187ecf74091c845626b0bdcc6130a20a0de7a86ae0108e2b5335ed3f",
- "sha256:f44eb231b9df485874f2ffd22dfd0c3c711e7de076516b9374edea5c65bc67ae"
- ],
- "index": "pypi",
- "version": "==2.6.1"
- },
- "importlib-metadata": {
- "hashes": [
- "sha256:073a852570f92da5f744a3472af1b61e28e9f78ccf0c9117658dc32b15de7b45",
- "sha256:d95141fbfa7ef2ec65cfd945e2af7e5a6ddbd7c8d9a25e66ff3be8e3daf9f60f"
- ],
- "markers": "python_version == '3.7'",
- "version": "==1.3.0"
- },
- "ipykernel": {
- "hashes": [
- "sha256:1a7def9c986f1ee018c1138d16951932d4c9d4da01dad45f9d34e9899565a22f",
- "sha256:b368ad13edb71fa2db367a01e755a925d7f75ed5e09fbd3f06c85e7a8ef108a8"
- ],
- "index": "pypi",
- "version": "==5.1.3"
- },
- "ipython": {
- "hashes": [
- "sha256:0f4bcf18293fb666df8511feec0403bdb7e061a5842ea6e88a3177b0ceb34ead",
- "sha256:387686dd7fc9caf29d2fddcf3116c4b07a11d9025701d220c589a430b0171d8a"
- ],
- "index": "pypi",
- "version": "==7.11.1"
- },
- "ipython-genutils": {
- "hashes": [
- "sha256:72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8",
- "sha256:eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8"
- ],
- "version": "==0.2.0"
- },
- "ipywidgets": {
- "hashes": [
- "sha256:13ffeca438e0c0f91ae583dc22f50379b9d6b28390ac7be8b757140e9a771516",
- "sha256:e945f6e02854a74994c596d9db83444a1850c01648f1574adf144fbbabe05c97"
- ],
- "version": "==7.5.1"
- },
- "isodate": {
- "hashes": [
- "sha256:2e364a3d5759479cdb2d37cce6b9376ea504db2ff90252a2e5b7cc89cc9ff2d8",
- "sha256:aa4d33c06640f5352aca96e4b81afd8ab3b47337cc12089822d6f322ac772c81"
- ],
- "version": "==0.6.0"
- },
- "isort": {
- "hashes": [
- "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1",
- "sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==4.3.21"
- },
- "itsdangerous": {
- "hashes": [
- "sha256:321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19",
- "sha256:b12271b2047cb23eeb98c8b5622e2e5c5e9abd9784a153e9d8ef9cb4dd09d749"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.1.0"
- },
- "jedi": {
- "hashes": [
- "sha256:1349c1e8c107095a55386628bb3b2a79422f3a2cab8381e34ce19909e0cf5064",
- "sha256:e909527104a903606dd63bea6e8e888833f0ef087057829b89a18364a856f807"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==0.15.2"
- },
- "jinja2": {
- "hashes": [
- "sha256:74320bb91f31270f9551d46522e33af46a80c3d619f4a4bf42b3164d30b5911f",
- "sha256:9fe95f19286cfefaa917656583d020be14e7859c6b0252588391e47db34527de"
- ],
- "index": "pypi",
- "version": "==2.10.3"
- },
- "jmespath": {
- "hashes": [
- "sha256:3720a4b1bd659dd2eecad0666459b9788813e032b83e7ba58578e48254e0a0e6",
- "sha256:bde2aef6f44302dfb30320115b17d030798de8c4110e28d5cf6cf91a7a31074c"
- ],
- "version": "==0.9.4"
- },
- "joblib": {
- "hashes": [
- "sha256:0630eea4f5664c463f23fbf5dcfc54a2bc6168902719fa8e19daf033022786c8",
- "sha256:bdb4fd9b72915ffb49fde2229ce482dd7ae79d842ed8c2b4c932441495af1403"
- ],
- "index": "pypi",
- "version": "==0.14.1"
- },
- "json-logging-py": {
- "hashes": [
- "sha256:118b1fe1f4eacaea6370e5b9710d0f6d0c0a4599aef9d5b9875a6a579974fc9a"
- ],
- "index": "pypi",
- "version": "==0.2"
- },
- "jsonschema": {
- "hashes": [
- "sha256:4e5b3cf8216f577bee9ce139cbe72eca3ea4f292ec60928ff24758ce626cd163",
- "sha256:c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a"
- ],
- "version": "==3.2.0"
- },
- "jupyter": {
- "hashes": [
- "sha256:3e1f86076bbb7c8c207829390305a2b1fe836d471ed54be66a3b8c41e7f46cc7",
- "sha256:5b290f93b98ffbc21c0c7e749f054b3267782166d72fa5e3ed1ed4eaf34a2b78",
- "sha256:d9dc4b3318f310e34c82951ea5d6683f67bed7def4b259fafbfe4f1beb1d8e5f"
- ],
- "index": "pypi",
- "version": "==1.0.0"
- },
- "jupyter-client": {
- "hashes": [
- "sha256:60e6faec1031d63df57f1cc671ed673dced0ed420f4377ea33db37b1c188b910",
- "sha256:d0c077c9aaa4432ad485e7733e4d91e48f87b4f4bab7d283d42bb24cbbba0a0f"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==5.3.4"
- },
- "jupyter-console": {
- "hashes": [
- "sha256:308ce876354924fb6c540b41d5d6d08acfc946984bf0c97777c1ddcb42e0b2f5",
- "sha256:cc80a97a5c389cbd30252ffb5ce7cefd4b66bde98219edd16bf5cb6f84bb3568"
- ],
- "markers": "python_version >= '3.5'",
- "version": "==6.0.0"
- },
- "jupyter-core": {
- "hashes": [
- "sha256:464769f7387d7a62a2403d067f1ddc616655b7f77f5d810c0dd62cb54bfd0fb9",
- "sha256:a183e0ec2e8f6adddf62b0a3fc6a2237e3e0056d381e536d3e7c7ecc3067e244"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==4.6.1"
- },
- "keras-applications": {
- "hashes": [
- "sha256:5579f9a12bcde9748f4a12233925a59b93b73ae6947409ff34aa2ba258189fe5",
- "sha256:df4323692b8c1174af821bf906f1e442e63fa7589bf0f1230a0b6bdc5a810c95"
- ],
- "version": "==1.0.8"
- },
- "keras-preprocessing": {
- "hashes": [
- "sha256:44aee5f2c4d80c3b29f208359fcb336df80f293a0bb6b1c738da43ca206656fb",
- "sha256:5a8debe01d840de93d49e05ccf1c9b81ae30e210d34dacbcc47aeb3049b528e5"
- ],
- "version": "==1.1.0"
- },
- "kiwisolver": {
- "hashes": [
- "sha256:05b5b061e09f60f56244adc885c4a7867da25ca387376b02c1efc29cc16bcd0f",
- "sha256:210d8c39d01758d76c2b9a693567e1657ec661229bc32eac30761fa79b2474b0",
- "sha256:26f4fbd6f5e1dabff70a9ba0d2c4bd30761086454aa30dddc5b52764ee4852b7",
- "sha256:3b15d56a9cd40c52d7ab763ff0bc700edbb4e1a298dc43715ecccd605002cf11",
- "sha256:3b2378ad387f49cbb328205bda569b9f87288d6bc1bf4cd683c34523a2341efe",
- "sha256:400599c0fe58d21522cae0e8b22318e09d9729451b17ee61ba8e1e7c0346565c",
- "sha256:47b8cb81a7d18dbaf4fed6a61c3cecdb5adec7b4ac292bddb0d016d57e8507d5",
- "sha256:53eaed412477c836e1b9522c19858a8557d6e595077830146182225613b11a75",
- "sha256:58e626e1f7dfbb620d08d457325a4cdac65d1809680009f46bf41eaf74ad0187",
- "sha256:5a52e1b006bfa5be04fe4debbcdd2688432a9af4b207a3f429c74ad625022641",
- "sha256:5c7ca4e449ac9f99b3b9d4693debb1d6d237d1542dd6a56b3305fe8a9620f883",
- "sha256:682e54f0ce8f45981878756d7203fd01e188cc6c8b2c5e2cf03675390b4534d5",
- "sha256:76275ee077772c8dde04fb6c5bc24b91af1bb3e7f4816fd1852f1495a64dad93",
- "sha256:79bfb2f0bd7cbf9ea256612c9523367e5ec51d7cd616ae20ca2c90f575d839a2",
- "sha256:7f4dd50874177d2bb060d74769210f3bce1af87a8c7cf5b37d032ebf94f0aca3",
- "sha256:8944a16020c07b682df861207b7e0efcd2f46c7488619cb55f65882279119389",
- "sha256:8aa7009437640beb2768bfd06da049bad0df85f47ff18426261acecd1cf00897",
- "sha256:9105ce82dcc32c73eb53a04c869b6a4bc756b43e4385f76ea7943e827f529e4d",
- "sha256:933df612c453928f1c6faa9236161a1d999a26cd40abf1dc5d7ebbc6dbfb8fca",
- "sha256:939f36f21a8c571686eb491acfffa9c7f1ac345087281b412d63ea39ca14ec4a",
- "sha256:9491578147849b93e70d7c1d23cb1229458f71fc79c51d52dce0809b2ca44eea",
- "sha256:9733b7f64bd9f807832d673355f79703f81f0b3e52bfce420fc00d8cb28c6a6c",
- "sha256:a02f6c3e229d0b7220bd74600e9351e18bc0c361b05f29adae0d10599ae0e326",
- "sha256:a0c0a9f06872330d0dd31b45607197caab3c22777600e88031bfe66799e70bb0",
- "sha256:aa716b9122307c50686356cfb47bfbc66541868078d0c801341df31dca1232a9",
- "sha256:acc4df99308111585121db217681f1ce0eecb48d3a828a2f9bbf9773f4937e9e",
- "sha256:b64916959e4ae0ac78af7c3e8cef4becee0c0e9694ad477b4c6b3a536de6a544",
- "sha256:d22702cadb86b6fcba0e6b907d9f84a312db9cd6934ee728144ce3018e715ee1",
- "sha256:d3fcf0819dc3fea58be1fd1ca390851bdb719a549850e708ed858503ff25d995",
- "sha256:d52e3b1868a4e8fd18b5cb15055c76820df514e26aa84cc02f593d99fef6707f",
- "sha256:db1a5d3cc4ae943d674718d6c47d2d82488ddd94b93b9e12d24aabdbfe48caee",
- "sha256:e3a21a720791712ed721c7b95d433e036134de6f18c77dbe96119eaf7aa08004",
- "sha256:e8bf074363ce2babeb4764d94f8e65efd22e6a7c74860a4f05a6947afc020ff2",
- "sha256:f16814a4a96dc04bf1da7d53ee8d5b1d6decfc1a92a63349bb15d37b6a263dd9",
- "sha256:f2b22153870ca5cf2ab9c940d7bc38e8e9089fa0f7e5856ea195e1cf4ff43d5a",
- "sha256:f790f8b3dff3d53453de6a7b7ddd173d2e020fb160baff578d578065b108a05f",
- "sha256:fe51b79da0062f8e9d49ed0182a626a7dc7a0cbca0328f612c6ee5e4711c81e4"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.1.0"
- },
- "knack": {
- "hashes": [
- "sha256:b1ac92669641b902e1aef97138666a21b8852f65d83cbde03eb9ddebf82ce121",
- "sha256:bd240163d4e2ce9fc8535f77519358da0afd6c0ca19f001c639c3160b57630a9"
- ],
- "version": "==0.6.3"
- },
- "lazy-object-proxy": {
- "hashes": [
- "sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d",
- "sha256:194d092e6f246b906e8f70884e620e459fc54db3259e60cf69a4d66c3fda3449",
- "sha256:1be7e4c9f96948003609aa6c974ae59830a6baecc5376c25c92d7d697e684c08",
- "sha256:4677f594e474c91da97f489fea5b7daa17b5517190899cf213697e48d3902f5a",
- "sha256:48dab84ebd4831077b150572aec802f303117c8cc5c871e182447281ebf3ac50",
- "sha256:5541cada25cd173702dbd99f8e22434105456314462326f06dba3e180f203dfd",
- "sha256:59f79fef100b09564bc2df42ea2d8d21a64fdcda64979c0fa3db7bdaabaf6239",
- "sha256:8d859b89baf8ef7f8bc6b00aa20316483d67f0b1cbf422f5b4dc56701c8f2ffb",
- "sha256:9254f4358b9b541e3441b007a0ea0764b9d056afdeafc1a5569eee1cc6c1b9ea",
- "sha256:9651375199045a358eb6741df3e02a651e0330be090b3bc79f6d0de31a80ec3e",
- "sha256:97bb5884f6f1cdce0099f86b907aa41c970c3c672ac8b9c8352789e103cf3156",
- "sha256:9b15f3f4c0f35727d3a0fba4b770b3c4ebbb1fa907dbcc046a1d2799f3edd142",
- "sha256:a2238e9d1bb71a56cd710611a1614d1194dc10a175c1e08d75e1a7bcc250d442",
- "sha256:a6ae12d08c0bf9909ce12385803a543bfe99b95fe01e752536a60af2b7797c62",
- "sha256:ca0a928a3ddbc5725be2dd1cf895ec0a254798915fb3a36af0964a0a4149e3db",
- "sha256:cb2c7c57005a6804ab66f106ceb8482da55f5314b7fcb06551db1edae4ad1531",
- "sha256:d74bb8693bf9cf75ac3b47a54d716bbb1a92648d5f781fc799347cfc95952383",
- "sha256:d945239a5639b3ff35b70a88c5f2f491913eb94871780ebfabb2568bd58afc5a",
- "sha256:eba7011090323c1dadf18b3b689845fd96a61ba0a1dfbd7f24b921398affc357",
- "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4",
- "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.4.3"
- },
- "libarchive": {
- "hashes": [
- "sha256:829dc298a08877f62335d528973bc034f7c1e8a03c16bfc1fa561e164e76a365"
- ],
- "index": "pypi",
- "version": "==0.4.7"
- },
- "limits": {
- "hashes": [
- "sha256:98accbccf66e6e2edc0bb7b6e295e6bb8596be3588a7c385de16c8e8463644a4",
- "sha256:c071295307c447f85aaa3c3ab3ce058e29d67010f4fabf278a8e163916e4deab"
- ],
- "version": "==1.4.1"
- },
- "lru-dict": {
- "hashes": [
- "sha256:365457660e3d05b76f1aba3e0f7fedbfcd6528e97c5115a351ddd0db488354cc"
- ],
- "index": "pypi",
- "version": "==1.1.6"
- },
- "markdown": {
- "hashes": [
- "sha256:2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a",
- "sha256:56a46ac655704b91e5b7e6326ce43d5ef72411376588afa1dd90e881b83c7e8c"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==3.1.1"
- },
- "markupsafe": {
- "hashes": [
- "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473",
- "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161",
- "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235",
- "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5",
- "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff",
- "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b",
- "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1",
- "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e",
- "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183",
- "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66",
- "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1",
- "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1",
- "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e",
- "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b",
- "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905",
- "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735",
- "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d",
- "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e",
- "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d",
- "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c",
- "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21",
- "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2",
- "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5",
- "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b",
- "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6",
- "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f",
- "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f",
- "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==1.1.1"
- },
- "matplotlib": {
- "hashes": [
- "sha256:08ccc8922eb4792b91c652d3e6d46b1c99073f1284d1b6705155643e8046463a",
- "sha256:161dcd807c0c3232f4dcd4a12a382d52004a498174cbfafd40646106c5bcdcc8",
- "sha256:1f9e885bfa1b148d16f82a6672d043ecf11197f6c71ae222d0546db706e52eb2",
- "sha256:2d6ab54015a7c0d727c33e36f85f5c5e4172059efdd067f7527f6e5d16ad01aa",
- "sha256:5d2e408a2813abf664bd79431107543ecb449136912eb55bb312317edecf597e",
- "sha256:61c8b740a008218eb604de518eb411c4953db0cb725dd0b32adf8a81771cab9e",
- "sha256:80f10af8378fccc136da40ea6aa4a920767476cdfb3241acb93ef4f0465dbf57",
- "sha256:819d4860315468b482f38f1afe45a5437f60f03eaede495d5ff89f2eeac89500",
- "sha256:8cc0e44905c2c8fda5637cad6f311eb9517017515a034247ab93d0cf99f8bb7a",
- "sha256:8e8e2c2fe3d873108735c6ee9884e6f36f467df4a143136209cff303b183bada",
- "sha256:98c2ffeab8b79a4e3a0af5dd9939f92980eb6e3fec10f7f313df5f35a84dacab",
- "sha256:d59bb0e82002ac49f4152963f8a1079e66794a4f454457fd2f0dcc7bf0797d30",
- "sha256:ee59b7bb9eb75932fe3787e54e61c99b628155b0cedc907864f24723ba55b309"
- ],
- "index": "pypi",
- "version": "==3.1.2"
- },
- "mccabe": {
- "hashes": [
- "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42",
- "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"
- ],
- "version": "==0.6.1"
- },
- "mistune": {
- "hashes": [
- "sha256:59a3429db53c50b5c6bcc8a07f8848cb00d7dc8bdb431a4ab41920d201d4756e",
- "sha256:88a1051873018da288eee8538d476dffe1262495144b33ecb586c4ab266bb8d4"
- ],
- "version": "==0.8.4"
- },
- "mock": {
- "hashes": [
- "sha256:83657d894c90d5681d62155c82bda9c1187827525880eda8ff5df4ec813437c3",
- "sha256:d157e52d4e5b938c550f39eb2fd15610db062441a9c2747d3dbfa9298211d0f8"
- ],
- "index": "pypi",
- "version": "==3.0.5"
- },
- "more-itertools": {
- "hashes": [
- "sha256:b84b238cce0d9adad5ed87e745778d20a3f8487d0f0cb8b8a586816c7496458d",
- "sha256:c833ef592a0324bcc6a60e48440da07645063c453880c9477ceb22490aec1564"
- ],
- "markers": "python_version >= '3.5'",
- "version": "==8.0.2"
- },
- "mpld3": {
- "hashes": [
- "sha256:4d455884a211bf99b37ecc760759435c7bb6a5955de47d8daf4967e301878ab7"
- ],
- "index": "pypi",
- "version": "==0.3"
- },
- "msgpack-python": {
- "hashes": [
- "sha256:378cc8a6d3545b532dfd149da715abae4fda2a3adb6d74e525d0d5e51f46909b"
- ],
- "index": "pypi",
- "version": "==0.5.6"
- },
- "msrest": {
- "hashes": [
- "sha256:56b8b5b4556fb2a92cac640df267d560889bdc9e2921187772d4691d97bc4e8d",
- "sha256:f5153bfe60ee757725816aedaa0772cbfe0bddb52cd2d6db4cb8b4c3c6c6f928"
- ],
- "version": "==0.6.10"
- },
- "msrestazure": {
- "hashes": [
- "sha256:63db9f646fffc9244b332090e679d1e5f283ac491ee0cc321f5116f9450deb4a",
- "sha256:fecb6a72a3eb5483e4deff38210d26ae42d3f6d488a7a275bd2423a1a014b22c"
- ],
- "version": "==0.6.2"
- },
- "nbconvert": {
- "hashes": [
- "sha256:21fb48e700b43e82ba0e3142421a659d7739b65568cc832a13976a77be16b523",
- "sha256:f0d6ec03875f96df45aa13e21fd9b8450c42d7e1830418cccc008c0df725fcee"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==5.6.1"
- },
- "nbformat": {
- "hashes": [
- "sha256:cca9a1acfd4e049dcd6c3628d3c84db8e48a770182fb7b87d6a62f9ceacfae39",
- "sha256:d1407544cf0c53ee88f504b6c732aef6e0f407a0858b405fcf133e0a25bb787b"
- ],
- "version": "==5.0.3"
- },
- "nbstripout": {
- "hashes": [
- "sha256:62f1b1fe9c7c298061089fd9bd5d297eb6209f7fbef0758631dbe58d38fc828f",
- "sha256:cf745ae8c49fccdb3068b73fc3b783898d5d62ee929429e9af37a6dfefba34b7"
- ],
- "index": "pypi",
- "version": "==0.3.7"
- },
- "networkx": {
- "hashes": [
- "sha256:8311ddef63cf5c5c5e7c1d0212dd141d9a1fe3f474915281b73597ed5f1d4e3d"
- ],
- "index": "pypi",
- "version": "==2.3"
- },
- "nose": {
- "hashes": [
- "sha256:9ff7c6cc443f8c51994b34a667bbcf45afd6d945be7477b52e97516fd17c53ac",
- "sha256:dadcddc0aefbf99eea214e0f1232b94f2fa9bd98fa8353711dacb112bfcbbb2a",
- "sha256:f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"
- ],
- "index": "pypi",
- "version": "==1.3.7"
- },
- "notebook": {
- "hashes": [
- "sha256:399a4411e171170173344761e7fd4491a3625659881f76ce47c50231ed714d9b",
- "sha256:f67d76a68b1074a91693e95dea903ea01fd02be7c9fac5a4b870b8475caed805"
- ],
- "markers": "python_version >= '3.5'",
- "version": "==6.0.2"
- },
- "numpy": {
- "hashes": [
- "sha256:1786a08236f2c92ae0e70423c45e1e62788ed33028f94ca99c4df03f5be6b3c6",
- "sha256:17aa7a81fe7599a10f2b7d95856dc5cf84a4eefa45bc96123cbbc3ebc568994e",
- "sha256:20b26aaa5b3da029942cdcce719b363dbe58696ad182aff0e5dcb1687ec946dc",
- "sha256:2d75908ab3ced4223ccba595b48e538afa5ecc37405923d1fea6906d7c3a50bc",
- "sha256:39d2c685af15d3ce682c99ce5925cc66efc824652e10990d2462dfe9b8918c6a",
- "sha256:56bc8ded6fcd9adea90f65377438f9fea8c05fcf7c5ba766bef258d0da1554aa",
- "sha256:590355aeade1a2eaba17617c19edccb7db8d78760175256e3cf94590a1a964f3",
- "sha256:70a840a26f4e61defa7bdf811d7498a284ced303dfbc35acb7be12a39b2aa121",
- "sha256:77c3bfe65d8560487052ad55c6998a04b654c2fbc36d546aef2b2e511e760971",
- "sha256:9537eecf179f566fd1c160a2e912ca0b8e02d773af0a7a1120ad4f7507cd0d26",
- "sha256:9acdf933c1fd263c513a2df3dceecea6f3ff4419d80bf238510976bf9bcb26cd",
- "sha256:ae0975f42ab1f28364dcda3dde3cf6c1ddab3e1d4b2909da0cb0191fa9ca0480",
- "sha256:b3af02ecc999c8003e538e60c89a2b37646b39b688d4e44d7373e11c2debabec",
- "sha256:b6ff59cee96b454516e47e7721098e6ceebef435e3e21ac2d6c3b8b02628eb77",
- "sha256:b765ed3930b92812aa698a455847141869ef755a87e099fddd4ccf9d81fffb57",
- "sha256:c98c5ffd7d41611407a1103ae11c8b634ad6a43606eca3e2a5a269e5d6e8eb07",
- "sha256:cf7eb6b1025d3e169989416b1adcd676624c2dbed9e3bcb7137f51bfc8cc2572",
- "sha256:d92350c22b150c1cae7ebb0ee8b5670cc84848f6359cf6b5d8f86617098a9b73",
- "sha256:e422c3152921cece8b6a2fb6b0b4d73b6579bd20ae075e7d15143e711f3ca2ca",
- "sha256:e840f552a509e3380b0f0ec977e8124d0dc34dc0e68289ca28f4d7c1d0d79474",
- "sha256:f3d0a94ad151870978fb93538e95411c83899c9dc63e6fb65542f769568ecfa5"
- ],
- "index": "pypi",
- "version": "==1.18.1"
- },
- "oauthlib": {
- "hashes": [
- "sha256:bee41cc35fcca6e988463cacc3bcb8a96224f470ca547e697b604cc697b2f889",
- "sha256:df884cd6cbe20e32633f1db1072e9356f53638e4361bef4e8b03c9127c9328ea"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==3.1.0"
- },
- "opencv-python": {
- "hashes": [
- "sha256:0495e9247fbbd5d88346bb4d480df27fb4000aa4799b5a15b1735968a94a5189",
- "sha256:078e8ea34d06b3fa459c58a6ce966ef715cc2e913b7bd96a46beb345975aa5d6",
- "sha256:0dbbd0348c8282d4e3cf472a8e2a17785f05c22a55647253fa00b539897f8fcc",
- "sha256:1b302b4721ca2d55ae7e9e80acebd73499c16a82be9bebc563a7937dbd348b2d",
- "sha256:1f035595ef2f296c234c2b8b9659162646b9312afd0cec7ab0217bad915ff068",
- "sha256:1f7fa5433c26c637cf923c59025df12fcd56b2d205da178c7ad6954e6e50912e",
- "sha256:20bd10b6f6f5de1a5e796900ab77ea57366139290f426d2039d3919d8ddf9f1c",
- "sha256:2306ddd98aa52688c9667f8080349d653d465a2b838cbacb19561286046ba1e8",
- "sha256:31945ea9e7324c41be925f2b21fcb523844b2399dc649010f3a3e97825dcfcd0",
- "sha256:36680744ebdc66a9da0a65f1f33ec9cf5d26a98749c5701dc612b334b213997d",
- "sha256:409e3a4c925accd68a5ab1cef21dd04b957c0ee2985db8f075a808dccd6e0f73",
- "sha256:440a093dda50daf093d73aae2dd333c9e4a593cfe7df8cbc298b421d313e263f",
- "sha256:4b0465c3df9dea074583b6b4f8cf22e5902c5c5ec213a479c6c834a8a0191cf7",
- "sha256:4b5902b647e66addfa5218dbc75e7a4de2f46c253ea17b234408f5792cfc8d7f",
- "sha256:4f0a5c098aad4df88ce7dc3828a857921368635e3a961e80431e60f3522a99be",
- "sha256:6df586230f9146afde5b8e2f4511978f8fb6172bf0f47ba290423979baae974d",
- "sha256:6e4fee2ee2bc4d911dad78e2b167da97796879aaade4be3ff42ff1993e250b15",
- "sha256:70f3c6fe31af7c00c60cb91bb7351837ba6c7b3d173b855ca5dbe265b90a1606",
- "sha256:78390d93834b6b7c9d9234dba68ba9c34a966f60e519efd2691e5c367dee7f8e",
- "sha256:81519bba8560c68f587482c157a74cf04d5a2877d4367377d2671e66eb7a3961",
- "sha256:87beeb6ad4ffcd6fbfbb464a8a75c7a1389a0642cc632ecceb504c86139567e3",
- "sha256:a354096290dd57ddb2664e7b21ddb6c6c2f5297cc4d8a402ce3f6a82a24807e3",
- "sha256:a4635e22637181b478d6ad337c94b596c98c16bdbae92ef90514bbf31e30ef3a",
- "sha256:b23359c21c4eb84f28fbe1331723bbf1ebc34125f22480da4b16cfae989a3249",
- "sha256:ba52829eafab59c5260bec012fad0e26bd05389828af0e316e278912c82dab32",
- "sha256:c672596fa261766d6d0cc02377755558b92dee80a64ee8dd6f58f4e56bf7835d",
- "sha256:fd6ac9a11faa5d1cbf014d059dd890ad6f0583f149e780ff7d0d3d47e68438d6"
- ],
- "index": "pypi",
- "version": "==3.4.2.17"
- },
- "opt-einsum": {
- "hashes": [
- "sha256:edfada4b1d0b3b782ace8bc14e80618ff629abf53143e1e6bbf9bd00b11ece77"
- ],
- "markers": "python_version >= '3.5'",
- "version": "==3.1.0"
- },
- "osmium": {
- "hashes": [
- "sha256:0178bc3dd46fd304b0a22a951df1a116d37bb0d4869bbe6c566ce1abf39be7e5",
- "sha256:07f6315af25fb496125d140151e317de0486ddc20254616d2347cd5537091e07",
- "sha256:090fbcf394b76c7a4e967f55977a1491efaf3276b4a27ec1262cfd13073eb497",
- "sha256:0b798022ddb598ffa8c5baf979cc0fe275a9419dfdf3ca21a92ede596f99bae2",
- "sha256:2170516d9c3c95432ea725ac4a0dca590fb263f80b6fc3f361a3d30eb9c41f28",
- "sha256:35d9ea62e0016466eece390792644192d45dbf12c70637d293b8be408c2390cd",
- "sha256:455dcd129819b1c47cfcb7c676e362c07b32dc5558bf16eddd0333f8899e331e",
- "sha256:5545722ce2ead2c1e634ef23e26b694fe06f5768006195762f14ab6496fb72ed",
- "sha256:68d8a9bab38657362d55ec0c2878acc40a74f4602e263c1c3b75bdfe8135c59c",
- "sha256:69fd3f0da9ecb3a041075bd84702ef9237c67c09f1a0b6defb00bbb727249259",
- "sha256:712910c5472726bb62a6e043179697e0a52ebb09b7e4e23dbf4a8d0e31c90e11",
- "sha256:82d84dbfe437546aad4e427d9b667eb4575b35100e8ff60fd1f0752522126211",
- "sha256:8475e8dc2186d0817b0254e35f502582592b8b44cd0a9478cbecd6602791ff50",
- "sha256:851491cddb07e7cf25b74a29e7ceca9c0eac74c45d0a033e6085820e830e1f32",
- "sha256:8ae2ce116bec61b2e51b181f61214fba06ec25ccd4d51cb42386b8b4b73ccd91",
- "sha256:8ea713709267a461eaf2c6544f4fe358312558e7448480f5fd0c3fef023e996d",
- "sha256:b7f774794fac9df16ad745035aa61e28a00c5a75bed3483fa77f67e34dc61920",
- "sha256:bb40e3e468b47e01f759a1c5de9e5429224ca6b8fe09f690c169480afc7ea840",
- "sha256:bc67305d09f391d735883efea870c37a3aa2dabf32530026a409eb506b52a2f0",
- "sha256:bef1b37772b39a438c5b2e65dbc1f3417ef2a8ade829ef1f6f0179431c5bcb7c",
- "sha256:df9bded041a099a72bc3bfb3732df93c36f96801c2706721d1d8623419e64321",
- "sha256:e0d4a1049a5bf8445c6e8c6cbc8f247795322870a32ca63f5fdec24cbcc973c2"
- ],
- "index": "pypi",
- "version": "==2.15.3"
- },
- "pandas": {
- "hashes": [
- "sha256:00dff3a8e337f5ed7ad295d98a31821d3d0fe7792da82d78d7fd79b89c03ea9d",
- "sha256:22361b1597c8c2ffd697aa9bf85423afa9e1fcfa6b1ea821054a244d5f24d75e",
- "sha256:255920e63850dc512ce356233081098554d641ba99c3767dde9e9f35630f994b",
- "sha256:26382aab9c119735908d94d2c5c08020a4a0a82969b7e5eefb92f902b3b30ad7",
- "sha256:33970f4cacdd9a0ddb8f21e151bfb9f178afb7c36eb7c25b9094c02876f385c2",
- "sha256:4545467a637e0e1393f7d05d61dace89689ad6d6f66f267f86fff737b702cce9",
- "sha256:52da74df8a9c9a103af0a72c9d5fdc8e0183a90884278db7f386b5692a2220a4",
- "sha256:61741f5aeb252f39c3031d11405305b6d10ce663c53bc3112705d7ad66c013d0",
- "sha256:6a3ac2c87e4e32a969921d1428525f09462770c349147aa8e9ab95f88c71ec71",
- "sha256:7458c48e3d15b8aaa7d575be60e1e4dd70348efcd9376656b72fecd55c59a4c3",
- "sha256:78bf638993219311377ce9836b3dc05f627a666d0dbc8cec37c0ff3c9ada673b",
- "sha256:8153705d6545fd9eb6dd2bc79301bff08825d2e2f716d5dced48daafc2d0b81f",
- "sha256:975c461accd14e89d71772e89108a050fa824c0b87a67d34cedf245f6681fc17",
- "sha256:9962957a27bfb70ab64103d0a7b42fa59c642fb4ed4cb75d0227b7bb9228535d",
- "sha256:adc3d3a3f9e59a38d923e90e20c4922fc62d1e5a03d083440468c6d8f3f1ae0a",
- "sha256:bbe3eb765a0b1e578833d243e2814b60c825b7fdbf4cdfe8e8aae8a08ed56ecf",
- "sha256:df8864824b1fe488cf778c3650ee59c3a0d8f42e53707de167ba6b4f7d35f133",
- "sha256:e45055c30a608076e31a9fcd780a956ed3b1fa20db61561b8d88b79259f526f7",
- "sha256:ee50c2142cdcf41995655d499a157d0a812fce55c97d9aad13bc1eef837ed36c"
- ],
- "markers": "python_version >= '3.5.3'",
- "version": "==0.25.3"
- },
- "pandocfilters": {
- "hashes": [
- "sha256:b3dd70e169bb5449e6bc6ff96aea89c5eea8c5f6ab5e207fc2f521a2cf4a0da9"
- ],
- "version": "==1.4.2"
- },
- "paramiko": {
- "hashes": [
- "sha256:920492895db8013f6cc0179293147f830b8c7b21fdfc839b6bad760c27459d9f",
- "sha256:9c980875fa4d2cb751604664e9a2d0f69096643f5be4db1b99599fe114a97b2f"
- ],
- "version": "==2.7.1"
- },
- "parso": {
- "hashes": [
- "sha256:55cf25df1a35fd88b878715874d2c4dc1ad3f0eebd1e0266a67e1f55efccfbe1",
- "sha256:5c1f7791de6bd5dbbeac8db0ef5594b36799de198b3f7f7014643b0c5536b9d3"
- ],
- "version": "==0.5.2"
- },
- "pbr": {
- "hashes": [
- "sha256:139d2625547dbfa5fb0b81daebb39601c478c21956dc57e2e07b74450a8c506b",
- "sha256:61aa52a0f18b71c5cc58232d2cf8f8d09cd67fcad60b742a60124cb8d6951488"
- ],
- "index": "pypi",
- "version": "==5.4.4"
- },
- "percache": {
- "hashes": [
- "sha256:04b08b9d775b0e88666c14cfd6627691cc056ec526a4608f620595d68d1e31a2"
- ],
- "index": "pypi",
- "version": "==0.4.4"
- },
- "pexpect": {
- "hashes": [
- "sha256:2094eefdfcf37a1fdbfb9aa090862c1a4878e5c7e0e7e7088bdb511c558e5cd1",
- "sha256:9e2c1fd0e6ee3a49b28f95d4b33bc389c89b20af6a1255906e90ff1262ce62eb"
- ],
- "markers": "sys_platform != 'win32'",
- "version": "==4.7.0"
- },
- "pickleshare": {
- "hashes": [
- "sha256:87683d47965c1da65cdacaf31c8441d12b8044cdec9aca500cd78fc2c683afca",
- "sha256:9649af414d74d4df115d5d718f82acb59c9d418196b7b4290ed47a12ce62df56"
- ],
- "version": "==0.7.5"
- },
- "pillow": {
- "hashes": [
- "sha256:0a628977ac2e01ca96aaae247ec2bd38e729631ddf2221b4b715446fd45505be",
- "sha256:4d9ed9a64095e031435af120d3c910148067087541131e82b3e8db302f4c8946",
- "sha256:54ebae163e8412aff0b9df1e88adab65788f5f5b58e625dc5c7f51eaf14a6837",
- "sha256:5bfef0b1cdde9f33881c913af14e43db69815c7e8df429ceda4c70a5e529210f",
- "sha256:5f3546ceb08089cedb9e8ff7e3f6a7042bb5b37c2a95d392fb027c3e53a2da00",
- "sha256:5f7ae9126d16194f114435ebb79cc536b5682002a4fa57fa7bb2cbcde65f2f4d",
- "sha256:62a889aeb0a79e50ecf5af272e9e3c164148f4bd9636cc6bcfa182a52c8b0533",
- "sha256:7406f5a9b2fd966e79e6abdaf700585a4522e98d6559ce37fc52e5c955fade0a",
- "sha256:8453f914f4e5a3d828281a6628cf517832abfa13ff50679a4848926dac7c0358",
- "sha256:87269cc6ce1e3dee11f23fa515e4249ae678dbbe2704598a51cee76c52e19cda",
- "sha256:875358310ed7abd5320f21dd97351d62de4929b0426cdb1eaa904b64ac36b435",
- "sha256:8ac6ce7ff3892e5deaab7abaec763538ffd011f74dc1801d93d3c5fc541feee2",
- "sha256:91b710e3353aea6fc758cdb7136d9bbdcb26b53cefe43e2cba953ac3ee1d3313",
- "sha256:9d2ba4ed13af381233e2d810ff3bab84ef9f18430a9b336ab69eaf3cd24299ff",
- "sha256:a62ec5e13e227399be73303ff301f2865bf68657d15ea50b038d25fc41097317",
- "sha256:ab76e5580b0ed647a8d8d2d2daee170e8e9f8aad225ede314f684e297e3643c2",
- "sha256:bf4003aa538af3f4205c5fac56eacaa67a6dd81e454ffd9e9f055fff9f1bc614",
- "sha256:bf598d2e37cf8edb1a2f26ed3fb255191f5232badea4003c16301cb94ac5bdd0",
- "sha256:c18f70dc27cc5d236f10e7834236aff60aadc71346a5bc1f4f83a4b3abee6386",
- "sha256:c5ed816632204a2fc9486d784d8e0d0ae754347aba99c811458d69fcdfd2a2f9",
- "sha256:dc058b7833184970d1248135b8b0ab702e6daa833be14035179f2acb78ff5636",
- "sha256:ff3797f2f16bf9d17d53257612da84dd0758db33935777149b3334c01ff68865"
- ],
- "index": "pypi",
- "version": "==7.0.0"
- },
- "portalocker": {
- "hashes": [
- "sha256:6f57aabb25ba176462dc7c63b86c42ad6a9b5bd3d679a9d776d0536bfb803d54",
- "sha256:dac62e53e5670cb40d2ee4cdc785e6b829665932c3ee75307ad677cf5f7d2e9f"
- ],
- "version": "==1.5.2"
- },
- "pprofile": {
- "hashes": [
- "sha256:3469102f462f9fc2d889970afcf73d89c0d89a36c49a4c262c3edc302b4a22da"
- ],
- "index": "pypi",
- "version": "==2.0.2"
- },
- "prometheus-client": {
- "hashes": [
- "sha256:71cd24a2b3eb335cb800c7159f423df1bd4dcd5171b234be15e3f31ec9f622da"
- ],
- "version": "==0.7.1"
- },
- "prompt-toolkit": {
- "hashes": [
- "sha256:46642344ce457641f28fc9d1c9ca939b63dadf8df128b86f1b9860e59c73a5e4",
- "sha256:e7f8af9e3d70f514373bf41aa51bc33af12a6db3f71461ea47fea985defb2c31",
- "sha256:f15af68f66e664eaa559d4ac8a928111eebd5feda0c11738b5998045224829db"
- ],
- "version": "==2.0.10"
- },
- "protobuf": {
- "hashes": [
- "sha256:0329e86a397db2a83f9dcbe21d9be55a47f963cdabc893c3a24f4d3a8f117c37",
- "sha256:0a7219254afec0d488211f3d482d8ed57e80ae735394e584a98d8f30a8c88a36",
- "sha256:14d6ac53df9cb5bb87c4f91b677c1bc5cec9c0fd44327f367a3c9562de2877c4",
- "sha256:180fc364b42907a1d2afa183ccbeffafe659378c236b1ec3daca524950bb918d",
- "sha256:3d7a7d8d20b4e7a8f63f62de2d192cfd8b7a53c56caba7ece95367ca2b80c574",
- "sha256:3f509f7e50d806a434fe4a5fbf602516002a0f092889209fff7db82060efffc0",
- "sha256:4571da974019849201fc1ec6626b9cea54bd11b6bed140f8f737c0a33ea37de5",
- "sha256:557686c43fbd04f5f7c533f00feee9a37dcca7b5896e3ae3664a33864e6dd546",
- "sha256:56bd1d84fbf4505c7b73f04de987eef5682e5752c811141b0186a3809bfb396f",
- "sha256:680c668d00b5eff08b86aef9e5ba9a705e621ea05d39071cfea8e28cb2400946",
- "sha256:6b5b947dc8b3f2aec0eaad65b0b5113fcd642c358c31357c647da6281ee31104",
- "sha256:6e96dffaf4d0a9a329e528b353ba62fd9ef13599688723d96bc9c165d0b6871e",
- "sha256:919f0d6f6addc836d08658eba3b52be2e92fd3e76da3ce00c325d8e9826d17c7",
- "sha256:9c7b19c30cf0644afd0e4218b13f637ce54382fdcb1c8f75bf3e84e49a5f6d0a",
- "sha256:a2e6f57114933882ec701807f217df2fb4588d47f71f227c0a163446b930d507",
- "sha256:a6b970a2eccfcbabe1acf230fbf112face1c4700036c95e195f3554d7bcb04c1",
- "sha256:bc45641cbcdea068b67438244c926f9fd3e5cbdd824448a4a64370610df7c593",
- "sha256:d61b14a9090da77fe87e38ba4c6c43d3533dcbeb5d84f5474e7ac63c532dcc9c",
- "sha256:d6faf5dbefb593e127463f58076b62fcfe0784187be8fe1aa9167388f24a22a1"
- ],
- "version": "==3.11.2"
- },
- "ptyprocess": {
- "hashes": [
- "sha256:923f299cc5ad920c68f2bc0bc98b75b9f838b93b599941a6b63ddbc2476394c0",
- "sha256:d7cc528d76e76342423ca640335bd3633420dc1366f258cb31d05e865ef5ca1f"
- ],
- "markers": "os_name != 'nt'",
- "version": "==0.6.0"
- },
- "pyasn1": {
- "hashes": [
- "sha256:014c0e9976956a08139dc0712ae195324a75e142284d5f87f1a87ee1b068a359",
- "sha256:03840c999ba71680a131cfaee6fab142e1ed9bbd9c693e285cc6aca0d555e576",
- "sha256:0458773cfe65b153891ac249bcf1b5f8f320b7c2ce462151f8fa74de8934becf",
- "sha256:08c3c53b75eaa48d71cf8c710312316392ed40899cb34710d092e96745a358b7",
- "sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d",
- "sha256:5c9414dcfede6e441f7e8f81b43b34e834731003427e5b09e4e00e3172a10f00",
- "sha256:6e7545f1a61025a4e58bb336952c5061697da694db1cae97b116e9c46abcf7c8",
- "sha256:78fa6da68ed2727915c4767bb386ab32cdba863caa7dbe473eaae45f9959da86",
- "sha256:7ab8a544af125fb704feadb008c99a88805126fb525280b2270bb25cc1d78a12",
- "sha256:99fcc3c8d804d1bc6d9a099921e39d827026409a58f2a720dcdb89374ea0c776",
- "sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba",
- "sha256:e89bf84b5437b532b0803ba5c9a5e054d21fec423a89952a74f87fa2c9b7bce2",
- "sha256:fec3e9d8e36808a28efb59b489e4528c10ad0f480e57dcc32b4de5c9d8c9fdf3"
- ],
- "version": "==0.4.8"
- },
- "pyasn1-modules": {
- "hashes": [
- "sha256:0c35a52e00b672f832e5846826f1fb7507907f7d52fba6faa9e3c4cbe874fe4b",
- "sha256:13a6955947d8a554de78fc305a4d651f20fb5580b88612a5f0661d4f189d27ac",
- "sha256:233f55c840e821e76828262db976ac894b285909d22d060c2bdb522e7bf28cc6",
- "sha256:24d54188cb7abd750e0a2cba61b7b46a75608175a0c3c1b1eee08322915d8d21",
- "sha256:27581362b4253b9c999882a64df974124cde12be0bf2c04148a0d68bc6bbb7b8",
- "sha256:33c220a2701032261a23eea6e9881404ac6fc7ff96f183b5353fea8fc8962547",
- "sha256:64f6aecf26e93f6a3ba3725b4eb9f532551747d7a63ca9ff43aef12f4bf11eac",
- "sha256:7b4edf07ca2f759d7cf693184be09f22e067c2eb52b03c770d0a2e9de1c67dfd",
- "sha256:9b972f81f59d896cebb9ebb1d44296f1acb28bf7869443c37551f4eed8d74f83",
- "sha256:9ca5e376a6d9dee35bb3a62608dfa2e6698798aa6b8db3c7afd0eb31af0d63c7",
- "sha256:b6ada4f840fe51abf5a6bd545b45bf537bea62221fa0dde2e8a553ed9f06a4e3",
- "sha256:c14b107a67ee36a7f183ae9f4803ffde4a03b67f3192eab0a62e851af71371d3",
- "sha256:eaf35047a0b068e3e0c2a99618b13b65c98c329661daa78c9d44a4ef0fe8139e"
- ],
- "version": "==0.2.7"
- },
- "pycocotools": {
- "git": "https://github.com/cocodataset/cocoapi.git",
- "ref": "e140a084d678eacd18e85a9d8cfa45d1d5911db9",
- "subdirectory": "PythonAPI",
- "version": "==0.0.0"
- },
- "pycparser": {
- "hashes": [
- "sha256:a988718abfad80b6b157acce7bf130a30876d27603738ac39f140993246b25b3"
- ],
- "version": "==2.19"
- },
- "pycurl": {
- "hashes": [
- "sha256:6f08330c5cf79fa8ef68b9912b9901db7ffd34b63e225dce74db56bb21deda8e"
- ],
- "index": "pypi",
- "version": "==7.43.0.3"
- },
- "pygame": {
- "hashes": [
- "sha256:0480fe82cd41a43e3eea497fa2c059c72ac54cb5d003d5aa2ed06a04541c384e",
- "sha256:136a3b5711d9ec369a0407e4e08ffced3ba61aa41059e9280ffffa79c8614f65",
- "sha256:2622b9dd95f445c887a36a57eade42c672598589f69a8052ccdb8eeeffa4dbb1",
- "sha256:301c6428c0880ecd4a9e3951b80e539c33863b6ff356a443db1758de4f297957",
- "sha256:396320aa29a925feed0b64639f77ce1418722ea7f536b4e4936083dd8d4c4535",
- "sha256:398c42b605ecc514e62f68f1944a2d21e247938309f598de6cb0ad3c207324a8",
- "sha256:4aaff572a273a32e70ec3593d213e59ab11c183a9916616562247930f17a5447",
- "sha256:4e1065577f1b29111113be5deb2ea88553551a5e1cf33e0c08fa32768f285809",
- "sha256:5f052dc2975a399aa1830c1f04c5f72856aa416bf3cd4b31375a058015a5c620",
- "sha256:68ea43e51150316b9fb08e251209d4e2b4e76a340b5b6fc8cdf1a898c78f7e5b",
- "sha256:698433a9fcefca0527244dc44dff9503eb26157494730b1cc80e6e4dbb246e92",
- "sha256:6f714986f7987f10cb94f1be0753318e341a7ea6b12d66f37a4d5d6dd4695023",
- "sha256:73cd9df328c7e72638dbcc1d18e7155225faed880a53db6bad90d1d7c0a71dfd",
- "sha256:7876d1f29f66d3d7cac46479503891ee1ef409b0fbce54b0d74f3a6b33a46dba",
- "sha256:854e87b8b2b76e3ed11d64985fcfdd7af919659503de99fc2b0a717b314c3cf0",
- "sha256:8da13704ad45b7d5de8a8cca135a7f44c7fc6aa9f691abe7b0392468a34a8013",
- "sha256:9ce22fb72298ea33dbb3a1c6c60a4a4e19d9698df6f3f5782eba4dada7b7736d",
- "sha256:a37b6c59e7b8feadc51db5197052b86ceb6443f9fb2a6f7d6527620e707c558c",
- "sha256:a6e8d2f99dbe1dfe72d0c019693c14d93c410f702d0b04ec9a81b36dacd55a23",
- "sha256:a9ac862dd7159861f2c6443b0029089e1c0c4ec762a8074022914ec52fe4dfac",
- "sha256:ae1bc3e78ed28f20878e7ca2c98663a6634e9c00d7746d39413fc18e907dc162",
- "sha256:be7e70f91bd4eb35ae081062f16bf434619b3292358d9b061f8159ddc570c7f0",
- "sha256:c895cf9c1b6d1cbba8cb8cc3f5427febcf8aa41a9333697741abeea1c537a350",
- "sha256:e3e7e4a09dfd8b03663222d6bcadec9fef021404f4d9eecf56825342e039dfc1",
- "sha256:f1f5714d2c23f6a64ef2ac4fcd36a2dd2689da85978d951a99a6ae5dfdf9bdbc",
- "sha256:fa788f775680fc5d268ab00a2da29c9a22830032cfab732730298a2952cd87f3"
- ],
- "index": "pypi",
- "version": "==1.9.6"
- },
- "pygments": {
- "hashes": [
- "sha256:2a3fe295e54a20164a9df49c75fa58526d3be48e14aceba6d6b1e8ac0bfd6f1b",
- "sha256:98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe"
- ],
- "index": "pypi",
- "version": "==2.5.2"
- },
- "pyjwt": {
- "hashes": [
- "sha256:5c6eca3c2940464d106b99ba83b00c6add741c9becaec087fb7ccdefea71350e",
- "sha256:8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96"
- ],
- "index": "pypi",
- "version": "==1.7.1"
- },
- "pylint": {
- "hashes": [
- "sha256:3db5468ad013380e987410a8d6956226963aed94ecb5f9d3a28acca6d9ac36cd",
- "sha256:886e6afc935ea2590b462664b161ca9a5e40168ea99e5300935f6591ad467df4"
- ],
- "index": "pypi",
- "version": "==2.4.4"
- },
- "pylogbeat": {
- "hashes": [
- "sha256:11f3b1d04424151d406d8b844a8db6299442b4af1f10d5f622a6febf1ad5c41d",
- "sha256:473494a0c798a560a8312ee662b333888181cf4db18cd8f87a8d7d1548beefd9"
- ],
- "version": "==1.0.2"
- },
- "pymongo": {
- "hashes": [
- "sha256:0369136c6e79c5edc16aa5de2b48a1b1c1fe5e6f7fc5915a2deaa98bd6e9dad5",
- "sha256:08364e1bea1507c516b18b826ec790cb90433aec2f235033ec5eecfd1011633b",
- "sha256:0af1d2bc8cc9503bf92ec3669a77ec3a6d7938193b583fb867b7e9696eed52e8",
- "sha256:0cfd1aeeb8c0a634646ab3ebeb4ce6828b94b2e33553a69ff7e6c07c250bf201",
- "sha256:15bbd2b5397f7d22498e2f2769fd698a8a247b9cc1a630ee8dabf647fb333480",
- "sha256:1b4a13dff15641e58620524db15d7a323d60572b2b187261c5cb58c36d74778d",
- "sha256:22fbdb908257f9aaaa372a7684f3e094a05ca52eb84f8f381c8b1827c49556fd",
- "sha256:264272fd1c95fc48002ad85d5e41270831777b4180f2500943e45e12b2a3ab43",
- "sha256:3372e98eebbfd05ebf020388003f8a4438bed41e0fef1ef696d2c13633c416c8",
- "sha256:339d24ecdc42745d2dc09b26fda8151988e806ca81134a7bd10513c4031d91e1",
- "sha256:38281855fc3961ba5510fbb503b8d16cc1fcb326e9f7ba0dd096ed4eb72a7084",
- "sha256:4acdd2e16392472bfd49ca49038845c95e5254b5af862b55f7f2cc79aa258886",
- "sha256:4e0c006bc6e98e861b678432e05bf64ba3eb889b6ab7e7bf1ebaecf9f1ba0e58",
- "sha256:4e4284bcbe4b7be1b37f9641509085b715c478e7fbf8f820358362b5dd359379",
- "sha256:4e5e94a5f9823f0bd0c56012a57650bc6772636c29d83d253260c26b908fcfd9",
- "sha256:4e61f30800a40f1770b2ec56bbf5dc0f0e3f7e9250eb05fa4feb9ccb7bbe39ca",
- "sha256:53577cf57ba9d93b58ab41d45250277828ff83c5286dde14f855e4b17ec19976",
- "sha256:681cb31e8631882804a6cc3c8cc8f54a74ff3a82261a78e50f20c5eec05ac855",
- "sha256:6dfc2710f43dd1d66991a0f160d196356732ccc8aa9dbc6875aeba78388fa142",
- "sha256:72218201b13d8169be5736417987e9a0a3b10d4349e40e4db7a6a5ac670c7ef2",
- "sha256:7247fbcdbf7ab574eb70743461b3cfc14d9cfae3f27a9afb6ce14d87f67dd0b5",
- "sha256:72651f4b4adf50201891580506c8cca465d94d38f26ed92abfc56440662c723c",
- "sha256:87b3aaf12ad6a9b5570b12d2a4b8802757cb3588a903aafd3c25f07f9caf07e3",
- "sha256:87c28b7b37617c5a01eb396487f7d3b61a453e1fa0475a175ab87712d6f5d52f",
- "sha256:88efe627b628f36ef53f09abb218d4630f83d8ebde7028689439559475c43dae",
- "sha256:89bfbca22266f12df7fb80092b7c876734751d02b93789580b68957ad4a8bf56",
- "sha256:908a3caf348a672b28b8a06fe7b4a27c2fdcf7f873df671e4027d48bcd7f971f",
- "sha256:9128e7bea85f3a3041306fa14a7aa82a24b47881918500e1b8396dd1c933b5a6",
- "sha256:9737d6d688a15b8d5c0bfa909638b79261e195be817b9f1be79c722bbb23cd76",
- "sha256:98a8305da158f46e99e7e51db49a2f8b5fcdd7683ea7083988ccb9c4450507a6",
- "sha256:99285cd44c756f0900cbdb5fe75f567c0a76a273b7e0467f23cb76f47e60aac0",
- "sha256:9ed568f8026ffeb00ce31e5351e0d09d704cc19a29549ba4da0ac145d2a26fdf",
- "sha256:a006162035032021dfd00a879643dc06863dac275f9210d843278566c719eebc",
- "sha256:a03cb336bc8d25a11ff33b94967478a9775b0d2b23b39e952d9cc6cb93b75d69",
- "sha256:a863ceb67be163060d1099b7e89b6dd83d6dd50077c7ceae31ac844c4c2baff9",
- "sha256:b82628eaf0a16c1f50e1c205fd1dd406d7874037dd84643da89e91b5043b5e82",
- "sha256:bc6446a41fb7eeaf2c808bab961b9bac81db0f5de69eab74eebe1b8b072399f7",
- "sha256:c42d290ed54096355838421cf9d2a56e150cb533304d2439ef1adf612a986eaf",
- "sha256:c43879fe427ea6aa6e84dae9fbdc5aa14428a4cfe613fe0fee2cc004bf3f307c",
- "sha256:c566cbdd1863ba3ccf838656a1403c3c81fdb57cbe3fdd3515be7c9616763d33",
- "sha256:c5b7a0d7e6ca986de32b269b6dbbd5162c1a776ece72936f55decb4d1b197ee9",
- "sha256:ca109fe9f74da4930590bb589eb8fdf80e5d19f5cd9f337815cac9309bbd0a76",
- "sha256:d0260ba68f9bafd8775b2988b5aeace6e69a37593ec256e23e150c808160c05c",
- "sha256:d12d86e771fc3072a0e6bdbf4e417c63fec85ee47cb052ba7ad239403bf5e154",
- "sha256:d2ce33501149b373118fcfec88a292a87ef0b333fb30c7c6aac72fe64700bdf6",
- "sha256:d582ea8496e2a0e124e927a67dca55c8833f0dbfbc2c84aaf0e5949a2dd30c51",
- "sha256:d68b9ab0a900582a345fb279675b0ad4fac07d6a8c2678f12910d55083b7240d",
- "sha256:dbf1fa571db6006907aeaf6473580aaa76041f4f3cd1ff8a0039fd0f40b83f6d",
- "sha256:e032437a7d2b89dab880c79379d88059cee8019da0ff475d924c4ccab52db88f",
- "sha256:e0f5798f3ad60695465a093e3d002f609c41fef3dcb97fcefae355d24d3274cf",
- "sha256:e756355704a2cf91a7f4a649aa0bbf3bbd263018b9ed08f60198c262f4ee24b6",
- "sha256:e824b4b87bd88cbeb25c8babeadbbaaaf06f02bbb95a93462b7c6193a064974e",
- "sha256:ea1171470b52487152ed8bf27713cc2480dc8b0cd58e282a1bff742541efbfb8",
- "sha256:fa19aef44d5ed8f798a8136ff981aedfa508edac3b1bed481eca5dde5f14fd3d",
- "sha256:faf83d20c041637cb277e5fdb59abc217c40ab3202dd87cc95d6fbd9ce5ffd9b",
- "sha256:fceb6ae5a149a42766efb8344b0df6cfb21b55c55f360170abaddb11d43af0f1"
- ],
- "index": "pypi",
- "version": "==3.10.0"
- },
- "pymysql": {
- "hashes": [
- "sha256:95f057328357e0e13a30e67857a8c694878b0175797a9a203ee7adbfb9b1ec5f",
- "sha256:9ec760cbb251c158c19d6c88c17ca00a8632bac713890e465b2be01fdc30713f"
- ],
- "index": "pypi",
- "version": "==0.9.2"
- },
- "pynacl": {
- "hashes": [
- "sha256:05c26f93964373fc0abe332676cb6735f0ecad27711035b9472751faa8521255",
- "sha256:0c6100edd16fefd1557da078c7a31e7b7d7a52ce39fdca2bec29d4f7b6e7600c",
- "sha256:0d0a8171a68edf51add1e73d2159c4bc19fc0718e79dec51166e940856c2f28e",
- "sha256:1c780712b206317a746ace34c209b8c29dbfd841dfbc02aa27f2084dd3db77ae",
- "sha256:2424c8b9f41aa65bbdbd7a64e73a7450ebb4aa9ddedc6a081e7afcc4c97f7621",
- "sha256:2d23c04e8d709444220557ae48ed01f3f1086439f12dbf11976e849a4926db56",
- "sha256:30f36a9c70450c7878053fa1344aca0145fd47d845270b43a7ee9192a051bf39",
- "sha256:37aa336a317209f1bb099ad177fef0da45be36a2aa664507c5d72015f956c310",
- "sha256:4943decfc5b905748f0756fdd99d4f9498d7064815c4cf3643820c9028b711d1",
- "sha256:53126cd91356342dcae7e209f840212a58dcf1177ad52c1d938d428eebc9fee5",
- "sha256:57ef38a65056e7800859e5ba9e6091053cd06e1038983016effaffe0efcd594a",
- "sha256:5bd61e9b44c543016ce1f6aef48606280e45f892a928ca7068fba30021e9b786",
- "sha256:6482d3017a0c0327a49dddc8bd1074cc730d45db2ccb09c3bac1f8f32d1eb61b",
- "sha256:7d3ce02c0784b7cbcc771a2da6ea51f87e8716004512493a2b69016326301c3b",
- "sha256:a14e499c0f5955dcc3991f785f3f8e2130ed504fa3a7f44009ff458ad6bdd17f",
- "sha256:a39f54ccbcd2757d1d63b0ec00a00980c0b382c62865b61a505163943624ab20",
- "sha256:aabb0c5232910a20eec8563503c153a8e78bbf5459490c49ab31f6adf3f3a415",
- "sha256:bd4ecb473a96ad0f90c20acba4f0bf0df91a4e03a1f4dd6a4bdc9ca75aa3a715",
- "sha256:bf459128feb543cfca16a95f8da31e2e65e4c5257d2f3dfa8c0c1031139c9c92",
- "sha256:e2da3c13307eac601f3de04887624939aca8ee3c9488a0bb0eca4fb9401fc6b1",
- "sha256:f67814c38162f4deb31f68d590771a29d5ae3b1bd64b75cf232308e5c74777e0"
- ],
- "index": "pypi",
- "version": "==1.3.0"
- },
- "pynmea2": {
- "hashes": [
- "sha256:8b83fa7e3e668af5e182ef1c2fd4a535433ecadf60d7b627280172d695a1646b",
- "sha256:fe786594299588d1bfbd346ece2c2c1e5b24e160dcb740813c34bfa70d0a141d"
- ],
- "index": "pypi",
- "version": "==1.15.0"
- },
- "pyopenssl": {
- "hashes": [
- "sha256:621880965a720b8ece2f1b2f54ea2071966ab00e2970ad2ce11d596102063504",
- "sha256:9a24494b2602aaf402be5c9e30a0b82d4a5c67528fe8fb475e3f3bc00dd69507"
- ],
- "version": "==19.1.0"
- },
- "pyparsing": {
- "hashes": [
- "sha256:4c830582a84fb022400b85429791bc551f1f4871c33f23e44f353119e92f969f",
- "sha256:c342dccb5250c08d45fd6f8b4a559613ca603b57498511740e65cd11a2e7dcec"
- ],
- "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==2.4.6"
- },
- "pypolyline": {
- "hashes": [
- "sha256:09cc2192bc12063c7afa2d2718b739cd4bf3f8ec29eacde0cb728c9f5f7f7858",
- "sha256:21acee0e31d867bde04583907ccb7afe4b21d33a63c23adc7cf0d82b6f2feab3",
- "sha256:5e0643454b4471f4f23d38530467ee7093d3b375898d5e1b054876e5a50a6b89",
- "sha256:6b0a1b573fe84c9ed0aa3a4eb9903d44864f37e405cdcc7396b61e6d00a937d6",
- "sha256:6bdbc9210f29d4fd44c3e4d510ffcc1276e46a50d63365831e2e422dc0b3cb43",
- "sha256:8efb93097c92c5894dcaf9e784b888f9426d170ae51d62164341bbb2b832c09a",
- "sha256:9c843a35b2d02b04c1226db851834b55f0de30eef47ba057fd6f8623cdef6f2d",
- "sha256:ad01fedf427536f391776b329c95e5f80f2b1a5d25c54ea7713c8cdb56947106",
- "sha256:e4e4c857790f6a3067dab3ae661edda99d5cee55d107b3b4d0186159431165ef",
- "sha256:f8c84f0d2aa6bd9ed14bdb671fab80f79b4ba93b4347b530ae4d3b56a3fb269a"
- ],
- "index": "pypi",
- "version": "==0.1.17"
- },
- "pyproj": {
- "hashes": [
- "sha256:0608ac0aed84dcf57c859df87ac315b9acce18268f62bafc04071b7b1ff1c5a9",
- "sha256:18265fb755e01df1d2248f1e837d81da4c9625e8f09481d64a9d6282c96f7467",
- "sha256:190540946bb6fbfce285f46c08fcfd9d03e9331a0e952a3ef2047e6b8e8d8125",
- "sha256:1da7f86d3b5e80ba3dabfd2c904a41bb6997ad9b55b47a934035492eaa0f331e",
- "sha256:2ebbaee33e076664058effc3f6c943ed4c19a45df3989203ac081fca4a4722e3",
- "sha256:32168c57450a1e6310b7ca331983d62d88393cc3e93b866fd6ea63dac30c7d3b",
- "sha256:34b8ccf42032d89ebb8e0a839ae91e943ed222dab9bf3c1373f6fb972f8bcac4",
- "sha256:432b4d28030635fac72713610aad2ed7424a7f07746fa1aa620c89761eb5e7a4",
- "sha256:55103aa0adf25d207efd6f7f36d79dadee7706f22c1791955cc52033b40071e3",
- "sha256:6bc74337edc1239f8c59d0d5b18a7996670b8fd523712d2dac599d5b792feae2",
- "sha256:6d2838bec2d9ccd31dba68c76e8e7504bf819a4d4ace86adfca1e009d8f30f19",
- "sha256:763ccac4398889cb798668824d34c4135f2e84a50681465a4199554aa1bd8611",
- "sha256:8dbf1633ad2abdae6f73fe8989700c74a12dc82cb8597e66af28ff3d990d9c45",
- "sha256:8ddffa4bcd9008c963840e8e79f2f3124f85f18d5987d4bbd9e7f38d9839a985",
- "sha256:8f225c6186b0cd2cb07fe377786425a2ddc4183ae438fe63c60b4a879c91620f",
- "sha256:97844a87cac739e389d1d0c69bc3b36c1d5c50c9f91443ef68bdef8fdf007f02",
- "sha256:9d7a13def19a91836a2c84e5c7fcb6dd5e2c9bb205fb75ee102ffba24d80bf32",
- "sha256:abd0784a017eedb3b03cd13f51b8852f4c68aa07affbee549bbd421f9b4268bb",
- "sha256:acf150ca1506fcdaa52b0570f2903216413a2a4da78dfdf5ff7ee4eb92c2f8d5",
- "sha256:b41522f8b77b64553280fb93823555bc8afb2469f77b8ce0e9aeed39abb50adc",
- "sha256:c1058da6c02152d8637bb739dca940c6ab72683e59db6065fdcbe9102f66ca46",
- "sha256:c70e713748c9c9d4a9d7bc42e1c71a17b1fc9b75b686b408a04eaf4909ead365",
- "sha256:d47caa0a89dcb39ecd405e3899e07b69d8eaa6dbf267621087a4a5328da8492a",
- "sha256:ed186edb4b610ed1e5589f3ba964d61da33d0bc54e89b8cbf8751da2e18555b3",
- "sha256:f2dc8c2128f20ee9ed571783ce4730b181476083c403514714e15000b8b470cf",
- "sha256:fba87f98344474da6df19bbfde4ca31c7d98a007069c8ef78cb27189f4bc7f04"
- ],
- "index": "pypi",
- "version": "==2.4.2.post1"
- },
- "pyqt5": {
- "hashes": [
- "sha256:2b79209aa6e4688f6ac46e6d2694236dcf91db5f3a87270150d0f82082e3d360",
- "sha256:2f230f2dbd767099de7a0cb915abdf0cbc3256a0b5bb910eb09b99117db7a65b",
- "sha256:3d6e315e6e2d6489a2e1e0148d00e784e277c6590c189227d6060f15b9be690a",
- "sha256:812233bd155735377e2e9c7eea7a28815f357440334db51788d941e2a8b62f64",
- "sha256:be10fa95e6bdc9cad616ebf368c51b3f5748138b2b3a600cf7c4f80b78cb9852"
- ],
- "index": "pypi",
- "version": "==5.14.1"
- },
- "pyqt5-sip": {
- "hashes": [
- "sha256:02d94786bada670ab17a2b62ce95b3cf8e3b40c99d36007593a6334d551840bb",
- "sha256:06bc66b50556fb949f14875a4c224423dbf03f972497ccb883fb19b7b7c3b346",
- "sha256:091fbbe10a7aebadc0e8897a9449cda08d3c3f663460d812eca3001ca1ed3526",
- "sha256:0a067ade558befe4d46335b13d8b602b5044363bfd601419b556d4ec659bca18",
- "sha256:1910c1cb5a388d4e59ebb2895d7015f360f3f6eeb1700e7e33e866c53137eb9e",
- "sha256:1c7ad791ec86247f35243bbbdd29cd59989afbe0ab678e0a41211f4407f21dd8",
- "sha256:3c330ff1f70b3eaa6f63dce9274df996dffea82ad9726aa8e3d6cbe38e986b2f",
- "sha256:482a910fa73ee0e36c258d7646ef38f8061774bbc1765a7da68c65056b573341",
- "sha256:7695dfafb4f5549ce1290ae643d6508dfc2646a9003c989218be3ce42a1aa422",
- "sha256:8274ed50f4ffbe91d0f4cc5454394631edfecd75dc327aa01be8bc5818a57e88",
- "sha256:9047d887d97663790d811ac4e0d2e895f1bf2ecac4041691487de40c30239480",
- "sha256:9f6ab1417ecfa6c1ce6ce941e0cebc03e3ec9cd9925058043229a5f003ae5e40",
- "sha256:b43ba2f18999d41c3df72f590348152e14cd4f6dcea2058c734d688dfb1ec61f",
- "sha256:c3ab9ea1bc3f4ce8c57ebc66fb25cd044ef92ed1ca2afa3729854ecc59658905",
- "sha256:da69ba17f6ece9a85617743cb19de689f2d63025bf8001e2facee2ec9bcff18f",
- "sha256:ef3c7a0bf78674b0dda86ff5809d8495019903a096c128e1f160984b37848f73",
- "sha256:fabff832046643cdb93920ddaa8f77344df90768930fbe6bb33d211c4dcd0b5e"
- ],
- "markers": "python_version >= '3.5'",
- "version": "==12.7.0"
- },
- "pyrsistent": {
- "hashes": [
- "sha256:f3b280d030afb652f79d67c5586157c5c1355c9a58dfc7940566e28d28f3df1b"
- ],
- "version": "==0.15.6"
- },
- "pysdl2": {
- "hashes": [
- "sha256:b52acab5493a77b08c2afee1f385769fc2005f17cfeaf1886eff22dc78da2123"
- ],
- "index": "pypi",
- "version": "==0.9.6"
- },
- "python-dateutil": {
- "hashes": [
- "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c",
- "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"
- ],
- "index": "pypi",
- "version": "==2.8.1"
- },
- "python-engineio": {
- "hashes": [
- "sha256:47ae4a9b3b4f2e8a68929f37a518338838e119f24c9a9121af92c49f8bea55c3",
- "sha256:c3a3822deb51fdf9c7fe4d78abf807c73b83ea538036a50862d3024450746253"
- ],
- "version": "==3.11.2"
- },
- "python-logstash": {
- "hashes": [
- "sha256:10943e5df83f592b4d61b63ad1afff855ccc8c9467f78718f0a59809ba1fe68c"
- ],
- "index": "pypi",
- "version": "==0.4.6"
- },
- "python-logstash-async": {
- "hashes": [
- "sha256:16a85e7c76265b06e2e42f5a2babc39811e3920aaa41119e059722d4185f1912",
- "sha256:6f2da753ee2307704b0c0d2e3dc6a52e3ad0605184690b4495356e418700abaa"
- ],
- "index": "pypi",
- "version": "==1.6.2"
- },
- "python-socketio": {
- "hashes": [
- "sha256:48cba5b827ac665dbf923a4f5ec590812aed5299a831fc43576a9af346272534",
- "sha256:af6c23c35497960f82106e36688123ecb52ad5a77d0ca27954ff3811c4d9d562"
- ],
- "version": "==4.4.0"
- },
- "pytz": {
- "hashes": [
- "sha256:1c557d7d0e871de1f5ccd5833f60fb2550652da6be2693c1e02300743d21500d",
- "sha256:b02c06db6cf09c12dd25137e563b31700d3b80fcc4ad23abb7a315f2789819be"
- ],
- "version": "==2019.3"
- },
- "pywavelets": {
- "hashes": [
- "sha256:076ca8907001fdfe4205484f719d12b4a0262dfe6652fa1cfc3c5c362d14dc84",
- "sha256:18a51b3f9416a2ae6e9a35c4af32cf520dd7895f2b69714f4aa2f4342fca47f9",
- "sha256:1a64b40f6acb4ffbaccce0545d7fc641744f95351f62e4c6aaa40549326008c9",
- "sha256:35959c041ec014648575085a97b498eafbbaa824f86f6e4a59bfdef8a3fe6308",
- "sha256:55e39ec848ceec13c9fa1598253ae9dd5c31d09dfd48059462860d2b908fb224",
- "sha256:6162dc0ae04669ea04b4b51420777b9ea2d30b0a9d02901b2a3b4d61d159c2e9",
- "sha256:68b5c33741d26c827074b3d8f0251de1c3019bb9567b8d303eb093c822ce28f1",
- "sha256:720dbcdd3d91c6dfead79c80bf8b00a1d8aa4e5d551dc528c6d5151e4efc3403",
- "sha256:7947e51ca05489b85928af52a34fe67022ab5b81d4ae32a4109a99e883a0635e",
- "sha256:79f5b54f9dc353e5ee47f0c3f02bebd2c899d49780633aa771fed43fa20b3149",
- "sha256:80b924edbc012ded8aa8b91cb2fd6207fb1a9a3a377beb4049b8a07445cec6f0",
- "sha256:889d4c5c5205a9c90118c1980df526857929841df33e4cd1ff1eff77c6817a65",
- "sha256:935ff247b8b78bdf77647fee962b1cc208c51a7b229db30b9ba5f6da3e675178",
- "sha256:98b2669c5af842a70cfab33a7043fcb5e7535a690a00cd251b44c9be0be418e5",
- "sha256:9e2528823ccf5a0a1d23262dfefe5034dce89cd84e4e124dc553dfcdf63ebb92",
- "sha256:bc5e87b72371da87c9bebc68e54882aada9c3114e640de180f62d5da95749cd3",
- "sha256:be105382961745f88d8196bba5a69ee2c4455d87ad2a2e5d1eed6bd7fda4d3fd",
- "sha256:c06d2e340c7bf8b9ec71da2284beab8519a3908eab031f4ea126e8ccfc3fd567",
- "sha256:cfe79844526dd92e3ecc9490b5031fca5f8ab607e1e858feba232b1b788ff0ea",
- "sha256:d510aef84d9852653d079c84f2f81a82d5d09815e625f35c95714e7364570ad4",
- "sha256:e02a0558e0c2ac8b8bbe6a6ac18c136767ec56b96a321e0dfde2173adfa5a504"
- ],
- "markers": "python_version >= '3.5'",
- "version": "==1.1.1"
- },
- "pyyaml": {
- "hashes": [
- "sha256:059b2ee3194d718896c0ad077dd8c043e5e909d9180f387ce42012662a4946d6",
- "sha256:1cf708e2ac57f3aabc87405f04b86354f66799c8e62c28c5fc5f88b5521b2dbf",
- "sha256:24521fa2890642614558b492b473bee0ac1f8057a7263156b02e8b14c88ce6f5",
- "sha256:4fee71aa5bc6ed9d5f116327c04273e25ae31a3020386916905767ec4fc5317e",
- "sha256:70024e02197337533eef7b85b068212420f950319cc8c580261963aefc75f811",
- "sha256:74782fbd4d4f87ff04159e986886931456a1894c61229be9eaf4de6f6e44b99e",
- "sha256:940532b111b1952befd7db542c370887a8611660d2b9becff75d39355303d82d",
- "sha256:cb1f2f5e426dc9f07a7681419fe39cee823bb74f723f36f70399123f439e9b20",
- "sha256:dbbb2379c19ed6042e8f11f2a2c66d39cceb8aeace421bfc29d085d93eda3689",
- "sha256:e3a057b7a64f1222b56e47bcff5e4b94c4f61faac04c7c4ecb1985e18caa3994",
- "sha256:e9f45bd5b92c7974e59bcd2dcc8631a6b6cc380a904725fce7bc08872e691615"
- ],
- "index": "pypi",
- "version": "==5.3"
- },
- "pyzmq": {
- "hashes": [
- "sha256:01b588911714a6696283de3904f564c550c9e12e8b4995e173f1011755e01086",
- "sha256:0573b9790aa26faff33fba40f25763657271d26f64bffb55a957a3d4165d6098",
- "sha256:0fa82b9fc3334478be95a5566f35f23109f763d1669bb762e3871a8fa2a4a037",
- "sha256:1e59b7b19396f26e360f41411a5d4603356d18871049cd7790f1a7d18f65fb2c",
- "sha256:2a294b4f44201bb21acc2c1a17ff87fbe57b82060b10ddb00ac03e57f3d7fcfa",
- "sha256:355b38d7dd6f884b8ee9771f59036bcd178d98539680c4f87e7ceb2c6fd057b6",
- "sha256:4b73d20aec63933bbda7957e30add233289d86d92a0bb9feb3f4746376f33527",
- "sha256:4ec47f2b50bdb97df58f1697470e5c58c3c5109289a623e30baf293481ff0166",
- "sha256:5541dc8cad3a8486d58bbed076cb113b65b5dd6b91eb94fb3e38a3d1d3022f20",
- "sha256:6fca7d11310430e751f9832257866a122edf9d7b635305c5d8c51f74a5174d3d",
- "sha256:7369656f89878455a5bcd5d56ca961884f5d096268f71c0750fc33d6732a25e5",
- "sha256:75d73ee7ca4b289a2a2dfe0e6bd8f854979fc13b3fe4ebc19381be3b04e37a4a",
- "sha256:80c928d5adcfa12346b08d31360988d843b54b94154575cccd628f1fe91446bc",
- "sha256:83ce18b133dc7e6789f64cb994e7376c5aa6b4aeced993048bf1d7f9a0fe6d3a",
- "sha256:8b8498ceee33a7023deb2f3db907ca41d6940321e282297327a9be41e3983792",
- "sha256:8c69a6cbfa94da29a34f6b16193e7c15f5d3220cb772d6d17425ff3faa063a6d",
- "sha256:8ff946b20d13a99dc5c21cb76f4b8b253eeddf3eceab4218df8825b0c65ab23d",
- "sha256:972d723a36ab6a60b7806faa5c18aa3c080b7d046c407e816a1d8673989e2485",
- "sha256:a6c9c42bbdba3f9c73aedbb7671815af1943ae8073e532c2b66efb72f39f4165",
- "sha256:aa3872f2ebfc5f9692ef8957fe69abe92d905a029c0608e45ebfcd451ad30ab5",
- "sha256:cf08435b14684f7f2ca2df32c9df38a79cdc17c20dc461927789216cb43d8363",
- "sha256:d30db4566177a6205ed1badb8dbbac3c043e91b12a2db5ef9171b318c5641b75",
- "sha256:d5ac84f38575a601ab20c1878818ffe0d09eb51d6cb8511b636da46d0fd8949a",
- "sha256:e37f22eb4bfbf69cd462c7000616e03b0cdc1b65f2d99334acad36ea0e4ddf6b",
- "sha256:e6549dd80de7b23b637f586217a4280facd14ac01e9410a037a13854a6977299",
- "sha256:ed6205ca0de035f252baa0fd26fdd2bc8a8f633f92f89ca866fd423ff26c6f25",
- "sha256:efdde21febb9b5d7a8e0b87ea2549d7e00fda1936459cfb27fb6fca0c36af6c1",
- "sha256:f4e72646bfe79ff3adbf1314906bbd2d67ef9ccc71a3a98b8b2ccbcca0ab7bec"
- ],
- "index": "pypi",
- "version": "==18.1.1"
- },
- "qtconsole": {
- "hashes": [
- "sha256:4de25b8895957d23ceacf2526b6f0a76da4e60e60115611930d387c853f3cb08",
- "sha256:654f423662e7dfe6a9b26fac8ec76aedcf742c339909ac49f1f0c1a1b744bcd1"
- ],
- "version": "==4.6.0"
- },
- "redis": {
- "hashes": [
- "sha256:3613daad9ce5951e426f460deddd5caf469e08a3af633e9578fc77d362becf62",
- "sha256:8d0fc278d3f5e1249967cba2eb4a5632d19e45ce5c09442b8422d15ee2c22cc2"
- ],
- "index": "pypi",
- "version": "==3.3.11"
- },
- "requests": {
- "hashes": [
- "sha256:11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4",
- "sha256:9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31"
- ],
- "index": "pypi",
- "version": "==2.22.0"
- },
- "requests-oauthlib": {
- "hashes": [
- "sha256:7f71572defaecd16372f9006f33c2ec8c077c3cfa6f5911a9a90202beb513f3d",
- "sha256:b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a",
- "sha256:fa6c47b933f01060936d87ae9327fead68768b69c6c9ea2109c48be30f2d4dbc"
- ],
- "version": "==1.3.0"
- },
- "reverse-geocoder": {
- "hashes": [
- "sha256:2a2e781b5f69376d922b78fe8978f1350c84fce0ddb07e02c834ecf98b57c75c"
- ],
- "index": "pypi",
- "version": "==1.5.1"
- },
- "rsa": {
- "hashes": [
- "sha256:14ba45700ff1ec9eeb206a2ce76b32814958a98e372006c8fb76ba820211be66",
- "sha256:1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487"
- ],
- "version": "==4.0"
- },
- "s2sphere": {
- "hashes": [
- "sha256:c2478c1ff7c601a59a7151a57b605435897514578fa6bdb8730721c182adbbaf",
- "sha256:d2340c9cf458ddc9a89afd1d8048a4195ce6fa6b0095ab900d4be5271e537401"
- ],
- "index": "pypi",
- "version": "==0.2.5"
- },
- "s3transfer": {
- "hashes": [
- "sha256:6efc926738a3cd576c2a79725fed9afde92378aa5c6a957e3af010cb019fac9d",
- "sha256:b780f2411b824cb541dbcd2c713d0cb61c7d1bcadae204cdddda2b35cef493ba"
- ],
- "version": "==0.2.1"
- },
- "scikit-image": {
- "hashes": [
- "sha256:063d1c20fcd53762f82ee58c29783ae4e8f6fbed445b41b704fa33b6f355729d",
- "sha256:0715b7940778ba5d73da3908d60ddf2eb93863f7c394493a522fe56d3859295c",
- "sha256:0808ab5f8218d91a1c008036993636535a37efd67a52ab0f2e6e3f4b7e75aeda",
- "sha256:2a54bea469eb1b611bee1ce36e60710f5f94f29205bc5bd67a51793909b1e62b",
- "sha256:2aa962aa82d815606d7dad7f045f5d7ca55c65b4320d47e15a98fc92612c2d6c",
- "sha256:2d346d49b6852cffb47cbde995e2696d5b07f688d8c057a0a4548abf3a98f920",
- "sha256:3ad2efa792ab8de5fcefe6f4f5bc1ab64c411cdb5c829ce1526ab3a5a7729627",
- "sha256:3af3d781ce085573ced37b2b5b9abfd32ce3d4723bd17f37e829025d189b0421",
- "sha256:41e28db0136f29ecd305bef0408fdfc64be9d415e54f5099a95555c65f5c1865",
- "sha256:6786b127f33470fd843e644435522fbf43bce05c9f5527946c390ccb9e1cac27",
- "sha256:8b2b768b02c6b7476f2e16ddd91f827d3817aef73f82cf28bff7a8dcdfd8c55c",
- "sha256:a48fb0d34a090b578b87ffebab0fe035295c1945dbc2b28e1a55ea2cf6031751",
- "sha256:dd7fbd32da74d4e9967dc15845f731f16e7966cee61f5dc0e12e2abb1305068c",
- "sha256:e18d73cc8893e2268b172c29f9aab530faf8cd3b7c11ae0bee3e763d719d35c5",
- "sha256:e774377876cb258e8f4d63f7809863f961c98aa02263b3ff54a39483bc6f7d26"
- ],
- "index": "pypi",
- "version": "==0.16.2"
- },
- "scipy": {
- "hashes": [
- "sha256:00af72998a46c25bdb5824d2b729e7dabec0c765f9deb0b504f928591f5ff9d4",
- "sha256:0902a620a381f101e184a958459b36d3ee50f5effd186db76e131cbefcbb96f7",
- "sha256:1e3190466d669d658233e8a583b854f6386dd62d655539b77b3fa25bfb2abb70",
- "sha256:2cce3f9847a1a51019e8c5b47620da93950e58ebc611f13e0d11f4980ca5fecb",
- "sha256:3092857f36b690a321a662fe5496cb816a7f4eecd875e1d36793d92d3f884073",
- "sha256:386086e2972ed2db17cebf88610aab7d7f6e2c0ca30042dc9a89cf18dcc363fa",
- "sha256:71eb180f22c49066f25d6df16f8709f215723317cc951d99e54dc88020ea57be",
- "sha256:770254a280d741dd3436919d47e35712fb081a6ff8bafc0f319382b954b77802",
- "sha256:787cc50cab3020a865640aba3485e9fbd161d4d3b0d03a967df1a2881320512d",
- "sha256:8a07760d5c7f3a92e440ad3aedcc98891e915ce857664282ae3c0220f3301eb6",
- "sha256:8d3bc3993b8e4be7eade6dcc6fd59a412d96d3a33fa42b0fa45dc9e24495ede9",
- "sha256:9508a7c628a165c2c835f2497837bf6ac80eb25291055f56c129df3c943cbaf8",
- "sha256:a144811318853a23d32a07bc7fd5561ff0cac5da643d96ed94a4ffe967d89672",
- "sha256:a1aae70d52d0b074d8121333bc807a485f9f1e6a69742010b33780df2e60cfe0",
- "sha256:a2d6df9eb074af7f08866598e4ef068a2b310d98f87dc23bd1b90ec7bdcec802",
- "sha256:bb517872058a1f087c4528e7429b4a44533a902644987e7b2fe35ecc223bc408",
- "sha256:c5cac0c0387272ee0e789e94a570ac51deb01c796b37fb2aad1fb13f85e2f97d",
- "sha256:cc971a82ea1170e677443108703a2ec9ff0f70752258d0e9f5433d00dda01f59",
- "sha256:dba8306f6da99e37ea08c08fef6e274b5bf8567bb094d1dbe86a20e532aca088",
- "sha256:dc60bb302f48acf6da8ca4444cfa17d52c63c5415302a9ee77b3b21618090521",
- "sha256:dee1bbf3a6c8f73b6b218cb28eed8dd13347ea2f87d572ce19b289d6fd3fbc59"
- ],
- "index": "pypi",
- "version": "==1.4.1"
- },
- "seaborn": {
- "hashes": [
- "sha256:42e627b24e849c2d3bbfd059e00005f6afbc4a76e4895baf44ae23fe8a4b09a5",
- "sha256:76c83f794ca320fb6b23a7c6192d5e185a5fcf4758966a0c0a54baee46d41e2f"
- ],
- "index": "pypi",
- "version": "==0.9.0"
- },
- "send2trash": {
- "hashes": [
- "sha256:60001cc07d707fe247c94f74ca6ac0d3255aabcb930529690897ca2a39db28b2",
- "sha256:f1691922577b6fa12821234aeb57599d887c4900b9ca537948d2dac34aea888b"
- ],
- "version": "==1.5.0"
- },
- "shapely": {
- "hashes": [
- "sha256:0378964902f89b8dbc332e5bdfa08e0bc2f7ab39fecaeb17fbb2a7699a44fe71",
- "sha256:34e7c6f41fb27906ccdf2514ee44a5774b90b39a256b6511a6a57d11ffe64999",
- "sha256:3ca69d4b12e2b05b549465822744b6a3a1095d8488cc27b2728a06d3c07d0eee",
- "sha256:3e9388f29bd81fcd4fa5c35125e1fbd4975ee36971a87a90c093f032d0e9de24",
- "sha256:3ef28e3f20a1c37f5b99ea8cf8dcb58e2f1a8762d65ed2d21fd92bf1d4811182",
- "sha256:523c94403047eb6cacd7fc1863ebef06e26c04d8a4e7f8f182d49cd206fe787e",
- "sha256:5d22a1a705c2f70f61ccadc696e33d922c1a92e00df8e1d58a6ade14dd7e3b4f",
- "sha256:714b6680215554731389a1bbdae4cec61741aa4726921fa2b2b96a6f578a2534",
- "sha256:7dfe1528650c3f0dc82f41a74cf4f72018288db9bfb75dcd08f6f04233ec7e78",
- "sha256:ba58b21b9cf3c33725f7f530febff9ed6a6846f9d0bf8a120fc74683ff919f89",
- "sha256:c4b87bb61fc3de59fc1f85e71a79b0c709dc68364d9584473697aad4aa13240f",
- "sha256:ebb4d2bee7fac3f6c891fcdafaa17f72ab9c6480f6d00de0b2dc9a5137dfe342"
- ],
- "index": "pypi",
- "version": "==1.6.4.post2"
- },
- "simplejson": {
- "hashes": [
- "sha256:0fe3994207485efb63d8f10a833ff31236ed27e3b23dadd0bf51c9900313f8f2",
- "sha256:17163e643dbf125bb552de17c826b0161c68c970335d270e174363d19e7ea882",
- "sha256:1d1e929cdd15151f3c0b2efe953b3281b2fd5ad5f234f77aca725f28486466f6",
- "sha256:1d346c2c1d7dd79c118f0cc7ec5a1c4127e0c8ffc83e7b13fc5709ff78c9bb84",
- "sha256:1ea59f570b9d4916ae5540a9181f9c978e16863383738b69a70363bc5e63c4cb",
- "sha256:1fbba86098bbfc1f85c5b69dc9a6d009055104354e0d9880bb00b692e30e0078",
- "sha256:229edb079d5dd81bf12da952d4d825bd68d1241381b37d3acf961b384c9934de",
- "sha256:22a7acb81968a7c64eba7526af2cf566e7e2ded1cb5c83f0906b17ff1540f866",
- "sha256:2b4b2b738b3b99819a17feaf118265d0753d5536049ea570b3c43b51c4701e81",
- "sha256:4cf91aab51b02b3327c9d51897960c554f00891f9b31abd8a2f50fd4a0071ce8",
- "sha256:4fd5f79590694ebff8dc980708e1c182d41ce1fda599a12189f0ca96bf41ad70",
- "sha256:5cfd495527f8b85ce21db806567de52d98f5078a8e9427b18e251c68bd573a26",
- "sha256:60aad424e47c5803276e332b2a861ed7a0d46560e8af53790c4c4fb3420c26c2",
- "sha256:7739940d68b200877a15a5ff5149e1599737d6dd55e302625650629350466418",
- "sha256:7cce4bac7e0d66f3a080b80212c2238e063211fe327f98d764c6acbc214497fc",
- "sha256:8027bd5f1e633eb61b8239994e6fc3aba0346e76294beac22a892eb8faa92ba1",
- "sha256:86afc5b5cbd42d706efd33f280fec7bd7e2772ef54e3f34cf6b30777cd19a614",
- "sha256:87d349517b572964350cc1adc5a31b493bbcee284505e81637d0174b2758ba17",
- "sha256:8de378d589eccbc75941e480b4d5b4db66f22e4232f87543b136b1f093fff342",
- "sha256:926bcbef9eb60e798eabda9cd0bbcb0fca70d2779aa0aa56845749d973eb7ad5",
- "sha256:9a126c3a91df5b1403e965ba63b304a50b53d8efc908a8c71545ed72535374a3",
- "sha256:ad8dd3454d0c65c0f92945ac86f7b9efb67fa2040ba1b0189540e984df904378",
- "sha256:d140e9376e7f73c1f9e0a8e3836caf5eec57bbafd99259d56979da05a6356388",
- "sha256:da00675e5e483ead345429d4f1374ab8b949fba4429d60e71ee9d030ced64037",
- "sha256:daaf4d11db982791be74b23ff4729af2c7da79316de0bebf880fa2d60bcc8c5a",
- "sha256:f4b64a1031acf33e281fd9052336d6dad4d35eee3404c95431c8c6bc7a9c0588",
- "sha256:fc046afda0ed8f5295212068266c92991ab1f4a50c6a7144b69364bdee4a0159",
- "sha256:fc9051d249dd5512e541f20330a74592f7a65b2d62e18122ca89bf71f94db748"
- ],
- "index": "pypi",
- "version": "==3.17.0"
- },
- "six": {
- "hashes": [
- "sha256:1f1b7d42e254082a9db6279deae68afb421ceba6158efa6131de7b3003ee93fd",
- "sha256:30f610279e8b2578cab6db20741130331735c781b56053c59c4076da27f06b66"
- ],
- "index": "pypi",
- "version": "==1.13.0"
- },
- "sqlalchemy": {
- "hashes": [
- "sha256:bfb8f464a5000b567ac1d350b9090cf081180ec1ab4aa87e7bca12dab25320ec"
- ],
- "index": "pypi",
- "version": "==1.3.12"
- },
- "subprocess32": {
- "hashes": [
- "sha256:88e37c1aac5388df41cc8a8456bb49ebffd321a3ad4d70358e3518176de3a56b",
- "sha256:eb2937c80497978d181efa1b839ec2d9622cf9600a039a79d0e108d1f9aec79d"
- ],
- "index": "pypi",
- "version": "==3.5.4"
- },
- "tabulate": {
- "hashes": [
- "sha256:5470cc6687a091c7042cee89b2946d9235fe9f6d49c193a4ae2ac7bf386737c8"
- ],
- "version": "==0.8.6"
- },
- "tenacity": {
- "hashes": [
- "sha256:72f397c2bb1887e048726603f3f629ea16f88cb3e61e4ed3c57e98582b8e3571",
- "sha256:947e728aedf06e8db665bb7898112e90d17e48cc3f3289784a2b9ccf6e56fabc"
- ],
- "index": "pypi",
- "version": "==6.0.0"
- },
- "tensorboard": {
- "hashes": [
- "sha256:32d9dec38d053d7d75796eb7c2e0d77285af35f69ee1a6796ab5ecc896679fb3",
- "sha256:ccae56f01acc78a138474081b631af52017c2075ffe1c453d58c49d5046ef081"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==2.0.2"
- },
- "tensorflow-estimator": {
- "hashes": [
- "sha256:aa8deab25d09a9730dfbae8ec58f4eb00ec2a90b5ca3dcbd8fa0717103d3bbb3"
- ],
- "version": "==2.0.1"
- },
- "tensorflow-gpu": {
- "hashes": [
- "sha256:6bb259ceadac6f9ccba7c07903570e4b495d6230efce8f4ab8831cede87cea42",
- "sha256:73943249a1059ea8344487756939539bd32d2639f1fc0f92d6395863764b683b",
- "sha256:767d775cb7b0f997b584a7441f47d76ff216cf05eb902fc56d9d3f664b03412a",
- "sha256:a79fcb04092afa2737a45ff81cfc74f4423d239bfe642159eb34c90233900157",
- "sha256:a87701141f8836205e20ba061246bc3a14e73f07f061a91325ca297c641995d0",
- "sha256:bd6ad275b05132910b9d929cf299895c1b92cd66a01271c8e33818454d88888c",
- "sha256:ccaae56548ab8a8148c1735ca176d2b2da103dc4cd8603fe86692b0b3c7530fb"
- ],
- "index": "pypi",
- "version": "==2.0.0"
- },
- "termcolor": {
- "hashes": [
- "sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b"
- ],
- "version": "==1.1.0"
- },
- "terminado": {
- "hashes": [
- "sha256:4804a774f802306a7d9af7322193c5390f1da0abb429e082a10ef1d46e6fb2c2",
- "sha256:a43dcb3e353bc680dd0783b1d9c3fc28d529f190bc54ba9a229f72fe6e7a54d7"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==0.8.3"
- },
- "testpath": {
- "hashes": [
- "sha256:60e0a3261c149755f4399a1fff7d37523179a70fdc3abdf78de9fc2604aeec7e",
- "sha256:bfcf9411ef4bf3db7579063e0546938b1edda3d69f4e1fb8756991f5951f85d4"
- ],
- "version": "==0.4.4"
- },
- "tornado": {
- "hashes": [
- "sha256:349884248c36801afa19e342a77cc4458caca694b0eda633f5878e458a44cb2c",
- "sha256:398e0d35e086ba38a0427c3b37f4337327231942e731edaa6e9fd1865bbd6f60",
- "sha256:4e73ef678b1a859f0cb29e1d895526a20ea64b5ffd510a2307b5998c7df24281",
- "sha256:559bce3d31484b665259f50cd94c5c28b961b09315ccd838f284687245f416e5",
- "sha256:abbe53a39734ef4aba061fca54e30c6b4639d3e1f59653f0da37a0003de148c7",
- "sha256:c845db36ba616912074c5b1ee897f8e0124df269468f25e4fe21fe72f6edd7a9",
- "sha256:c9399267c926a4e7c418baa5cbe91c7d1cf362d505a1ef898fde44a07c9dd8a5"
- ],
- "markers": "python_version >= '3.5'",
- "version": "==6.0.3"
- },
- "traitlets": {
- "hashes": [
- "sha256:70b4c6a1d9019d7b4f6846832288f86998aa3b9207c6821f3578a6a6a467fe44",
- "sha256:d023ee369ddd2763310e4c3eae1ff649689440d4ae59d7485eb4cfbbe3e359f7"
- ],
- "version": "==4.3.3"
- },
- "typed-ast": {
- "hashes": [
- "sha256:1170afa46a3799e18b4c977777ce137bb53c7485379d9706af8a59f2ea1aa161",
- "sha256:18511a0b3e7922276346bcb47e2ef9f38fb90fd31cb9223eed42c85d1312344e",
- "sha256:262c247a82d005e43b5b7f69aff746370538e176131c32dda9cb0f324d27141e",
- "sha256:2b907eb046d049bcd9892e3076c7a6456c93a25bebfe554e931620c90e6a25b0",
- "sha256:354c16e5babd09f5cb0ee000d54cfa38401d8b8891eefa878ac772f827181a3c",
- "sha256:48e5b1e71f25cfdef98b013263a88d7145879fbb2d5185f2a0c79fa7ebbeae47",
- "sha256:4e0b70c6fc4d010f8107726af5fd37921b666f5b31d9331f0bd24ad9a088e631",
- "sha256:630968c5cdee51a11c05a30453f8cd65e0cc1d2ad0d9192819df9978984529f4",
- "sha256:66480f95b8167c9c5c5c87f32cf437d585937970f3fc24386f313a4c97b44e34",
- "sha256:71211d26ffd12d63a83e079ff258ac9d56a1376a25bc80b1cdcdf601b855b90b",
- "sha256:7954560051331d003b4e2b3eb822d9dd2e376fa4f6d98fee32f452f52dd6ebb2",
- "sha256:838997f4310012cf2e1ad3803bce2f3402e9ffb71ded61b5ee22617b3a7f6b6e",
- "sha256:95bd11af7eafc16e829af2d3df510cecfd4387f6453355188342c3e79a2ec87a",
- "sha256:bc6c7d3fa1325a0c6613512a093bc2a2a15aeec350451cbdf9e1d4bffe3e3233",
- "sha256:cc34a6f5b426748a507dd5d1de4c1978f2eb5626d51326e43280941206c209e1",
- "sha256:d755f03c1e4a51e9b24d899561fec4ccaf51f210d52abdf8c07ee2849b212a36",
- "sha256:d7c45933b1bdfaf9f36c579671fec15d25b06c8398f113dab64c18ed1adda01d",
- "sha256:d896919306dd0aa22d0132f62a1b78d11aaf4c9fc5b3410d3c666b818191630a",
- "sha256:fdc1c9bbf79510b76408840e009ed65958feba92a88833cdceecff93ae8fff66",
- "sha256:ffde2fbfad571af120fcbfbbc61c72469e72f550d676c3342492a9dfdefb8f12"
- ],
- "markers": "python_version < '3.8' and implementation_name == 'cpython'",
- "version": "==1.4.0"
- },
- "urllib3": {
- "hashes": [
- "sha256:a8a318824cc77d1fd4b2bec2ded92646630d7fe8619497b142c84a9e6f5a7293",
- "sha256:f3c5fd51747d450d4dcf6f923c81f78f811aab8205fda64b0aba34a4e48b0745"
- ],
- "index": "pypi",
- "version": "==1.25.7"
- },
- "wcwidth": {
- "hashes": [
- "sha256:8fd29383f539be45b20bd4df0dc29c20ba48654a41e661925e612311e9f3c603",
- "sha256:f28b3e8a6483e5d49e7f8949ac1a78314e740333ae305b4ba5defd3e74fb37a8"
- ],
- "version": "==0.1.8"
- },
- "webencodings": {
- "hashes": [
- "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78",
- "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"
- ],
- "version": "==0.5.1"
- },
- "werkzeug": {
- "hashes": [
- "sha256:7280924747b5733b246fe23972186c6b348f9ae29724135a6dfc1e53cea433e7",
- "sha256:e5f4a1f98b52b18a93da705a7458e55afb26f32bff83ff5d19189f92462d65c4"
- ],
- "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
- "version": "==0.16.0"
- },
- "wheel": {
- "hashes": [
- "sha256:9515fe0a94e823fd90b08d22de45d7bde57c90edce705b22f5e1ecf7e1b653c8",
- "sha256:e721e53864f084f956f40f96124a74da0631ac13fbbd1ba99e8e2b5e9cafdf64"
- ],
- "markers": "python_version >= '3'",
- "version": "==0.30.0"
- },
- "widgetsnbextension": {
- "hashes": [
- "sha256:079f87d87270bce047512400efd70238820751a11d2d8cb137a5a5bdbaf255c7",
- "sha256:bd314f8ceb488571a5ffea6cc5b9fc6cba0adaf88a9d2386b93a489751938bcd"
- ],
- "version": "==3.5.1"
- },
- "wrapt": {
- "hashes": [
- "sha256:565a021fd19419476b9362b05eeaa094178de64f8361e44468f9e9d7843901e1"
- ],
- "version": "==1.11.2"
- },
- "zipp": {
- "hashes": [
- "sha256:3718b1cbcd963c7d4c5511a8240812904164b7f381b647143a89d3b98f9bcd8e",
- "sha256:f06903e9f1f43b12d371004b4ac7b06ab39a44adc747266928ae6debfa7b3335"
- ],
- "markers": "python_version >= '2.7'",
- "version": "==0.6.0"
- }
- }
-}
diff --git a/README.md b/README.md
index 013397a77..73bccf297 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-[](#)
+[](#)
Table of Contents
=======================
@@ -68,12 +68,12 @@ Supported Cars
| Acura | RDX 2016-18 | AcuraWatch Plus | openpilot | 25mph5 | 12mph |
| Chrysler | Pacifica 2017-18 | Adaptive Cruise | Stock | 0mph | 9mph |
| Chrysler | Pacifica Hybrid 2017-18 | Adaptive Cruise | Stock | 0mph | 9mph |
-| Chrysler | Pacifica Hybrid 2019 | Adaptive Cruise | Stock | 0mph | 39mph |
+| Chrysler | Pacifica Hybrid 2019-20 | Adaptive Cruise | Stock | 0mph | 39mph |
| Honda | Accord 2018-19 | All | Stock | 0mph | 3mph |
| Honda | Accord Hybrid 2018-19 | All | Stock | 0mph | 3mph |
+| Honda | Civic Hatchback 2017-19 | Honda Sensing | Stock | 0mph | 12mph |
| Honda | Civic Sedan/Coupe 2016-18 | Honda Sensing | openpilot | 0mph | 12mph |
| Honda | Civic Sedan/Coupe 2019 | Honda Sensing | Stock | 0mph | 2mph |
-| Honda | Civic Hatchback 2017-19 | Honda Sensing | Stock | 0mph | 12mph |
| Honda | CR-V 2015-16 | Touring | openpilot | 25mph5 | 12mph |
| Honda | CR-V 2017-19 | Honda Sensing | Stock | 0mph | 12mph |
| Honda | CR-V Hybrid 2017-2019 | Honda Sensing | Stock | 0mph | 12mph |
@@ -83,19 +83,22 @@ Supported Cars
| Honda | Pilot 2016-18 | Honda Sensing | openpilot | 25mph5 | 12mph |
| Honda | Pilot 2019 | All | openpilot | 25mph5 | 12mph |
| Honda | Ridgeline 2017-19 | Honda Sensing | openpilot | 25mph5 | 12mph |
-| Hyundai | Santa Fe 20191 | All | Stock | 0mph | 0mph |
| Hyundai | Elantra 2017-191 | SCC + LKAS | Stock | 19mph | 34mph |
| Hyundai | Genesis 20181 | All | Stock | 19mph | 34mph |
+| Hyundai | Santa Fe 20191 | All | Stock | 0mph | 0mph |
| Jeep | Grand Cherokee 2016-18 | Adaptive Cruise | Stock | 0mph | 9mph |
| Jeep | Grand Cherokee 2019 | Adaptive Cruise | Stock | 0mph | 39mph |
| Kia | Optima 20191 | SCC + LKAS | Stock | 0mph | 0mph |
| Kia | Sorento 20181 | All | Stock | 0mph | 0mph |
| Kia | Stinger 20181 | SCC + LKAS | Stock | 0mph | 0mph |
| Lexus | CT Hybrid 2017-18 | All | Stock4| 0mph | 0mph |
+| Lexus | ES 2019 | All | openpilot | 0mph | 0mph |
| Lexus | ES Hybrid 2019 | All | openpilot | 0mph | 0mph |
-| Lexus | RX Hybrid 2016-19 | All | Stock4| 0mph | 0mph |
| Lexus | IS 2017-2019 | All | Stock | 22mph | 0mph |
| Lexus | IS Hybrid 2017 | All | Stock | 0mph | 0mph |
+| Lexus | RX 2016-17 | All | Stock4| 0mph | 0mph |
+| Lexus | RX 2020 | All | openpilot | 0mph | 0mph |
+| Lexus | RX Hybrid 2016-19 | All | Stock4| 0mph | 0mph |
| Subaru | Crosstrek 2018-19 | EyeSight | Stock | 0mph | 0mph |
| Subaru | Impreza 2019-20 | EyeSight | Stock | 0mph | 0mph |
| Toyota | Avalon 2016 | TSS-P | Stock4| 20mph5 | 0mph |
@@ -106,7 +109,7 @@ Supported Cars
| Toyota | C-HR Hybrid 2017-19 | All | Stock | 0mph | 0mph |
| Toyota | Corolla 2017-19 | All | Stock4| 20mph5 | 0mph |
| Toyota | Corolla 2020 | All | openpilot | 0mph | 0mph |
-| Toyota | Corolla Hatchback 2019 | All | openpilot | 0mph | 0mph |
+| Toyota | Corolla Hatchback 2019-20 | All | openpilot | 0mph | 0mph |
| Toyota | Corolla Hybrid 2020 | All | openpilot | 0mph | 0mph |
| Toyota | Highlander 2017-19 | All | Stock4| 0mph | 0mph |
| Toyota | Highlander Hybrid 2017-19 | All | Stock4| 0mph | 0mph |
@@ -118,6 +121,7 @@ Supported Cars
| Toyota | Rav4 2019 | All | openpilot | 0mph | 0mph |
| Toyota | Rav4 Hybrid 2016 | TSS-P | Stock4| 0mph | 0mph |
| Toyota | Rav4 Hybrid 2017-18 | All | Stock4| 0mph | 0mph |
+| Toyota | Rav4 Hybrid 2019-20 | All | openpilot | 0mph | 0mph |
| Toyota | Sienna 2018 | All | Stock4| 0mph | 0mph |
| Volkswagen| Golf 2016-193 | Driver Assistance | Stock | 0mph | 0mph |
@@ -131,9 +135,9 @@ Community Maintained Cars and Features
| Make | Model (US Market Reference) | Supported Package | ACC | No ACC accel below | No ALC below |
| ----------| ------------------------------| ------------------| -----------------| -------------------| -------------|
| Buick | Regal 20186 | Adaptive Cruise | openpilot | 0mph | 7mph |
+| Cadillac | ATS 20186 | Adaptive Cruise | openpilot | 0mph | 7mph |
| Chevrolet | Malibu 20176 | Adaptive Cruise | openpilot | 0mph | 7mph |
| Chevrolet | Volt 2017-186 | Adaptive Cruise | openpilot | 0mph | 7mph |
-| Cadillac | ATS 20186 | Adaptive Cruise | openpilot | 0mph | 7mph |
| GMC | Acadia Denali 20186| Adaptive Cruise | openpilot | 0mph | 7mph |
| Holden | Astra 20176 | Adaptive Cruise | openpilot | 0mph | 7mph |
@@ -242,7 +246,7 @@ Safety and Testing
Testing on PC
------
-Check out [openpilot-tools](https://github.com/commaai/openpilot-tools): lots of tools you can use to replay driving data, test and develop openpilot from your pc.
+Check out the tools directory in master: lots of tools you can use to replay driving data, test and develop openpilot from your pc.
Community and Contributing
------
diff --git a/RELEASES.md b/RELEASES.md
index 1b4caf963..b472cf9cd 100644
--- a/RELEASES.md
+++ b/RELEASES.md
@@ -1,3 +1,12 @@
+Version 0.7.2 (2020-02-07)
+========================
+ * ECU firmware version based fingerprinting for Honda & Toyota
+ * New driving model: improved path prediction during turns and lane changes and better lead speed tracking
+ * Improve driver monitoring under extreme lighting and add low accuracy alert
+ * Support for 2019 Rav4 Hybrid thanks to illumiN8i!
+ * Support for 2016, 2017 and 2020 Lexus RX thanks to illumiN8i!
+ * Support for 2020 Chrysler Pacifica Hybrid thanks to adhintz!
+
Version 0.7.1 (2020-01-20)
========================
* comma two support!
diff --git a/SConstruct b/SConstruct
index 404cc4491..73c603ad5 100644
--- a/SConstruct
+++ b/SConstruct
@@ -1,6 +1,7 @@
import os
import subprocess
import sys
+import platform
AddOption('--test',
action='store_true',
@@ -11,6 +12,8 @@ AddOption('--asan',
help='turn on ASAN')
arch = subprocess.check_output(["uname", "-m"], encoding='utf8').rstrip()
+if platform.system() == "Darwin":
+ arch = "Darwin"
if arch == "aarch64":
lenv = {
@@ -29,7 +32,6 @@ if arch == "aarch64":
"/data/data/com.termux/files/usr/lib",
"/system/vendor/lib64",
"/system/comma/usr/lib",
- "#phonelibs/yaml-cpp/lib",
"#phonelibs/nanovg",
"#phonelibs/libyuv/lib",
]
@@ -48,22 +50,34 @@ else:
"#phonelibs/zmq/x64/include",
"#external/tensorflow/include",
]
- libpath = [
- "#phonelibs/capnp-cpp/x64/lib",
- "#phonelibs/capnp-c/x64/lib",
- "#phonelibs/yaml-cpp/x64/lib",
- "#phonelibs/snpe/x86_64-linux-clang",
- "#phonelibs/zmq/x64/lib",
- "#phonelibs/libyuv/x64/lib",
- "#external/zmq/lib",
- "#external/tensorflow/lib",
- "#cereal",
- "#selfdrive/common",
- "/usr/lib",
- "/usr/local/lib",
- ]
+
+ if arch == "Darwin":
+ libpath = [
+ "#phonelibs/capnp-cpp/mac/lib",
+ "#phonelibs/capnp-c/mac/lib",
+ "#phonelibs/libyuv/mac/lib",
+ "#cereal",
+ "#selfdrive/common",
+ "/usr/local/lib",
+ "/System/Library/Frameworks/OpenGL.framework/Libraries",
+ ]
+ else:
+ libpath = [
+ "#phonelibs/capnp-cpp/x64/lib",
+ "#phonelibs/capnp-c/x64/lib",
+ "#phonelibs/snpe/x86_64-linux-clang",
+ "#phonelibs/zmq/x64/lib",
+ "#phonelibs/libyuv/x64/lib",
+ "#external/zmq/lib",
+ "#external/tensorflow/lib",
+ "#cereal",
+ "#selfdrive/common",
+ "/usr/lib",
+ "/usr/local/lib",
+ ]
rpath = ["phonelibs/capnp-cpp/x64/lib",
+ "phonelibs/zmq/x64/lib",
"external/tensorflow/lib",
"cereal",
"selfdrive/common"]
@@ -98,7 +112,6 @@ env = Environment(
"#selfdrive",
"#phonelibs/bzip2",
"#phonelibs/libyuv/include",
- "#phonelibs/yaml-cpp/include",
"#phonelibs/openmax/include",
"#phonelibs/json/src",
"#phonelibs/json11",
@@ -195,8 +208,10 @@ SConscript(['common/SConscript'])
SConscript(['common/kalman/SConscript'])
SConscript(['phonelibs/SConscript'])
-SConscript(['selfdrive/modeld/SConscript'])
-SConscript(['selfdrive/camerad/SConscript'])
+if arch != "Darwin":
+ SConscript(['selfdrive/camerad/SConscript'])
+ SConscript(['selfdrive/modeld/SConscript'])
+
SConscript(['selfdrive/controls/lib/cluster/SConscript'])
SConscript(['selfdrive/controls/lib/lateral_mpc/SConscript'])
SConscript(['selfdrive/controls/lib/longitudinal_mpc/SConscript'])
diff --git a/check_code_quality.sh b/check_code_quality.sh
deleted file mode 100644
index aed17230e..000000000
--- a/check_code_quality.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-# Only pyflakes checks (--select=F)
-flake8 --select=F $(find . -iname "*.py" | grep -vi "^\./pyextra.*" | grep -vi "^\./panda")
-RESULT=$?
-if [ $RESULT -eq 0 ]; then
- pylint $(find . -iname "*.py" | grep -vi "^\./pyextra.*" | grep -vi "^\./panda")
- RESULT=$? & 3
-fi
-
-[ $RESULT -ne 0 ] && exit 1
-exit 0
diff --git a/common/android.py b/common/android.py
index a4b8b836e..e0933e822 100644
--- a/common/android.py
+++ b/common/android.py
@@ -5,6 +5,9 @@ import re
import struct
import subprocess
import random
+from cereal import log
+
+NetworkType = log.ThermalData.NetworkType
ANDROID = os.path.isfile('/EON')
@@ -89,3 +92,39 @@ def parse_service_call_bytes(ret):
return r
except Exception:
return None
+
+def get_network_type():
+ if not ANDROID:
+ return NetworkType.none
+
+ wifi_check = parse_service_call_string(service_call(["connectivity", "2"]))
+ if wifi_check is None:
+ return NetworkType.none
+ elif 'WIFI' in wifi_check:
+ return NetworkType.wifi
+ else:
+ cell_check = parse_service_call_unpack(service_call(['phone', '59']), ">q")
+ # from TelephonyManager.java
+ cell_networks = {
+ 0: NetworkType.none,
+ 1: NetworkType.cell2G,
+ 2: NetworkType.cell2G,
+ 3: NetworkType.cell3G,
+ 4: NetworkType.cell2G,
+ 5: NetworkType.cell3G,
+ 6: NetworkType.cell3G,
+ 7: NetworkType.cell3G,
+ 8: NetworkType.cell3G,
+ 9: NetworkType.cell3G,
+ 10: NetworkType.cell3G,
+ 11: NetworkType.cell2G,
+ 12: NetworkType.cell3G,
+ 13: NetworkType.cell4G,
+ 14: NetworkType.cell4G,
+ 15: NetworkType.cell3G,
+ 16: NetworkType.cell2G,
+ 17: NetworkType.cell3G,
+ 18: NetworkType.cell4G,
+ 19: NetworkType.cell4G
+ }
+ return cell_networks.get(cell_check, NetworkType.none)
diff --git a/common/api/__init__.py b/common/api/__init__.py
index b27520738..38fe6b247 100644
--- a/common/api/__init__.py
+++ b/common/api/__init__.py
@@ -1,13 +1,13 @@
import jwt
import requests
from datetime import datetime, timedelta
-
+from common.basedir import PERSIST
from selfdrive.version import version
class Api():
def __init__(self, dongle_id):
self.dongle_id = dongle_id
- with open('/persist/comma/id_rsa') as f:
+ with open(PERSIST+'/comma/id_rsa') as f:
self.private_key = f.read()
def get(self, *args, **kwargs):
diff --git a/common/basedir.py b/common/basedir.py
index 99760fa33..e928ded4c 100644
--- a/common/basedir.py
+++ b/common/basedir.py
@@ -1,4 +1,11 @@
import os
BASEDIR = os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), "../"))
+from common.android import ANDROID
+if ANDROID:
+ PERSIST = "/persist"
+ PARAMS = "/data/params"
+else:
+ PERSIST = os.path.join(BASEDIR, "persist")
+ PARAMS = os.path.join(BASEDIR, "persist", "params")
diff --git a/common/clock.pyx b/common/clock.pyx
index 6205eca10..654d53f8f 100644
--- a/common/clock.pyx
+++ b/common/clock.pyx
@@ -1,16 +1,22 @@
-from posix.time cimport clock_gettime, timespec, CLOCK_BOOTTIME, CLOCK_MONOTONIC_RAW
+from posix.time cimport clock_gettime, timespec, CLOCK_MONOTONIC_RAW, clockid_t
-cdef double readclock(int clock_id):
- cdef timespec ts
- cdef double current
+IF UNAME_SYSNAME == "Darwin":
+ # Darwin doesn't have a CLOCK_BOOTTIME
+ CLOCK_BOOTTIME = CLOCK_MONOTONIC_RAW
+ELSE:
+ from posix.time cimport CLOCK_BOOTTIME
- clock_gettime(clock_id, &ts)
- current = ts.tv_sec + (ts.tv_nsec / 1000000000.)
- return current
+cdef double readclock(clockid_t clock_id):
+ cdef timespec ts
+ cdef double current
+ clock_gettime(clock_id, &ts)
+ current = ts.tv_sec + (ts.tv_nsec / 1000000000.)
+ return current
def monotonic_time():
- return readclock(CLOCK_MONOTONIC_RAW)
+ return readclock(CLOCK_MONOTONIC_RAW)
def sec_since_boot():
- return readclock(CLOCK_BOOTTIME)
+ return readclock(CLOCK_BOOTTIME)
+
diff --git a/common/ffi_wrapper.py b/common/ffi_wrapper.py
index 2c169881c..0fbe16296 100644
--- a/common/ffi_wrapper.py
+++ b/common/ffi_wrapper.py
@@ -2,8 +2,14 @@ import os
import sys
import fcntl
import hashlib
+import platform
from cffi import FFI
+def suffix():
+ if platform.system() == "Darwin":
+ return ".dylib"
+ else:
+ return ".so"
def ffi_wrap(name, c_code, c_header, tmpdir="/tmp/ccache", cflags="", libraries=None):
if libraries is None:
diff --git a/common/logging_extra.py b/common/logging_extra.py
index d57332780..b5d07f220 100644
--- a/common/logging_extra.py
+++ b/common/logging_extra.py
@@ -1,9 +1,11 @@
+import io
import os
import sys
import copy
import json
import socket
import logging
+import traceback
from threading import local
from collections import OrderedDict
from contextlib import contextmanager
@@ -118,6 +120,42 @@ class SwagLogger(logging.Logger):
else:
self.info(evt)
+ def findCaller(self, stack_info=False, stacklevel=1):
+ """
+ Find the stack frame of the caller so that we can note the source
+ file name, line number and function name.
+ """
+ f = sys._getframe(3)
+ #On some versions of IronPython, currentframe() returns None if
+ #IronPython isn't run with -X:Frames.
+ if f is not None:
+ f = f.f_back
+ orig_f = f
+ while f and stacklevel > 1:
+ f = f.f_back
+ stacklevel -= 1
+ if not f:
+ f = orig_f
+ rv = "(unknown file)", 0, "(unknown function)", None
+ while hasattr(f, "f_code"):
+ co = f.f_code
+ filename = os.path.normcase(co.co_filename)
+ if filename == _srcfile:
+ f = f.f_back
+ continue
+ sinfo = None
+ if stack_info:
+ sio = io.StringIO()
+ sio.write('Stack (most recent call last):\n')
+ traceback.print_stack(f, file=sio)
+ sinfo = sio.getvalue()
+ if sinfo[-1] == '\n':
+ sinfo = sinfo[:-1]
+ sio.close()
+ rv = (co.co_filename, f.f_lineno, co.co_name, sinfo)
+ break
+ return rv
+
if __name__ == "__main__":
log = SwagLogger()
diff --git a/common/params.py b/common/params.py
index 3a4e4a2a1..009e5729d 100755
--- a/common/params.py
+++ b/common/params.py
@@ -29,7 +29,7 @@ import fcntl
import tempfile
import threading
from enum import Enum
-
+from common.basedir import PARAMS
def mkdirs_exists_ok(path):
try:
@@ -54,6 +54,7 @@ keys = {
"AthenadPid": [TxType.PERSISTENT],
"CalibrationParams": [TxType.PERSISTENT],
"CarParams": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
+ "CarParamsCache": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"CarVin": [TxType.CLEAR_ON_MANAGER_START, TxType.CLEAR_ON_PANDA_DISCONNECT],
"CommunityFeaturesToggle": [TxType.PERSISTENT],
"CompletedTrainingVersion": [TxType.PERSISTENT],
@@ -319,7 +320,7 @@ def write_db(params_path, key, value):
lock.release()
class Params():
- def __init__(self, db='/data/params'):
+ def __init__(self, db=PARAMS):
self.db = db
# create the database if it doesn't exist...
@@ -327,6 +328,11 @@ class Params():
with self.transaction(write=True):
pass
+ def clear_all(self):
+ shutil.rmtree(self.db, ignore_errors=True)
+ with self.transaction(write=True):
+ pass
+
def transaction(self, write=False):
if write:
return DBWriter(self.db)
diff --git a/common/transformations/camera.py b/common/transformations/camera.py
index 489874eb6..d8729e2f4 100644
--- a/common/transformations/camera.py
+++ b/common/transformations/camera.py
@@ -131,37 +131,6 @@ def img_from_device(pt_device):
return pt_img.reshape(input_shape)[:,:2]
-#TODO please use generic img transform below
-def rotate_img(img, eulers, crop=None, intrinsics=eon_intrinsics):
- import cv2 # pylint: disable=import-error
-
- size = img.shape[:2]
- rot = orient.rot_from_euler(eulers)
- quadrangle = np.array([[0, 0],
- [size[1]-1, 0],
- [0, size[0]-1],
- [size[1]-1, size[0]-1]], dtype=np.float32)
- quadrangle_norm = np.hstack((normalize(quadrangle, intrinsics=intrinsics), np.ones((4,1))))
- warped_quadrangle_full = np.einsum('ij, kj->ki', intrinsics.dot(rot), quadrangle_norm)
- warped_quadrangle = np.column_stack((warped_quadrangle_full[:,0]/warped_quadrangle_full[:,2],
- warped_quadrangle_full[:,1]/warped_quadrangle_full[:,2])).astype(np.float32)
- if crop:
- W_border = (size[1] - crop[0])//2
- H_border = (size[0] - crop[1])//2
- outside_crop = (((warped_quadrangle[:,0] < W_border) |
- (warped_quadrangle[:,0] >= size[1] - W_border)) &
- ((warped_quadrangle[:,1] < H_border) |
- (warped_quadrangle[:,1] >= size[0] - H_border)))
- if not outside_crop.all():
- raise ValueError("warped image not contained inside crop")
- else:
- H_border, W_border = 0, 0
- M = cv2.getPerspectiveTransform(quadrangle, warped_quadrangle)
- img_warped = cv2.warpPerspective(img, M, size[::-1])
- return img_warped[H_border: size[0] - H_border,
- W_border: size[1] - W_border]
-
-
def get_camera_frame_from_calib_frame(camera_frame_from_road_frame):
camera_frame_from_ground = camera_frame_from_road_frame[:, (0, 1, 3)]
calib_frame_from_ground = np.dot(eon_intrinsics,
diff --git a/installer/updater/updater.cc b/installer/updater/updater.cc
index e2d3e7dae..a76be8b8f 100644
--- a/installer/updater/updater.cc
+++ b/installer/updater/updater.cc
@@ -155,8 +155,6 @@ struct Updater {
TouchState touch;
int fb_w, fb_h;
- EGLDisplay display;
- EGLSurface surface;
FramebufferState *fb = NULL;
NVGcontext *vg = NULL;
@@ -198,7 +196,7 @@ struct Updater {
touch_init(&touch);
fb = framebuffer_init("updater", 0x00001000, false,
- &display, &surface, &fb_w, &fb_h);
+ &fb_w, &fb_h);
assert(fb);
vg = nvgCreateGLES3(NVG_ANTIALIAS | NVG_STENCIL_STROKES | NVG_DEBUG);
@@ -708,7 +706,7 @@ struct Updater {
glDisable(GL_BLEND);
- eglSwapBuffers(display, surface);
+ framebuffer_swap(fb);
assert(glGetError() == GL_NO_ERROR);
diff --git a/models/dmonitoring_model_q.dlc b/models/dmonitoring_model_q.dlc
new file mode 100644
index 000000000..0aee22a47
Binary files /dev/null and b/models/dmonitoring_model_q.dlc differ
diff --git a/models/monitoring_model_q.dlc b/models/monitoring_model_q.dlc
deleted file mode 100644
index 59104e18e..000000000
Binary files a/models/monitoring_model_q.dlc and /dev/null differ
diff --git a/models/supercombo.dlc b/models/supercombo.dlc
index fb48eb2ec..d7942d6df 100644
Binary files a/models/supercombo.dlc and b/models/supercombo.dlc differ
diff --git a/panda/board/obj/panda.bin.signed b/panda/board/obj/panda.bin.signed
deleted file mode 100644
index 405e3d50f..000000000
Binary files a/panda/board/obj/panda.bin.signed and /dev/null differ
diff --git a/phonelibs/eigen/COPYING.MINPACK b/phonelibs/eigen/COPYING.MINPACK
index 11d8a9a6c..ae7984dae 100644
--- a/phonelibs/eigen/COPYING.MINPACK
+++ b/phonelibs/eigen/COPYING.MINPACK
@@ -1,52 +1,52 @@
-Minpack Copyright Notice (1999) University of Chicago. All rights reserved
-
-Redistribution and use in source and binary forms, with or
-without modification, are permitted provided that the
-following conditions are met:
-
-1. Redistributions of source code must retain the above
-copyright notice, this list of conditions and the following
-disclaimer.
-
-2. Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following
-disclaimer in the documentation and/or other materials
-provided with the distribution.
-
-3. The end-user documentation included with the
-redistribution, if any, must include the following
-acknowledgment:
-
- "This product includes software developed by the
- University of Chicago, as Operator of Argonne National
- Laboratory.
-
-Alternately, this acknowledgment may appear in the software
-itself, if and wherever such third-party acknowledgments
-normally appear.
-
-4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS"
-WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE
-UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
-THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE
-OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY
-OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
-USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF
-THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)
-DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
-UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL
-BE CORRECTED.
-
-5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT
-HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
-ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,
-INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF
-ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF
-PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER
-SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT
-(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,
-EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE
-POSSIBILITY OF SUCH LOSS OR DAMAGES.
-
+Minpack Copyright Notice (1999) University of Chicago. All rights reserved
+
+Redistribution and use in source and binary forms, with or
+without modification, are permitted provided that the
+following conditions are met:
+
+1. Redistributions of source code must retain the above
+copyright notice, this list of conditions and the following
+disclaimer.
+
+2. Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following
+disclaimer in the documentation and/or other materials
+provided with the distribution.
+
+3. The end-user documentation included with the
+redistribution, if any, must include the following
+acknowledgment:
+
+ "This product includes software developed by the
+ University of Chicago, as Operator of Argonne National
+ Laboratory.
+
+Alternately, this acknowledgment may appear in the software
+itself, if and wherever such third-party acknowledgments
+normally appear.
+
+4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS"
+WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE
+UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
+THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE
+OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY
+OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
+USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF
+THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)
+DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
+UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL
+BE CORRECTED.
+
+5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT
+HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
+ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,
+INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF
+ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF
+PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER
+SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT
+(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,
+EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE
+POSSIBILITY OF SUCH LOSS OR DAMAGES.
+
diff --git a/phonelibs/fastcv/aarch64/include/fastcv.h b/phonelibs/fastcv/aarch64/include/fastcv.h
index 758bce78e..4827b2b6f 100644
--- a/phonelibs/fastcv/aarch64/include/fastcv.h
+++ b/phonelibs/fastcv/aarch64/include/fastcv.h
@@ -1,34089 +1,34089 @@
-#ifndef FASTCV_H
-#define FASTCV_H
-
-/**=============================================================================
-
-@file
- fastcv.h
-
-@brief
- Public API
-
-
-Copyright (c) 2011-2015 Qualcomm Technologies, Inc.
-All Rights Reserved.
-Confidential and Proprietary - Qualcomm Technologies, Inc.
-
-=============================================================================**/
-
-/**=============================================================================
-@mainpage FastCV Public API Documentation
-
-@version 1.7.1
-
-@section Overview Overview
-
-FastCV provides two main features to computer vision application developers:
- - First, it provides a library of frequently used computer vision (CV)
- functions, optimized to run efficiently on mobile devices.
- - Second, it provides a clean processor-agnostic hardware acceleration API,
- under which chipset vendors can hardware accelerate FastCV functions on
- their hardware.
-
-FastCV 1.7.1 supports Android and Windows mobile developers.
-FastCV 1.7.1 is available for download for free from developer.qualcomm.com.
-
-FastCV 1.7.1 is released as a unified binary, a single binary containing two
-implementations of the library.
- - The first implementation runs on ARM processor, and is referred to as
- the "FastCV for ARM."
- - The second implementation runs only on Qualcomm Snapdragon
- chipsets, and is called "FastCV for Snapdragon."
-
-Releases are generally motivated for the following reasons:
- - Changes to previously released APIs
- - Addition of new functions
- - Performance improvements and/or bug fixes - also known as implementation
- modifications
-
- Each motivation has a varying degree of impact on the user of the library.
- The general release numbering scheme captures this variety of motivations.
-
- Given release ID: A.B.C
-
- An increase in "A" indicates that a previously released API has changed,
- so a developer may encounter compilation issues which require modification
- of their code in order to adhear to the modified API. Qualcomm will make
- every effort to minimize these changes. Additionally, new functions and
- implementation modifications may be present.
-
- An increase in "B" indicates that new functions have been added to the
- library, so additional functionality is available, however existing APIs
- have not changed. Additionally, implementation modifications may be
- present.
-
- An increase in "C" indicates that implementation modifications only have
- been made.
-
-@defgroup math_vector Math / Vector Operations
-@details Commonly used vector & math functions
-
-@defgroup image_processing Image processing
-@details Image filtering, convolution and scaling operations
-
-@defgroup image_transform Image transformation
-@details Warp perspective, affine transformations
-
-@defgroup feature_detection Feature detection
-@details Fast corner detection, harris corner detection, canny edge detection, etc.
-
-@defgroup object_detection Object detection
-@details Object detection functions such as NCC template match, etc.
-
-@defgroup 3D_reconstruction 3D reconstruction
-@details Homography, pose evaluation functions
-
-@defgroup color_conversion Color conversion
-@details Commonly used formats supported: e.g., YUV, RGB, YCrCb, etc.
-
-@defgroup clustering_and_search Clustering and search
-@details K clusters best fitting of a set of input points
-
-@defgroup Motion_and_Object_Tracking Motion and object tracking
-@details Supports and tracking functions
-
-@defgroup Structural_Analysis_and_Drawing Shape and drawing
-@details Contour and polygon drawing functions
-
-@defgroup mem_management Memory Management
-@details Functions to allocate and deallocate memory for use with fastCV.
-
-@defgroup misc Miscellaneous
-@details Support functions
-
-@defgroup machine_learning Machine Learning
-@details Machine learning functions such as SVM prediction, etc.
-
-**/
-
-//==============================================================================
-// Defines
-//==============================================================================
-
-#ifdef __GNUC__
- /// Macro to align memory at 4-bytes (32-bits) for GNU-based compilers.
- #define FASTCV_ALIGN32( VAR ) (VAR) __attribute__ ((aligned(4)))
- /// Macro to align memory at 8-bytes (64-bits) for GNU-based compilers.
- #define FASTCV_ALIGN64( VAR ) (VAR) __attribute__ ((aligned(8)))
- /// Macro to align memory at 16-bytes (128-bits) for GNU-based compilers.
- #define FASTCV_ALIGN128( VAR ) (VAR) __attribute__ ((aligned(16)))
- #ifdef BUILDING_SO
- /// MACRO enables function to be visible in shared-library case.
- #define FASTCV_API __attribute__ ((visibility ("default")))
- #else
- /// MACRO empty for non-shared-library case.
- #define FASTCV_API
- #endif
-#else
- /// Macro to align memory at 4-bytes (32-bits) for MSVC compiler.
- #define FASTCV_ALIGN32( VAR ) __declspec(align(4)) (VAR)
- /// Macro to align memory at 8-bytes (64-bits) for MSVC compiler.
- #define FASTCV_ALIGN64( VAR ) __declspec(align(8)) (VAR)
- /// Macro to align memory at 16-bytes (128-bits) for MSVC compiler.
- #define FASTCV_ALIGN128( VAR ) __declspec(align(16)) (VAR)
- #ifdef BUILDING_DLL
- /// MACRO enables function to be visible in shared-library case.
- #define FASTCV_API __declspec(dllexport)
- #else
- /// MACRO empty for non-shared-library case.
- #define FASTCV_API
- #endif
-#endif
-
-//==============================================================================
-// Included modules
-//==============================================================================
-
-#include
-#include
-typedef float float32_t;
-typedef double float64_t;
-
-//==============================================================================
-// Declarations
-//==============================================================================
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines operational mode of interface to allow the end developer to
-/// dictate how the target optimized implementation should behave.
-//------------------------------------------------------------------------------
-typedef enum
-{
- /// Target-optimized implementation uses lowest power consuming
- /// implementation.
- FASTCV_OP_LOW_POWER = 0,
-
- /// Target-optimized implementation uses highest performance implementation.
- FASTCV_OP_PERFORMANCE = 1,
-
- /// Target-optimized implementation offloads as much of the CPU as possible.
- FASTCV_OP_CPU_OFFLOAD = 2,
-
- /// Target-optimized implementation uses CPU highest performance implementation.
- FASTCV_OP_CPU_PERFORMANCE = 3,
-
- /// Values >= 0x80000000 are reserved
- FASTCV_OP_RESERVED = 0x80000000
-
-} fcvOperationMode;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines the flip directions for matrix flip functions.
-//------------------------------------------------------------------------------
-typedef enum
-{
- /// Flip horizontally.
- FASTCV_FLIP_HORIZ = 1,
-
- /// Flip vertically.
- FASTCV_FLIP_VERT = 2,
-
- /// Flip horizontally and vertically.
- FASTCV_FLIP_BOTH = 3
-
-} fcvFlipDir;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines the clockwise rotation degrees for image rotation functions.
-//------------------------------------------------------------------------------
-typedef enum
-{
- /// Rotate 90 degrees clockwise.
- FASTCV_ROTATE_90 = 1,
-
- /// Rotate 180 degrees clockwise.
- FASTCV_ROTATE_180 = 2,
-
- /// Rotate 270 degrees clockwise.
- FASTCV_ROTATE_270 = 3
-
-} fcvRotateDegree;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines the interpolation types.
-//------------------------------------------------------------------------------
-
-typedef enum
-{
- /// Nearest neighbor interpolation
- FASTCV_INTERPOLATION_TYPE_NEAREST_NEIGHBOR = 0,
-
- /// Bilinear interpolation
- FASTCV_INTERPOLATION_TYPE_BILINEAR,
-
- /// Interpolation by area
- FASTCV_INTERPOLATION_TYPE_AREA
-
-} fcvInterpolationType;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines the policy to handle integer overflow.
-//------------------------------------------------------------------------------
-
-typedef enum
-{
- /// Do nothing to the overflow.
- /// Let the overflowed number wrap around.
- /// May save runtime if overflow unlikely to occur,
- /// or users do not care about overflow.
- FASTCV_CONVERT_POLICY_WRAP = 0,
-
- /// Clamped to the maximum interger if overflow,
- /// clamped to the minimum integer if underflow.
- /// May require more runtime than FASTCV_CONVERT_POLICY_WRAP.
- FASTCV_CONVERT_POLICY_SATURATE
-
-} fcvConvertPolicy;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines the border types.
-//------------------------------------------------------------------------------
-
-typedef enum
-{
- /// Border behavior undefined, left to the implementation.
- FASTCV_BORDER_UNDEFINED = 0,
-
- /// For out-of-bound pixels, apply a user-specified constant value.
- FASTCV_BORDER_CONSTANT,
-
- /// For out-of-bound pixels, apply values from the nearest edge pixels.
- FASTCV_BORDER_REPLICATE
-
-} fcvBorderType;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines the norm for a vector.
-//------------------------------------------------------------------------------
-
-typedef enum
-{
- /// L1 norm. The norm is the sum of absolute values of every component in a vector.
- FASTCV_NORM_L1,
-
- /// L2 norm, i.e., the Euclidean norm of a vector.
- FASTCV_NORM_L2
-
-} fcvNormType;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines all supported channel indices
-//------------------------------------------------------------------------------
-
-typedef enum
-{
- /// The first channel of the image.
- FASTCV_CHANNEL_0,
-
- /// The second channel of the image.
- FASTCV_CHANNEL_1,
-
- /// The third channel of the image.
- FASTCV_CHANNEL_2,
-
- /// The fourth channel of the image.
- FASTCV_CHANNEL_3,
-
- /// The RED channel of the image.
- FASTCV_CHANNEL_R,
-
- /// The GREEN channel of the image.
- FASTCV_CHANNEL_G,
-
- /// The BLUE channel of the image.
- FASTCV_CHANNEL_B,
-
- /// The ALPHA channel of the image.
- FASTCV_CHANNEL_A,
-
- /// The LUMA channel of the image.
- FASTCV_CHANNEL_Y,
-
- /// The Cb/U channel of the image.
- FASTCV_CHANNEL_U,
-
- /// The Cr/V/Value channel of the image.
- FASTCV_CHANNEL_V
-
-} fcvChannelType;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines all supported image formats based on the FOURCC definition
-//------------------------------------------------------------------------------
-
-typedef enum
-{
- /// A single plane of 24 bit pixel as 3 interleaved 8 bit units of R then G then B data.
- FASTCV_RGB,
-
- /// A single plane of 32 bit pixel as 4 interleaved 8 bit units of R then G then B data, then a ”don’t care?byte.
- FASTCV_RGBX,
-
- /// A 2 plane YUV format of Luma (Y) and interleaved UV data at 4:2:0 sampling.
- /// For a frame of width W and height H, Y plane has the size of W * H, while the UV plane has the size of W * H/2.
- /// The extracted U or V plane is then expected to be W/2 * H/2.
- FASTCV_NV12,
-
- /// A 2 plane YUV format of Luma (Y) and interleaved VU data at 4:2:0 sampling.
- /// For a frame of width W and height H, Y plane has the size of W * H, while the VU plane has the size of W * H/2.
- /// The extracted U or V plane is then expected to be W/2 * H/2.
- FASTCV_NV21,
-
- /// A single plane of 32 bit macro pixel of U0, Y0, V0, Y1 bytes.
- /// For a frame of width W and height H, its buffer size is at least 2*W * H.
- /// The extracted Y plane is expected to be W * H while the U or V plane is expected to be W/2 * H.
- FASTCV_UYVY,
-
- /// A single plane of 32 bit macro pixel of Y0, U0, Y1, V0 bytes.
- /// For a frame of width W and height H, its buffer size is at least 2*W * H.
- /// The extracted Y plane is expected to be W * H while the U or V plane is expected to be W/2 * H.
- FASTCV_YUYV,
-
- /// A 3 plane of 8 bit 4:2:0 sampled Y, U, V planes.
- /// For a frame of width W and height H, Y plane has the size of W * H, while the U or I plane each has a size of W/2 * H/2.
- FASTCV_IYUV,
-
- /// A 3 plane of 8 bit 4:4:4 sampled Y, U, V planes.
- /// For a frame of width W and height H, Y or U or V plane each has the size of W * H.
- FASTCV_YUV4
-
-} fcvImageFormat;
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines the status returned by a function.
-//------------------------------------------------------------------------------
-typedef enum
-{
- //// Success
- FASTCV_SUCCESS = 0,
-
- /// General failure
- FASTCV_EFAIL,
-
- /// Unaligned pointer parameter
- FASTCV_EUNALIGNPARAM,
-
- /// Bad parameters
- FASTCV_EBADPARAM,
-
- /// Called at invalid state
- FASTCV_EINVALSTATE,
-
- /// Insufficient resources, memory, thread...
- FASTCV_ENORES,
-
- /// Unsupported feature
- FASTCV_EUNSUPPORTED,
-
- /// Hardware QDSP failed to respond
- FASTCV_EHWQDSP,
-
- /// Hardware GPU failed to respond
- FASTCV_EHWGPU
-
-} fcvStatus;
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines the kernel functions of SVM prediction.
-//------------------------------------------------------------------------------
-typedef enum
-{
- FASTCV_SVM_LINEAR,
- FASTCV_SVM_POLY,
- FASTCV_SVM_RBF,
- FASTCV_SVM_SIGMOID
-} fcvSVMKernelType;
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines the different scaling options for the pyramid
-//------------------------------------------------------------------------------
-typedef enum
-{
- FASTCV_PYRAMID_SCALE_HALF,
- FASTCV_PYRAMID_SCALE_ORB
-} fcvPyramidScale;
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines the termination criteria list.
-//------------------------------------------------------------------------------
-typedef enum
-{
- /// Indicates a termination after a set number of iterations
- FASTCV_TERM_CRITERIA_ITERATIONS,
-
- /// Indicates a termination after matching against the value of eplison provided to the function
- FASTCV_TERM_CRITERIA_EPSILON,
-
- /// Indicates that both an iterations and eplison method are employed. Whichever one matches first causes the termination.
- FASTCV_TERM_CRITERIA_BOTH,
-} fcvTerminationCriteria;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines the normalization method in the HOG extraction process
-//------------------------------------------------------------------------------
-typedef enum
-{
- /// Do the regular normalization method
- FASTCV_HOG_NORM_REGULAR = 0,
-
- /// Do re-normalization
- FASTCV_HOG_NORM_RENORMALIZATION = 1,
-
- /// Use F-HOG method
- FASTCV_HOG_NORM_FHOG = 2,
-
-} fcvHOGNormMethod;
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines the vaiance estimator type
-//------------------------------------------------------------------------------
-typedef enum
-{
- /// Sums the squared deviation and devides by (n-1)
- /// As known as sample variance
- FASTCV_UNBIASED_VARIANCE_ESTIMATOR = 0,
-
- /// Sums the squared deviation and devides by n
- /// As known as population variance
- FASTCV_BIASED_VARIANCE_ESTIMATOR = 1,
-
-} fcvVarianceEstimator;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a structure to contain points correspondence data.
-//------------------------------------------------------------------------------
-typedef struct
-{
- /// Tuples of 3 values: xFrom,yFrom,zFrom. Float array which this points to
- /// must be greater than or equal to 3 * numCorrespondences.
- const float32_t* from;
- /*~ FIELD fcvCorrespondences.from
- VARRAY LENGTH ( fcvCorrespondences.numCorrespondences * \
- (fcvCorrespondences.fromStride ? fcvCorrespondences.fromStride : 3) ) */
-
- /// Tuples of 2 values: xTo,yTo. Float array which this points to
- /// must be greater than or equal to 2 * numCorrespondences.
- const float32_t* to;
- /*~ FIELD fcvCorrespondences.to
- VARRAY LENGTH ( fcvCorrespondences.numCorrespondences * \
- (fcvCorrespondences.toStride ? fcvCorrespondences.toStride : 2) ) */
-
- /// Distance in bytes between two coordinates in the from array.
- /// If this parameter is set to 2 or 3, a dense array is assume (stride will
- /// be sizeof(float) times 2 or 3). The minimum value of fromStride
- /// should be 2.
- uint32_t fromStride;
-
- /// Distance in bytes between two coordinates in the to array.
- /// If this parameter is set to 2, a dense array is assume (stride will
- /// be 2 * sizeof(float)). The minimum value of toStride
- /// should be 2.
- uint32_t toStride;
-
- /// Number of points in points correspondences.
- uint32_t numCorrespondences;
-
- /// Array of inlier indices for corrs array. Processing will only occur on
- /// the indices supplied in this array. Array which this points to must be
- /// at least numIndices long.
- const uint16_t* indices;
- /*~ FIELD fcvCorrespondences.indices VARRAY LENGTH (fcvCorrespondences.numIndices) */
-
- /// Length of indices array.
- uint32_t numIndices;
-} fcvCorrespondences;
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Structure representing an image pyramid level
-//------------------------------------------------------------------------------
-
-typedef struct
-{
- const void* ptr;
- unsigned int width;
- unsigned int height;
-} fcvPyramidLevel ;
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Structure representing an image pyramid level (version2 with stride)
-//------------------------------------------------------------------------------
-
-typedef struct
-{
- const void* ptr;
- unsigned int width;
- unsigned int height;
- unsigned int stride;
-} fcvPyramidLevel_v2 ;
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Structure describing node of a tree;
-/// Assumption is that nodes of all trees are stored in in a single array
-/// and all indices refer to this array
-/// @remark
-/// if indices of both children are negative the node is a leaf
-// ----------------------------------------------------------------------------
-typedef struct fcvKDTreeNodef32
-{
- /// the split value at the node
- float32_t divVal;
-
- /// dimension at which the split is made;
- /// if this is a leaf (both children equal to -1) then this is
- /// the index of the dataset vector
- int32_t divFeat;
-
- /// index of the child node with dataset items to the left
- /// of the split value
- int32_t childLeft;
-
- /// index of the child node with dataset items to the right
- /// of the split value
- int32_t childRight;
-
-} fcvKDTreeNodef32;
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// structure describing a branch (subtree)
-/// @remark
-/// branches are stored on the priority queue (heap) for backtracking
-// -----------------------------------------------------------------------------
-typedef struct fcvKDTreeBranchf32
-{
- /// square of minimal distance from query for all nodes below
- float32_t minDistSq;
-
- /// index of the top node of the branch
- int32_t topNode;
-
-} fcvKDTreeBranchf32;
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Structure with KDTrees data
-// -----------------------------------------------------------------------------
-typedef struct fcvKDTreeDatas8f32
-{
- // info about the dataset for which KDTrees are constructed
- /// the dataset of vectors
- const int8_t *dataset;
-
- /// array with inverse lengths of dataset vectors
- const float32_t* invLen;
-
- /// number of vectors in the dataset
- int32_t numVectors;
-
- // info about trees
- /// indice of root nodes of trees
- int32_t* trees;
-
- /// array of nodes of all trees
- fcvKDTreeNodef32* nodes;
-
- /// number of all nodes
- int32_t numNodes;
-
- /// capacity of node array
- int32_t maxNumNodes;
-
- // info used during lookups
- /// priority queue
- fcvKDTreeBranchf32* heap;
-
- /// number of branches on the priority queue
- int32_t numBranches;
-
- /// capactiy of the priority queue
- int32_t maxNumBranches;
-
- /// array of indices to vectors in the dataset;
- /// during searches used to mark checkID;
- /// should have numVectors capacity
- int32_t* vind;
-
- /// unique ID for each lookup
- int32_t checkID;
-
- /// number of nearest neighbors to find
- int32_t numNNs;
-
-} fcvKDTreeDatas8f32;
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// fixed point kdtrees
-/// Structure describing node of tree;
-/// Assumption is that nodes of all trees are stored in in a single array
-/// and all indices refer to this array
-/// @remark
-/// if indices of both children are negative the node is a leaf
-// ----------------------------------------------------------------------------
-typedef struct fcvKDTreeNodes32
-{
- /// the split value at the node
- int32_t divVal;
-
- /// dimension at which the split is made;
- /// if this is a leaf (both children equal to -1) then this is
- /// the index of the dataset vector
- int32_t divFeat;
-
- /// index of the child node with dataset items to the left
- /// of the split value
- int32_t childLeft;
-
- /// index of the child node with dataset items to the right
- /// of the split value
- int32_t childRight;
-
-} fcvKDTreeNodes32;
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// fixed point kdtrees
-/// structure describing a branch (subtree)
-/// @remark
-/// branches are stored on the priority queue (heap) for backtracking
-// -----------------------------------------------------------------------------
-typedef struct fcvKDTreeBranchs32
-{
- /// square of minimal distance from query for all nodes below
- int32_t minDistSq;
-
- /// index of the top node of the branch
- int32_t topNode;
-
-} fcvKDTreeBranchs32;
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// fixed point kdtrees
-/// Structure with KDTrees data
-// -----------------------------------------------------------------------------
-typedef struct fcvKDTreeDatas8s32
-{
- // info about the dataset for which KDTrees are constructed
- /// the dataset of vectors
- const int8_t *dataset;
-
- /// array with inverse lengths of dataset vectors
- const int32_t* invLen;
-
- /// number of vectors in the dataset
- int32_t numVectors;
-
- // info about trees
- /// indices of root nodes of all trees
- int32_t* trees;
-
- /// number of trees used
- int32_t numTrees;
-
- /// array of nodes of all trees
- fcvKDTreeNodes32* nodes;
-
- /// number of all nodes
- int32_t numNodes;
-
- /// capacity of node array
- int32_t maxNumNodes;
-
- // info used during lookups
- /// priority queue
- fcvKDTreeBranchs32* heap;
-
- /// number of branches on the priority queue
- int32_t numBranches;
-
- /// capactiy of the priority queue
- int32_t maxNumBranches;
-
- /// array of indices to vectors in the dataset;
- /// during searches used to mark checkID;
- /// should have numVectors capacity
- int32_t* vind;
-
- /// unique ID for each lookup
- int32_t checkID;
-
- /// number of nearest neighbors to find
- int32_t numNNs;
-
-} fcvKDTreeDatas8s32;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a struct of rectangle
-//------------------------------------------------------------------------------
-typedef struct
-{
- ///x-coordinate of the top-left corner
- int32_t x;
- ///y-coordinate of the top-left corner
- int32_t y;
- ///width of the rectangle
- uint32_t width;
- ///height of the rectangle
- uint32_t height;
-} fcvRectangleInt;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a struct of termination criteria
-//------------------------------------------------------------------------------
-typedef struct
-{
- /// Maxmimum number of iteration
- int32_t max_iter;
- ///
- float32_t epsilon;
-}fcvTermCriteria;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a struct of 2D box used for tracking
-//------------------------------------------------------------------------------
-typedef struct
-{
- // Center of the box
- ///x-coordinate of the 2D point
- int32_t x;
- ///y-coordinate of the 2D point
- int32_t y;
- // The box size
- int32_t columns;
- int32_t rows;
- // The orientation of the principal axis
- int32_t orientation;
-}fcvBox2D;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a struct of image moments
-//------------------------------------------------------------------------------
-typedef struct {
- // spatial moments
- float32_t m00, m10, m01, m20, m11, m02, m30, m21, m12, m03;
- // central moments
- float32_t mu20, mu11, mu02, mu30, mu21, mu12, mu03;
- // m00 != 0 ? 1/sqrt(m00) : 0
- float32_t inv_sqrt_m00;
-} fcvMoments;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a struct of code word
-//------------------------------------------------------------------------------
-typedef struct fcvBGCodeWord
-{
- /// Pointer to next codebook element
- struct fcvBGCodeWord* next;
-
- /// Last update time
- int32_t tLastUpdate;
-
- /// Longest period of inactivity
- int32_t stale;
- /// Min value of pixel for each channel
- uint8_t min0, min1, min2;
-
- /// Max value of pixel for each channel
- uint8_t max0, max1, max2;
-
- /// Min value of learning boundary for each channel
- uint8_t learnLow0, learnLow1, learnLow2;
-
- /// Max value of learning boundary for each channel
- uint8_t learnHigh0, learnHigh1, learnHigh2;
-} fcvBGCodeWord;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a struct for circle
-//------------------------------------------------------------------------------
-typedef struct fcvCircle
-{
- int32_t x;
- int32_t y;
- int32_t radius;
-} fcvCircle;
-
-
-typedef struct fcvPoint2D
-{
- float x;
- float y;
-} fcvPoint2D;
-
-typedef struct fcvLine
-{
- fcvPoint2D start;
- fcvPoint2D end;
-} fcvLine;
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a struct for parameters for line segment detection
-//------------------------------------------------------------------------------
-typedef struct fcvLineSegment {
- fcvPoint2D start, end; ///< Two ending points
- float32_t normal[2]; ///< Orientation, average of the gradient direction
- uint32_t nPoints; ///< (Optional) Number of pixels in pointsList
- int32_t pointsStartIndex; ///< (Optional) Starting index of the pixel positions contributed to line segment fitting stored in indexBuffer
- uint32_t sumMag; ///< Sum of all pixels gradient magnitude
-} fcvLineSegment;
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Parameters for fusing a depth map into a cuboid fusion block
-///
-/// @details
-/// This structure describes a single cuboid block that shall be fused
-/// with data from a depth map. All coordinates must be pre-transformed
-/// into the coordinate frame of the depth frame.
-///
-//------------------------------------------------------------------------------
-typedef struct fcvDepthFusionBlockConfig {
- uint32_t flags; ///< Option specified as a bit field - 0x0000:N/A, 0x0001:run clipping
- float32_t ramp; ///< Fusion ramp: maximum allowed distance between volume sample position and depth map sample position
- float32_t p0[3], ///< Location of the 1st sample in the volume
- dX[3], ///< One sample step in X-direction in the volume
- dY[3], ///< One sample step in Y-direction in the volume
- dZ[3]; ///< One sample step in Z-direction in the volume
- uint32_t volumeIndex; ///< Index of the volume to be updated
-} fcvDepthFusionBlockConfig;
-
-//==============================================================================
-// UTILITY FUNCTIONS
-//==============================================================================
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Retrieves version of FastCV library.
-///
-/// @param version
-/// Pointer to location to put string.
-///
-/// @param versionLength
-/// Length of storage for version string.
-///
-/// @ingroup misc
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvGetVersion( char* version,
- unsigned int versionLength );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Selects HW units for all routines at run-time.
-/// \n\b WARNING: Should be called once at the very beginning to update mode
-///
-/// @param mode
-/// See enum for details.
-///
-/// @return
-/// 0 if successful.
-/// 999 if minmum HW requirement not met.
-/// other #'s if unsuccessful.
-///
-/// @ingroup misc
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvSetOperationMode( fcvOperationMode mode );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Clean up FastCV resources. Must be called before the program exits.
-///
-/// @ingroup misc
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCleanUp( void );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Allocates memory for Pyramid
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvPyramidAllocate_v2(). In the 2.0.0 release,
-/// fcvPyramidAllocate_v2 will be renamed to fcvPyramidAllocate
-/// and the signature of fcvPyramidAllocate as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param pyr
-/// Pointer to an array of fcvPyramidLevel
-///
-/// @param baseWidth
-/// Width of the base level: the value assigned to pyr[0].width
-///
-/// @param baseHeight
-/// Height of the base level: the value assigned to pyr[0].height
-///
-/// @param bytesPerPixel
-/// Number of bytes per pixel:
-/// \n e.g for uint8_t pyramid, bytesPerPixel = 1
-/// \n for int32_t pyramid, bytesPerPixel = 4
-///
-/// @param numLevels
-/// number of levels in the pyramid
-///
-/// @param allocateBase
-/// \n if set to 1, memory will be allocated for the base level
-/// \n if set to 0, memory for the base level is allocated by the callee
-/// \n\b WARNING: How this parameter is set will impact how the memory is freed.
-/// Please refer to fcvPyramidDelete for details.
-///
-/// @ingroup mem_management
-//----------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidAllocate( fcvPyramidLevel* pyr,
- unsigned int baseWidth,
- unsigned int baseHeight,
- unsigned int bytesPerPixel,
- unsigned int numLevels,
- int allocateBase );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Allocates memory for Pyramid
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvPyramidAllocate() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvPyramidAllocate,
-/// \a fcvPyramidAllocate_v2 will be removed, and the current signature
-/// for \a fcvPyramidAllocate will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvPyramidAllocate when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param pyr
-/// Pointer to an array of fcvPyramidLevel_v2
-///
-/// @param baseWidth
-/// Width of the base level: the value assigned to pyr[0].width
-///
-/// @param baseHeight
-/// Height of the base level: the value assigned to pyr[0].height
-///
-/// @param baseStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory.
-/// Stride of the base level: the value assigned to pyr[0].stride
-/// \n \b NOTE: stride of non-base pyramid image is the same as
-/// width*bytesPerPixel of the non-base pyramid image
-///
-/// @param bytesPerPixel
-/// Number of bytes per pixel:
-/// \n e.g for uint8_t pyramid, bytesPerPixel = 1
-/// \n for int32_t pyramid, bytesPerPixel = 4
-///
-/// @param numLevels
-/// number of levels in the pyramid
-///
-/// @param allocateBase
-/// \n if set to 1, memory will be allocated for the base level
-/// \n if set to 0, memory for the base level is allocated by the callee
-/// \n\b WARNING: How this parameter is set will impact how the memory is freed.
-/// Please refer to fcvPyramidDelete for details.
-///
-/// @ingroup mem_management
-//----------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidAllocate_v2( fcvPyramidLevel_v2* pyr,
- uint32_t baseWidth,
- uint32_t baseHeight,
- uint32_t baseStride,
- uint32_t bytesPerPixel,
- uint32_t numLevels,
- int32_t allocateBase );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Allocates memory for Pyramid
-/// DO NOT USE THIS API unless for testing purposes.
-/// This API can be removed without notice.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvPyramidAllocate_v2() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvPyramidAllocate,
-/// \a fcvPyramidAllocate_v3 will be removed, and the current signature
-/// for \a fcvPyramidAllocate will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvPyramidAllocate when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param pyr
-/// Pointer to an array of fcvPyramidLevel_v2
-///
-/// @param baseWidth
-/// Width of the base level: the value assigned to pyr[0].width
-///
-/// @param baseHeight
-/// Height of the base level: the value assigned to pyr[0].height
-///
-/// @param baseStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory.
-/// Stride of the base level: the value assigned to pyr[0].stride
-/// \n \b NOTE: stride of non-base pyramid image is the same as
-/// width*bytesPerPixel of the non-base pyramid image
-///
-/// @param bytesPerPixel
-/// Number of bytes per pixel:
-/// \n e.g for uint8_t pyramid, bytesPerPixel = 1
-/// \n for int32_t pyramid, bytesPerPixel = 4
-///
-/// @param alignment
-/// Used to specify the alignment of each pyramid level other than the base. Must be a multiple
-/// of 8. If set to 0, the alignment will be set as 8 bits.
-///
-/// @param numLevels
-/// number of levels in the pyramid
-///
-/// @param scale
-/// Defines the type of scaling used for each pyramid level.
-/// FASTCV_PYRAMID_SCALE_HALF downscales each level of the pyramid by a factor of 2.
-/// FASTCV_PYRAMID_SCALE_ORB downscales each level of the pyramid by a factor of 1/(2)^(1/4),
-/// which is approximated as 0.8408964f
-///
-/// @param allocateBase
-/// \n if set to 1, memory will be allocated for the base level
-/// \n if set to 0, memory for the base level is allocated by the callee
-/// \n\b WARNING: How this parameter is set will impact how the memory is freed.
-/// Please refer to fcvPyramidDelete_v2 for details.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup mem_management
-//----------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvPyramidAllocate_v3(fcvPyramidLevel_v2* __restrict pyr,
- uint32_t baseWidth,
- uint32_t baseHeight,
- uint32_t baseStride,
- uint32_t bytesPerPixel,
- uint32_t alignment,
- uint32_t numLevels,
- fcvPyramidScale scale,
- int32_t allocateBase);
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Deallocates an array of fcvPyramidLevel. Can be used for any
-/// type(f32/s8/u8).
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvPyramidDelete_v2(). In the 2.0.0 release,
-/// fcvPyramidDelete_v2 will be renamed to fcvPyramidDelete
-/// and the signature of fcvPyramidDelete as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param pyr
-/// pyramid to deallocate
-///
-/// @param numLevels
-/// Number of levels in the pyramid
-///
-/// @param startLevel
-/// Start level of the pyramid
-/// \n\b WARNING: if pyr was allocated with allocateBase=0 which means baselevel memory
-/// was allocated outside of fcvPyramidAllocate, then startLevel
-/// for fcvPyramidDelete has to be set to 1 (or higher).
-///
-/// @ingroup mem_management
-//----------------------------------------------------------------------------
-
-FASTCV_API void
-fcvPyramidDelete( fcvPyramidLevel* pyr,
- unsigned int numLevels,
- unsigned int startLevel );
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Deallocates an array of fcvPyramidLevel. Can be used for any
-/// type(f32/s8/u8).
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvPyramidDelete() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvPyramidDelete,
-/// \a fcvPyramidDelete_v2 will be removed, and the current signature
-/// for \a fcvPyramidDelete will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvPyramidDelete when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param pyr
-/// pyramid to deallocate
-///
-/// @param numLevels
-/// Number of levels in the pyramid
-///
-/// @param startLevel
-/// Start level of the pyramid
-/// \n\b WARNING: if pyr was allocated with allocateBase=0 which means baselevel memory
-/// was allocated outside of fcvPyramidAllocate, then startLevel
-/// for fcvPyramidDelete_v2 has to be set to 1 (or higher).
-///
-/// @ingroup mem_management
-//----------------------------------------------------------------------------
-
-FASTCV_API void
-fcvPyramidDelete_v2( fcvPyramidLevel_v2* pyr,
- uint32_t numLevels,
- uint32_t startLevel );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Allocates aligned memory.
-///
-/// @param nBytes
-/// Number of bytes.
-///
-/// @param byteAlignment
-/// Alignment specified in bytes (e.g., 16 = 128-bit alignment).
-/// \n\b WARNING: must be < 255 bytes
-///
-/// @return
-/// SUCCESS: pointer to aligned memory
-/// FAILURE: 0
-///
-/// @ingroup mem_management
-//------------------------------------------------------------------------------
-
-FASTCV_API void*
-fcvMemAlloc( unsigned int nBytes,
- unsigned int byteAlignment );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Frees memory allocated by fcvMemAlloc().
-///
-/// @param ptr
-/// Pointer to memory.
-///
-/// @ingroup mem_management
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvMemFree( void* ptr );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Initialize the Memory sub-system in FastCV. The sub-system handles
-/// temporary/scratch memory requirements from several FastCV functions
-/// that do not have parameters to have this supplied by the users of those
-/// functions.
-///
-/// \b Important:
-/// \n 1. Every call to this function should be followed by a call to
-/// fcvMemDeInit().
-/// \n 2. This function (and the fcvMemDeInit) only needs to called once per
-/// process.
-/// \n 3. Any call to FastCV functions that uses internal temporary memory
-/// outside of fcvMemInit and fcvMemDeInit pair will use non-optimum memory
-/// allocation.
-/// \n 4. A call to this function without a corresponding call to fcvMemDeInit
-/// can result in memory leak.
-///
-/// @ingroup mem_management
-// -----------------------------------------------------------------------------
-FASTCV_API void
-fcvMemInit(void);
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Initialize the Memory sub-system in FastCV with pre-allocated buffer.
-/// The sub-system handles temporary/scratch memory requirements from several
-/// FastCV functions that do not have parameters to have this supplied by the
-/// users of those functions.
-///
-/// \b Important:
-/// \n 1. Every call to this function should be followed by a call to
-/// fcvMemDeInit().
-/// \n 2. This function (and the fcvMemDeInit) only needs to called once per
-/// process.
-/// \n 3. Any call to FastCV functions that uses internal temporary memory
-/// outside of fcvMemInit and fcvMemDeInit pair will use non-optimum memory
-/// allocation.
-/// \n 4. A call to this function without a corresponding call to fcvMemDeInit
-/// can result in memory leak.
-///
-/// @param preAllocBytes
-/// Number of bytes for the pre-allocated buffer.
-///
-/// @ingroup mem_management
-// -----------------------------------------------------------------------------
-FASTCV_API void
-fcvMemInitPreAlloc( uint32_t preAllocBytes );
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// De-Initialize the Memory sub-system initialized by fcvMemInit() function.
-///
-/// \b Important:
-/// \n 1. Call to this function without a corresponding call to fcvMemInit will
-/// result in no-op.
-///
-/// @ingroup mem_management
-// -----------------------------------------------------------------------------
-FASTCV_API void
-fcvMemDeInit(void);
-
-//End - Utility functions
-
-
-//==============================================================================
-// FUNCTIONS
-//==============================================================================
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 3x3 median filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterMedian3x3u8_v2(). In the 2.0.0 release,
-/// fcvFilterMedian3x3u8_v2 will be renamed to fcvFilterMedian3x3u8
-/// and the signature of fcvFilterMedian3x3u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Border values are ignored. The 3x3 mask convolves with the image area
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param srcImg
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dstImg
-/// Output 8-bit image. Size of buffer is srcWidth*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterMedian3x3u8( const uint8_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dstImg );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 3x3 median filter
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterMedian3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterMedian3x3u8,
-/// \a fcvFilterMedian3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterMedian3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterMedian3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Border values are ignored. The 3x3 mask convolves with the image area
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param srcImg
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dstImg
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterMedian3x3u8_v2( const uint8_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dstImg,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 3x3 Gaussian filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterGaussian3x3u8_v2(). In the 2.0.0 release,
-/// fcvFilterGaussian3x3u8_v2 will be renamed to fcvFilterGaussian3x3u8
-/// and the signature of fcvFilterGaussian3x3u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Gaussian kernel:
-/// \n 1 2 1
-/// \n 2 4 2
-/// \n 1 2 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit image. Destination buffer size is srcWidth*srcHeight.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param blurBorder
-/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
-/// borders up to half-kernel width are ignored (e.g. 1 pixel in the 3x3
-/// case).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian3x3u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- int blurBorder );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 3x3 Gaussian filter
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterGaussian3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterGaussian3x3u8,
-/// \a fcvFilterGaussian3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterGaussian3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterGaussian3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Convolution with 3x3 Gaussian kernel:
-/// \n 1 2 1
-/// \n 2 4 2
-/// \n 1 2 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
-///
-/// @param blurBorder
-/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
-/// borders up to half-kernel width are ignored (e.g. 1 pixel in the 3x3
-/// case).
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int blurBorder );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 5x5 Gaussian filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterGaussian5x5u8_v2(). In the 2.0.0 release,
-/// fcvFilterGaussian5x5u8_v2 will be renamed to fcvFilterGaussian5x5u8
-/// and the signature of fcvFilterGaussian5x5u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Convolution with 5x5 Gaussian kernel:
-/// \n 1 4 6 4 1
-/// \n 4 16 24 16 4
-/// \n 6 24 36 24 6
-/// \n 4 16 24 16 4
-/// \n 1 4 6 4 1
-///
-/// @param src
-/// Input int data (can be sq. of gradient, etc). Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param blurBorder
-/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
-/// borders up to half-kernel width are ignored (e.g. 2 pixel in the 5x5
-/// case).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian5x5u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- int blurBorder );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 5x5 Gaussian filter
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterGaussian5x5u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterGaussian5x5u8,
-/// \a fcvFilterGaussian5x5u8_v2 will be removed, and the current signature
-/// for \a fcvFilterGaussian5x5u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterGaussian5x5u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Convolution with 5x5 Gaussian kernel:
-/// \n 1 4 6 4 1
-/// \n 4 16 24 16 4
-/// \n 6 24 36 24 6
-/// \n 4 16 24 16 4
-/// \n 1 4 6 4 1
-///
-/// @param src
-/// Input int data (can be sq. of gradient, etc). Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
-///
-/// @param blurBorder
-/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
-/// borders up to half-kernel width are ignored (e.g. 2 pixel in the 5x5
-/// case).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian5x5u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int blurBorder );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 11x11 Gaussian filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterGaussian11x11u8_v2(). In the 2.0.0 release,
-/// fcvFilterGaussian11x11u8_v2 will be renamed to fcvFilterGaussian11x11u8
-/// and the signature of fcvFilterGaussian11x11u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Convolution with 11x11 Gaussian kernel:
-/// \n 1 10 45 120 210 252 210 120 45 10 1
-/// \n 10 100 450 1200 2100 2520 2100 1200 450 100 10
-/// \n 45 450 2025 5400 9450 11340 9450 5400 2025 450 45
-/// \n 120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
-/// \n 210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
-/// \n 252 2520 11340 30240 52920 63504 52920 30240 11340 2520 252
-/// \n 210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
-/// \n 120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
-/// \n 45 450 2025 5400 9450 11340 9450 5400 2025 450 45
-/// \n 10 100 450 1200 2100 2520 2100 1200 450 100 10
-/// \n 1 10 45 120 210 252 210 120 45 10 , 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param blurBorder
-/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
-/// borders up to half-kernel width are ignored (e.g. 5 pixel in the 11x11
-/// case).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian11x11u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- int blurBorder );
-
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 11x11 Gaussian filter
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterGaussian11x11u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterGaussian11x11u8,
-/// \a fcvFilterGaussian11x11u8_v2 will be removed, and the current signature
-/// for \a fcvFilterGaussian11x11u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterGaussian11x11u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Convolution with 11x11 Gaussian kernel:
-/// \n 1 10 45 120 210 252 210 120 45 10 1
-/// \n 10 100 450 1200 2100 2520 2100 1200 450 100 10
-/// \n 45 450 2025 5400 9450 11340 9450 5400 2025 450 45
-/// \n 120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
-/// \n 210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
-/// \n 252 2520 11340 30240 52920 63504 52920 30240 11340 2520 252
-/// \n 210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
-/// \n 120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
-/// \n 45 450 2025 5400 9450 11340 9450 5400 2025 450 45
-/// \n 10 100 450 1200 2100 2520 2100 1200 450 100 10
-/// \n 1 10 45 120 210 252 210 120 45 10 , 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param blurBorder
-/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
-/// borders up to half-kernel width are ignored (e.g. 5 pixel in the 11x11
-/// case).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian11x11u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int blurBorder );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YUV (YCrCb) 4:2:0 PesudoPlanar (Interleaved) to RGB 8888.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvColorYCrCb420PseudoPlanarToRGB8888u8. In the 2.0.0 release,
-/// the signature of fcvColorYUV420toRGB8888u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// 8-bit image of input YUV 4:2:0 values.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// The input are one Y plane followed by one interleaved and 2D (both
-/// horizontally and vertically) sub-sampled CrCb plane:
-/// Y plane : Y00 Y01 Y02 Y03 ...
-/// Y10 Y11 Y12 Y13 ...
-/// Interleaved and 2D sub-sampled plane: Cr0 Cb0 Cr1 Cb1 ...
-///
-/// @param dst
-/// 32-bit image of output RGB 8888 values. R is at LSB.
-/// \n\b WARNING: size must match input yuv420.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYUV420toRGB8888u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint32_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YUV (YCrCb) 4:2:0 PesudoPlanar (Interleaved CrCb) to RGB 888.
-///
-/// \n\b ATTENTION: The name of this function will be changed when the 2.0.0 release
-/// of this library is made.
-/// Until 2.0.0, the developer should use this implementation with the expectation of
-/// moving to a different name when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// 8-bit image of input YUV picture.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// The input are one Y plane followed by one interleaved and 2D (both
-/// horizontally and vertically) sub-sampled CrCb plane:
-/// Y plane : Y00 Y01 Y02 Y03 ...
-/// Y10 Y11 Y12 Y13 ...
-/// Interleaved and 2D sub-sampled plane: Cr0 Cb0 Cr1 Cb1 ...
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcYStride
-/// Stride (in bytes) of input image Y component (i.e., number of bytes between
-/// column 0 of row 1 and column 0 of row 2).
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values).
-///
-/// @param srcCStride
-/// Stride (in bytes) of input image Chroma component (i.e., number of bytes between
-/// column 0 of row 1 and column 0 of row 2)
-/// \n\b WARNING: should be multiple of 4 (4 * 1-byte values).
-///
-/// @param dst
-/// 32-bit image of output RGB 8888 values. R in LSB.
-/// \n\b WARNING: size must match input yuv420.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output RGB image (i.e., number of bytes between column 0 of
-/// row 1 and column 0 of row 2)
-/// \n\b WARNING: should be multiple of 32 (8 * 4-byte values).
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYCrCb420PseudoPlanarToRGB8888u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcYStride,
- unsigned int srcCStride,
- uint32_t* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YUV (YCbCr) 4:2:0 PesudoPlanar (Interleaved CbCr) to RGB 565.
-///
-/// \n\b ATTENTION: The name of this function will be changed when the 2.0.0 release
-/// of this library is made.
-/// Until 2.0.0, the developer should use this implementation with the expectation of
-/// moving to a different name when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// 8-bit image of input YUV 4:2:0 values.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// The input are one Y plane followed by one interleaved and 2D (both
-/// horizontally and vertically) sub-sampled CbCr plane:
-/// Y plane : Y00 Y01 Y02 Y03 ...
-/// Y10 Y11 Y12 Y13 ...
-/// Interleaved and 2D sub-sampled plane: Cb0 Cr0 Cb1 Cr1 ...
-///
-/// @param dst
-/// 16-bit image of output RGB 565 values. R in LSBs.
-/// 2 pixels are packed into one 32-bit output
-/// \n\b WARNING: size must match input yuv420.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 4
-///
-/// @param srcHeight
-/// Image height.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYUV420toRGB565u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint32_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YCbCr H1V1 to RGB 888.
-///
-/// @details
-/// Color conversion from YCbCr H1V1 (YCbCr 4:4:4 planar) to RGB 888.
-/// \n R = Y + 1.40200*(Cr-128)
-/// \n G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)
-/// \n B = Y + 1.77200*(CB-128)
-///
-/// @param src
-/// 8-bit image of input values. Stored as YCbCr H1V1 planar format in 8x8 blocks for Y,Cb,Cr.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// 8-bit image of output RGB 888 values. R in LSB.
-/// \n\b WARNING: size must match input crcb.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYCrCbH1V1toRGB888u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YCbCr H2V2 to RGB 888.
-///
-/// @details
-/// Color conversion from YCbCr H2V2 (YCbCr 4:2:0 planar) to RGB 888.
-/// \n R = Y + 1.40200*(Cr-128)
-/// \n G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)
-/// \n B = Y + 1.77200*(CB-128)
-///
-/// @param ysrc
-/// 8-bit input values. Stored as YCbCr H2V2 planar format in 16x16 blocks for Y, 8x8 blocks for Cb, Cr.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// 8-bit image of output RGB 888 values. R in LSB.
-/// \n\b WARNING: size must match input crcb.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYCrCbH2V2toRGB888u8( const uint8_t* __restrict ysrc,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YCbCr H2V1 to RGB 888.
-///
-/// @details
-/// Color conversion from YCbCr H2V1 (YCbCr 4:2:2) to RGB 888.
-/// \n R = Y + 1.40200*(Cr-128)
-/// \n G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)
-/// \n B = Y + 1.77200*(CB-128)
-///
-/// @param src
-/// 8-bit input values. Stored as YCbCr H2V1 planar format in 16x8 blocks for Y, 8x8 blocks for Cb, Cr.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// 8-bit image of output RGB 888 values. R in LSB.
-/// \n\b WARNING: size must match input crcb.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYCrCbH2V1toRGB888u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YCbCr H1V2 to RGB 888.
-///
-/// @details
-/// Color conversion from YCbCr H1V2 (YCbCr 4:2:2) to RGB 888.
-/// \n R = Y + 1.40200*(Cr-128)
-/// \n G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)
-/// \n B = Y + 1.77200*(CB-128)
-///
-/// @param ysrc
-/// 8-bit input values. Stored as YCbCr H1V2 planar format in 8x16 blocks for Y, 8x8 blocks for Cb, Cr.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// 8-bit image of output RGB 888 values. R in LSB.
-/// \n\b WARNING: size must match input crcb.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYCrCbH1V2toRGB888u8( const uint8_t* __restrict ysrc,
-
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from RGB 888 to YCrCb.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvColorRGB888toYCrCbu8_v2(). In the 2.0.0 release,
-/// fcvColorRGB888toYCrCbu8_v2 will be renamed to fcvColorRGB888toYCrCbu8
-/// and the signature of fcvColorRGB888toYCrCbu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Color conversion from RGB 888 to YCrCb 4:4:4 interleaved.
-///
-/// @param src
-/// 8-bit input values.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// 8-bit output values. Stored as Y, Cr, Cb interleaved format.
-/// \n\b WARNING: size must match input crcb.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorRGB888toYCrCbu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from RGB 888 to YCrCb 4:4:4 (Full interleaved, similar to
-/// 3-channel RGB).
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvColorRGB888toYCrCbu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvColorRGB888toYCrCbu8,
-/// \a fcvColorRGB888toYCrCbu8_v2 will be removed, and the current signature
-/// for \a fcvColorRGB888toYCrCbu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvColorRGB888toYCrCbu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Color conversion from RGB 888 to YCrCb 4:4:4 interleaved.
-///
-/// @param src
-/// 8-bit input values.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b WARNING: Must be at least 3*srcWidth.
-///
-/// @param dst
-/// 8-bit output values. Stored as Y, Cr, Cb interleaved format.
-/// \n\b WARNING: size must match input crcb.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b WARNING: Must be at least 3*srcWidth.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorRGB888toYCrCbu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Create a 36-dimension gradient based descriptor on 17x17 patch.
-///
-/// @details
-///
-/// @param patch
-/// Input luminance data for 17x17 patch to describe.
-///
-/// @param descriptorChar
-/// Output descriptor vector. 36 x 8-bit vector. Normalized and quantized to range [-127, 127]
-///
-/// @param descriptorNormSq
-/// Output squared norm (L2 norm) of the descriptor vector.
-///
-///
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvDescriptor17x17u8To36s8( const uint8_t* __restrict patch,
- int8_t* __restrict descriptorChar,
- int32_t* __restrict descriptorNormSq );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 8-bit vectors.
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @param abSize
-/// Number of elements in A and B.
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API int32_t
-fcvDotProducts8( const int8_t* __restrict a,
- const int8_t* __restrict b,
- unsigned int abSize );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 8-bit vectors.
-///
-/// @param a
-/// Vector A.
-///
-/// @param b
-/// Vector B.
-///
-/// @param abSize
-/// Number of elements in A and B.
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvDotProductu8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- unsigned int abSize );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 36-byte vectors.
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API int32_t
-fcvDotProduct36x1s8( const int8_t* __restrict a,
- const int8_t* __restrict b );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of one 36-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b,c,d,e):\n
-/// , , ,
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @param c
-/// Vector.
-///
-/// @param d
-/// Vector.
-///
-/// @param e
-/// Vector.
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct36x4s8( const int8_t* __restrict a,
- const int8_t* __restrict b,
- const int8_t* __restrict c,
- const int8_t* __restrict d,
- const int8_t* __restrict e,
- int32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalized dot product of one 36-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):\n
-/// , , ,
-/// using their given inverse lengths for normalization.
-///
-/// @param a
-/// Vector.
-///
-/// @param invLengthA
-/// Inverse of vector A.
-///
-/// @param b0
-/// Vector.
-///
-/// @param b1
-/// Vector.
-///
-/// @param b2
-/// Vector.
-///
-/// @param b3
-/// Vector.
-///
-/// @param invLengthsB
-/// Pointer to an array of the inverse values of each B vector.
-/// The pointer must point to 4 floating point values.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProductNorm36x4s8( const int8_t* __restrict a,
- float invLengthA,
- const int8_t* __restrict b0,
- const int8_t* __restrict b1,
- const int8_t* __restrict b2,
- const int8_t* __restrict b3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 36-byte vectors.
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvDotProduct36x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of one 36-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b,c,d,e):\n
-/// , , ,
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @param c
-/// Vector.
-///
-/// @param d
-/// Vector.
-///
-/// @param e
-/// Vector.
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct36x4u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- const uint8_t* __restrict e,
- uint32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalized dot product of one 36-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):\n
-/// , , ,
-/// using their given inverse lengths for normalization.
-///
-/// @param a
-/// Vector.
-///
-/// @param invLengthA
-/// Inverse of vector A.
-///
-/// @param b0
-/// Vector.
-///
-/// @param b1
-/// Vector.
-///
-/// @param b2
-/// Vector.
-///
-/// @param b3
-/// Vector.
-///
-/// @param invLengthsB
-/// Pointer to an array of the inverse values of each B vector.
-/// The pointer must point to 4 floating point values.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProductNorm36x4u8( const uint8_t* __restrict a,
- float invLengthA,
- const uint8_t* __restrict b0,
- const uint8_t* __restrict b1,
- const uint8_t* __restrict b2,
- const uint8_t* __restrict b3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 64-byte vectors.
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API int32_t
-fcvDotProduct64x1s8( const int8_t* __restrict a,
- const int8_t* __restrict b );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of one 64-byte vector against 4 others.
-///
-/// @details
-/// Dot product of vector (a) against 4 others (b,c,d,e):\n
-/// , , ,
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param c
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param d
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param e
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct64x4s8( const int8_t* __restrict a,
- const int8_t* __restrict b,
- const int8_t* __restrict c,
- const int8_t* __restrict d,
- const int8_t* __restrict e,
- int32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalized dot product of one 64-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):\n
-/// , , ,
-/// using their given inverse lengths for normalization.
-///
-/// @param a
-/// Vector.
-///
-/// @param invLengthA
-/// Inverse of vector A.
-///
-/// @param b0
-/// Vector.
-///
-/// @param b1
-/// Vector.
-///
-/// @param b2
-/// Vector.
-///
-/// @param b3
-/// Vector.
-///
-/// @param invLengthsB
-/// Pointer to an array of the inverse values of each B vector.
-/// The pointer must point to 4 floating point values.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProductNorm64x4s8( const int8_t* __restrict a,
- float invLengthA,
- const int8_t* __restrict b0,
- const int8_t* __restrict b1,
- const int8_t* __restrict b2,
- const int8_t* __restrict b3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 64-byte vectors.
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvDotProduct64x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of one 64-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b,c,d,e):\n
-/// , , ,
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @param c
-/// Vector.
-///
-/// @param d
-/// Vector.
-///
-/// @param e
-/// Vector.
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct64x4u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- const uint8_t* __restrict e,
- uint32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalized dot product of one 64-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):\n
-/// , , ,
-/// using their given inverse lengths for normalization.
-///
-/// @param a
-/// Vector.
-///
-/// @param invLengthA
-/// Inverse of vector A.
-///
-/// @param b0
-/// Vector.
-///
-/// @param b1
-/// Vector.
-///
-/// @param b2
-/// Vector.
-///
-/// @param b3
-/// Vector.
-///
-/// @param invLengthsB
-/// Pointer to an array of the inverse values of each B vector.
-/// The pointer must point to 4 floating point values.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProductNorm64x4u8( const uint8_t* __restrict a,
- float invLengthA,
- const uint8_t* __restrict b0,
- const uint8_t* __restrict b1,
- const uint8_t* __restrict b2,
- const uint8_t* __restrict b3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 128-byte vectors.
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API int32_t
-fcvDotProduct128x1s8( const int8_t* __restrict a,
- const int8_t* __restrict b );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of one 128-byte vector against 4 others.
-///
-/// @details
-/// Dot product of vector (a) against 4 others (b,c,d,e):\n
-/// , , ,
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param c
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param d
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param e
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct128x4s8( const int8_t* __restrict a,
- const int8_t* __restrict b,
- const int8_t* __restrict c,
- const int8_t* __restrict d,
- const int8_t* __restrict e,
- int32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalized dot product of one 128-byte vector against 4 others.
-///
-/// @details
-/// Dot product of vector (a) against 4 others (b0,b1,b2,b3):\n
-/// , , ,
-/// using their given inverse lengths for normalization.
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLengthA
-/// Inverse of vector A.
-///
-/// @param b0
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b1
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b2
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b3
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLengthsB
-/// Pointer to an array of the inverse values of each B vector.
-/// The pointer must point to 4 floating point values.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProductNorm128x4s8( const int8_t* __restrict a,
- float invLengthA,
- const int8_t* __restrict b0,
- const int8_t* __restrict b1,
- const int8_t* __restrict b2,
- const int8_t* __restrict b3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 128-byte vectors.
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvDotProduct128x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of one 128-byte vector against 4 others.
-///
-/// @details
-/// Dot product of vector (a) against 4 others (b,c,d,e):\n
-/// , , ,
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param c
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param d
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param e
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct128x4u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- const uint8_t* __restrict e,
- uint32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalized dot product of one 128-byte vector against 4 others.
-///
-/// @details
-/// Dot product of vector (a) against 4 others (b0,b1,b2,b3):\n
-/// , , ,
-/// using their given inverse lengths for normalization.
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLengthA
-/// Inverse of vector A.
-///
-/// @param b0
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b1
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b2
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b3
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLengthsB
-/// Pointer to an array of the inverse values of each B vector.
-/// The pointer must point to 4 floating point values.
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProductNorm128x4u8( const uint8_t* __restrict a,
- float invLengthA,
- const uint8_t* __restrict b0,
- const uint8_t* __restrict b1,
- const uint8_t* __restrict b2,
- const uint8_t* __restrict b3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of 1 patch (8x8 byte square) with several (n) 8x8 squares
-/// along a line of pixels in an image.
-///
-/// @param patchPixels
-/// Pointer to 8-bit patch pixel values linearly laid out in memory.
-///
-/// @param imagePixels
-/// Pointer to 8-bit image pixel values linearly laid out in memory.
-///
-/// @param imgW
-/// Width in pixels of the source image.
-///
-/// @param imgH
-/// Height in pixels of the source image.
-///
-/// @param nX
-/// X location on image of starting search pixel.
-///
-/// @param nY
-/// Y location on image of starting search pixel.
-///
-/// @param nNum
-/// Number of pixels (in X direction) on image to sweep.
-///
-/// @param dotProducts
-/// Output dot product values of nNum pixels.
-/// \n\b WARNING: array size must be a multiple of 4 (e.g., 4, 8, 12, ...)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct8x8u8( const uint8_t* __restrict patchPixels,
- const uint8_t* __restrict imagePixels,
- unsigned short imgW,
- unsigned short imgH,
- int nX,
- int nY,
- unsigned int nNum,
- int32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of 1 patch (8x8 byte square) with 8x8 squares in 11x12
-/// rectangle around the center search pixel (iX,iY).
-///
-/// @param patchPixels
-/// Pointer to 8-bit patch pixel values linearly laid out in memory.
-///
-/// @param imagePixels
-/// Pointer to 8-bit image pixel values linearly laid out in memory.
-///
-/// @param imgW
-/// Width in pixels of the image.
-///
-/// @param imgH
-/// Height in pixels of the image.
-///
-/// @param iX
-/// X location on image of the center of the search window.
-///
-/// @param iY
-/// Y location on image of the center of the search window.
-///
-/// @param dotProducts
-/// Output 11x12 dot product values.
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct11x12u8( const uint8_t* __restrict patchPixels,
- const uint8_t* __restrict imagePixels,
- unsigned short imgW,
- unsigned short imgH,
- int iX,
- int iY,
- int32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 3x3 Sobel edge filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterSobel3x3u8_v2(). In the 2.0.0 release,
-/// fcvFilterSobel3x3u8_v2 will be renamed to fcvFilterSobel3x3u8
-/// and the signature of fcvFilterSobel3x3u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// This function calculates an image derivative by convolving the image with an appropriate 3x3 kernel.
-/// Border values are ignored. The 3x3 mask convolves with the image area
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit image of |dx|+|dy|. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: dst is saturated to 255
-/// \n\b WARNING: data should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterSobel3x3u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 3x3 Sobel edge filter
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterSobel3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterSobel3x3u8,
-/// \a fcvFilterSobel3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterSobel3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterSobel3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// This function calculates an image derivative by convolving the image with an appropriate 3x3 kernel.
-/// Border values are ignored. The 3x3 mask convolves with the image area
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image of |dx|+|dy|. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: dst is saturated to 255
-/// \n\b WARNING: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterSobel3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Canny edge filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCanny3x3u8_v2(). In the 2.0.0 release,
-/// fcvFilterCanny3x3u8_v2 will be renamed to fcvFilterCanny3x3u8
-/// and the signature of fcvFilterCanny3x3u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Canny edge detector applied to a 8 bit grayscale image. The min threshold
-/// is set to 0 and the max threshold is set to 15. The aperture size used
-/// is set to 3. This function will output the edge, since its working with a
-/// 3x3 window, it leaves one row/col of pixels at the corners
-/// map stored as a binarized image (0x0 - not an edge, 0xFF - edge).
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit image containing the edge detection results.
-/// Size of buffer is srcWidth*srcHeight bytes.
-///
-/// @param lowThresh
-/// For all the intermediate pixels along the edge, the magnitude of the
-/// gradient at the pixel locations should be greater than 'low'
-/// (sqrt(gx^2 + gy^2) > low, where gx and gy are X and Y gradient)
-///
-/// @param highThresh
-/// For an edge starting point, i.e. either the first or last
-/// pixel of the edge, the magnitude of the gradient at the pixel should be
-/// greater than 'high' (sqrt(gx^2 + gy^2) > high, where gx and gy are X and
-/// Y gradient).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCanny3x3u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- int lowThresh,
- int highThresh );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Canny edge filter
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterCanny3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCanny3x3u8,
-/// \a fcvFilterCanny3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterCanny3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCanny3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Canny edge detector applied to a 8 bit grayscale image. The Canny edge
-/// detector uses min/max threshold to classify an edge. The min threshold
-/// is set to 0 and the max threshold is set to 15. The aperture size used
-/// in the Canny edge detector will be same as the filter footprint in the
-/// Sobel edge detector and is set to 3. This function will output the edge
-/// map stored as a binarized image (0x0 - not an edge, 0xFF - edge), since
-/// it works with 3x3 windows, it leaves 1 row/col of pixels at the corners.
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image containing the edge detection results.
-/// Size of buffer is dstStride*srcHeight bytes.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param lowThresh
-/// For all the intermediate pixels along the edge, the magnitude of the
-/// gradient at the pixel locations should be greater than 'low'
-/// (sqrt(gx^2 + gy^2) > low, where gx and gy are X and Y gradient)
-///
-/// @param highThresh
-/// For an edge starting point, i.e. either the first or last
-/// pixel of the edge, the magnitude of the gradient at the pixel should be
-/// greater than 'high' (sqrt(gx^2 + gy^2) > high, where gx and gy are X and
-/// Y gradient).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCanny3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int lowThresh,
- int highThresh );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Canny edge filter
-///
-/// \n\b ATTENTION: This function is in the extension lib.
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterCanny3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCanny3x3u8,
-/// \a fcvFilterCanny3x3u8_v3 will be removed, and the current signature
-/// for \a fcvFilterCanny3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCanny3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Canny edge detector applied to a 8 bit grayscale image. The Canny edge
-/// detector uses min/max threshold to classify an edge. The min threshold
-/// is set to 0 and the max threshold is set to 15. The aperture size used
-/// in the Canny edge detector will be same as the filter footprint in the
-/// Sobel edge detector and is set to 3. This function will output the edge
-/// map stored as a binarized image (0x0 - not an edge, 0xFF - edge), since
-/// it works with 3x3 windows, it leaves 1 row/col of pixels at the corners.
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image containing the edge detection results.
-/// Size of buffer is dstStride*srcHeight bytes.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param gx
-/// gradient in X direction.
-/// \n\b NOTE: use NULL if do not need the gradient output.
-///
-/// @param gy
-/// gradient in Y direction.
-/// \n\b NOTE: use NULL if do not need the gradient output.
-///
-/// @param gradStride
-/// Output stride for gx and gy.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth*2.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param lowThresh
-/// For all the intermediate pixels along the edge, the magnitude of the
-/// gradient at the pixel locations should be greater than 'low'
-/// (sqrt(gx^2 + gy^2) > low, where gx and gy are X and Y gradient)
-///
-/// @param highThresh
-/// For an edge starting point, i.e. either the first or last
-/// pixel of the edge, the magnitude of the gradient at the pixel should be
-/// greater than 'high' (sqrt(gx^2 + gy^2) > high, where gx and gy are X and
-/// Y gradient).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFilterCanny3x3u8_v3( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int16_t* __restrict gx,
- int16_t* __restrict gy,
- unsigned int gradStride,
- int lowThresh,
- int highThresh );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs image difference by subracting src2 from src1. dst=src1-src2.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageDiffu8_v2(). In the 2.0.0 release,
-/// fcvImageDiffu8_v2 will be renamed to fcvImageDiffu8
-/// and the signature of fcvImageDiffu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// dst[i,j] = (uint8_t) max( min((short)(src1[i,j]-src2[i,j]), 255), 0 );
-///
-/// @param src1
-/// First source image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param src2
-/// Second source image, must be same size as src1.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Destination. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: Must be same size as src1 and src2.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageDiffu8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs image difference by subracting src2 from src1. dst=src1-src2.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvImageDiffu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageDiffu8,
-/// \a fcvImageDiffu8_v2 will be removed, and the current signature
-/// for \a fcvImageDiffu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageDiffu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// dst[i,j] = (uint8_t) max( min((short)(src1[i,j]-src2[i,j]), 255), 0 );
-///
-/// @param src1
-/// First source image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param src2
-/// Second source image, must be same size as src1.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Destination. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: Must be same size as src1 and src2.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageDiffu8_v2( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-
-//--------------------------------------------------------------------------
-/// @brief
-/// Compute image difference src1-src2
-///
-/// @param src1
-/// Input image1 of int16 type. Size of buffer is srcStride*srcHeight*2 bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param src2
-/// Input image2, must have same size as src1
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Input image height
-///
-/// @param srcStride
-/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output image, saturated for int16 type. Size of buffer is dstStride*srcHeight*2 bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @ingroup image_processing
-////------------------------------------------------------------------------
-FASTCV_API void
-fcvImageDiffs16( const int16_t* __restrict src1,
- const int16_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dst,
- unsigned int dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs image difference by subracting src2 from src1. dst=src1-src2.
-///
-/// @details
-///
-/// @param src1
-/// First source image. Size of buffer is srcStride*srcHeight*4 bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param src2
-/// Second source image, must be same size as src1.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Destination. Size of buffer is dstStride*srcHeight*4 bytes.
-/// \n\b NOTE: Must be same size as src1 and src2.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageDifff32( const float* __restrict src1,
- const float* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs image difference by promoting both src1 and src 2 to
-/// floating point values and then subracting src2 from src1. dst=src1-src2.
-///
-/// @details
-///
-/// @param src1
-/// First source image
-///
-/// @param src2
-/// Second source image, must be same size as src1.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param dst
-/// Destination image in float type
-/// \n\b NOTE: Must be same size as src1 and src2.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageDiffu8f32( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs image difference by subracting src2 from src1.
-/// dst = ( src1 >> 1) - ( src2 >> 1).
-///
-/// @details
-///
-/// @param src1
-/// First source image
-///
-/// @param src2
-/// Second source image, must be same size as src1.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param dst
-/// Destination image in int8 type
-/// \n\b NOTE: Must be same size as src1 and src2.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageDiffu8s8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int8_t* __restrict dst,
- unsigned int dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientInterleaveds16_v2(). In the 2.0.0 release,
-/// fcvImageGradientInterleaveds16_v2 will be renamed to fcvImageGradientInterleaveds16
-/// and the signature of fcvImageGradientInterleaveds16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param gradients
-/// Buffer to store gradient. Must be 2*(width-1)*(height-1) in size.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientInterleaveds16( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients
- );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvImageGradientInterleaveds16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientInterleaveds16,
-/// \a fcvImageGradientInterleaveds16_v2 will be removed, and the current signature
-/// for \a fcvImageGradientInterleaveds16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientInterleaveds16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param gradients
-/// Buffer to store gradient. Must be 2*(width-1)*(height-1) in size.
-///
-/// @param gradStride
-/// Stride in bytes of the interleaved gradients array.
-/// \n\b NOTE: if 0, srcStride is set as 4*(srcWidth-2).
-/// \n\b WARNING: should be multiple of 16 ( 8 * 2-byte values ), and at least as much as 4*(srcWidth-2) if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientInterleaveds16_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients,
- unsigned int gradStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Function to initialize MSER. To invoke MSER functionality, 3 functions have to be called:
-/// fcvMserInit, fcvMseru8, fcvMserRelease.
-/// Image width has to be greater than 50, and image height has to be greater than 5.
-/// Pixels at the image boundary are not processed. If boundary pixels are important
-/// for a particular application, please consider padding the input image with dummy
-/// pixels of one pixel wide.
-/// Here is the typical usage:
-/// void *mserHandle;
-/// if (fcvMserInit (width,........,&mserHandle))
-/// {
-/// fcvMseru8 (mserHandle,...);
-/// fcvMserRelease(mserHandle);
-/// }
-///
-/// @param width
-/// Width of the image for which MSER has to be done.
-///
-/// @param height
-/// Height of the image for which MSER has to be done.
-///
-/// @param delta
-/// Delta to be used in MSER algorithm (the difference in grayscale values
-/// within which the region is stable ).
-/// Typical value range [0.8 8], typical value 2
-///
-/// @param minArea
-/// Minimum area (number of pixels) of a mser contour.
-/// Typical value range [10 50], typical value 30
-///
-/// @param maxArea
-/// Maximum area (number of pixels) of a mser contour.
-/// Typical value 14400 or 0.25*width*height
-///
-/// @param maxVariation
-/// Maximum variation in grayscale between 2 levels allowed.
-/// Typical value range [0.1 1.0], typical value 0.15
-///
-/// @param minDiversity
-/// Minimum diversity in grayscale between 2 levels allowed.
-/// Typical value range [0.1 1.0], typical value 0.2
-///
-/// @param mserHandle
-/// Output. the mserHandle to be used in subsequent calls.
-///
-/// @return
-/// 1 if successful.
-/// 0 if unsuccessful, mserHandle is invalid.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API int
-fcvMserInit(const unsigned int width,
- const unsigned int height,
- unsigned int delta,
- unsigned int minArea,
- unsigned int maxArea,
- float maxVariation,
- float minDiversity,
- void ** mserHandle );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Function to release MSER resources.
-///
-/// @param mserHandle
-/// Handle to be used to free up MSER resources.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvMserRelease(void *mserHandle);
-
-///---------------------------------------------------------------------------
-/// @brief
-/// Function to invoke MSER.
-/// Image width has to be greater than 50, and image height has to be greater than 5.
-/// Pixels at the image boundary are not processed. If boundary pixels are important
-/// for a particular application, please consider padding the input image with dummy
-/// pixels of one pixel wide.
-/// Here is the typical usage:
-/// void *mserHandle;
-/// if (fcvMserInit (width,........,&mserHandle))
-/// {
-/// fcvMseru8 (mserHandle,...);
-/// fcvMserRelease(mserHandle);
-/// }
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMseru8_v2(). In the 2.0.0 release,
-/// fcvMseru8_v2 will be renamed to fcvMseru8.
-/// and the signature of fcvMseru8 as it appears now, will be removed.
-/// \n\n
-///
-/// @param mserHandle
-/// The MSER Handle returned by init.
-///
-/// @param srcPtr
-/// Pointer to an image array (unsigned char ) for which MSER has to be done.
-///
-/// @param srcWidth
-/// Width of the source image.
-/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserInit.
-///
-/// @param srcHeight
-/// Height of the source image.
-/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserInit.
-///
-/// @param srcStride
-/// Stride of the source image.
-///
-/// @param maxContours
-/// Maximum contours that will be returned.
-///
-/// @param numContours
-/// Output, Number of MSER contours in the region.
-///
-/// @param numPointsInContour
-/// Output, Number of points in each contour. This will have values filled up for the
-/// first (*numContours) values. This memory has to be allocated by the caller.
-///
-/// @param pointsArraySize
-/// Size of the output points Array.
-/// Typical size: (# of pixels in source image) * 30
-///
-/// @param pointsArray
-/// Output. This is the points in all the contours. This is a linear array, whose memory
-/// has to be allocated by the caller.
-/// Typical allocation size: pointArraySize.
-/// pointsArray[0...numPointsInContour[0]-1] defines the first MSER region,
-/// pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region
-/// and so on.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvMseru8( void *mserHandle,
- const uint8_t* __restrict srcPtr,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- unsigned int maxContours,
- unsigned int * __restrict numContours,
- unsigned int * __restrict numPointsInContour,
- unsigned int pointsArraySize,
- unsigned int * __restrict pointsArray);
-
-///---------------------------------------------------------------------------
-/// @brief
-/// Function to invoke MSER, with additional outputs for each contour.
-/// Image width has to be greater than 50, and image height has to be greater than 5.
-/// Pixels at the image boundary are not processed. If boundary pixels are important
-/// for a particular application, please consider padding the input image with dummy
-/// pixels of one pixel wide.
-/// Here is the typical usage:
-/// void *mserHandle;
-/// if (fcvMserInit (width,........,&mserHandle))
-/// {
-/// fcvMserExtu8 (mserHandle,...);
-/// fcvMserRelease(mserHandle);
-/// }
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMserExtu8_v2(). In the 2.0.0 release,
-/// fcvMserExtu8_v2 will be renamed to fcvMserExtu8.
-/// and the signature of fcvMserExtu8 as it appears now, will be removed.
-/// \n\n
-///
-/// @param mserHandle
-/// The MSER Handle returned by init.
-///
-/// @param srcPtr
-/// Pointer to an image array (unsigned char ) for which MSER has to be done.
-///
-/// @param srcWidth
-/// Width of the source image.
-/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserInit.
-///
-/// @param srcHeight
-/// Height of the source image.
-/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserInit.
-///
-/// @param srcStride
-/// Stride of the source image.
-///
-/// @param maxContours
-/// Maximum contours that will be returned.
-/// Application dependent. OCR usually requires 100-1000 contours.
-/// Segmentation usually requires 50-100
-///
-/// @param numContours
-/// Output, Number of MSER contours in the region.
-///
-/// @param numPointsInContour
-/// Output, Number of points in each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller.
-///
-/// @param pointsArraySize
-/// Size of the output points Array.
-/// Typical size: (# of pixels in source image)*30
-///
-/// @param pointsArray
-/// Output. This is the points in all the contours. This is a linear array, whose memory
-/// has to be allocated by the caller.
-/// Typical allocation size: pointArraySize.
-/// pointsArray[0...numPointsInContour[0]-1] defines the first MSER region;
-/// pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region
-/// and so on.
-///
-/// @param contourVariation
-/// Output, Variation for each contour from previous grey level.
-/// This will have values filled up for the first (*numContours) values.
-/// This memory has to be allocated by the caller with size of maxContours.
-///
-/// @param contourPolarity
-/// Output, Polarity for each contour. This value is 1 if this is a MSER+ region,
-/// -1 if this is a MSER- region. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours.
-///
-/// @param contourNodeId
-/// Output, Node id for each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours
-///
-/// @param contourNodeCounter
-/// Output, Node counter for each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvMserExtu8( void *mserHandle,
- const uint8_t* __restrict srcPtr,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- unsigned int maxContours,
- unsigned int * __restrict numContours,
- unsigned int * __restrict numPointsInContour,
- unsigned int * __restrict pointsArray,
- unsigned int pointsArraySize,
- unsigned int * __restrict contourVariation,
- int * __restrict contourPolarity,
- unsigned int * __restrict contourNodeId,
- unsigned int * __restrict contourNodeCounter);
-
-///---------------------------------------------------------------------------
-/// @brief
-/// Function to invoke MSER with a smaller memory footprint and the (optional) output of contour bound boxes.
-/// Image width has to be greater than 50, and image height has to be greater than 5.
-/// Pixels at the image boundary are not processed. If boundary pixels are important
-/// for a particular application, please consider padding the input image with dummy
-/// pixels of one pixel wide.
-/// Here is the typical usage:
-/// void *mserHandle;
-/// if (fcvMserInit (width,........,&mserHandle))
-/// {
-/// if ( !fcvMseru8_v2 (mserHandle,...) )
-/// {
-/// // Error handle
-/// }
-/// fcvMserRelease(mserHandle);
-/// }
-///
-/// @param mserHandle
-/// The MSER Handle returned by init.
-///
-/// @param srcPtr
-/// Pointer to an image array (unsigned char ) for which MSER has to be done.
-///
-/// @param srcWidth
-/// Width of the source image.
-/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserInit.
-///
-/// @param srcHeight
-/// Height of the source image.
-/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserInit.
-///
-/// @param srcStride
-/// Stride of the source image.
-///
-/// @param maxContours
-/// Maximum contours that will be returned.
-///
-/// @param numContours
-/// Output, Number of MSER contours in the region.
-///
-/// @param recArray
-/// Output, This is the bounding rectangle info for each contour.
-/// If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours.
-/// Typical allocation size: 4*maxContours.
-/// rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour,
-/// rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
-///
-/// @param numPointsInContour
-/// Output, Number of points in each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller.
-///
-/// @param pointsArraySize
-/// Size of the output points Array.
-/// Typical size: (# of pixels in source image) * 30
-///
-/// @param pointsArray
-/// Output. This is the points in all the contours. This is a linear array, whose memory
-/// has to be allocated by the caller.
-/// Typical allocation size: pointArraySize.
-/// pointsArray[0...numPointsInContour[0]-1] defines the first MSER region,
-/// pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region
-/// and so on.
-///
-/// @return
-/// 1 if successful.
-/// 0 if failure, e.g., to indicate detected contours are greater than maxContours.
-/// In that case, please consider increasing maxContours.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API int
-fcvMseru8_v2( void *mserHandle,
- const uint8_t* __restrict srcPtr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxContours,
- uint32_t* __restrict numContours,
- uint16_t* __restrict recArray,
- uint32_t* __restrict numPointsInContour,
- uint32_t pointsArraySize,
- uint16_t* __restrict pointsArray);
-
-///---------------------------------------------------------------------------
-/// @brief
-/// Function to invoke MSER with a smaller memory footprint,
-/// the (optional) output of contour bound boxes, and additional information.
-/// Image width has to be greater than 50, and image height has to be greater than 5.
-/// Pixels at the image boundary are not processed. If boundary pixels are important
-/// for a particular application, please consider padding the input image with dummy
-/// pixels of one pixel wide.
-/// Here is the typical usage:
-/// void *mserHandle;
-/// if (fcvMserInit (width,........,&mserHandle))
-/// {
-/// if ( !fcvMserExtu8_v2 (mserHandle,...) )
-/// {
-/// // Error handle
-/// }
-/// fcvMserRelease(mserHandle);
-/// }
-///
-/// @param mserHandle
-/// The MSER Handle returned by init.
-///
-/// @param srcPtr
-/// Pointer to an image array (unsigned char ) for which MSER has to be done.
-///
-/// @param srcWidth
-/// Width of the source image.
-/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserInit.
-///
-/// @param srcHeight
-/// Height of the source image.
-/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserInit.
-///
-/// @param srcStride
-/// Stride of the source image.
-///
-/// @param maxContours
-/// Maximum contours that will be returned.
-///
-/// @param numContours
-/// Output, Number of MSER contours in the region.
-///
-/// @param recArray
-/// Output, This is the bounding rectangle info for each contour.
-/// If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours.
-/// Typical allocation size: 4*maxContours.
-/// rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour,
-/// rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
-///
-/// @param numPointsInContour
-/// Output, Number of points in each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller.
-///
-/// @param pointsArraySize
-/// Size of the output points Array.
-/// Typical size: (# of pixels in source image) * 30
-///
-/// @param pointsArray
-/// Output. This is the points in all the contours. This is a linear array, whose memory
-/// has to be allocated by the caller.
-/// Typical allocation size: pointArraySize.
-/// pointsArray[0...numPointsInContour[0]-1] defines the first MSER region,
-/// pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region
-/// and so on.
-///
-/// @param contourVariation
-/// Output, Variation for each contour from previous grey level.
-/// This will have values filled up for the first (*numContours) values.
-/// This memory has to be allocated by the caller with size of maxContours.
-///
-/// @param contourPolarity
-/// Output, Polarity for each contour. This value is 1 if this is a MSER+ region,
-/// -1 if this is a MSER- region. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours.
-///
-/// @param contourNodeId
-/// Output, Node id for each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours
-///
-/// @param contourNodeCounter
-/// Output, Node counter for each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours.
-///
-/// @return
-/// 1 if successful.
-/// 0 if failure, e.g., to indicate detected contours are greater than maxContours.
-/// In that case, please consider increasing maxContours.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API int
-fcvMserExtu8_v2( void *mserHandle,
- const uint8_t* __restrict srcPtr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxContours,
- uint32_t* __restrict numContours,
- uint16_t* __restrict recArray,
- uint32_t* __restrict numPointsInContour,
- uint32_t pointsArraySize,
- uint16_t* __restrict pointsArray,
- uint32_t* __restrict contourVariation,
- int8_t* __restrict contourPolarity,
- uint32_t* __restrict contourNodeId,
- uint32_t* __restrict contourNodeCounter);
-
-///---------------------------------------------------------------------------
-/// @brief
-/// Function to invoke MSER with a smaller memory footprint,
-/// the (optional) output of contour bound boxes, and additional information.
-/// Image width has to be greater than 50, and image height has to be greater than 5.
-/// Pixels at the image boundary are not processed. If boundary pixels are important
-/// for a particular application, please consider padding the input image with dummy
-/// pixels of one pixel wide.
-/// Here is the typical usage:
-/// void *mserHandle;
-/// if (fcvMserInit (width,........,&mserHandle))
-/// {
-/// if ( !fcvMserExtu8_v3 (mserHandle,...) )
-/// {
-/// // Error handle
-/// }
-/// fcvMserRelease(mserHandle);
-/// }
-///
-/// @param mserHandle
-/// The MSER Handle returned by init.
-///
-/// @param srcPtr
-/// Pointer to an image array (unsigned char ) for which MSER has to be done.
-///
-/// @param srcWidth
-/// Width of the source image.
-/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserInit.
-///
-/// @param srcHeight
-/// Height of the source image.
-/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserInit.
-///
-/// @param srcStride
-/// Stride of the source image.
-///
-/// @param maxContours
-/// Maximum contours that will be returned.
-///
-/// @param numContours
-/// Output, Number of MSER contours in the region.
-///
-/// @param recArray
-/// Output, This is the bounding rectangle info for each contour.
-/// If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours.
-/// Typical allocation size: 4*maxContours.
-/// rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour,
-/// rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
-///
-/// @param staPointsInPath
-/// Output. Return the index of contour starting points in pathArray.
-/// This memory has to be allocated by the caller. The allocated size should be maxContours*sizeof(uint32_t).
-///
-/// @param numPointsInContour
-/// Output, Number of points in each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller.
-///
-/// @param pathArraySize
-/// Input. The size of output pathArray in terms of how many uint16_t numbers. Must be srcWidth*srcHeight*4.
-/// Note: this parameter is not measured in terms of bytes.
-///
-/// @param pathArray
-/// Output. This is the compressed representation of points in all the contours. This is a linear array, whose memory
-/// has to be allocated by the caller.
-/// Typical allocation size: pathArraySize*sizeof(uint16_t).
-/// For example:
-/// pathArray[ staPointsInPath[0] ] : x coord of the FIRST point in the FIRST mser region.
-/// pathArray[ staPointsInPath[0] + 1 ] : y coord of the FIRST point in the FIRST mser region.
-/// pathArray[ staPointsInPath[0] + 2 ] : x coord of the SECOND point in the FIRST mser region.
-/// pathArray[ staPointsInPath[0] + 3 ] : y coord of the SECOND point in the FIRST mser region.
-/// . . .
-/// pathArray[ staPointsInPath[0] + 2*numPointsInContour[0] - 2 ] : x coord of the LAST point in the FIRST mser region.
-/// pathArray[ staPointsInPath[0] + 2*numPointsInContour[0] - 1 ] : y coord of the LAST point in the FIRST mser region.
-/// and
-/// pathArray[ staPointsInPath[1] ] : x coord of the FIRST point in the SECOND mser region.
-/// pathArray[ staPointsInPath[1] + 1 ] : y coord of the FIRST point in the SECOND mser region.
-/// pathArray[ staPointsInPath[1] + 2 ] : x coord of the SECOND point in the SECOND mser region.
-/// pathArray[ staPointsInPath[1] + 3 ] : y coord of the SECOND point in the SECOND mser region.
-/// . . .
-/// pathArray[ staPointsInPath[1] + 2*numPointsInContour[1] - 2 ] : x coord of the LAST point in the SECOND mser region.
-/// pathArray[ staPointsInPath[1] + 2*numPointsInContour[1] - 1 ] : y coord of the LAST point in the SECOND mser region.
-/// . . .
-///
-/// @param contourVariation
-/// Output, Variation for each contour from previous grey level.
-/// This will have values filled up for the first (*numContours) values.
-/// This memory has to be allocated by the caller with size of maxContours.
-///
-/// @param contourPolarity
-/// Output, Polarity for each contour. This value is 1 if this is a MSER+ region,
-/// -1 if this is a MSER- region. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours.
-///
-/// @param contourNodeId
-/// Output, Node id for each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours
-///
-/// @param contourNodeCounter
-/// Output, Node counter for each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours.
-///
-/// @return
-/// 1 if successful.
-/// 0 if failure, e.g., to indicate detected contours are greater than maxContours.
-/// In that case, please consider increasing maxContours.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API int
-fcvMserExtu8_v3( void *mserHandle,
- const uint8_t* __restrict srcPtr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxContours,
- uint32_t* __restrict numContours,
- uint16_t* __restrict recArray,
- uint32_t* __restrict staPointsInPath,
- uint32_t* __restrict numPointsInContour,
- uint32_t pathArraySize,
- uint16_t* __restrict pathArray,
- uint32_t* __restrict contourVariation,
- int8_t* __restrict contourPolarity,
- uint32_t* __restrict contourNodeId,
- uint32_t* __restrict contourNodeCounter);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Function to initialize 8-neighbor MSER. To invoke 8-neighbor MSER functionality, 3 functions have to be called:
-/// fcvMserNN8Init, fcvMserNN8u8, fcvMserRelease.
-/// Image width has to be greater than 50, and image height has to be greater than 5.
-/// Pixels at the image boundary are not processed. If boundary pixels are important
-/// for a particular application, please consider padding the input image with dummy
-/// pixels of one pixel wide.
-/// Here is the typical usage:
-/// void *mserHandle;
-/// if (fcvMserNN8Init (width,........,&mserHandle))
-/// {
-/// if ( !fcvMserNN8u8 (mserHandle,...) )
-/// {
-/// // Error handle
-/// }
-/// fcvMserRelease(mserHandle);
-/// }
-///
-/// @param width
-/// Width of the image for which MSER has to be done.
-///
-/// @param height
-/// Height of the image for which MSER has to be done.
-///
-/// @param delta
-/// Delta to be used in MSER algorithm (the difference in grayscale values
-/// within which the region is stable ).
-/// Typical value range [0.8 8], typical value 2
-///
-/// @param minArea
-/// Minimum area (number of pixels) of a mser contour.
-/// Typical value range [10 50], typical value 30
-///
-/// @param maxArea
-/// Maximum area (number of pixels) of a mser contour.
-/// Typical value 14400 or 0.25*width*height
-///
-/// @param maxVariation
-/// Maximum variation in grayscale between 2 levels allowed.
-/// Typical value range [0.1 1.0], typical value 0.15
-///
-/// @param minDiversity
-/// Minimum diversity in grayscale between 2 levels allowed.
-/// Typical value range [0.1 1.0], typical value 0.2
-///
-/// @param mserHandle
-/// Output. the mserHandle to be used in subsequent calls.
-///
-/// @return
-/// 1 if successful.
-/// 0 if unsuccessful, mserHandle is invalid.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API int
-fcvMserNN8Init(const uint32_t width,
- const uint32_t height,
- uint32_t delta,
- uint32_t minArea ,
- uint32_t maxArea ,
- float32_t maxVariation ,
- float32_t minDiversity ,
- void **mserHandle );
-
-///---------------------------------------------------------------------------
-/// @brief
-/// Function to invoke 8-neighbor MSER.
-/// Image width has to be greater than 50, and image height has to be greater than 5.
-/// Pixels at the image boundary are not processed. If boundary pixels are important
-/// for a particular application, please consider padding the input image with dummy
-/// pixels of one pixel wide.
-/// Here is the typical usage:
-/// void *mserHandle;
-/// if (fcvMserNN8Init (width,........,&mserHandle))
-/// {
-/// if ( !fcvMserNN8u8 (mserHandle,...) )
-/// {
-/// // Error handle
-/// }
-/// fcvMserRelease(mserHandle);
-/// }
-///
-/// @param mserHandle
-/// The MSER Handle returned by init.
-///
-/// @param srcPtr
-/// Pointer to an image array (unsigned char ) for which MSER has to be done.
-///
-/// @param srcWidth
-/// Width of the source image.
-/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserNN8Init.
-///
-/// @param srcHeight
-/// Height of the source image.
-/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserNN8Init.
-///
-/// @param srcStride
-/// Stride of the source image.
-///
-/// @param maxContours
-/// Maximum contours that will be returned.
-///
-/// @param numContours
-/// Output, Number of MSER contours in the region.
-///
-/// @param recArray
-/// Output, This is the bounding rectangle info for each contour.
-/// If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours.
-/// Typical allocation size: 4*maxContours.
-/// rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour,
-/// rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
-///
-/// @param numPointsInContour
-/// Output, Number of points in each contour. This will have values filled up for the
-/// first (*numContours) values. This memory has to be allocated by the caller.
-///
-/// @param pointsArraySize
-/// Size of the output points Array.
-/// Typical size: (# of pixels in source image) * 30
-///
-/// @param pointsArray
-/// Output. This is the points in all the contours. This is a linear array, whose memory
-/// has to be allocated by the caller.
-/// Typical allocation size: pointArraySize.
-/// pointsArray[0...numPointsInContour[0]-1] defines the first MSER region,
-/// pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region
-/// and so on.
-///
-/// @return
-/// 1 if successful.
-/// 0 if failure, e.g., to indicate detected contours are greater than maxContours.
-/// In that case, please consider increasing maxContours.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API int
-fcvMserNN8u8 ( void *mserHandle,
- const uint8_t* __restrict srcPtr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxContours,
- uint32_t* __restrict numContours,
- uint16_t* __restrict recArray,
- uint32_t* __restrict numPointsInContour,
- uint32_t pointsArraySize,
- uint16_t* __restrict pointsArray);
-
-///---------------------------------------------------------------------------
-/// @brief
-/// Function to invoke 8-neighbor MSER, , with additional outputs for each contour.
-/// Image width has to be greater than 50, and image height has to be greater than 5.
-/// Pixels at the image boundary are not processed. If boundary pixels are important
-/// for a particular application, please consider padding the input image with dummy
-/// pixels of one pixel wide.
-/// Here is the typical usage:
-/// void *mserHandle;
-/// if (fcvMserNN8Init (width,........,&mserHandle))
-/// {
-/// if ( !fcvMserExtNN8u8 (mserHandle,...) )
-/// {
-/// // Error handle
-/// }
-/// fcvMserRelease(mserHandle);
-/// }
-///
-/// @param mserHandle
-/// The MSER Handle returned by init.
-///
-/// @param srcPtr
-/// Pointer to an image array (unsigned char ) for which MSER has to be done.
-///
-/// @param srcWidth
-/// Width of the source image.
-/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserNN8Init.
-///
-/// @param srcHeight
-/// Height of the source image.
-/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserNN8Init.
-///
-/// @param srcStride
-/// Stride of the source image.
-///
-/// @param maxContours
-/// Maximum contours that will be returned.
-///
-/// @param numContours
-/// Output, Number of MSER contours in the region.
-///
-/// @param recArray
-/// Output, This is the bounding rectangle info for each contour.
-/// If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours.
-/// Typical allocation size: 4*maxContours.
-/// rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour,
-/// rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
-///
-/// @return
-/// 1 if successful.
-/// 0 if failure, e.g., to indicate detected contours are greater than maxContours.
-/// In that case, please consider increasing maxContours.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API int
-fcvMserExtNN8u8(void *mserHandle,
- const uint8_t* __restrict srcPtr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxContours,
- uint32_t* __restrict numContours,
- uint16_t* __restrict recArray,
- uint32_t* __restrict numPointsInContour,
- uint32_t pointsArraySize,
- uint16_t* __restrict pointsArray,
- uint32_t* __restrict contourVariation,
- int8_t* __restrict contourPolarity,
- uint32_t* __restrict contourNodeId,
- uint32_t* __restrict contourNodeCounter);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientInterleavedf32_v2(). In the 2.0.0 release,
-/// fcvImageGradientInterleavedf32_v2 will be renamed to fcvImageGradientInterleavedf32
-/// and the signature of fcvImageGradientInterleavedf32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param gradients
-/// Buffer to store gradient. Must be 2*(width-1)*(height-1) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientInterleavedf32( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvImageGradientInterleavedf32() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientInterleavedf32,
-/// \a fcvImageGradientInterleavedf32_v2 will be removed, and the current signature
-/// for \a fcvImageGradientInterleavedf32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientInterleavedf32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param gradients
-/// Buffer to store gradient. Must be 2*(width-1)*(height-1) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param gradStride
-/// Stride (in bytes) of the interleaved gradients array.
-/// \n\b NOTE: if 0, srcStride is set as (srcWidth-2)*2*sizeof(float).
-/// \n\b WARNING: should be multiple of 32 ( 8 * 4-byte values ), and at least as much as 8 * srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientInterleavedf32_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients,
- unsigned int gradStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientPlanars16_v2(). In the 2.0.0 release,
-/// fcvImageGradientPlanars16_v2 will be renamed to fcvImageGradientPlanars16
-/// and the signature of fcvImageGradientPlanars16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (srcWidth)*(srcHeight) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (srcWidth)*(srcHeight) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientPlanars16( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvImageGradientPlanars16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientPlanars16,
-/// \a fcvImageGradientPlanars16_v2 will be removed, and the current signature
-/// for \a fcvImageGradientPlanars16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientPlanars16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (srcWidth)*(srcHeight) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (srcWidth)*(srcHeight) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' arrays.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 16 (8 * 2-bytes per gradient value), and at least as much as srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientPlanars16_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- unsigned int dxyStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientPlanarf32_v2(). In the 2.0.0 release,
-/// fcvImageGradientPlanarf32_v2 will be renamed to fcvImageGradientPlanarf32
-/// and the signature of fcvImageGradientPlanarf32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientPlanarf32( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dx,
- float* __restrict dy );
-
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvImageGradientPlanarf32() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientPlanarf32,
-/// \a fcvImageGradientPlanarf32_v2 will be removed, and the current signature
-/// for \a fcvImageGradientPlanarf32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientPlanarf32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (srcWidth)*(srcHeight) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (srcWidth)*(srcHeight) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride of Gradient values ('dx' and 'dy' arrays) measured in bytes.
-/// \n\b NOTE: if 0, srcStride is set as 4*srcWidth.
-/// \n\b WARNING: should be multiple of 32 (8 * 4-bytes per gradient value), and at least as much as 4*srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientPlanarf32_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dx,
- float* __restrict dy,
- unsigned int dxyStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners from the image. This function tests the whole image
-/// for corners (apart from the border). FAST-9 looks for continuous segments on the
-/// pixel ring of 9 pixels or more.
-///
-/// @param src
-/// Pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-/// \n\b WARNING: should be a multiple of 8.
-/// \n\b WARNING: must be <= 2048.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If 0 is passed, srcStride is set to width.
-/// \n\b WARNING: should be a multiple of 8.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-/// \n\b WARNING: If border < 3, it will be default to 3.
-/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n e.g. struct { int x, y; } xy;
-/// \n\b WARNING: should be 128-bit aligned.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast9u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners from the image. This function takes a bit mask so
-/// that only image areas masked with '0' are tested for corners (if these
-/// areas are also not part of the border). FAST-9 looks for continuous segments on the
-/// pixel ring of 9 pixels or more.
-///
-/// @param src
-/// pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// image width
-/// \n\b WARNING: must be <= 2048.
-/// \n\b WARNING: should be a multiple of 8.
-///
-/// @param srcHeight
-/// image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: should be a multiple of 8. If left at 0 srcStride is default to srcWidth.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-/// \n\b WARNING: If border < 3, it will be default to 3.
-/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n\b WARNING: should be 128-bit aligned.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of corners
-/// is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param mask
-/// Per-pixel mask for each pixel represented in input image.
-/// If a bit set to 0, pixel will be a candidate for corner detection.
-/// If a bit set to 1, pixel will be ignored.
-///
-/// @param maskWidth
-/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param maskHeight
-/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast9InMasku8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- unsigned int maskWidth,
- unsigned int maskHeight );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners from the image. This function tests the whole image
-/// for corners (apart from the border). FAST-10 looks for continuous segments on the
-/// pixel ring of 10 pixels or more.
-///
-/// @param src
-/// Pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-/// \n\b WARNING: should be a multiple of 8.
-/// \n\b WARNING: must be <= 2048.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If 0 is passed, srcStride is set to width.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-/// \n\b WARNING: If border < 3, it will be default to 3.
-/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n e.g. struct { int x, y; } xy;
-/// \n\b WARNING: should be 128-bit aligned.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exists when the maximum number of
-/// corners is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast10u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners from the image. This function takes a bit mask so
-/// that only image areas masked with '0' are tested for corners (if these
-/// areas are also not part of the border). FAST-10 looks for continuous segments on the
-/// pixel ring of 10 pixels or more.
-///
-/// @param src
-/// pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// image width
-/// \n\b WARNING: must be <= 2048.
-/// \n\b WARNING: should be a multiple of 8.
-///
-/// @param srcHeight
-/// image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-/// \n\b WARNING: If border < 3, it will be default to 3.
-/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n\b WARNING: should be 128-bit aligned.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exists when the maximum number of corners
-/// is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param mask
-/// Per-pixel mask for each pixel represented in input image.
-/// If a bit set to 0, pixel will be a candidate for corner detection.
-/// If a bit set to 1, pixel will be ignored.
-///
-/// @param maskWidth
-/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param maskHeight
-/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast10InMasku8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- uint32_t maskWidth,
- uint32_t maskHeight );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts Harris corners from the image. This function tests the whole
-/// image for corners (apart from the border).
-///
-/// @param src
-/// Pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-/// \n\b WARNING: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n\b WARNING: should be 128-bit aligned.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param threshold
-/// Minimum "Harris Score" or "Harris Corner Response" of a pixel for it to be
-/// regarded as a corner.
-///
-/// @return
-/// 0 if successful.
-///
-///
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerHarrisu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners,
- int threshold );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Local Harris Max applies the Harris Corner algorithm on an 11x11 patch
-/// within an image to determine if a corner is present.
-///
-/// @param src
-/// Pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-/// \n\b WARNING: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If srcStride == 0, then will use srcWidth.
-///
-/// @param posX
-/// Center X coordinate of the search window
-///
-/// @param posY
-/// Center Y coordinate of the search window
-///
-/// @param maxX
-/// pointer to the X coordinate identified as a corner
-///
-/// @param maxY
-/// pointer to the Y coordinate identified as a corner
-///
-/// @param maxScore
-/// pointer to the Harris score associated with the corner
-///
-/// @return
-/// 0 if no corner is found (maxX, maxY, and maxScore are invalid)
-/// or if posX and/or posY position the patch outside of the range of
-/// the source image.
-/// 1 if a corner is found (maxX, maxY, and maxScore are valid)
-///
-///
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API unsigned int
-fcvLocalHarrisMaxu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- unsigned int posX,
- unsigned int posY,
- unsigned int *maxX,
- unsigned int *maxY,
- int *maxScore);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts Harris corners from the image. This function takes a bit mask so
-/// that only image areas masked with '0' are tested for corners (if these
-/// areas are also not part of the border).
-///
-/// @param src
-/// pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// image width
-/// \n\b WARNING: should be a multiple of 8.
-///
-/// @param srcHeight
-/// image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of corners
-/// is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param threshold
-/// Minimum "Harris Score" or "Harris Corner Respose" of a pixel for it to be
-/// regarded as a corner.
-///
-/// @param mask
-/// Per-pixel mask for each pixel represented in input image.
-/// If a bit set to 0, pixel will be a candidate for corner detection.
-/// If a bit set to 1, pixel will be ignored.
-///
-/// @param maskWidth
-/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param maskHeight
-/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @return
-/// 0 if successful.
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerHarrisInMasku8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners,
- int threshold,
- const uint8_t* __restrict mask,
- unsigned int maskWidth,
- unsigned int maskHeight );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts Harris corners from the image. This function tests the whole
-/// image for corners (apart from the border). It is an improved version
-/// which is more robust to low contrast images.
-///
-/// @param src
-/// Pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: should be a multiple of 8.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n\b WARNING: should be 128-bit aligned.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param threshold
-/// Minimum "Harris Score" or "Harris Corner Response" of a pixel for it to be
-/// regarded as a corner.
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerHarrisAdaptiveu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t border,
- float32_t* __restrict xy,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- int32_t threshold);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts Harris corners from the image.
-/// \n\b ATTENTION: Compared to fcvCornerHarrisu8, this API gives more accurate results
-/// in exchange for slower execution time.\n\n
-///
-/// DO NOT USE THIS API unless for testing purposes.
-/// This API can be removed without notice.
-///
-/// @details
-/// This function extracts Harris Corner features from the image. The input is
-/// an unsigned 8 bit image. Based on the values of the kernel size, the block size,
-/// the sensitivity, the function generates a Harris Response map (Harris Score).
-/// This map is then thresholded using the threshold parameter to locate local maxima.
-/// Additionally, if the Non Maximum Suppression flag is enabled, the function performs
-/// non maximum suppression of the thresholded response using the min distance parameter
-/// to calculate the neighborhood.
-///
-/// @param src
-/// Input unsigned 8 bit image from which corner features are to be detected
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-///
-/// @param srcHeight
-/// Input Image height
-///
-/// @param srcStride
-/// Input image stride, i.e. the gap (in terms of bytes) between the first element
-/// of a row and that of the successive row. If srcStride is equal to 0,
-/// it will be set to srcWidth.
-/// \n\b NOTE: should be a multiple of 8
-///
-/// @param harrisResp
-/// The computed Harris Response Map of the image. If the @param normalizeResponse flag is set,
-/// then all values in the map are normalized between 0 and 255. If the @param normalizeResponse flag
-/// is not set, then the map is not normalized to this range.
-/// This buffer MUST be allocated as srcWidth*srcHeight*sizeof(float32_t).
-///
-/// @param respStride
-/// Harris response stride, i.e. the gap (in terms of bytes) between the first element
-/// of a row and that of the successive row. If respStride is equal to 0,
-/// it will be set to srcWidth * sizeof(float32_t).
-/// \n\b NOTE: should be a multiple of 8
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y positions of the
-/// detected corners.
-/// \n\b WARNING: should be 128-bit aligned.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners that should be detected. The function exits when the
-/// maximum number of corners is exceeded.
-/// \n\b NOTE: This number should account for the number of key points before non-maximum suppression.
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param threshold
-/// Minimum "Harris Score" or "Harris Corner Response" of a pixel for it to be
-/// regarded as a corner. If the @param normalizeResponse flag is set, then this parameter MUST be a value between
-/// 0 and 255. If the @param normalizeResponse flag is not set, then this parameter can be any value in the range of
-/// int32_t. This parameter is used to threshold @param harrisResp to detect corner features.
-///
-/// @param sensitivity
-/// This parameter represents the sensitivity threshold from the Harris Stephens
-/// equation. Typical values are between 0.04 and 0.06
-///
-/// @param kernelSize
-/// Size of the Sobel Kernel used to compute the gradients from the input image
-/// MUST be 3,5 or 7.
-///
-/// @param blockSize
-/// Size of an average block for computing a derivative covariation matrix over each
-/// pixel neighborhood.
-///
-/// @param nmsEnabled
-/// A flag to enable or disable non maximum suppression. Set flag to 1 to enable it and
-/// 0 to disable.
-/// \n\b NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key
-/// points before NMS
-///
-/// @param minDistance
-/// The radial euclidean distance to perform non-maximum suppression.
-///
-/// @param normalizeResponse
-/// This parameter is a flag to enable or disable normalization of the harris response.
-/// If it is set, then it enables normalization of the response to the range between 0 and 255. If it
-/// is not set, then the response is NOT normalized to this range.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API fcvStatus
-fcvCornerHarrisScoreu8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t* __restrict harrisResp,
- uint32_t respStride,
- uint32_t* __restrict xy,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- float32_t threshold,
- float32_t sensitivity,
- uint32_t kernelSize,
- uint32_t blockSize,
- uint32_t nmsEnabled,
- float32_t minDistance,
- uint32_t normalizeResponse);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Computes affine trans. for a given set of corresponding features points
-/// using a linear least square colver based on Cholkesky decomposition.
-///
-/// @param corrs
-/// Correspondence data struct containing coords of points in two frames
-///
-/// @param affine
-/// 3 x 3 affine matrix (computed best fit affine transformation)
-///
-/// @ingroup 3D_reconstruction
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvGeomAffineFitf32( const fcvCorrespondences* __restrict corrs,
- float* __restrict affine );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Evaluates specified affine transformation against provided points
-/// correspondences. Checks which correspondence members have a projection
-/// error that is smaller than the given one (maxSquErr).
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param affine
-/// Affine matrix representing relationship between ptTo and ptFrom
-/// correspondences stored as 3x3 floating point matrix formatted as
-/// @todo r0h0, r0h1
-/// Pointer storage must be at least a 9-element floating point array.
-///
-/// @param maxsqerr
-/// Maximum error value squared.
-///
-/// @param inliers
-/// Output array for those indices that passed the test - the array MUST
-/// be able to store numIndices items.
-///
-/// @param numinliers
-/// Output number of corrs that passed the test.
-///
-/// @return
-/// 0 if successfull
-/// -1 if error value square is >= maxsqerr
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvGeomAffineEvaluatef32( const fcvCorrespondences* __restrict corrs,
- float* __restrict affine,
- float maxsqerr,
- uint16_t* __restrict inliers,
- int32_t* numinliers );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs cholesky homography fitting on specified points correspondences.
-/// \n
-/// \n [x_to] [ a11 a12 a13 ] [ x_from ]
-/// \n [y_to] = [ a21 a22 a23 ] * [ y_from ]
-/// \n [ 1 ] [ a31 a32 a33 ] [ 1 ]
-/// \n note that all the correspondences are considered, if correspondence pairs
-/// are smaller than 4, the API returns. If correspondence pairs are larger than
-/// 4, the API takes all the correspondences into consideration using least
-/// squared method.
-///
-/// @details
-/// Output precision is within 3e-3
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param homography
-/// 3x3 floating point matrix formatted as @todo r0h0, r0h1
-/// Pointer storage must be at least a 9-element floating point array.
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvGeomHomographyFitf32( const fcvCorrespondences* __restrict corrs,
- float* __restrict homography );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Evaluates specified homography against provided points correspondences.
-/// Check which correspondence members have a projection error that is
-/// smaller than the given one (maxSquErr).
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvGeomHomographyEvaluatef32_v2(). In the 2.0.0 release,
-/// fcvGeomHomographyEvaluatef32_v2 will be renamed to fcvGeomHomographyEvaluatef32
-/// and the signature of fcvGeomHomographyEvaluatef32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param homography
-/// Homography representing relationship between ptTo and ptFrom
-/// correspondences stored as 3x3 floating point matrix formatted as
-/// @todo r0h0, r0h1
-/// Pointer storage must be at least a 9-element floating point array.
-///
-/// @param maxsqerr
-/// Maximum error value squared.
-///
-/// @param inliers
-/// Output array for those indices that passed the test - the array MUST
-/// be able to store numIndices items.
-///
-/// @param numinliers
-/// Output number of corrs that passed the test.
-///
-/// @return
-/// 0 that error is less than maximum error, -1 greater or equal to maximum
-/// error.
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvGeomHomographyEvaluatef32( const fcvCorrespondences* __restrict corrs,
- float* __restrict homography,
- float maxsqerr,
- uint16_t* __restrict inliers,
- int32_t* numinliers );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Evaluates specified homography against provided points correspondences.
-/// Check which correspondence members have a projection error that is
-/// smaller than the given one (maxSquErr).
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvGeomHomographyEvaluatef32() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvGeomHomographyEvaluatef32,
-/// \a fcvGeomHomographyEvaluatef32_v2 will be removed, and the current signature
-/// for \a fcvGeomHomographyEvaluatef32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvGeomHomographyEvaluatef32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param homography
-/// Homography representing relationship between ptTo and ptFrom
-/// correspondences stored as 3x3 floating point matrix formatted as
-/// @todo r0h0, r0h1
-/// Pointer storage must be at least a 9-element floating point array.
-///
-/// @param maxsqerr
-/// Maximum error value squared.
-///
-/// @param inliers
-/// Output array for those indices that passed the test - the array MUST
-/// be able to store numIndices items.
-///
-/// @param errinliers
-/// Output array for the error of indices of correspondences that passed
-/// the test.
-///
-/// @param numinliers
-/// Output number of corrs that passed the test.
-///
-/// @return
-/// 0 that error is less than maximum error, -1 greater or equal to maximum
-/// error.
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvGeomHomographyEvaluatef32_v2( const fcvCorrespondences* __restrict corrs,
- float32_t* __restrict homography,
- float32_t maxsqerr,
- uint16_t* __restrict inliers,
- float32_t*__restrict errinliers,
- int32_t* numinliers );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs cholesky pose fitting on specified points correspondences.
-/// Takes a pose and uses the correspondences to refine it using iterative
-/// Gauss-Newton optimization.
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param minIterations
-/// Minimum number of iterations to refine.
-///
-/// @param maxIterations
-/// Maximum number of iterations to refine.
-///
-/// @param stopCriteria
-/// Improvement threshold, iterations stop if improvement is less than this
-/// value.
-///
-/// @param initpose
-/// Pose representing initial pose
-/// correspondences stored as a
-/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
-/// matrix and t is the translation vector. The matrix stored in pose is row
-/// major ordering: \n
-/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
-/// matrix is: \n
-/// | a11, a12, a13 , a14|\n
-/// | a21, a22, a23, a24 |\n
-/// | a31, a32, a33, a34 |\n
-/// Pointer storage must be at least a 12-element floating point array.
-///
-/// @param refinedpose
-/// Pose representing refined pose
-/// correspondences stored as a
-/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
-/// matrix and t is the translation vector. The matrix stored in pose is row
-/// major ordering: \n
-/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
-/// matrix is: \n
-/// | a11, a12, a13 , a14|\n
-/// | a21, a22, a23, a24 |\n
-/// | a31, a32, a33, a34 |\n
-/// Pointer storage must be at least a 12-element floating point array.
-///
-/// @return
-/// Final reprojection error.
-///
-///
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API float
-fcvGeomPoseRefineGNf32( const fcvCorrespondences* __restrict corrs,
- short minIterations,
- short maxIterations,
- float stopCriteria,
- float* initpose,
- float* refinedpose );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Update and compute the differential pose based on the specified points correspondences
-/// This function and fcvGeomPoseOptimizeGNf32
-/// can be used iteratively to perform poseRefine GN.
-///
-/// @param projected
-/// 2D position after projection
-///
-/// @param reprojErr
-/// 2D reprojection error in camera coordinates (not in pixels!)
-///
-/// @param invz
-/// Inverse depth (z)
-///
-/// @param reprojVariance
-/// Reprojection variance in camera coordinates
-///
-/// @param numpts
-/// Number of points
-///
-/// @param pose
-/// Pose representing differential pose
-/// correspondences stored as a
-/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
-/// matrix and t is the translation vector. The matrix stored in pose is row
-/// major ordering: \n
-/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
-/// matrix is: \n
-/// | a11, a12, a13 , a14|\n
-/// | a21, a22, a23, a24 |\n
-/// | a31, a32, a33, a34 |\n
-/// Pointer storage must be at least a 12-element floating point array.
-///
-/// @return
-/// 0 if successfully clustered, otherwise error code
-///
-///
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvGeomPoseUpdatef32(
- const float* __restrict projected,
- const float* __restrict reprojErr,
- const float* __restrict invz,
- const float* __restrict reprojVariance,
- unsigned int numpts,
- float* __restrict pose );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Update the pose based on the specified points correspondences
-/// using Gauss-Newton optimization. This function and fcvGeomPoseEvaluateErrorf32
-/// can be used iteratively to perform poseRefine GN.
-///
-/// @param projected
-/// 2D position after projection
-///
-/// @param reprojErr
-/// 2D reprojection error in camera coordinates (not in pixels!)
-///
-/// @param invz
-/// Inverse depth (z)
-///
-/// @param reprojVariance
-/// Reprojection variance in camera coordinates
-///
-/// @param numpts
-/// Number of points
-///
-/// @param pose
-/// Pose representing updated pose
-/// correspondences stored as a
-/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
-/// matrix and t is the translation vector. The matrix stored in pose is row
-/// major ordering: \n
-/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
-/// matrix is: \n
-/// | a11, a12, a13 , a14|\n
-/// | a21, a22, a23, a24 |\n
-/// | a31, a32, a33, a34 |\n
-/// Pointer storage must be at least a 12-element floating point array.
-///
-/// @return
-/// 0 if successfully clustered, otherwise error code
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvGeomPoseOptimizeGNf32( const float* __restrict projected,
- const float* __restrict reprojErr,
- const float* __restrict invz,
- const float* __restrict reprojVariance,
- unsigned int numpts,
- float* __restrict pose );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Calculate the reprojection error based on the input pose.
-/// This function and fcvGeomPoseOptimizef32 can be used iteratively
-/// to perform poseRefine (GN or LM)..
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param pose
-/// Pose representing updated pose
-/// correspondences stored as a
-/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
-/// matrix and t is the translation vector. The matrix stored in pose is row
-/// major ordering: \n
-/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
-/// matrix is: \n
-/// | a11, a12, a13 , a14|\n
-/// | a21, a22, a23, a24 |\n
-/// | a31, a32, a33, a34 |\n
-/// Pointer storage must be at least a 12-element floating point array.
-///
-/// @param projected
-/// 2D position after projection
-///
-/// @param reprojErr
-/// 2D reprojection error in camera coordinates (not in pixels!)
-///
-/// @param invz
-/// Inverse depth (z)
-///
-/// @param reprojVariance
-/// Reprojection variance in camera coordinates
-///
-/// @return
-/// Reprojection error.
-///
-///
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API float
-fcvGeomPoseEvaluateErrorf32( const fcvCorrespondences* __restrict corrs,
- const float* __restrict pose,
- float* __restrict projected,
- float* __restrict reprojErr,
- float* __restrict invz,
- float* __restrict reprojVariance );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Checks which members have a projection error that is smaller than the
-/// given one.
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param pose
-/// Pose representing relationship between ptTo and ptFrom
-/// correspondences stored as a
-/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
-/// matrix and t is the translation vector. The matrix stored in pose is row
-/// major ordering: \n
-/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
-/// matrix is: \n
-/// | a11, a12, a13 , a14|\n
-/// | a21, a22, a23, a24 |\n
-/// | a31, a32, a33, a34 |\n
-/// Pointer storage must be at least a 12-element floating point array.
-///
-/// @param maxSquErr
-/// Maximum error value squared.
-///
-/// @param inliers
-/// Output array for those indices that passed the test - the array MUST
-/// be able to store numIndices items.
-///
-/// @param numInliers
-/// Output number of corrs that passed the test.
-///
-/// @return
-/// 0 that error is less than maximum error, -1 greater or equal to maximum
-/// error.
-///
-///
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvGeomPoseEvaluatef32( const fcvCorrespondences* __restrict corrs,
- const float* pose,
- float maxSquErr,
- uint16_t* __restrict inliers,
- uint32_t* numInliers );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Estimates a 6DOF pose
-/// \n\b NOTE: Given the coordinates of three 3D points (in world reference frame),
-/// and their corresponding perspective projections in an image,
-/// this algorithm determines the position and orientation of the camera in
-/// the world reference frame. The function provides up to four solutions
-/// that can be disambiguated using a fourth point.
-/// When used in conjunction with RANSAC, this function can perform efficient outlier rejection.
-/// Two degenerate cases should be avoided when using this function:
-/// - Indeterminate configuration:
-/// When the three points are collinear in space, there will be a family of poses mapping the
-/// three points to the same image points.
-/// - Unstable configuration:
-/// The camera center is located on a circular cylinder passing through the three points and
-/// the camera optical axis is perpendicular to the plane derived by the three points.
-/// With this configuration, a small change in the position of the three points will
-/// result in a large change of the estimated pose..
-///
-/// @param corrs
-/// 2D-3D correspondence points
-///
-/// @param pose
-/// computed pose (numPoses * 12 data)
-///
-/// @param numPoses (max = 4)
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvGeom3PointPoseEstimatef32( const fcvCorrespondences* __restrict corrs,
- float* pose,
- int32_t* numPoses );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 3x3 correlation with non-separable kernel.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCorr3x3s8_v2(). In the 2.0.0 release,
-/// fcvFilterCorr3x3s8_v2 will be renamed to fcvFilterCorr3x3s8
-/// and the signature of fcvFilterCorr3x3s8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param kernel
-/// 2-D 3x3 kernel.
-/// \n\b NOTE: Normalized to Q4.4
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be an even number
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE: must be an even number
-///
-/// @param dst
-/// Output convolution. Border values are ignored in this function.
-/// Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorr3x3s8( const int8_t* __restrict kernel,
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 3x3 correlation with non-separable kernel.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterCorr3x3s8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCorr3x3s8,
-/// \a fcvFilterCorr3x3s8_v2 will be removed, and the current signature
-/// for \a fcvFilterCorr3x3s8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCorr3x3s8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param kernel
-/// 2-D 3x3 kernel.
-/// \n\b NOTE: Normalized to Q4.4
-///
-/// @param src
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be an even number
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE: must be an even number
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output convolution. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride. Border values are ignored in this function.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorr3x3s8_v2( const int8_t* __restrict kernel,
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// NxN correlation with non-separable kernel.
-/// Border values are ignored in this function. The filling of dst starts
-/// at (N/2,N/2) and ends at (srcWidth-1-N/2,srcHeight-1-N/2).
-/// \n\b NOTE: The border is N/2 wide pixel strips at top, bottom, left and right of image.
-///
-/// @param kernel
-/// 2-D NxN kernel of float32_t.
-///
-/// @param N
-/// Dimension of kernel.
-///
-/// @param src
-/// Input image of unit8_t. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Src image stride, stride of image is the number of bytes between column 0 of
-/// row 1 and column 0 of row 2 in data memory.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output correlation. Size of buffer is dstStride*srcHeight*sizeof(float32_t) bytes.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride, stride of image is the number of bytes between column 0 of
-/// row 1 and column 0 of row 2 in data memory.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth*sizeof(float32_t).
-/// \n\b WARNING: should be multiple of 8, and at least as much as
-/// srcWidth*sizeof(float32_t) if not 0.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterCorrNxNu8f32( const float32_t* __restrict kernel,
- uint32_t N,
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t* __restrict dst,
- uint32_t dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// NxN correlation with non-separable kernel.
-/// Border values are ignored in this function. The filling of dst starts
-/// at (N/2,N/2) and ends at (srcWidth-1-N/2,srcHeight-1-N/2).
-/// \n\b NOTE: The border is N/2 wide pixel strips at top, bottom, left and right of image.
-///
-/// @param kernel
-/// 2-D NxN kernel of int8_t.
-///
-/// @param N
-/// Dimension of kernel.
-///
-/// @param shift
-/// The right shift count used to normalize output. Shift can be considered as Q factor of kernel.
-///
-/// @param src
-/// Input image of unit8_t. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Src image stride, stride of image is the number of bytes between column 0 of
-/// row 1 and column 0 of row 2 in data memory.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output correlation. Size of buffer is dstStride*srcHeight*sizeof(int16_t) bytes.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride, stride of image is the number of bytes between column 0 of
-/// row 1 and column 0 of row 2 in data memory.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth*sizeof(int16_t).
-/// \n\b WARNING: should be multiple of 8, and at least as much as
-/// srcWidth*sizeof(int16_t) if not 0.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterCorrNxNu8s16( const int8_t* __restrict kernel,
- uint32_t N,
- int8_t shift,
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// NxN correlation with non-separable kernel.
-/// Border values are ignored in this function. The filling of dst starts
-/// at (N/2,N/2) and ends at (srcWidth-1-N/2,srcHeight-1-N/2).
-/// \n\b NOTE: The border is N/2 wide pixel strips at top, bottom, left and right of image.
-///
-/// @param kernel
-/// 2-D NxN kernel of int8_t.
-///
-/// @param N
-/// Dimension of kernel.
-///
-/// @param shift
-/// The right shift count used to normalize output. Shift can be considered as Q factor of kernel.
-///
-/// @param src
-/// Input image of unit8_t. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Src image stride, stride of image is the number of bytes between column 0 of
-/// row 1 and column 0 of row 2 in data memory.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output correlation. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride, stride of image is the number of bytes between column 0 of
-/// row 1 and column 0 of row 2 in data memory.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as
-/// srcWidth if not 0.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterCorrNxNu8( const int8_t* __restrict kernel,
- uint32_t N,
- int8_t shift,
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 9x9 correlation with separable kernel.
-/// If src and dst point to the same address, it will do in-place.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCorrSep9x9s16_v2(). In the 2.0.0 release,
-/// fcvFilterCorrSep9x9s16_v2 will be renamed to fcvFilterCorrSep9x9s16
-/// and the signature of fcvFilterCorrSep9x9s16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel in Q15.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param tmp
-/// Temporary image buffer used internally.
-/// Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dst
-/// Output correlation. Border values are ignored in this function.
-/// Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorrSep9x9s16( const int16_t* __restrict kernel,
- const int16_t* src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int16_t* __restrict tmp,
- int16_t* dst );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// 9x9 FIR filter (convolution) with seperable kernel.
-/// If srcImg and dstImg point to the same address
-/// and srcStride equals to dstStride, it will do in-place.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterCorrSep9x9s16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCorrSep9x9s16,
-/// \a fcvFilterCorrSep9x9s16_v2 will be removed, and the current signature
-/// for \a fcvFilterCorrSep9x9s16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCorrSep9x9s16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-///
-/// @param srcImg
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image tile width.
-///
-/// @param srcHeight
-/// Image tile height.
-///
-/// @param srcStride
-/// source Image width
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstImg
-/// Output correlation. Border values are ignored in this function.
-/// Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: Size = width * heigth
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstStride
-/// dst Image width
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-FASTCV_API void
-fcvFilterCorrSep9x9s16_v2( const int16_t* __restrict kernel,
- const int16_t* srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* dstImg,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 11x11 correlation with separable kernel.
-/// If src and dst point to the same address, it will do in-place.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCorrSep11x11s16_v2(). In the 2.0.0 release,
-/// fcvFilterCorrSep11x11s16_v2 will be renamed to fcvFilterCorrSep11x11s16
-/// and the signature of fcvFilterCorrSep11x11s16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: array must be >=12 elements with kernel[11]=0
-/// \n\b WARNING: should be 128-bit aligned.
-/// \n\b NOTE: Normalized to Q1.15
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dst
-/// Output correlation. Border values are ignored in this function.
-/// Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorrSep11x11s16( const int16_t* __restrict kernel,
- const int16_t* src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int16_t* __restrict tmpImg,
- int16_t* dst );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// 11x11 FIR filter (convolution) with seperable kernel.
-/// If srcImg and dstImg point to the same address
-/// and srcStride equals to dstStride, it will do in-place.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterCorrSep11x11s16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCorrSep11x11s16,
-/// \a fcvFilterCorrSep11x11s16_v2 will be removed, and the current signature
-/// for \a fcvFilterCorrSep11x11s16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCorrSep11x11s16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcImg
-/// Input image. Size of buffer is srStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image tile width.
-/// \n\b WARNING: should be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image tile height.
-///
-/// @param srcStride
-/// source Image width
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstImg
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Size = dstStride * srcHeigth
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstStride
-/// dst Image width
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-FASTCV_API void
-fcvFilterCorrSep11x11s16_v2( const int16_t* __restrict kernel,
- const int16_t* srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* dstImg,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 13x13 correlation with separable kernel.
-/// If src and dst point to the same address, it will do in-place.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCorrSep13x13s16_v2(). In the 2.0.0 release,
-/// fcvFilterCorrSep13x13s16_v2 will be renamed to fcvFilterCorrSep13x13s16
-/// and the signature of fcvFilterCorrSep13x13s16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: Normalized to Q1.15
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dst
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorrSep13x13s16( const int16_t* __restrict kernel,
- const int16_t* src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int16_t* __restrict tmpImg,
- int16_t* dst );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// 13x13 FIR filter (convolution) with seperable kernel.
-/// If srcImg and dstImg point to the same address
-/// and srcStride equals to dstStride, it will do in-place.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterCorrSep13x13s16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCorrSep13x13s16,
-/// \a fcvFilterCorrSep13x13s16_v2 will be removed, and the current signature
-/// for \a fcvFilterCorrSep13x13s16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCorrSep13x13s16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcImg
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image tile width.
-/// \n\b WARNING: should be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image tile height.
-///
-/// @param srcStride
-/// source Image width
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstImg
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Size = dstStride * srcHeigth
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstStride
-/// dst Image width
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-FASTCV_API void
-fcvFilterCorrSep13x13s16_v2( const int16_t* __restrict kernel,
- const int16_t* srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* dstImg,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 15x15 correlation with separable kernel.
-/// If src and dst point to the same address, it will do in-place.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCorrSep15x15s16_v2(). In the 2.0.0 release,
-/// fcvFilterCorrSep15x15s16_v2 will be renamed to fcvFilterCorrSep15x15s16
-/// and the signature of fcvFilterCorrSep15x15s16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: array must be 16 elements with kernel[15]=0
-/// \n\b NOTE: Normalized to Q1.15
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Must be same size as src
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dst
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Must be same size as src
-/// \n\b NOTE: data should be 128-bit aligned
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorrSep15x15s16( const int16_t* __restrict kernel,
- const int16_t* src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int16_t* __restrict tmpImg,
- int16_t* dst );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// 15x15 FIR filter (convolution) with seperable kernel.
-/// If srcImg and dstImg point to the same address
-/// and srcStride equals to dstStride, it will do in-place.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterCorrSep15x15s16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCorrSep15x15s16,
-/// \a fcvFilterCorrSep15x15s16_v2 will be removed, and the current signature
-/// for \a fcvFilterCorrSep15x15s16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCorrSep15x15s16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: array must be 16 elements with kernel[15]=0
-/// \n\b NOTE: Normalized to Q1.15
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcImg
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image tile width.
-/// \n\b WARNING: should be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image tile height.
-///
-/// @param srcStride
-/// source Image width
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstImg
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Size = dstStride * srcHeigth
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstStride
-/// dst Image width
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-FASTCV_API void
-fcvFilterCorrSep15x15s16_v2( const int16_t* __restrict kernel,
- const int16_t* srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* dstImg,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 17x17 correlation with separable kernel.
-/// If src and dst point to the same address, it will do in-place.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCorrSep17x17s16_v2(). In the 2.0.0 release,
-/// fcvFilterCorrSep17x17s16_v2 will be renamed to fcvFilterCorrSep17x17s16
-/// and the signature of fcvFilterCorrSep17x17s16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: Normalized to Q1.15
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dst
-/// Output correlation.. Border values are ignored in this function.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorrSep17x17s16( const int16_t* __restrict kernel,
- const int16_t* src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int16_t* __restrict tmpImg,
- int16_t* dst );
-
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// 17x17 FIR filter (convolution) with seperable kernel.
-/// If srcImg and dstImg point to the same address
-/// and srcStride equals to dstStride, it will do in-place.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterCorrSep17x17s16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCorrSep17x17s16,
-/// \a fcvFilterCorrSep17x17s16_v2 will be removed, and the current signature
-/// for \a fcvFilterCorrSep17x17s16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCorrSep17x17s16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcImg
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image tile width.
-///
-/// @param srcHeight
-/// Image tile height.
-///
-/// @param srcStride
-/// source Image width
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstImg
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Size = dstStride * srcHeigth
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstStride
-/// dst Image width
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-FASTCV_API void
-fcvFilterCorrSep17x17s16_v2( const int16_t* __restrict kernel,
- const int16_t* srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* dstImg,
- unsigned int dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// NxN correlation with separable kernel.
-/// If srcImg and dstImg point to the same address
-/// and srcStride equals to dstStride, it will do in-place.
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param knlSize
-/// Seperable kernel size.
-///
-/// @param srcImg
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image tile width.
-///
-/// @param srcHeight
-/// Image tile height.
-///
-/// @param srcStride
-/// source Image width
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstImg
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Size = dstStride * srcHeigth
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstStride
-/// dst Image width
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorrSepNxNs16( const int16_t* __restrict kernel,
- int knlSize,
- const int16_t* srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* dstImg,
- unsigned int dstStride );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// MxN correlation with separable kernel.
-///
-/// @param kernelX
-/// 1-D kernel of int8_t. The kernel is first applied to rows.
-/// kernelX has Q factor equal to shift.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param knlSizeX
-/// Seperable kernel size of kernelX.
-/// \n\b NOTE: kenrelX must be <= 32.
-///
-/// @param kernelY
-/// 1-D kernel of int8_t. The kernel is applied to columns after kernelX
-/// is applied. It could be the same buffer as kernelX which makes it a
-/// NxN symetric kernel.
-/// kernelY has Q factor equal to shift.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param knlSizeY
-/// Seperable kernel size of kernelY.
-///
-/// @param shift
-/// The Q factor of kernels. Output is right-shifted by 2*shift to compensate for two rounds of filtering
-///
-/// @param srcImg
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Src image stride, stride of image is the number of bytes between column 0 of
-/// row 1 and column 0 of row 2 in data memory.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dstImg
-/// Output correlation. Can do in-place filtering (i.e. dstImg=srcImg).
-/// \n\b NOTE: Size = dstStride * srcHeigth
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstStride
-/// Output stride, stride of image is the number of bytes between column 0 of
-/// row 1 and column 0 of row 2 in data memory.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterCorrSepMxNu8( const int8_t* kernelX,
- uint32_t knlSizeX,
- const int8_t* kernelY,
- uint32_t knlSizeY,
- int8_t shift,
- const uint8_t* srcImg,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* dstImg,
- uint32_t dstStride);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Calculates the mean and variance of intensities of a rectangle in a
-/// grayscale image.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageIntensityStats_v2(). In the 2.0.0 release,
-/// fcvImageIntensityStats_v2 will be renamed to fcvImageIntensityStats
-/// and the signature of fcvImageIntensityStats as it appears now,
-/// will be removed.
-/// This API is the same as fcvImageIntensityStats_v2 with
-/// FASTCV_UNBIASED_VARIANCE_ESTIMATOR
-/// \n\n
-///
-/// @param src
-/// pointer to 8-bit grayscale image
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of source image
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param xBegin
-/// x coordinate of top left of rectangle
-///
-/// @param yBegin
-/// y coordinate of top left of rectangle
-///
-/// @param recWidth
-/// width of rectangular region
-///
-/// @param recHeight
-/// height of rectangular region
-///
-/// @param mean
-/// output of mean of region
-///
-/// @param variance
-/// output of variance of region
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageIntensityStats( const uint8_t* __restrict src,
- unsigned int srcWidth,
- int xBegin,
- int yBegin,
- unsigned int recWidth,
- unsigned int recHeight,
- float* mean,
- float* variance );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Calculates the mean and variance of intensities of a rectangle in a
-/// grayscale image.
-///
-/// @param src
-/// pointer to 8-bit grayscale image
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of source image
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param xBegin
-/// x coordinate of top left of rectangle
-///
-/// @param yBegin
-/// y coordinate of top left of rectangle
-///
-/// @param recWidth
-/// width of rectangular region
-///
-/// @param recHeight
-/// height of rectangular region
-///
-/// @param mean
-/// output of mean of region
-///
-/// @param variance
-/// output of variance of region
-///
-/// @param varianceEstimator
-/// variance estimator
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvImageIntensityStats_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- int xBegin,
- int yBegin,
- uint32_t recWidth,
- uint32_t recHeight,
- float32_t* mean,
- float32_t* variance,
- fcvVarianceEstimator varianceEstimator);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a histogram of intensities for a rectangular region of a grayscale
-/// image. Bins each pixel into a histogram of size 256, depending on the
-/// intensity of the pixel (in the range 0 to 255).
-///
-/// @details
-///
-/// @param src
-/// pointer to 8-bit grayscale image
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of source image
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param xBegin
-/// x coordinate of top left of rectangle
-///
-/// @param yBegin
-/// y coordinate of top left of rectangle
-///
-/// @param recWidth
-/// Width of rectangular region
-///
-/// @param recHeight
-/// Height of rectangular region
-///
-/// @param histogram
-/// Array of size 256 for storing the histogram
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageIntensityHistogram( const uint8_t* __restrict src,
- unsigned int srcWidth,
- int xBegin,
- int yBegin,
- unsigned int recWidth,
- unsigned int recHeight,
- int32_t* histogram );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 8-bit image and adds an
-/// unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvIntegratePatchu8_v2(). In the 2.0.0 release,
-/// fcvIntegratePatchu8_v2 will be renamed to fcvIntegratePatchu8
-/// and the signature of fcvIntegratePatchu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (patchW+1)(patchH+1)
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (patchW+1)(patchH+1)
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegratePatchu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int patchX,
- int patchY,
- unsigned int patchW,
- unsigned int patchH,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 8-bit patch values and their
-/// squares and adds an unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvIntegratePatchu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvIntegratePatchu8,
-/// \a fcvIntegratePatchu8_v2 will be removed, and the current signature
-/// for \a fcvIntegratePatchu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvIntegratePatchu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (patchW+1)(patchH+1)
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (patchW+1)(patchH+1)
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegratePatchu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int patchX,
- int patchY,
- unsigned int patchW,
- unsigned int patchH,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 8-bit patch values and their
-/// squares and adds an unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvIntegratePatchu8() and fcvIntegratePatchu8_v2() with the addition of
-/// extra parameters. This function has been added to allow for backward
-/// compatibility with the original function. When the 2.0.0 release of this
-/// library is made, this function will be renamed to: \a fcvIntegratePatchu8,
-/// \a fcvIntegratePatchu8_v2 and fcvIntegratePatchu8_v3 will be removed, and
-/// the current signature for \a fcvIntegratePatchu8 and fcvIntegratePatchu8_v2
-/// will be removed. Until 2.0.0, the developer should use this implementation
-/// with the expectation of renaming it to \a fcvIntegratePatchu8 when
-/// transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (patchW+1)(patchH+1)
-///
-/// @param intgrlStride
-/// Stride in bytes of the Integral Image
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (patchW+1)(patchH+1)
-///
-/// @param intgrlSqrdStride
-/// Stride in bytes of the Squared Integral Image
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvIntegratePatchu8_v3(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t patchX,
- uint32_t patchY,
- uint32_t patchW,
- uint32_t patchH,
- uint32_t* __restrict intgrlImgOut,
- uint32_t intgrlStride,
- uint32_t* __restrict intgrlSqrdImgOut,
- uint32_t intgrlSqrdStride);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 12x12 8-bit patch values and
-/// their squares. It also adds an unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvIntegratePatch12x12u8_v2(). In the 2.0.0 release,
-/// fcvIntegratePatch12x12u8_v2 will be renamed to fcvIntegratePatch12x12u8
-/// and the signature of fcvIntegratePatch12x12u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (12+1)(12+1)
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (12+1)(12+1)
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegratePatch12x12u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 12x12 8-bit patch values and
-/// their squares. It also adds an unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvIntegratePatch12x12u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvIntegratePatch12x12u8,
-/// \a fcvIntegratePatch12x12u8_v2 will be removed, and the current signature
-/// for \a fcvIntegratePatch12x12u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvIntegratePatch12x12u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (12+1)(12+1)
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (12+1)(12+1)
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegratePatch12x12u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 18x18 8-bit patch values and
-/// their squares. It also adds an unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvIntegratePatch18x18u8_v2(). In the 2.0.0 release,
-/// fcvIntegratePatch18x18u8_v2 will be renamed to fcvIntegratePatch18x18u8
-/// and the signature of fcvIntegratePatch18x18u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (18+1)(18+1)
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (18+1)(18+1)
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegratePatch18x18u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 18x18 8-bit patch values and
-/// their squares. It also adds an unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvIntegratePatch18x18u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvIntegratePatch18x18u8,
-/// \a fcvIntegratePatch18x18u8_v2 will be removed, and the current signature
-/// for \a fcvIntegratePatch18x18u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvIntegratePatch18x18u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (18+1)(18+1)
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (18+1)(18+1)
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegratePatch18x18u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Integrates one line of an image or any portion of an image that is
-/// contiguous in memory.
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Number of pixels.
-/// \n NOTE: bit width enforces numPxls < 2^16
-///
-/// @param intgrl
-/// Sum of values from specified pixels.
-///
-/// @param intgrlSqrd
-/// Sum of squared values from specified pixels.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegrateImageLineu8( const uint8_t* __restrict src,
- uint16_t srcWidth,
- uint32_t* intgrl,
- uint32_t* intgrlSqrd );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Integrates 64 contiguous pixels of an image.
-///
-/// @param src
-/// Input image.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param intgrl
-/// Sum of values from specified pixels.
-///
-/// @param intgrlSqrd
-/// Sum of squared values from specified pixels.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegrateImageLine64u8( const uint8_t* __restrict src,
- uint16_t* intgrl,
- uint32_t* intgrlSqrd );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// compute approximate mean and variance for the range of NFT4 float
-/// descriptors where descriptor elements along dimension are treated
-/// as random vars
-///
-/// @param src
-/// contiguous block of descriptors of dimension 36
-///
-/// @param first
-/// index of the first descriptor in range array vind for computing mean and var
-///
-/// @param last
-/// index of the last descriptor in range array vind for computing mean and range
-///
-/// @param vind
-/// array of randomized indexes of descriptors
-///
-/// @param means
-/// buffer for approximate means, must be 36 long
-///
-/// @param vars
-/// buffer for approximate variances, must be 36 long
-///
-/// @param temp
-/// bufffer, must be 46 long
-///
-/// @return
-/// 0 - success
-/// EFAULT - invalid address
-/// EINVAL - invalid argument
-///
-/// @remark
-/// If descriptor range is > 100 then only
-/// 100 samples are drawn from the range to compute
-/// approximate means and variances.
-///
-/// Variances computed here do not have to be true variances because their
-/// values do not matter in kdtrees. The only thing that matters is that
-/// the ordering relation of variances is preserved
-///
-///
-///
-/// @ingroup object_detection
-// -----------------------------------------------------------------------------
-
-FASTCV_API int
-fcvDescriptorSampledMeanAndVar36f32( const float* __restrict src,
- int first,
- int last,
- int32_t* vind,
- float* __restrict means,
- float* __restrict vars,
- float* __restrict temp );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Searches a 8x8 patch within radius around a center pixel for the max NCC.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvNCCPatchOnCircle8x8u8_v2(). In the 2.0.0 release,
-/// fcvNCCPatchOnCircle8x8u8_v2 will be renamed to fcvNCCPatchOnCircle8x8u8
-/// and the signature of fcvNCCPatchOnCircle8x8u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param patch
-/// Pointer to 8-bit patch pixel values linearly laid out in memory.
-///
-/// @param src
-/// Pointer to 8-bit image pixel values linearly laid out in memory.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width in pixels of the image.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height in pixels of the image.
-///
-/// @param search_center_x
-/// X location of search center in pixels of the image.
-///
-/// @param search_center_y
-/// Y location of search center in pixels of the image.
-///
-/// @param search_radius
-/// Radius of search in pixels. Must be <=5.
-///
-/// @param best_x
-/// Center X location on the image of the best NCC match. The center X has
-/// 4 pixels to the left and 3 to the right.
-///
-/// @param best_y
-/// Center Y location on the image of the best NCC match. The center Y has
-/// 4 pixels above and 3 pixels below.
-///
-/// @param bestNCC
-/// Largest value of the normalized cross-correlation found in the NCC search.
-/// It's quantized to integer value in Q7 (between -128 and 128).
-///
-/// @param findSubPixel (0 or 1)
-/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
-///
-/// @param subX
-/// Sub-pixel estimate for optimal NCC relative to best_x.
-/// \n e.g., float x = (float)best_x + subX;
-///
-/// @param subY
-/// Sub-pixel estimate for optimal NCC relative to best_y.
-///
-/// @return
-/// 0 = OK \n
-/// 1 = "search_radius" too large\n
-/// 2 = invalid "search_center_x,y"\n
-/// 3 = not found\n
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvNCCPatchOnCircle8x8u8( const uint8_t* __restrict patch,
- const uint8_t* __restrict src,
- unsigned short srcWidth,
- unsigned short srcHeight,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_radius,
- uint16_t* best_x,
- uint16_t* best_y,
- uint32_t* bestNCC,
- int findSubPixel,
- float* subX,
- float* subY );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Searches a 8x8 patch within radius around a center pixel for the max NCC.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvNCCPatchOnCircle8x8u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvNCCPatchOnCircle8x8u8,
-/// \a fcvNCCPatchOnCircle8x8u8_v2 will be removed, and the current signature
-/// for \a fcvNCCPatchOnCircle8x8u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvNCCPatchOnCircle8x8u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param patch
-/// Pointer to 8-bit patch pixel values linearly laid out in memory.
-///
-/// @param src
-/// Pointer to 8-bit image pixel values linearly laid out in memory.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width in pixels of the image.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height in pixels of the image.
-///
-/// @param search_center_x
-/// X location of search center in pixels of the image.
-///
-/// @param search_center_y
-/// Y location of search center in pixels of the image.
-///
-/// @param search_radius
-/// Radius of search in pixels. Must be <=5.
-///
-/// @param filterLowVariance
-/// Minimum variance. Used to as threshold to compare against variance of
-/// 8x8 block of src or patch.
-///
-/// @param best_x
-/// Center X location on the image of the best NCC match. The center X has
-/// 4 pixels to the left and 3 to the right.
-///
-/// @param best_y
-/// Center Y location on the image of the best NCC match. The center Y has
-/// 4 pixels above and 3 pixels below.
-///
-/// @param bestNCC
-/// Largest value of the normalized cross-correlation found in the NCC search.
-/// It's quantized to integer value in Q7 (between -128 and 128).
-///
-/// @param findSubPixel (0 or 1)
-/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
-///
-/// @param subX
-/// Sub-pixel estimate for optimal NCC relative to best_x.
-/// \n e.g., float x = (float)best_x + subX;
-///
-/// @param subY
-/// Sub-pixel estimate for optimal NCC relative to best_y.
-///
-/// @return
-/// 0 = OK \n
-/// 1 = "search_radius" too large\n
-/// 2 = invalid "search_center_x,y"\n
-/// 3 = not found\n
-/// 4 = Patch has too low variance\n
-/// 5 = Image region has too low variance\n
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvNCCPatchOnCircle8x8u8_v2( const uint8_t* __restrict patch,
- const uint8_t* __restrict src,
- unsigned short srcWidth,
- unsigned short srcHeight,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_radius,
- int filterLowVariance,
- uint16_t* best_x,
- uint16_t* best_y,
- uint32_t* bestNCC,
- int findSubPixel,
- float* subX,
- float* subY );
-
-
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Searches a 8x8 patch within square region around a center pixel
-/// for the max NCC.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvNCCPatchOnSquare8x8u8_v2(). In the 2.0.0 release,
-/// fcvNCCPatchOnSquare8x8u8_v2 will be renamed to fcvNCCPatchOnSquare8x8u8
-/// and the signature of fcvNCCPatchOnSquare8x8u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param patch
-/// Pointer to 8-bit patch pixel values linearly laid out in memory.
-///
-/// @param src
-/// Pointer to 8-bit image pixel values linearly laid out in memory.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width in pixels of the image.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height in pixels of the image.
-///
-/// @param search_center_x
-/// Center X coordinate of the search window
-///
-/// @param search_center_y
-/// Center Y coordinate of the search window
-///
-/// @param search_w
-/// Width of search square in pixels
-/// \n\b WARNING: must be 11 or less.
-///
-/// @param best_x
-/// Center X location on the image of the best NCC match. The center X has
-/// 4 pixels to the left and 3 to the right.
-///
-/// @param best_y
-/// Center Y location on the image of the best NCC match. The center Y has
-/// 4 pixels above and 3 pixels below.
-///
-/// @param bestNCC
-/// NCC value of the best match block.
-/// It's quantized to integer value in Q7 (between -128 and 128).
-///
-/// @param doSubPixel (0 or 1)
-/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
-///
-/// @param subX
-/// Sub-pixel estimate for optimal NCC relative to best_x.
-/// \n e.g., float x = (float)best_x + subX;
-///
-/// @param subY
-/// Sub-pixel estimate for optimal NCC relative to best_y.
-///
-/// @return
-/// 0 = OK \n
-/// 1 = "search_radius" too large\n
-/// 2 = invalid "search_center_x,y"\n
-/// 3 = not found\n
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvNCCPatchOnSquare8x8u8( const uint8_t* __restrict patch,
- const uint8_t* __restrict src,
- unsigned short srcWidth,
- unsigned short srcHeight,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_w,
- uint16_t* best_x,
- uint16_t* best_y,
- uint32_t* bestNCC,
- int doSubPixel,
- float* subX,
- float* subY );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Searches a 8x8 patch within square region around a center pixel
-/// for the max NCC.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvNCCPatchOnSquare8x8u8 with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvNCCPatchOnSquare8x8u8,
-/// \a fcvNCCPatchOnSquare8x8u8_v2 will be removed, and the current signature
-/// for \a fcvNCCPatchOnSquare8x8u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvNCCPatchOnSquare8x8u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param patch
-/// Pointer to 8-bit patch pixel values linearly laid out in memory.
-///
-/// @param src
-/// Pointer to 8-bit image pixel values linearly laid out in memory.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width in pixels of the image.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height in pixels of the image.
-///
-/// @param search_center_x
-/// Center X coordinate of the search window
-///
-/// @param search_center_y
-/// Center Y coordinate of the search window
-///
-/// @param search_w
-/// Width of search square in pixels
-/// \n\b WARNING: must be 11 or less.
-///
-/// @param filterLowVariance
-/// Minimum variance. Used to as threshold to compare against variance of
-/// 8x8 block of src or patch.
-///
-/// @param best_x
-/// Center X location on the image of the best NCC match. The center X has
-/// 4 pixels to the left and 3 to the right.
-///
-/// @param best_y
-/// Center Y location on the image of the best NCC match. The center Y has
-/// 4 pixels above and 3 pixels below.
-///
-/// @param bestNCC
-/// NCC value of the best match block.
-/// It's quantized to integer value in Q7 (between -128 and 128).
-///
-/// @param doSubPixel (0 or 1)
-/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
-///
-/// @param subX
-/// Sub-pixel estimate for optimal NCC relative to best_x.
-/// \n e.g., float x = (float)best_x + subX;
-///
-/// @param subY
-/// Sub-pixel estimate for optimal NCC relative to best_y.
-///
-/// @return
-/// 0 = OK \n
-/// 1 = "search_radius" too large\n
-/// 2 = invalid "search_center_x,y"\n
-/// 3 = not found\n
-/// 4 = Patch has too low variance\n
-/// 5 = Image region has too low variance\n
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvNCCPatchOnSquare8x8u8_v2( const uint8_t* __restrict patch,
- const uint8_t* __restrict src,
- unsigned short srcWidth,
- unsigned short srcHeight,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_w,
- int filterLowVariance,
- uint16_t* best_x,
- uint16_t* best_y,
- uint32_t* bestNCC,
- int doSubPixel,
- float* subX,
- float* subY );
-
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sum of absolute differences of an image against an 8x8 template.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvSumOfAbsoluteDiffs8x8u8_v2(). In the 2.0.0 release,
-/// fcvSumOfAbsoluteDiffs8x8u8_v2 will be renamed to fcvSumOfAbsoluteDiffs8x8u8
-/// and the signature of fcvSumOfAbsoluteDiffs8x8u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// 8x8 sum of ||A-B||. The template patch is swept over the entire image and
-/// the results are put in dst.
-///
-/// @param patch
-/// 8x8 template
-///
-/// @param src
-/// Reference Image.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the src image.
-///
-/// @param srcHeight
-/// Height of the src image.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param dst
-/// The dst buffer shall be width X height bytes in length.
-/// Output of SAD(A,B). dst[4][4] correspondes to the 0,0 pixel of the template
-/// aligned with the 0,0 pixel of src. The dst border values not covered by
-/// entire 8x8 patch window will remain unmodified by the function. The caller
-/// should either initialize these to 0 or ignore.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSumOfAbsoluteDiffs8x8u8( const uint8_t* __restrict patch,
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint16_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sum of absolute differences of an image against an 8x8 template.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvSumOfAbsoluteDiffs8x8u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvSumOfAbsoluteDiffs8x8u8,
-/// \a fcvSumOfAbsoluteDiffs8x8u8_v2 will be removed, and the current signature
-/// for \a fcvSumOfAbsoluteDiffs8x8u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvSumOfAbsoluteDiffs8x8u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// 8x8 sum of ||A-B||. The template patch is swept over the entire image and
-/// the results are put in dst.
-///
-/// @param patch
-/// 8x8 template
-///
-/// @param patchStride
-/// Stride of the 8x8 template buffer
-///
-/// @param dstStride
-/// Stride of the patch (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-///
-/// @param src
-/// Reference Image.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the src image.
-///
-/// @param srcHeight
-/// Height of the src image.
-///
-/// @param srcStride
-/// Stride of image (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-///
-/// @param dst
-/// The dst buffer shall be at least ( width x height ) values in length.
-/// Output of SAD(A,B). dst[4][4]correspondes to the 0,0 pixel of the template
-/// aligned with the 0,0 pixel of src. The dst border values not covered by
-/// entire 8x8 patch window will remain unmodified by the function. The caller
-/// should either initialize these to 0 or ignore.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of destination (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-///
-///
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSumOfAbsoluteDiffs8x8u8_v2( const uint8_t* __restrict patch,
- unsigned int patchStride,
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint16_t* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Down-scale the image to half width and height by averaging 2x2 pixels
-/// into one.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvScaleDownBy2u8_v2(). In the 2.0.0 release,
-/// fcvScaleDownBy2u8_v2 will be renamed to fcvScaleDownBy2u8
-/// and the signature of fcvScaleDownBy2u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// A box filter downsampling the next pixel, the pixel below, and the next
-/// pixel to the pixel below into one pixel.\n
-/// | px00 px01 px02 px03 |\n
-/// | px10 px11 px12 px13 |\n
-/// to:\n
-/// | (px00+px01+px10+px11)/4 (px02+px03+px12+px13)/4 |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE:must be a multiple of 2
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is srcWidth*srcHeight/4 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvScaleDownBy2u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Down-scale the image to half width and height by averaging 2x2 pixels
-/// into one.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvScaleDownBy2u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvScaleDownBy2u8,
-/// \a fcvScaleDownBy2u8_v2 will be removed, and the current signature
-/// for \a fcvScaleDownBy2u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvScaleDownBy2u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// A box filter downsampling the next pixel, the pixel below, and the next
-/// pixel to the pixel below into one pixel.\n
-/// | px00 px01 px02 px03 |\n
-/// | px10 px11 px12 px13 |\n
-/// to:\n
-/// | (px00+px01+px10+px11)/4 (px02+px03+px12+px13)/4 |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE:must be a multiple of 2
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight/2 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth/2.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth/2 if not 0.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvScaleDownBy2u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Downscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvScaleDownBy2Gaussian5x5u8_v2(). In the 2.0.0 release,
-/// fcvScaleDownBy2Gaussian5x5u8_v2 will be renamed to fcvScaleDownBy2Gaussian5x5u8
-/// and the signature of fcvScaleDownBy2Gaussian5x5u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Downsamples the image using a 5x5 Gaussian filter kernel.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE:must be a multiple of 2
-///
-/// @param dst
-/// Output 8-bit downscale image of size (width / 2) x (height / 2).
-/// \n\b NOTE: border values have been taken cared w.r.t. the pixel coordinate.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleDownBy2Gaussian5x5u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Downscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvScaleDownBy2Gaussian5x5u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvScaleDownBy2Gaussian5x5u8,
-/// \a fcvScaleDownBy2Gaussian5x5u8_v2 will be removed, and the current signature
-/// for \a fcvScaleDownBy2Gaussian5x5u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvScaleDownBy2Gaussian5x5u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Downsamples the image using a 5x5 Gaussian filter kernel.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit downscale image of size (width / 2) x (height / 2).
-/// \n\b NOTE: border values have been taken cared w.r.t. the pixel coordinate.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth/2.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth/2 if not 0.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleDownBy2Gaussian5x5u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Downscale the image to quarter width and height by averaging 4x4 pixels
-/// into one..
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvScaleDownBy4u8_v2(). In the 2.0.0 release,
-/// fcvScaleDownBy4u8_v2 will be renamed to fcvScaleDownBy4u8
-/// and the signature of fcvScaleDownBy4u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// A 4x4 downsampling box filter across adjacent pixels is applied.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE:must be a multiple of 4
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is srcWidth*srcHeight/16 bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvScaleDownBy4u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Downscale the image to quarter width and height by averaging 4x4 pixels
-/// into one..
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvScaleDownBy4u8_v2() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvScaleDownBy4u8_v2,
-/// \a fcvScaleDownBy4u8_v2 will be removed, and the current signature
-/// for \a fcvScaleDownBy4u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvScaleDownBy4u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// A 4x4 downsampling box filter across adjacent pixels is applied.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE:must be a multiple of 4
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight/4 bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth/4.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth/4 if not 0.
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvScaleDownBy4u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Downscale the image to 2/3 width and height by averaging 3x3 pixels
-/// into one..
-///
-/// @details
-/// A 3x3 downsampling box filter across adjacent pixels is applied.
-///
-/// @param src
-/// Input 8-bit image.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: In case of non multiple of 3, it will crop to the closest multiple of 3
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE: In case of non multiple of 3, it will crop to the closest multiple of 3
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If 0 is passed, srcStride is set to srcWidth.
-///
-/// @param dst
-/// Output 8-bit image.
-/// \n\b WARNING: should be 128-bit aligned.
-/// Memory must be pre-allocated at least srcWidth * srcHeight * 2 / 3
-/// dstWidth = srcWidth/3*2
-/// dstHeight = srcHeight/3*2
-///
-/// @param dstStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If 0 is passed, dstStride is set to dstWidth which is srcWidth *2/3.
-///
-/// @return
-/// 0 if successful
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvScaleDown3To2u8( const uint8_t* __restrict src,
- unsigned srcWidth,
- unsigned srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Downsample Horizontaly and/or Vertically by an *integer* scale.
-///
-/// @details
-/// Uses Nearest Neighbor method
-///
-/// @param src
-/// Input 8-bit image.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Source Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Source Image height.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If 0 is passed, srcStride is set to srcWidth.
-///
-/// @param dst
-/// Output 8-bit image.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Destination Image width.
-///
-/// @param dstHeight
-/// Destination Image height.
-///
-/// @param dstStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If 0 is passed, dstStride is set to dstWidth which is srcWidth *2/3.
-///
-/// @return
-/// 0 if successful
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvScaleDownNNu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Downsample Horizontaly and/or Vertically by an *integer* scale.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvScaleDownu8_v2(). In the 2.0.0 release,
-/// fcvScaleDownu8_v2 will be renamed to fcvScaleDownu8
-/// and the signature of fcvScaleDownu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Uses an box averaging filter of size MxN where M is the scale factor
-/// in horizontal dimension and N is the scale factor in the vertical
-/// dimension.
-/// \n \b NOTE: input dimensions should be multiple of output dimensions.
-/// \n NOTE: On different processors, some output pixel values may be off by 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Source Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Source Image height.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstWidth*dstHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Destination Image width.
-///
-/// @param dstHeight
-/// Destination Image height.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleDownu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Downsample Horizontaly and/or Vertically by an *integer* scale.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvScaleDownu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvScaleDownu8,
-/// \a fcvScaleDownu8_v2 will be removed, and the current signature
-/// for \a fcvScaleDownu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvScaleDownu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Uses an box averaging filter of size MxN where M is the scale factor
-/// in horizontal dimension and N is the scale factor in the vertical
-/// dimension
-/// \n \b NOTE: input dimensions should be multiple of output dimensions.
-/// \n NOTE: On different processors, some output pixel values may be off by 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Source Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Source Image height.
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*dstHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Destination Image width.
-///
-/// @param dstHeight
-/// Destination Image height.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleDownu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Upscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvScaleUpBy2Gaussian5x5u8_v2(). In the 2.0.0 release,
-/// fcvScaleUpBy2Gaussian5x5u8_v2 will be renamed to fcvScaleUpBy2Gaussian5x5u8
-/// and the signature of fcvScaleUpBy2Gaussian5x5u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Upsamples the image using a 5x5 Gaussian filter kernel.
-/// /n/b NOTE: border values have been taken care with Gaussion coefficients.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit upsampled image of size (2*width) x (2*height).
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleUpBy2Gaussian5x5u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Upscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvScaleUpBy2Gaussian5x5u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvScaleUpBy2Gaussian5x5u8,
-/// \a fcvScaleUpBy2Gaussian5x5u8_v2 will be removed, and the current signature
-/// for \a fcvScaleUpBy2Gaussian5x5u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvScaleUpBy2Gaussian5x5u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Upsamples the image using a 5x5 Gaussian filter kernel.
-/// /n/b NOTE: border values have been taken care with Gaussion coefficients.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit upsampled image of size (2*dstStride) x (2*srcHeight).
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth*2.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth*2 if not 0.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleUpBy2Gaussian5x5u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Translate to float and normalize 36 8-bit elements
-///
-/// @param src
-/// Pointer to the first input vector
-///
-/// @param invLen
-/// Pointer to inverse length of the first input vector
-/// located right after each 36 element vector
-///
-/// @param numVecs
-/// Number of vectors to translate
-///
-/// @param reqNorm
-/// Required norm
-///
-/// @param srcStride
-/// Step in bytes to data of the next vector
-/// Each vector has 36 8-bit elements and 1 float invLen
-///
-/// @param dst
-/// Pointer to contiguous block for output vectors
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param stopBuild
-/// Allows other threads to break this function in the middle of processing.
-/// When set to 1, the function will exit on the next iteration.
-///
-/// @return
-/// 0 - success
-/// EFAULT - invalid address
-/// EINVAL - invalid argument
-///
-/// @ingroup math_vector
-// -----------------------------------------------------------------------------
-
-FASTCV_API int
-fcvVecNormalize36s8f32( const int8_t* __restrict src,
- unsigned int srcStride,
- const float* __restrict invLen,
- unsigned int numVecs,
- float reqNorm,
- float* __restrict dst,
- int32_t* stopBuild );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Sum of squared differences of one 36-byte vector against 4 others.
-///
-/// @details
-/// SSD of one vector (a) against 4 others (b0,b1,b2,b3) using their given
-/// inverse lengths for normalization.
-/// \n\n SSD(a,b0), SSD(a,b1), SSD(a,b2), SSD(a,b3)
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLenA
-/// Inverse of vector A = 1/|A|
-///
-/// @param b0
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b1
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b2
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b3
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLenB
-/// Inverse of vectors b0...b3 = 1/|b0|,... 1/|b3|
-/// \n\b WARNING: array should be 128-bit aligned
-///
-/// @param distances
-/// Output of the 4 results { SSD(a,b0), SSD(a,b1), SSD(a,b2), SSD(a,b3) }.
-/// \n ACCURACY: 1.0e-6
-/// \n\b WARNING: array should be 128-bit aligned
-///
-///
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSumOfSquaredDiffs36x4s8( const int8_t* __restrict a,
- float invLenA,
- const int8_t* __restrict b0,
- const int8_t* __restrict b1,
- const int8_t* __restrict b2,
- const int8_t* __restrict b3,
- const float* __restrict invLenB,
- float* __restrict distances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Sum of squared differences of one 36-byte vector against N others.
-///
-/// @details
-/// SSD of one vector (a) against N other 36-byte vectors
-/// ( b[0], b[1], ..., b[n-1] )
-/// using their given inverse lengths for normalization.
-/// \n\n SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLenA
-/// Inverse of vector A = 1/|A|
-///
-/// @param b
-/// Vectors b[0]...b[n-1].
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param invLenB
-/// Inverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param numB
-/// Number of B vectors.
-///
-/// @param distances
-/// Output of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }.
-/// \n ACCURACY: 1.0e-6
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSumOfSquaredDiffs36xNs8( const int8_t* __restrict a,
- float invLenA,
- const int8_t* const * __restrict b,
- const float* __restrict invLenB,
- unsigned int numB,
- float* __restrict distances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Sorting of 8 float numbers
-///
-/// @details
-/// Perform sorting of 8 scores in ascending order (output of SumOfSquaredDiffs)
-///
-/// @param inScores
-/// Input 8 element float array
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param outScores
-/// Output is 8 element sorted float array
-/// \n\b WARNING: array should be 128-bit aligned
-///
-///
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSort8Scoresf32( float* __restrict inScores, float* __restrict outScores );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Binarizes a grayscale image based on a threshold value.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterThresholdu8_v2(). In the 2.0.0 release,
-/// fcvFilterThresholdu8_v2 will be renamed to fcvFilterThresholdu8
-/// and the signature of fcvFilterThresholdu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Sets the pixel to max(255) if it's value is greater than the threshold;
-/// else, set the pixel to min(0).
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit binarized image. Size of buffer is srcWidth*srcHeight bytes.
-/// If src equals to dst, it will do in-place.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param threshold
-/// Threshold value for binarization.
-/// \n\b WARNING: must be larger than 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFilterThresholdu8( const uint8_t* src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* dst,
- unsigned int threshold );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Binarizes a grayscale image based on a threshold value.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterThresholdu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterThresholdu8,
-/// \a fcvFilterThresholdu8_v2 will be removed, and the current signature
-/// for \a fcvFilterThresholdu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterThresholdu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Sets the pixel to max(255) if it's value is greater than the threshold;
-/// else, set the pixel to min(0).
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes.
-/// If src equals to dst and srcStride equals to dstStride, it will do in-place.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param threshold
-/// Threshold value for binarization.
-/// \n\b WARNING: must be larger than 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterThresholdu8_v2( const uint8_t* src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* dst,
- unsigned int dstStride,
- unsigned int threshold );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Binarizes a grayscale image based on a threshold value.
-/// The binarized image will be in the two values selected by user.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterThresholdu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterThresholdu8,
-/// \a fcvFilterThresholdu8_v3 will be removed, and the current signature
-/// for \a fcvFilterThresholdu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterThresholdu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Sets the pixel to max(255) if it's value is greater than the threshold;
-/// else, set the pixel to min(0).
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes.
-/// If src equals to dst and srcStride equals to dstStride, it will do in-place.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param threshold
-/// Threshold value for binarization.
-/// \n\b WARNING: must be larger than 0.
-///
-/// @param trueValue
-/// The value in type of uint8_t assigned to the destination pixel if the source is larger than threshold
-///
-/// @param falseValue
-/// The value in type of uint8_t assigned to the destination pixel if the source is smaller than or equal to threshold
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterThresholdu8_v3( const uint8_t* src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* dst,
- unsigned int dstStride,
- unsigned int threshold,
- uint8_t trueValue,
- uint8_t falseValue);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Binarizes a grayscale image based on a pair of threshold values.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterThresholdRangeu8_v2(). In the 2.0.0 release,
-/// fcvFilterThresholdRangeu8_v2 will be renamed to fcvFilterThresholdRangeu8
-/// and the signature of fcvFilterThresholdRangeu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Sets the pixel to min(0) if it's value is greater than the higher threshold
-/// or smaller than the lower threshold;
-/// else, set the pixel to max(255).
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes.
-/// If src equals to dst and srcStride equals to dstStride, it will do in-place.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param lowThresh
-/// The lower threshold value for binarization.
-///
-/// @param highThresh
-/// The higher threshold value for binarization.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterThresholdRangeu8( const uint8_t* src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* dst,
- uint32_t dstStride,
- uint8_t lowThresh,
- uint8_t highThresh );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Binarizes a grayscale image based on a pair of threshold values.
-/// The binarized image will be in the two values selected by user.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterThresholdRangeu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterThresholdRangeu8,
-/// \a fcvFilterThresholdRangeu8_v2 will be removed, and the current signature
-/// for \a fcvFilterThresholdRangeu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterThresholdRangeu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Sets the pixel to min(0) if it's value is greater than the higher threshold
-/// or smaller than the lower threshold;
-/// else, set the pixel to max(255).
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes.
-/// If src equals to dst and srcStride equals to dstStride, it will do in-place.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param lowThresh
-/// The lower threshold value for binarization.
-///
-/// @param highThresh
-/// The higher threshold value for binarization.
-///
-/// @param trueValue
-/// The value in type of uint8_t assigned to the destination pixel if the source is
-/// within the range inclusively defined by the pair of threshold values
-///
-/// @param falseValue
-/// The value in type of uint8_t assigned to the destination pixel if the source is
-/// out of the range defined by the pair of threshold values
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterThresholdRangeu8_v2( const uint8_t* src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* dst,
- uint32_t dstStride,
- uint8_t lowThresh,
- uint8_t highThresh,
- uint8_t trueValue,
- uint8_t falseValue);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterDilate3x3u8_v2(). In the 2.0.0 release,
-/// fcvFilterDilate3x3u8_v2 will be renamed to fcvFilterDilate3x3u8
-/// and the signature of fcvFilterDilate3x3u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit dilated image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterDilate3x3u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterDilate3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterDilate3x3u8,
-/// \a fcvFilterDilate3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterDilate3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterDilate3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit dilated image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterDilate3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Erode a grayscale image by taking the local minima of 3x3 neighborhood window.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterErode3x3u8_v2(). In the 2.0.0 release,
-/// fcvFilterErode3x3u8_v2 will be renamed to fcvFilterErode3x3u8
-/// and the signature of fcvFilterErode3x3u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit eroded image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterErode3x3u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Erode a grayscale image by taking the local minima of 3x3 nbhd window.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterErode3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterErode3x3u8,
-/// \a fcvFilterErode3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterErode3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterErode3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit eroded image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterErode3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Warps the patch centered at nPos in the input image using the affine
-/// transform in nAffine
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvTransformAffine8x8u8_v2(). In the 2.0.0 release,
-/// fcvTransformAffine8x8u8_v2 will be renamed to fcvTransformAffine8x8u8
-/// and the signature of fcvTransformAffine8x8u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param nPos[ 2 ]
-/// Position in the image in 32 bit fixed point (Q16)
-/// \n\b NOTE: if any 1 coordinates of the warped square are inside the image, return 1 and
-/// \n leave function. Otherwise, return 0.
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param nAffine[ 2 ][ 2 ]
-/// Transformation matrix in 32 bit fixed point (Q16). The matrix stored
-/// in nAffine is using row major ordering: \n
-/// a11, a12, a21, a22 where the matrix is: \n
-/// | a11, a12 |\n
-/// | a21, a22 |\n
-///
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param nPatch
-/// Transformed patch.
-///
-/// @return
-/// 0 if the transformation is valid
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvTransformAffine8x8u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- const int32_t* __restrict nPos,
- const int32_t* __restrict nAffine,
- uint8_t* __restrict nPatch );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Warps the patch centered at nPos in the input image using the affine
-/// transform in nAffine
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvTransformAffine8x8u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvTransformAffine8x8u8,
-/// \a fcvTransformAffine8x8u8_v2 will be removed, and the current signature
-/// for \a fcvTransformAffine8x8u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvTransformAffine8x8u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of image (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be at least as much as srcWidth if not 0.
-///
-/// @param nPos[ 2 ]
-/// Position in the image in 32 bit fixed point (Q16)
-/// \n\b NOTE: if any 1 coordinates of the warped square are inside the image, return 1 and
-/// \n leave function. Otherwise, return 0.
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param nAffine[ 2 ][ 2 ]
-/// Transformation matrix in 32 bit fixed point (Q16). The matrix stored
-/// in nAffine is using row major ordering: \n
-/// a11, a12, a21, a22 where the matrix is: \n
-/// | a11, a12 |\n
-/// | a21, a22 |\n
-///
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param patch
-/// Transformed patch.
-///
-/// @param patchStride
-/// Stride of patch (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-/// \n\b NOTE: if 0, srcStride is set as 8.
-/// \n\b WARNING: must be at least as much as 8 if not 0.
-///
-/// @return
-/// 0 if the transformation is valid
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvTransformAffine8x8u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- const int32_t* __restrict nPos,
- const int32_t* __restrict nAffine,
- uint8_t* __restrict patch,
- unsigned int patchStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Warps a grayscale image using the a perspective projection transformation
-/// matrix (also known as a homography). This type of transformation is an
-/// invertible transformation which maps straight lines to straight lines.
-/// Bi-linear interpolation is used where applicable.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvWarpPerspectiveu8_v2(). In the 2.0.0 release,
-/// fcvWarpPerspectiveu8_v2 will be renamed to fcvWarpPerspectiveu8
-/// and the signature of fcvWarpPerspectiveu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Warps an image taking into consideration the perspective scaling.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Input image height.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param dst
-/// Warped output image. Size of buffer is dstWidth*dstHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Dst image width.
-/// \n\b NOTE: data should be multiple of 8.
-///
-/// @param dstHeight
-/// Dst image height.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param projectionMatrix
-/// 3x3 perspective transformation matrix (generally a homography). The
-/// matrix stored in homography is row major ordering: \n
-/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
-/// | a11, a12, a13 |\n
-/// | a21, a22, a23 |\n
-/// | a31, a32, a33 |\n
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// Note:
-/// The projection matrix follows the so-called inverse mapping convention.
-/// It is applied to the dst coordinates to produce the corresponding
-/// src coordinates. In other 3rd party tools, the so-called forward mapping
-/// convention may be used, where the projection matrix refers to the one
-/// applied to the src coordinates to produce the dst coordinates.
-/// When comparing with 3rd party results, please make sure
-/// the same convention of projection matrices are assumed. If not,
-/// please transform the projection matrix into an equivalent form under
-/// the forward mapping convention before feeding it into 3rd party tools.
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvWarpPerspectiveu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- float* __restrict projectionMatrix );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Warps a grayscale image using the a perspective projection transformation
-/// matrix (also known as a homography). This type of transformation is an
-/// invertible transformation which maps straight lines to straight lines.
-/// Bi-linear interpolation is used where applicable.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvWarpPerspectiveu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvWarpPerspectiveu8,
-/// \a fcvWarpPerspectiveu8_v2 will be removed, and the current signature
-/// for \a fcvWarpPerspectiveu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvWarpPerspectiveu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Warps an image taking into consideration the perspective scaling.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Input image height.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcStride
-/// Input image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Warped output image. Size of buffer is dstStride*dstHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Dst image width.
-/// \n\b NOTE: data should be multiple of 8.
-///
-/// @param dstHeight
-/// Dst image height.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param dstStride
-/// Output image stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
-///
-/// @param projectionMatrix
-/// 3x3 perspective transformation matrix (generally a homography). The
-/// matrix stored in homography is row major ordering: \n
-/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
-/// | a11, a12, a13 |\n
-/// | a21, a22, a23 |\n
-/// | a31, a32, a33 |\n
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// Note:
-/// The projection matrix follows the so-called inverse mapping convention.
-/// It is applied to the dst coordinates to produce the corresponding
-/// src coordinates. In other 3rd party tools, the so-called forward mapping
-/// convention may be used, where the projection matrix refers to the one
-/// applied to the src coordinates to produce the dst coordinates.
-/// When comparing with 3rd party results, please make sure
-/// the same convention of projection matrices are assumed. If not,
-/// please transform the projection matrix into an equivalent form under
-/// the forward mapping convention before feeding it into 3rd party tools.
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvWarpPerspectiveu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride,
- float* __restrict projectionMatrix );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Warps a 3 color channel image based on a 3x3 perspective projection matrix using
-/// bilinear interpolation.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcv3ChannelWarpPerspectiveu8_v2(). In the 2.0.0 release,
-/// fcv3ChannelWarpPerspectiveu8_v2 will be renamed to fcv3ChannelWarpPerspectiveu8
-/// and the signature of fcv3ChannelWarpPerspectiveu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight*3 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Input image height.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param dst
-/// Warped output image. Size of buffer is dstWidth*dstHeight*3 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Output image width.
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param dstHeight
-/// Output image height.
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param projectionMatrix
-/// 3x3 perspective transformation matrix (generally a homography). The
-/// matrix stored in homography is row major ordering: \n
-/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
-/// | a11, a12, a13 |\n
-/// | a21, a22, a23 |\n
-/// | a31, a32, a33 |\n
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// Note:
-/// The projection matrix follows the so-called inverse mapping convention.
-/// It is applied to the dst coordinates to produce the corresponding
-/// src coordinates. In other 3rd party tools, the so-called forward mapping
-/// convention may be used, where the projection matrix refers to the one
-/// applied to the src coordinates to produce the dst coordinates.
-/// When comparing with 3rd party results, please make sure
-/// the same convention of projection matrices are assumed. If not,
-/// please transform the projection matrix into an equivalent form under
-/// the forward mapping convention before feeding it into 3rd party tools.
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcv3ChannelWarpPerspectiveu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- float* __restrict projectionMatrix );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Warps a 3 color channel image based on a 3x3 perspective projection
-/// matrix using bilinear interpolation.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcv3ChannelWarpPerspectiveu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcv3ChannelWarpPerspectiveu8,
-/// \a fcv3ChannelWarpPerspectiveu8_v2 will be removed, and the current signature
-/// for \a fcv3ChannelWarpPerspectiveu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcv3ChannelWarpPerspectiveu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcHeight
-/// Input image height.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcStride
-/// Input image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth*3.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth*3 if not 0.
-///
-/// @param dst
-/// Warped output image. Size of buffer is dstStride*dstHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Output image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param dstHeight
-/// Output image height.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param dstStride
-/// Output image stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as dstWidth*3.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth*3 if not 0.
-///
-/// @param projectionMatrix
-/// 3x3 perspective transformation matrix (generally a homography). The
-/// matrix stored in homography is row major ordering: \n
-/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
-/// | a11, a12, a13 |\n
-/// | a21, a22, a23 |\n
-/// | a31, a32, a33 |\n
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// Note:
-/// The projection matrix follows the so-called inverse mapping convention.
-/// It is applied to the dst coordinates to produce the corresponding
-/// src coordinates. In other 3rd party tools, the so-called forward mapping
-/// convention may be used, where the projection matrix refers to the one
-/// applied to the src coordinates to produce the dst coordinates.
-/// When comparing with 3rd party results, please make sure
-/// the same convention of projection matrices are assumed. If not,
-/// please transform the projection matrix into an equivalent form under
-/// the forward mapping convention before feeding it into 3rd party tools.
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcv3ChannelWarpPerspectiveu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride,
- float* __restrict projectionMatrix );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// General function for computing cluster centers and cluster bindings
-/// for a set of points of dimension dim.
-///
-/// @param points
-/// Array of all points. Array size must be greater than
-/// numPoints * dim.
-///
-/// @param numPoints
-/// Number of points in points array.
-///
-/// @param dim
-/// dimension, e.g. 36
-///
-/// @param pointStride
-/// Byte distance between adjacent points in array
-///
-/// @param indices
-/// Array of point indices in points array. Processing will only
-/// occur on points whose indices are in this array. Each index in array
-/// must be smaller numPoints.
-///
-/// @param numIndices
-/// Length of indices array. numIndieces must be <= numPoints.
-///
-/// @param numClusters
-/// Number of cluster centers
-///
-/// @param clusterCenters
-/// current cluster centers;
-/// elements are distant by clusterCenterStride
-///
-/// @param clusterCenterStride
-/// byte distance between adjacent cluster centers in array
-///
-/// @param newClusterCenters
-/// array for new cluster centers; should be numClusterCenters long
-///
-/// @param clusterMemberCounts
-/// Element counts for each cluster; should be numClusterCenters long
-///
-/// @param clusterBindings
-/// Output indices of the clusters to which each vector belongs to, array must
-/// be numIndices long.
-///
-/// @param sumOfClusterDistances
-/// Array for sum of distances of cluster elements to cluster centers;
-/// Must be numClusters long
-///
-/// @return
-/// 0 if successfully clustered, otherwise error code
-///
-/// @remark
-/// This is general clusterer. There are no assumptions on points other
-/// than they belong to a vector space
-///
-///
-///
-/// @ingroup clustering_and_search
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvClusterEuclideanf32( const float* __restrict points,
- int numPoints, // actually not used but helpful
- int dim,
- int pointStride,
- const size_t* __restrict indices,
- int numIndices,
- int numClusters,
- float* __restrict clusterCenters,
- int clusterCenterStride,
- float* __restrict newClusterCenters,
- size_t* __restrict clusterMemberCounts,
- size_t* __restrict clusterBindings,
- float* sumOfClusterDistances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Function for computing cluster centers and cluster bindings
-/// for a set of normalized points of dimension dim. Cluster centers
-/// are also normalized (see remark below)
-///
-/// @param points
-/// Array of all points. Array size must be greater than
-/// numPoints * dim.
-///
-/// @param numPoints
-/// Number of points in points array.
-///
-/// @param dim
-/// dimension, e.g. 36
-///
-/// @param pointStride
-/// Byte distance between adjacent points in array
-///
-/// @param indices
-/// Array of point indices in points array. Processing will only
-/// occur on points whose indices are in this array. Each index in array
-/// must be smaller numPoints.
-///
-/// @param numIndices
-/// Length of indices array. numIndieces must be <= numPoints.
-///
-/// @param numClusters
-/// Number of cluster centers
-///
-/// @param clusterCenters
-/// current cluster centers;
-/// elements are distant by clusterCenterStride
-///
-/// @param clusterCenterStride
-/// byte distance between adjacent cluster centers in array
-///
-/// @param newClusterCenters
-/// array for new cluster centers; should be numClusterCenters long
-///
-/// @param clusterMemberCounts
-/// Element counts for each cluster; should be numClusterCenters long
-///
-/// @param clusterBindings
-/// Output indices of the clusters to which each vector belongs to, a
-/// rray must be numIndices long.
-///
-/// @param sumOfClusterDistances
-/// Array for sum of distances of cluster elements to cluster centers;
-/// Must be numClusters long
-///
-/// @return
-/// 0 if successfully clustered, otherwise error code
-///
-/// @remark
-/// this function assumes that points are normalized (e.g. NFT4
-/// descriptors). Cluster centers are also normalized. Normalized points
-/// are on a surface of unit sphere which is not a vector space but
-/// curved manifold of dimension (dim-1) embeded in Euclidean vector space
-/// of dimension dim
-///
-/// @ingroup clustering_and_search
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvClusterEuclideanNormedf32( const float* __restrict points,
- int numPoints,
- int dim,
- int pointStride,
- const size_t* __restrict indices,
- int numIndices,
- int numClusters,
- float* __restrict clusterCenters,
- int clusterCenterStride,
- float* __restrict newClusterCenters,
- size_t* __restrict clusterMemberCounts,
- size_t* __restrict clusterBindings,
- float* sumOfClusterDistances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Function for computing cluster centers and cluster bindings
-/// for a set of normalized points of dimension 36. Cluster centers
-/// are also normalized (see remark below)
-///
-/// @param points
-/// Array of all points. Array size must be greater than
-/// numPoints * 36.
-///
-/// @param numPoints
-/// Number of points in points array.
-///
-/// @param pointStride
-/// Byte distance between adjacent points in array
-///
-/// @param indices
-/// Array of point indices in points array. Processing will only
-/// occur on points whose indices are in this array. Each index in array
-/// must be smaller numPoints.
-///
-/// @param numIndices
-/// Length of indices array. numIndieces must be <= numPoints.
-///
-/// @param numClusters
-/// Number of cluster centers
-///
-/// @param clusterCenters
-/// current cluster centers;
-/// elements are distant by clusterCenterStride
-///
-/// @param clusterCenterStride
-/// byte distance between adjacent cluster centers in array
-///
-/// @param newClusterCenters
-/// array for new cluster centers; should be numClusterCenters long
-///
-/// @param clusterMemberCounts
-/// Element counts for each cluster; should be numClusterCenters long
-///
-/// @param clusterBindings
-/// Output indices of the clusters to which each vector belongs to, a
-/// rray must be numIndices long.
-///
-/// @param sumOfClusterDistances
-/// Array for sum of distances of cluster elements to cluster centers;
-/// Must be numClusters long
-///
-/// @return
-/// 0 if successfully clustered, otherwise error code
-///
-/// @remark
-/// this function assumes that points are normalized (e.g. NFT4
-/// descriptors). Cluster centers are also normalized. Normalized points
-/// are on a surphace of unit sphere which is not a vector space but
-/// curved manifold of dimension (dim-1) embeded in Euclidean vector space
-/// of dimension dim
-///
-/// @ingroup clustering_and_search
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvClusterEuclideanNormed36f32( const float* __restrict points,
- int numPoints,
- int pointStride,
- const size_t* __restrict indices,
- int numIndices,
- int numClusters,
- float* __restrict clusterCenters,
- int clusterCenterStride,
- float* __restrict newClusterCenters,
- size_t* __restrict clusterMemberCounts,
- size_t* __restrict clusterBindings,
- float* sumOfClusterDistances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Blur with 5x5 Gaussian filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterGaussian5x5s16_v2(). In the 2.0.0 release,
-/// fcvFilterGaussian5x5s16_v2 will be renamed to fcvFilterGaussian5x5s16
-/// and the signature of fcvFilterGaussian5x5s16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Convolution with 5x5 Gaussian kernel:
-/// \n 1 4 6 4 1
-/// \n 4 16 24 16 4
-/// \n 6 24 36 24 6
-/// \n 4 16 24 16 4
-/// \n 1 4 6 4 1
-///
-/// @param src
-/// Input int data (can be sq. of gradient, etc).
-/// \n\b NOTE: Size of buffer is srcWidth*srcHeight*2 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output int data. Size of buffer is srcWidth*srcHeight*2 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param blurBorder
-/// If set to 0, border is ignored.
-/// If set to 1, border is blurred by 0-padding adjacent values.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian5x5s16( const int16_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int16_t* __restrict dst,
- int blurBorder );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Blur with 5x5 Gaussian filter
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterGaussian5x5s16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterGaussian5x5s16,
-/// \a fcvFilterGaussian5x5s16_v2 will be removed, and the current signature
-/// for \a fcvFilterGaussian5x5s16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterGaussian5x5s16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Convolution with 5x5 Gaussian kernel:
-/// \n 1 4 6 4 1
-/// \n 4 16 24 16 4
-/// \n 6 24 36 24 6
-/// \n 4 16 24 16 4
-/// \n 1 4 6 4 1
-///
-/// @param src
-/// Input int data (can be sq. of gradient, etc).
-/// Size of buffer is srcStride*srcHeight*2 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth*2.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*2 if not 0.
-///
-/// @param dst
-/// Output int data. Size of buffer is dstStride*srcHeight*2 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride in bytes.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth*2.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*2 if not 0.
-///
-/// @param blurBorder
-/// If set to 0, border is ignored.
-/// If set to 1, border is blurred by 0-padding adjacent values.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian5x5s16_v2( const int16_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dst,
- unsigned int dstStride,
- int blurBorder );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Blur with 5x5 Gaussian filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterGaussian5x5s32_v2(). In the 2.0.0 release,
-/// fcvFilterGaussian5x5s32_v2 will be renamed to fcvFilterGaussian5x5s32
-/// and the signature of fcvFilterGaussian5x5s32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Convolution with 5x5 Gaussian kernel:
-/// \n 1 4 6 4 1
-/// \n 4 16 24 16 4
-/// \n 6 24 36 24 6
-/// \n 4 16 24 16 4
-/// \n 1 4 6 4 1
-///
-/// @param src
-/// Input int data (can be sq. of gradient, etc).
-/// Size of buffer is srcWidth*srcHeight*4 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output int data. Size of buffer is srcWidth*srcHeight*4 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param blurBorder
-/// If set to 0, border is ignored.
-/// If set to 1, border is blurred by 0-padding adjacent values.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian5x5s32( const int32_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int32_t* __restrict dst,
- int blurBorder );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Blur with 5x5 Gaussian filter
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterGaussian5x5s32() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterGaussian5x5s32,
-/// \a fcvFilterGaussian5x5s32_v2 will be removed, and the current signature
-/// for \a fcvFilterGaussian5x5s32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterGaussian5x5s32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Convolution with 5x5 Gaussian kernel:
-/// \n 1 4 6 4 1
-/// \n 4 16 24 16 4
-/// \n 6 24 36 24 6
-/// \n 4 16 24 16 4
-/// \n 1 4 6 4 1
-///
-/// @param src
-/// Input int data (can be sq. of gradient, etc).
-/// Size of buffer is srcStride*srcHeight*4 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Input Image stride in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth*sizeof(int32_t).
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output int data. Size of buffer is dstStride*srcHeight*4 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output Image stride in bytes.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth*sizeof(int32_t).
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param blurBorder
-/// If set to 0, border is ignored.
-/// If set to 1, border is blurred by 0-padding adjacent values.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian5x5s32_v2( const int32_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int32_t* __restrict dst,
- unsigned int dstStride,
- int blurBorder );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Segments an image (3 or 1 channel) into meaningful regions,
-/// depending on the color or gray scale uniformity of the neighborhood pixels.
-///
-/// @param src
-/// Pointer to 8-bit color (3-channel) or grayscale (1-channel) image.
-///
-/// @param srcWidth
-/// Width of src image, measured by pixels.
-///
-/// @param srcHeight
-/// Height of src image, measured by pixels.
-///
-/// @param srcStride
-/// Stride of src image, measured by bytes.
-/// WARNING: should be multiple of 8, and at least as much as srcWidth*numChannel if not 0.
-///
-/// @param numChannel
-/// Number of channels of src image. 1 for gray scale and 3 for color image.
-///
-/// @param thresholdSplit
-/// Threshold for region split. Higher value: larger uniform region segmented.
-/// Range of 3-channel image segmentation 20~500: 20~50 for heavy over-segmentation, 50~100 for median over-segmentation, 100~150 for light over-segmentation, 150~250 for normal segmentation, 250~400 for light under-segmentation, 400~500 for heavy under-segmentation.
-/// Range of 1-channel image segmentation 3~150: 3~10 for heavy over-segmentation, 10~15 for median over-segmentation, 15~25 for light over-segmentation, 25~50 for normal segmentation, 50~75 for light under-segmentation, 75~150 for heavy under-segmentation.
-///
-/// @param thresholdMerge
-/// Threshold for region merge, measured by the region area (pixels). Higher value: larger uniform region segmented. Range 10~1000 for VGA size image.
-/// Range of 3-channel image segmentation 10~1000: 10~30 for heavy over-segmentation, 30~60 for median over-segmentation, 60~150 for light over-segmentation, 150~400 for normal segmentation, 400~600 for light under-segmentation, 600~1000 for heavy under-segmentation.
-/// Same for the 1-channel image.
-/// For other image size, please tune the thresholdMerge value proportional to the VGA size.
-///
-/// @param segLabel
-/// Segmented labels. 1 channel with same size of src. Pixel belonging to the same region is uniformly labeled by a non-zero number.
-///
-/// @param segLabelStride
-/// Stride of segmented labels, measured by bytes.
-/// WARNING: should be multiple of 8, and at least as much as srcWidth*4 if not 0.
-///
-/// @param data
-/// data buffer for inner function buffer allocation. The buffer size is recommended below,
-/// for 3-channel image: *data = (uint8_t *) malloc ( srcWidth*srcHeight*18*sizeof(uint8_t) );
-/// for 1-channel image: *data = (uint8_t *) malloc ( srcWidth*srcHeight*16*sizeof(uint8_t) );
-///
-/// @return
-/// 0 if successful.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvImageSegmentationRegionGrow( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t numChannel,
- uint32_t thresholdSplit,
- uint32_t thresholdMerge,
- uint32_t* __restrict segLabel,
- uint32_t segLabelStride,
- uint8_t* __restrict data );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Warps the patch centered at nPos in the input image using the affine
-/// transform in nAffine
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvTransformAffineu8_v2(). In the 2.0.0 release,
-/// fcvTransformAffineu8_v2 will be renamed to fcvTransformAffineu8
-/// and the signature of fcvTransformAffineu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param position[ 2 ]
-/// Position in the image
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param affine[ 2 ][ 2 ]
-/// Transformation matrix. The matrix stored
-/// in affine is using row major ordering: \n
-/// a11, a12, a21, a22 where the matrix is: \n
-/// | a11, a12 |\n
-/// | a21, a22 |\n
-///
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param patch
-/// Transformed patch.
-///
-/// @param patchWidth
-/// Patch width.
-///
-/// @param patchHeight
-/// Patch height.
-///
-/// @return
-/// 0 if the transformation is valid
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvTransformAffineu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- const float* __restrict position,
- const float* __restrict affine,
- uint8_t* __restrict patch,
- unsigned int patchWidth,
- unsigned int patchHeight );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Warps the patch centered at nPos in the input image using the affine
-/// transform in nAffine
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvTransformAffineu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvTransformAffineu8,
-/// \a fcvTransformAffineu8_v2 will be removed, and the current signature
-/// for \a fcvTransformAffineu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvTransformAffineu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of image (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be at least as much as srcWidth if not 0.
-///
-/// @param position[ 2 ]
-/// Position in the image
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param affine[ 2 ][ 2 ]
-/// Transformation matrix. The matrix stored
-/// in affine is using row major ordering: \n
-/// a11, a12, a21, a22 where the matrix is: \n
-/// | a11, a12 |\n
-/// | a21, a22 |\n
-///
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param patch
-/// Transformed patch.
-///
-/// @param patchWidth
-/// Patch width.
-///
-/// @param patchHeight
-/// Patch height.
-///
-/// @param patchStride
-/// Stride of patch (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-/// \n\b NOTE: if 0, patchStride is set as patchWidth.
-/// \n\b WARNING: must be at least as much as patchWidth if not 0.
-///
-/// @return
-/// 0 if the transformation is valid
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvTransformAffineu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- const float* __restrict position,
- const float* __restrict affine,
- uint8_t* __restrict patch,
- unsigned int patchWidth,
- unsigned int patchHeight,
- unsigned int patchStride );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts a 17x17 rotation corrected patch from a 25x25 image.
-///
-/// @param src
-/// 25x25 input image in continuous memory.
-///
-/// @param dst
-/// 17x17 output patch.
-///
-/// @param orientation
-/// Rotation angle of patch relative to src.
-/// \n 10-bit fixed-point angle around unit circle.
-/// \n NOTE: 0 = 0 degrees and 1024 = 360 degrees.
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCopyRotated17x17u8( const uint8_t* __restrict src,
- uint8_t* __restrict dst,
- int orientation );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Counts "1" bits in supplied vector.
-///
-/// @param src
-/// Pointer to vector to count bits that are 1.
-///
-/// @param srcLength
-/// Length of the vector to count bits. Assumed that the remainder of bits modulo 8
-/// will be set to 0 a priori.
-///
-/// @return
-/// total number of "1" bits in supplied vector
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvBitCountu8( const uint8_t* __restrict src,
- unsigned int srcLength );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Counts "1" bits in supplied 32-byte vector.
-///
-/// @param src
-/// Pointer to 32-byte vector(s) to count bits that are 1.
-///
-/// @return
-/// total number of "1" bits in supplied vector
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvBitCount32x1u8( const uint8_t* __restrict src );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Counts bits in supplied 4, 32-byte vectors.
-///
-/// @param a
-/// Pointer to 32-byte vector to count bits.
-///
-/// @param b
-/// Pointer to 32-byte vector to count bits.
-///
-/// @param c
-/// Pointer to 32-byte vector to count bits.
-///
-/// @param d
-/// Pointer to 32-byte vector to count bits.
-///
-/// @param bitCount
-/// Array to store the four resultant bit counts.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvBitCount32x4u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- uint32_t* __restrict bitCount );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Counts bits in supplied 64-byte vector.
-///
-/// @param src
-/// Pointer to 64-byte vector(s) to count bits.
-///
-/// @return
-/// Bit count.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvBitCount64x1u8( const uint8_t* __restrict src );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Counts bits in supplied 4, 64-byte vectors.
-///
-/// @param a
-/// Pointer to 64-byte vector to count bits.
-///
-/// @param b
-/// Pointer to 64-byte vector to count bits.
-///
-/// @param c
-/// Pointer to 64-byte vector to count bits.
-///
-/// @param d
-/// Pointer to 64-byte vector to count bits.
-///
-/// @param bitCount
-/// Array to store the four resultant bit counts.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvBitCount64x4u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- uint32_t* __restrict bitCount );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Counts bits in supplied vector of unsigned intergers.
-///
-/// @param src
-/// Pointer to vector(s) to count bits.
-///
-/// @param srcLength
-/// Number of elements in vector
-///
-/// @return
-/// Bit count.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvBitCountu32( const uint32_t* __restrict src,
- unsigned int srcLength );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between the two supplied arbitrary length
-/// vectors.
-///
-/// @param a
-/// Pointer to vector to compute distance.
-///
-/// @param b
-/// Pointer to vector to compute distance.
-///
-/// @param abLength
-/// Length in bits of each of the vectors. Assumed that the remainder of
-/// bits modulo 8 will be set to 0 a priori.
-///
-/// @return
-/// Hamming distance between the two vectors.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvHammingDistanceu8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- unsigned int abLength );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between the two supplied 32-byte vectors.
-///
-/// @param a
-/// Pointer to 32-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param b
-/// Pointer to 32-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @return
-/// Hamming distance between the two vectors.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvHammingDistance32x1u8a4( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between the two supplied 64-byte vectors.
-///
-/// @param a
-/// Pointer to 64-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param b
-/// Pointer to 64-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @return
-/// Hamming distance between the two vectors.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvHammingDistance64x1u8a4( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between the two supplied 32-byte vectors.
-///
-/// @param a
-/// Pointer to 32-byte vector to compute distance.
-///
-/// @param b
-/// Pointer to 32-byte vector to compute distance.
-///
-/// @return
-/// Hamming distance between the two vectors.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvHammingDistance32x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between the two supplied 64-byte vectors.
-///
-/// @param a
-/// Pointer to 64-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param b
-/// Pointer to 64-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @return
-/// Hamming distance between the two vectors.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvHammingDistance64x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between A and each of B,C,D,E 32-byte vectors.
-///
-/// @param a
-/// Pointer to 32-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param b
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param c
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param d
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param e
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param hammingDistances
-/// Array to store each Hamming distance between the vectors.
-/// \n\b WARNING: should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvHammingDistance32x4u8a4( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- const uint8_t* __restrict e,
- uint32_t* __restrict hammingDistances );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between A and each of B,C,D,E 64-byte
-/// vectors.
-///
-/// @param a
-/// Pointer to 32-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param b
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param c
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param d
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param e
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param hammingDistances
-/// Array to store each Hamming distance between the vectors.
-/// \n\b WARNING: should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvHammingDistance64x4u8a4( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- const uint8_t* __restrict e,
- uint32_t* __restrict hammingDistances );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between A and each of B,C,D,E 64-byte vectors.
-///
-/// @param a
-/// Pointer to 64-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param b
-/// Pointer to 64-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param c
-/// Pointer to 64-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param d
-/// Pointer to 64-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param e
-/// Pointer to 64-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param hammingDistances
-/// Array to store each Hamming distance between the vectors.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvHammingDistance64x4u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- const uint8_t* __restrict e,
- uint32_t* __restrict hammingDistances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners and scores from the image
-///
-/// @param src
-/// 8-bit image
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width
-/// \n\b NOTE: should be a multiple of 8.
-/// \n\b WARNING: must be <= 2048.
-///
-/// @param srcHeight
-/// image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-/// \n\b WARNING: If border < 3, it will be default to 3.
-/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
-///
-/// @param xy
-/// pointer to the output array cointaining the interleaved x,y position of the
-/// detected corners.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param scores
-/// Pointer to the output array containing the scores of the detected corners.
-/// The score is the highest threshold that can still validate the detected corner.
-/// Must be greater than barrier. A higher score value indicates a stronger corner feature.
-/// For example, a corner of score 108 is stronger than a corner of score 50.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded.
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast9Scoreu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners and scores from the image
-///
-/// @param src
-/// Grayscale image with one byte per pixel
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// image width
-/// \n\b NOTE: should be a multiple of 8.
-/// \n\b WARNING: must be <= 2048.
-///
-/// @param srcHeight
-/// image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-/// \n\b WARNING: If border < 3, it will be default to 3.
-/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
-///
-/// @param xy
-/// Pointer to the output array cointaining the interleaved x,y position of the
-/// detected corners.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param scores
-/// Pointer to the output array containing the scores of the detected corners.
-/// The score is the highest threshold that can still validate the detected corner.
-/// Must be greater than barrier. A higher score value indicates a stronger corner feature.
-/// For example, a corner of score 108 is stronger than a corner of score 50.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded.
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param mask
-/// Per-pixel mask for each pixel represented in input image.
-/// If a bit set to 0, pixel will be a candidate for corner detection.
-/// If a bit set to 1, pixel will be ignored.
-///
-/// @param maskWidth
-/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param maskHeight
-/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast9InMaskScoreu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- unsigned int maskWidth,
- unsigned int maskHeight );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners and scores from the image
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvCornerFast9Scoreu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvCornerFast9Scoreu8,
-/// \a fcvCornerFast9Scoreu8_v2 will be removed, and the current signature
-/// for \a fcvCornerFast9Scoreu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvCornerFast9Scoreu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// non-maximum suppression can be enabled to reduce the number of false corners.
-///
-/// @param src
-/// 8-bit image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-/// \n\b WARNING: If border < 3, it will be default to 3.
-/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
-///
-/// @param xy
-/// Pointer to the output array cointaining the interleaved x,y position of the
-/// detected corners.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param scores
-/// Pointer to the output array containing the scores of the detected corners.
-/// The score is the highest threshold that can still validate the detected corner.
-/// Must be greater than barrier. A higher score value indicates a stronger corner feature.
-/// For example, a corner of score 108 is stronger than a corner of score 50.
-/// \n\b NOTE: should be 128-bit aligned.
-/// \n\b NOTE: size of buffer is @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded.
-/// \n\b NOTE: This number should account for the number of key points before non-maximum suppression.
-///
-/// @param nCorners
-/// Pointer to an integer storing the number of corners detected
-///
-/// @param nmsEnabled
-/// Enable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
-/// \n\b NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key
-/// points before NMS
-///
-/// @param tempBuf
-/// Pointer to scratch buffer if nms is enabled, otherwise it can be NULL.
-/// Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast9Scoreu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners,
- uint32_t nmsEnabled,
- void* __restrict tempBuf);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners and scores from the image based on the mask. The mask specifies pixels
-/// to be ignored by the detector.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvCornerFast9InMaskScoreu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvCornerFast9InMaskScoreu8,
-/// \a fcvCornerFast9InMaskScoreu8_v2 will be removed, and the current signature
-/// for \a fcvCornerFast9InMaskScoreu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvCornerFast9InMaskScoreu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// non-maximum suppression can be enabled to reduce the number of false corners.
-///
-/// @param src
-/// 8-bit grayscale image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-/// \n\b WARNING: If border < 3, it will be default to 3.
-/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
-///
-/// @param xy
-/// Pointer to the output array cointaining the interleaved x,y position of the
-/// detected corners.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param scores
-/// Pointer to the output array containing the scores of the detected corners.
-/// The score is the highest threshold that can still validate the detected corner.
-/// Must be greater than barrier. A higher score value indicates a stronger corner feature.
-/// For example, a corner of score 108 is stronger than a corner of score 50.
-/// \n\b NOTE: should be 128-bit aligned.
-/// \n\b NOTE: size of buffer is @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded.
-/// \n\b NOTE: This number should account for the number of key points before non-maximum suppression.
-///
-/// @param nCorners
-/// Pointer to an integer storing the number of corners detected
-///
-/// @param mask
-/// Mask used to omit regions of the image. For allowed mask sizes refer to
-/// @param maskWidth and @param maskHeight . The mask is so defined to work with multiple
-/// scales if necessary. For any pixel set to '1' in the mask, the corresponding pixel in the image
-/// will be ignored.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param maskWidth
-/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param maskHeight
-/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param nmsEnabled
-/// Enable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
-/// \n\b NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key
-/// points before NMS
-///
-/// @param tempBuf
-/// Pointer to scratch buffer if nms is enabled, otherwise it can be NULL.
-/// Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast9InMaskScoreu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- unsigned int maskWidth,
- unsigned int maskHeight,
- uint32_t nmsEnabled,
- void* __restrict tempBuf);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners and scores from the image
-///
-/// @details
-/// non-maximum suppression can be enabled to reduce the number of false corners.
-///
-/// @param src
-/// 8-bit image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-/// \n\b WARNING: If border < 3, it will be default to 3.
-/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
-///
-/// @param xy
-/// Pointer to the output array cointaining the interleaved x,y position of the
-/// detected corners.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param scores
-/// Pointer to the output array containing the scores of the detected corners.
-/// The score is the highest threshold that can still validate the detected corner.
-/// Must be greater than barrier. A higher score value indicates a stronger corner feature.
-/// For example, a corner of score 108 is stronger than a corner of score 50.
-/// \n\b NOTE: should be 128-bit aligned.
-/// \n\b NOTE: size of buffer is @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded.
-/// \n\b NOTE: This number should account for the number of key points before non-maximum suppression.
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param nmsEnabled
-/// Enable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
-/// \n\b NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key
-/// points before NMS
-///
-/// @param tempBuf
-/// Pointer to scratch buffer if nms is enabled, otherwise it can be NULL.
-/// Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @ingroup feature_detection
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast10Scoreu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- uint32_t nmsEnabled,
- void* __restrict tempBuf);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners and scores from the image based on the mask. The mask specifies pixels
-/// to be ignored by the detector.
-///
-/// @param src
-/// 8-bit grayscale image where keypoints are detected
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// image width
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-/// \n\b WARNING: If border < 3, it will be default to 3.
-/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
-///
-/// @param xy
-/// Pointer to the output array cointaining the interleaved x,y position of the
-/// detected corners.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param scores
-/// Pointer to the output array containing the scores of the detected corners.
-/// The score is the highest threshold that can still validate the detected corner.
-/// Must be greater than barrier. A higher score value indicates a stronger corner feature.
-/// For example, a corner of score 108 is stronger than a corner of score 50.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded.
-/// \n\b NOTE: This number should account for the number of key points before non-maximum suppression.
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param mask
-/// Mask used to omit regions of the image. For allowed mask sizes refer to
-/// @param maskWidth and @param maskHeight. The mask is so defined to work with multiple
-/// scales if necessary. For any pixel set to '1' in the mask, the corresponding pixel in the image
-/// will be ignored.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param maskWidth
-/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param maskHeight
-/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param nmsEnabled
-/// Enable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
-/// \n\b NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key
-/// points before NMS
-///
-/// @param tempBuf
-/// Pointer to scratch buffer if nms is enabled, otherwise it can be NULL.
-/// Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup feature_detection
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast10InMaskScoreu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- uint32_t maskWidth,
- uint32_t maskHeight,
- uint32_t nmsEnabled,
- void* __restrict tempBuf);
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Optical flow. Bitwidth optimized implementation
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvTrackLKOpticalFlowu8_v2(). In the 2.0.0 release,
-/// fcvTrackLKOpticalFlowu8_v2 will be renamed to fcvTrackLKOpticalFlowu8
-/// and the signature of fcvTrackLKOpticalFlowu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src1
-/// Input image from frame #1.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param src2
-/// Input image from frame #2.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Input image height.
-///
-/// @param src1Pyr
-/// Image Pyradmid of src1
-/// \n\b WARNING: obtained by calling fcvPyramidCreateu8
-///
-/// @param src2Pyr
-/// Image Pyradmid of src2
-/// \n\b WARNING: obtained by calling fcvPyramidCreateu8
-///
-/// @param dx1Pyr
-/// Horizontal Sobel gradient pyramid for src1
-/// \n\b NOTE: To be left NULL. In this case the function will
-/// build the pyramid internally.
-///
-/// @param dy1Pyr
-/// Vertical Sobel grading pyraid for src1
-/// \n\b NOTE: To be left NULL. In this case the function will
-/// build the pyramid internally.
-///
-/// @param featureXY
-/// Pointer to X,Y floating point, sub-pixel coordinates for features to
-/// track. Stored as X,Y tuples. featureXY array storage must
-/// be >= featureLen*2.
-///
-/// @param featureXY_out
-/// Pointer to X,Y floating point, sub-pixel coordinates for tracked features
-/// Stored as X,Y tuples. featureXY array storage must
-/// be >= featureLen*2.
-///
-/// @param featureStatus
-/// Pointer to integer array for status of each feature defined in
-/// featureXY. featureStatus array storage must
-/// be >= featureLen.
-///
-/// @param featureLen
-/// Number of features in featuresXY and featureStatus array.
-///
-/// @param windowWidth
-/// Width of window for optical flow searching. Must be odd number.
-/// \n\b NOTE: suggested value 5, 7 or 9
-///
-/// @param windowHeight
-/// Height of window for optical flow searching. Must be odd number.
-/// \n\b NOTE:: suggested value 5, 7 or 9
-///
-/// @param maxIterations
-/// Maximum number of LK iterations to perform per pyramid level.
-/// \n\b NOTE: suggested value 5 or 7
-///
-/// @param nPyramidLevels
-/// Number of pyramid levels.
-/// \n\b NOTE: suggested value 3 or 4 depending on size of image
-///
-/// @param maxResidue
-/// Maximum feature residue above which feature is declared lost.
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @param minDisplacement
-/// Minimum displacement solved below which iterations are stopped.
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @param minEigenvalue
-/// Threshold for feature goodness. If it is set it to 0, the check is disabled.
-/// \n\b NOTE: If good features are passed to the function, then it is suggested
-/// that you set it to 0 to have faster function time
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @param lightingNormalized
-/// if 1 Enable lightning normalization
-/// \n if 0 Disable lightning normalization
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @ingroup object_detection
-// -----------------------------------------------------------------------------
-
-FASTCV_API void
-fcvTrackLKOpticalFlowu8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- int srcWidth,
- int srcHeight,
- const fcvPyramidLevel* src1Pyr,
- const fcvPyramidLevel* src2Pyr,
- const fcvPyramidLevel* dx1Pyr,
- const fcvPyramidLevel* dy1Pyr,
- const float* featureXY,
- float* featureXY_out,
- int32_t* featureStatus,
- int featureLen,
- int windowWidth,
- int windowHeight,
- int maxIterations,
- int nPyramidLevels,
- float maxResidue,
- float minDisplacement,
- float minEigenvalue,
- int lightingNormalized );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Optical flow (with stride so ROI can be supported)
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvTrackLKOpticalFlowu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvTrackLKOpticalFlowu8,
-/// \a fcvTrackLKOpticalFlowu8_v2 will be removed, and the current signature
-/// for \a fcvTrackLKOpticalFlowu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a ffcvTrackLKOpticalFlowu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src1
-/// Input image from frame #1.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param src2
-/// Input image from frame #2.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param width
-/// Input image width.
-///
-/// @param height
-/// Input image height.
-///
-/// @param stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to width.
-/// NOTE: should be a multiple of 8.
-///
-/// @param src1Pyr
-/// Image Pyramid of src1 (with stride)
-/// \n\b WARNING: obtained by calling fcvPyramidCreateu8_v2
-///
-/// @param src2Pyr
-/// Image Pyradmid of src2 (with stride)
-/// \n\b WARNING: obtained by calling fcvPyramidCreateu8_v2
-///
-/// @param featureXY
-/// Pointer to X,Y floating point, sub-pixel coordinates for features to
-/// track. Stored as X,Y tuples. featureXY array storage must
-/// be >= featureLen*2.
-///
-/// @param featureXY_out
-/// Pointer to X,Y floating point, sub-pixel coordinates for tracked features
-/// Stored as X,Y tuples. featureXY array storage must
-/// be >= featureLen*2.
-///
-/// @param featureStatus
-/// Pointer to integer array for status of each feature defined in
-/// featureXY. featureStatus array storage must
-/// be >= featureLen.
-///
-/// @param featureLen
-/// Number of features in featuresXY and featureStatus array.
-///
-/// @param windowWidth
-/// Width of window for optical flow searching. Must be odd number.
-/// \n\b NOTE: suggested value 5, 7 or 9
-///
-/// @param windowHeight
-/// Height of window for optical flow searching. Must be odd number.
-/// \n\b NOTE:: suggested value 5, 7 or 9
-///
-/// @param maxIterations
-/// Maximum number of LK iterations to perform per pyramid level.
-/// \n\b NOTE: suggested value 5 or 7
-///
-/// @param nPyramidLevels
-/// Number of pyramid levels.
-/// \n\b NOTE: suggested value 3 or 4 depending on size of image
-///
-/// @ingroup object_detection
-// -----------------------------------------------------------------------------
-
-FASTCV_API void
-fcvTrackLKOpticalFlowu8_v2( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- uint32_t width,
- uint32_t height,
- uint32_t stride,
- const fcvPyramidLevel_v2 *src1Pyr,
- const fcvPyramidLevel_v2 *src2Pyr,
- const float32_t* featureXY,
- float32_t* featureXY_out,
- int32_t* featureStatus,
- int32_t featureLen,
- int32_t windowWidth,
- int32_t windowHeight,
- int32_t maxIterations,
- int32_t nPyramidLevels);
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Optical flow.
-///
-/// \n\b ATTENTION: This function will be removed when the 2.0.0 release of this library
-/// is made. Until 2.0.0, the developer should use this implementation with the expectation of
-/// using \a fcvTrackLKOpticalFlowu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src1
-/// Input image from frame #1.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param src2
-/// Input image from frame #2.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Input image height.
-///
-/// @param src1Pyr
-/// Image Pyradmid of src1
-/// \n\b WARNING: obtained by calling fcvPyramidCreateu8
-///
-/// @param src2Pyr
-/// Image Pyradmid of src2
-/// \n\b WARNING: obtained by calling fcvPyramidCreateu8
-///
-/// @param dx1Pyr
-/// Horizontal Sobel gradient pyramid for src1
-/// \n\b NOTE: To be left NULL. In this case the function will
-/// build the pyramid internally.
-///
-/// @param dy1Pyr
-/// Vertical Sobel grading pyraid for src1
-/// \n\b NOTE: To be left NULL. In this case the function will
-/// build the pyramid internally.
-///
-/// @param featureXY
-/// Pointer to X,Y floating point, sub-pixel coordinates for features to
-/// track. Stored as X,Y tuples. featureXY array storage must
-/// be >= featureLen*2.
-///
-/// @param featureXY_out
-/// Pointer to X,Y floating point, sub-pixel coordinates for tracked features
-/// Stored as X,Y tuples. featureXY array storage must
-/// be >= featureLen*2.
-///
-/// @param featureStatus
-/// Pointer to integer array for status of each feature defined in
-/// featureXY. featureStatus array storage must
-/// be >= featureLen.
-/// \n\b NOTE: Possible status are :
-/// \n TRACKED 1
-/// \n NOT_FOUND -1
-/// \n SMALL_DET -2
-/// \n MAX_ITERATIONS -3
-/// \n OUT_OF_BOUNDS -4
-/// \n LARGE_RESIDUE -5
-/// \n SMALL_EIGVAL -6
-/// \n INVALID -99
-///
-/// @param featureLen
-/// Number of features in featuresXY and featureStatus array.
-///
-/// @param windowWidth
-/// Width of window for optical flow searching. Must be odd number.
-/// \n\b NOTE: suggested value 5, 7 or 9
-///
-/// @param windowHeight
-/// Height of window for optical flow searching. Must be odd number.
-/// \n\b NOTE:: suggested value 5, 7 or 9
-///
-/// @param maxIterations
-/// Maximum number of LK iterations to perform per pyramid level.
-/// \n\b NOTE: suggested value 5 or 7
-///
-/// @param nPyramidLevels
-/// Number of pyramid levels.
-/// \n\b NOTE: suggested value 3 or 4 depending on size of image
-///
-/// @param maxResidue
-/// Maximum feature residue above which feature is declared lost.
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @param minDisplacement
-/// Minimum displacement solved below which iterations are stopped.
-/// \n\b NOTE : Suggest that be set to between 0.1 and 0.2, say 0.15
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @param minEigenvalue
-/// Threshold for feature goodness. If it is set it to 0, the check is disabled.
-/// \n\b NOTE: If good features are passed to the function, then it is suggested
-/// that you set it to 0 to have faster function time
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @param lightingNormalized
-/// if 1 Enable lightning normalization
-/// \n if 0 Disable lightning normalization
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvTrackLKOpticalFlowf32( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- const fcvPyramidLevel* src1Pyr,
- const fcvPyramidLevel* src2Pyr,
- const fcvPyramidLevel* dx1Pyr,
- const fcvPyramidLevel* dy1Pyr,
- const float* featureXY,
- float* featureXY_out,
- int32_t* featureStatus,
- int featureLen,
- int windowWidth,
- int windowHeight,
- int maxIterations,
- int nPyramidLevels,
- float maxResidue,
- float minDisplacement,
- float minEigenvalue,
- int lightingNormalized );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Builds an image pyramid of float32 arising from a single
-/// original image - that are successively downscaled w.r.t. the
-/// pre-set levels.
-/// \n\b NOTE: Memory should be deallocated using fcvPyramidDelete
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvPyramidCreatef32_v2(). In the 2.0.0 release,
-/// fcvPyramidCreatef32_v2 will be renamed to fcvPyramidCreatef32
-/// and the signature of fcvPyramidCreatef32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Base image. Size of buffer is srcWidth*srcHeight*4 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of base image
-/// \n\b WARNING: must be a multiple of 2^numLevels
-///
-/// @param srcHeight
-/// Height of base image
-/// \n\b WARNING: must be a multiple of 2^numLevels
-///
-/// @param numLevels
-/// Number of levels of the pyramid
-///
-/// @param pyramid
-/// Output pyramid of numLevels+1 images of the same type as src .
-/// pyramid[0] will be the same as src . pyramid[1] is the next
-/// pyramid layer, a smoothed and down-sized src , and so on.
-///
-/// @ingroup image_processing
-//-------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidCreatef32( const float* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int numLevels,
- fcvPyramidLevel* pyramid );
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Builds an image pyramid (with stride).
-/// \n\b NOTE: Memory should be deallocated using fcvPyramidDelete_v2
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvPyramidCreatef32() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvPyramidCreatef32,
-/// \a fcvPyramidCreatef32_v2 will be removed, and the current signature
-/// for \a fcvPyramidCreatef32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvPyramidCreatef32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// base image
-///
-/// @param srcWidth
-/// width of base image
-/// \n\b NOTE: Needs to be a multiple of 2^numLevels
-///
-/// @param srcHeight
-/// height of base image
-/// \n\b NOTE: Needs to be a multiple of 2^numLevel
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory (base image).
-/// \n\b NOTE: Needs to be a multiple of 2^numLevels
-/// \n\b NOTE: If left at 0, pyramid (non-base) image stride is the same as its srcWidth*sizeof(float32_t)
-///
-/// @param numLevels
-/// Number of levels of the pyramid
-///
-/// @param fcvPyramidLevel_v2
-/// output pyramid (with stride) of numLevels+1 images of the same type as src .
-/// pyramid[0] will be the same as src . pyramid[1] is the next
-/// pyramid layer, a smoothed and down-sized src , and so on.
-///
-/// @ingroup image_processing
-//-------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidCreatef32_v2( const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t numLevels,
- fcvPyramidLevel_v2* pyramid );
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Builds an image pyramid of uint8_t arising from a single
-/// original image - that are successively downscaled w.r.t. the
-/// pre-set levels.
-/// \n\b NOTE: Memory should be deallocated using fcvPyramidDelete
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvPyramidCreateu8_v2(). In the 2.0.0 release,
-/// fcvPyramidCreateu8_v2 will be renamed to fcvPyramidCreateu8
-/// and the signature of fcvPyramidCreateu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Base image. Size of buffer is srcWidth*srcHeight bytes.
-///
-/// @param srcWidth
-/// Width of base image
-/// \n\b WARNING: must be a multiple of 2^(numLevels-1)
-///
-/// @param srcHeight
-/// height of base image
-/// \n\b NOTE: must be a multiple of 2^(numLevels-1)
-///
-/// @param numLevels
-/// Number of levels of the pyramid
-///
-/// @param pyramid
-/// Output pyramid of numLevels+1 images of the same type as src .
-/// pyramid[0] will be the same as src . pyramid[1] is the next
-/// pyramid layer, a smoothed and down-sized src , and so on.
-///
-/// @ingroup image_processing
-//-------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidCreateu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int numLevels,
- fcvPyramidLevel* pyramid );
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Builds an image pyramid (with stride).
-/// \n\b NOTE: Memory should be deallocated using fcvPyramidDelete
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvPyramidCreateu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvPyramidCreateu8,
-/// \a fcvPyramidCreateu8_v2 will be removed, and the current signature
-/// for \a fcvPyramidCreateu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvPyramidCreateu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// base image
-///
-/// @param srcWidth
-/// width of base image
-/// \n\b NOTE: Needs to be a multiple of 2^numLevels
-///
-/// @param srcHeight
-/// height of base image
-/// \n\b NOTE: Needs to be a multiple of 2^numLevel
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory (base image).
-/// \n\b NOTE: Needs to be a multiple of 2^numLevels
-/// \n\b NOTE: Pyramid (non-base) image stride is the same as its width
-///
-/// @param numLevels
-/// Number of levels of the pyramid
-///
-/// @param fcvPyramidLevel_v2
-/// output pyramid (with stride) of numLevels+1 images of the same type as src .
-/// pyramid[0] will be the same as src . pyramid[1] is the next
-/// pyramid layer, a smoothed and down-sized src , and so on.
-///
-/// @ingroup image_processing
-//-------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidCreateu8_v2( const uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t numLevels,
- fcvPyramidLevel_v2* pyramid );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Builds a Gaussian image pyramid.
-/// DO NOT USE THIS API unless for testing purposes.
-/// This API can be removed without notice.
-///
-/// @details
-/// This function builds a Gaussian image Pyramid given an input image. Each level
-/// of the pyramid is computed by first applying a gaussian filter on the previous level,
-/// and then scaling the image based on the type of scale factor selected. The memory for
-/// the pyramid must be allocated using fcvPyramidAllocate_v3(), and should be
-/// deallocated using fcvPyramidDelete_v2()
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvPyramidCreateu8_v2() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvPyramidCreateu8,
-/// \a fcvPyramidCreateu8_v3 will be removed, and the current signature
-/// for \a fcvPyramidCreateu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvPyramidCreateu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// base image
-///
-/// @param srcWidth
-/// Width of base image
-///
-/// @param srcHeight
-/// Height of base image
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory (base image).
-/// \n\b NOTE: The stride of pyramid levels other than the base are set to be the same as their width
-///
-/// @param numLevels
-/// Number of levels of the pyramid
-///
-/// @param scale
-/// Defines the type of scaling used for each pyramid level.
-/// FASTCV_PYRAMID_SCALE_HALF downscales each level of the pyramid by a factor of 2.
-/// FASTCV_PYRAMID_SCALE_ORB downscales each level of the pyramid by a factor of 1/(2)^(1/4),
-/// which is approximated as 0.8408964f
-///
-/// @param pyramidGaussian
-/// output pyramid of "numLevels" images of the same type as src .
-/// pyramidGaussian[0] will be the same as src . pyramidGaussian[1] is the next
-/// pyramid layer, a smoothed and scaled src, and so on.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//-------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvPyramidCreateu8_v3(const uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t numLevels,
- fcvPyramidScale scale,
- fcvPyramidLevel_v2* __restrict pyramidGaussian);
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Creates a gradient pyramid of int16_t from an image pyramid of uint8_t
-///
-/// @param imgPyr
-/// Input Image Pyramid
-///
-/// @param dxPyr
-/// Horizontal Sobel gradient pyramid
-///
-/// @param dyPyr
-/// Verical Sobel gradient pyramid
-///
-/// @param numLevels
-/// Number of levels in the pyramids
-///
-/// @ingroup image_processing
-//-------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidSobelGradientCreatei16( const fcvPyramidLevel* imgPyr,
- fcvPyramidLevel* dxPyr,
- fcvPyramidLevel* dyPyr,
- unsigned int numLevels );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Creates a gradient pyramid of float32 from an image pyramid of uint8_t
-///
-/// @param imgPyr
-/// input Image Pyramid
-///
-/// @param dxPyr
-/// Horizontal Sobel gradient pyramid
-///
-/// @param dyPyr
-/// Verical Sobel gradient pyramid
-///
-/// @param numLevels
-/// Number of levels in the pyramids
-///
-/// @ingroup image_processing
-//-------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidSobelGradientCreatef32( const fcvPyramidLevel* imgPyr,
- fcvPyramidLevel* dxPyr,
- fcvPyramidLevel* dyPyr,
- unsigned int numLevels );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Creates a gradient pyramid of integer8 from an image pyramid of uint8_t
-///
-/// @param imgPyr
-/// input Image Pyramid
-///
-/// @param dxPyr
-/// Horizontal Sobel gradient pyramid
-///
-/// @param dyPyr
-/// Verical Sobel gradient pyramid
-///
-/// @param numLevels
-/// Number of levels in the pyramids
-///
-/// @ingroup image_processing
-// -----------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidSobelGradientCreatei8( const fcvPyramidLevel* imgPyr,
- fcvPyramidLevel* dxPyr,
- fcvPyramidLevel* dyPyr,
- unsigned int numLevels );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelPlanars16_v3(). In the 2.0.0 release,
-/// fcvImageGradientSobelPlanars16_v3 will be renamed to fcvImageGradientSobelPlanars16
-/// and the signature of fcvImageGradientSobelPlanars16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelPlanars16( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelPlanars16_v3(). In the 2.0.0 release,
-/// fcvImageGradientSobelPlanars16_v3 will be renamed to fcvImageGradientSobelPlanars16
-/// and the signature of fcvImageGradientSobelPlanars16_v2 and
-/// fcvImageGradientSobelPlanars16_v3 as it appears now, will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays.
-/// \n\b NOTE: if 0, dxyStride is set as (srcWidth*sizeof(int16_t)).
-/// \n\b WARNING: should be multiple of 16 (8 * 2-bytes per gradient value), and at least as much as srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelPlanars16_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- unsigned int dxyStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data without normalization.
-/// This function computes central differences on 3x3 neighborhood and then convolves
-/// the result with Sobel kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvImageGradientSobelPlanars16_v2() with a change in behavior: no normalization
-/// at the end of the calculation.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientSobelPlanars16,
-/// \a fcvImageGradientSobelPlanars16_v2 and fcvImageGradientSobelPlanars16_v3
-/// will be removed, and the current signature for \a fcvImageGradientSobelPlanars16
-/// and fcvImageGradientSobelPlanars16_v3 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientSobelPlanars16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient. The number of pixels in a row.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth.
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageGradientSobelPlanars16_v3( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- unsigned int dxyStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelInterleaveds16_v3(). In the 2.0.0 release,
-/// fcvImageGradientSobelInterleaveds16_v3 will be renamed to fcvImageGradientSobelInterleaveds16
-/// and the signature of fcvImageGradientSobelInterleaveds16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param gradients
-/// Buffer to store horizontal and vertical gradient. Must be
-/// (width-2)*(height-2) *2 in size.
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelInterleaveds16( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelInterleaveds16_v3(). In the 2.0.0 release,
-/// fcvImageGradientSobelInterleaveds16_v3 will be renamed to fcvImageGradientSobelInterleaveds16
-/// and the signature of fcvImageGradientSobelInterleaveds16 and
-/// fcvImageGradientSobelInterleaveds16_v2 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param gradients
-/// Buffer to store horizontal and vertical gradient. Must be
-/// gradStride*(height-2) *2 bytes in size.
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param gradStride
-/// Stride (in bytes) of the interleaved gradients array.
-/// \n\b NOTE: if 0, gradStride is set as (srcWidth-2)*2*sizeof(int16_t).
-/// \n\b WARNING: should be multiple of 8, and at least as much as 4*srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelInterleaveds16_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients,
- unsigned int gradStride );
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-/// \n Compared to the original and v2 functions, this v3 functions does not normalize
-/// \n the gradients (divide by 8). It just returns the actual dx, dy values.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvImageGradientSobelInterleaveds16_v2() with a change in behavior: no
-/// normalization at the end of the calculation.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientSobelInterleaveds16,
-/// \a fcvImageGradientSobelInterleaveds16_v2 and fcvImageGradientSobelInterleaveds16_v3
-/// will be removed, and the current signature for \a fcvImageGradientSobelInterleaveds16
-/// and fcvImageGradientSobelInterleaveds16_v3 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientSobelInterleaveds16 when transitioning to 2.0.0.
-/// \n\n
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient. The number of pixels in a row.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param gradients
-/// Buffer to store horizontal and vertical gradient. Must be
-/// gradStride*(height-2) *2 bytes in size.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param gradStride
-/// Stride (in bytes) is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in the interleaved gradients array. If left at 0 gradStride is default to 4 * (srcWidth-2).
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @ingroup image_processing
-// -----------------------------------------------------------------------------
-FASTCV_API void
-fcvImageGradientSobelInterleaveds16_v3( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients,
- unsigned int gradStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelInterleavedf32_v2(). In the 2.0.0 release,
-/// fcvImageGradientSobelInterleavedf32_v2 will be renamed to fcvImageGradientSobelInterleavedf32
-/// and the signature of fcvImageGradientSobelInterleavedf32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param gradients
-/// Buffer to store horizontal and vertical gradient. Must be
-/// (width-2)*(height-2) *2 floats in size.
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelInterleavedf32( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvImageGradientSobelInterleavedf32() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientSobelInterleavedf32,
-/// \a fcvImageGradientSobelInterleavedf32_v2 will be removed, and the current signature
-/// for \a fcvImageGradientSobelInterleavedf32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientSobelInterleavedf32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param gradients
-/// Buffer to store horizontal and vertical gradient. Must be
-/// gradStride*(height-2) *2 bytes in size.
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param gradStride
-/// Stride (in bytes) of the interleaved gradients array.
-/// \n\b NOTE: if 0, gradStride is set as (srcWidth-2)*2*sizeof(float).
-/// \n\b WARNING: should be multiple of 8, and at least as much as (srcWidth-2)*2*sizeof(float) if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelInterleavedf32_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients,
- unsigned int gradStride);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function
-/// computes central differences on 3x3 neighborhood and then convolves the
-/// result with Sobel kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterGaussian3x3u8_v2(). In the 2.0.0 release,
-/// fcvImageGradientSobelPlanars8_v2 will be renamed to fcvImageGradientSobelPlanars8
-/// and the signature of fcvImageGradientSobelPlanars8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelPlanars8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int8_t* __restrict dx,
- int8_t* __restrict dy);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function
-/// computes central differences on 3x3 neighborhood and then convolves the
-/// result with Sobel kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvImageGradientSobelPlanars8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientSobelPlanars8,
-/// \a fcvImageGradientSobelPlanars8_v2 will be removed, and the current signature
-/// for \a fcvImageGradientSobelPlanars8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientSobelPlanars8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelPlanars8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int8_t* __restrict dx,
- int8_t* __restrict dy,
- unsigned int dxyStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelPlanarf32_v2(). In the 2.0.0 release,
-/// fcvImageGradientSobelPlanarf32_v2 will be renamed to fcvImageGradientSobelPlanarf32
-/// and the signature of fcvImageGradientSobelPlanarf32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageGradientSobelPlanarf32( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvImageGradientSobelPlanarf32() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientSobelPlanarf32,
-/// \a fcvImageGradientSobelPlanarf32_v2 will be removed, and the current signature
-/// for \a fcvImageGradientSobelPlanarf32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientSobelPlanarf32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays.
-/// \n\b NOTE: if 0, dxyStride is set as 4*srcWidth.
-/// \n\b WARNING: should be multiple of 32 (8 * 4-bytes per gradient value),and at least as much as srcWidth*sizeof(float) if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageGradientSobelPlanarf32_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy,
- unsigned int dxyStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelPlanarf32f32_v2(). In the 2.0.0 release,
-/// fcvImageGradientSobelPlanarf32f32_v2 will be renamed to fcvImageGradientSobelPlanarf32f32
-/// and the signature of fcvImageGradientSobelPlanarf32f32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight floats.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels (not bytes) between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (width)*(height) floats in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (width)*(height) floats in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageGradientSobelPlanarf32f32( const float * __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvImageGradientSobelPlanarf32f32()() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientSobelPlanarf32f32(),
-/// \a fcvImageGradientSobelPlanarf32f32_v2 will be removed, and the current signature
-/// for \a fcvImageGradientSobelPlanarf32f32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientSobelPlanarf32f32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight floats.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride (in bytes) of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: should be multiple of 32 (8 * 4-bytes), and at least as much as srcWidth*sizeof(float) if not 0.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth*4.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays.
-/// \n\b WARNING: should be multiple of 32 (8 * 4-bytes per gradient value).
-/// \n\b WARNING: should be multiple of 32 (8 * 4-bytes), and at least as much as srcWidth*sizeof(float) if not 0.
-/// \n\b NOTE: if 0, dxyStride is set as srcWidth*4.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageGradientSobelPlanarf32f32_v2( const float * __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy,
- unsigned int dxyStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Block Optical Flow 16x16 - Tracks all 16x16 blocks in the Region of Interest
-/// (ROI) from Source-1 to Source-2. Generates Motion Vectors for blocks where
-/// motion is detected.
-///
-/// @details
-///
-/// @param[in] src1
-/// Pointer to source image where the original blocks are present.
-/// \n Dimensions should be same as \a src2, and equal to \a srcWidth,
-/// \a srcHeight, \a srcStride.
-/// \n\b WARNING: should be 128-bit aligned. Buffer size is srcStride*srcHeight bytes.
-///
-/// @param[in] src2
-/// Pointer to second source image where motion vectors for blocks in \a img1
-/// are to be located.
-/// \n Dimensions should be same as \a src1, and equal to \a srcWidth,
-/// \a srcHeight, \a srcStride.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param[in] srcWidth
-/// Width of source images pointed by \a src1 and \a src2.
-///
-/// @param[in] srcHeight
-/// Height of source images pointed by \a src1 and \a src2.
-///
-/// @param[in] srcStride
-/// Stride of source images pointed by \a src1 and \a src2.
-///
-/// @param[in] roiLeft
-/// Left co-ordinate (x0) of Region-of-Interest (ROI).
-///
-/// @param[in] roiTop
-/// Top co-orgdinate (y0) of Region-of-Interest (ROI).
-///
-/// @param[in] roiRight
-/// Right co-ordinate (x1) of Region-of-Interest (ROI).
-///
-/// @param[in] roiBottom
-/// Bottom co-ordinate (y1) of Region-of-Interest (ROI).
-///
-/// @param[in] shiftSize
-/// Distance in number of pixels (both horizontally and vertically) between
-/// consecutive blocks for which motion vector is searched.
-/// \n\b NOTE: Larger the value, less number of blocks will be tracked, and
-/// hence the function will run faster.
-///
-/// @param[in] searchWidth
-/// Numbers of pixels horizontally on left and right of the source block (src2) where a
-/// match is searched for. For example, if searchWidth is 8 and searchHeight
-/// is 8, then the search area for any given block will be 32x32 around
-/// the location of that block.
-///
-/// @param[in] searchHeight
-/// Numbers of pixels vertically on top and bottom of the source block (src2) where a
-/// match is searched for. For example, if searchWidth is 8 and searchHeight
-/// is 8, then the search area for any given block will be 32x32 around
-/// the location of that block.
-///
-/// @param[in] searchStep
-/// Distance in number of pixels between consecutive search targets within
-/// the above search window.
-/// \n\b NOTE: Larger the value, more coarse the search will be and thus
-/// will make the fucntion run faster. Smaller the value, more dense the
-/// search will be, making the funciton run slower.
-///
-/// @param[in] usePrevious
-/// Indicates if the function should use the existing motion vectors in
-/// locX and locY as the starting point for motion vector search.
-/// \n\b NOTE: This parameter is redundant at the moment.
-///
-/// @param[out] numMv
-/// Pointer to variable that will store the count of Motion Vectors
-/// generated by the function.
-/// \n\b WARNING: This pointer should be Non-NULL.
-///
-/// @param[out] locX
-/// Pointer to an array which will store the X co-ordinates of the
-/// original Block for which a Motion Vector is generated.
-/// \n\b NOTE: The array will contain \a numMv valid entries.
-/// \n\b NOTE: the maximum number of MVs is related to ROI size and shiftSize, as follows:
-/// (roiRight-roiLeft)/shiftSize * (roiBottom-roiTop)/shiftSize;
-/// \n\b WARNING: This pointer should be Non-NULL, and the array size should
-/// be >= number of 16x16 blocks in ROI.
-///
-/// @param[out] locY
-/// Pointer to an array which will store the Y co-ordinates of the
-/// original Block for which a Motion Vector is generated.
-/// \n\b NOTE: The array will contain \a numMv valid entries.
-/// \n\b NOTE: the maximum number of MVs is related to ROI size and shiftSize, as follows:
-/// (roiRight-roiLeft)/shiftSize * (roiBottom-roiTop)/shiftSize;
-/// \n\b WARNING: This pointer should be Non-NULL, and the array size should
-/// be >= number of 16x16 blocks in ROI.
-///
-/// @param[out] mvX
-/// Pointer to an array which will store the X co-ordinates of the block in \a src2
-/// corresponding block in \a src1. (\a mvX[i]-\a locX[i]) will give the motion
-/// vector for the block in \a src1.
-/// \n\b NOTE: The array will contain \a numMv valid entries.
-/// \n\b NOTE: the maximum number of MVs is related to ROI size and shiftSize, as follows:
-/// (roiRight-roiLeft)/shiftSize * (roiBottom-roiTop)/shiftSize;
-/// \n\b WARNING: This pointer should be Non-NULL, and the array size should
-/// be >= number of 16x16 blocks in ROI.
-///
-/// @param[out] mvY
-/// Pointer to an array which will store the Y co-ordinates of the block in \a src2
-/// corresponding block in \a src1. (\a mvY[i]-\a locY[i]) will give the motion
-/// vector for the block in \a src1.
-/// \n\b NOTE: The array will contain \a numMv valid entries.
-/// \n\b NOTE: the maximum number of MVs is related to ROI size and shiftSize, as follows:
-/// (roiRight-roiLeft)/shiftSize * (roiBottom-roiTop)/shiftSize;
-/// \n\b WARNING: This pointer should be Non-NULL, and the array size should
-/// be >= number of 16x16 blocks in ROI.
-///
-/// @return
-/// 0 - Success, Failure otherwise.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API int
-fcvTrackBMOpticalFlow16x16u8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t roiLeft,
- uint32_t roiTop,
- uint32_t roiRight,
- uint32_t roiBottom,
- uint32_t shiftSize,
- uint32_t searchWidth,
- uint32_t searchHeight,
- uint32_t searchStep,
- uint32_t usePrevious,
- uint32_t * numMv,
- uint32_t * locX,
- uint32_t * locY,
- uint32_t * mvX,
- uint32_t * mvY);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Searches a set of patches within the source image for the max NCCs. The search
-/// regions are corresponding to the patches in the search list.
-///
-/// @param patches
-/// Pointer to a set of 8-bit patches, each patch takes patchWidth *patchHeight pixel
-/// values which are linearly laid out in memory.
-/// \n\b WARNING: patchWidth * patchHeight must be <= 256
-///
-/// @param patchWidth
-/// Width in pixels of the patch.
-///
-/// @param patchHeight
-/// Height in pixels of the patch.
-///
-/// @param src
-/// Pointer to 8-bit image for search.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width in pixels of the image.
-///
-/// @param srcHeight
-/// Height in pixels of the image.
-///
-/// @param srcStride
-/// The stride of the imge. Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to srcWidth.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param searchCenterX
-/// The list of Center X coordinate of each search window
-///
-/// @param searchCenterY
-/// The list of Center Y coordinate of each search window
-///
-/// @param searchWidth
-/// Width of search range in pixels
-/// \n\b WARNING: must be odd number.
-///
-/// @param searchHeight
-/// Height of search range in pixels
-/// \n\b WARNING: must be odd number.
-///
-/// @param filterLowVariance
-/// Minimum variance. Used to as threshold to compare against variance of
-/// the block of src or patch.
-///
-/// @param bestX
-/// The list of Center X location on the image of the best NCC matches.
-/// The center X has (patchWidth/2) pixels to the left and
-/// (patchWidth - (patchWidth/2) - 1) to the right.
-///
-/// @param bestY
-/// The list of Center Y location on the image of the best NCC matches.
-/// The center Y has (patchWidth/2) pixels above and
-/// (patchWidth - (patchWidth/2) - 1) below.
-///
-/// @param bestNCC
-/// NCC value of the best match blocks.
-/// It's quantized to integer value in Q7 (between -128 and 128).
-///
-/// @param findSubPixel (0 or 1)
-/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
-///
-/// @param subX
-/// Sub-pixel estimate for optimal NCC relative to bestX.
-/// \n e.g., float x = (float)bestX + subX;
-///
-/// @param subY
-/// Sub-pixel estimate for optimal NCC relative to bestY.
-///
-/// @param numSearches
-/// number of patch searches in the image.
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API fcvStatus
-fcvNCCPatchesOnRectu8 ( const uint8_t* __restrict patches,
- uint32_t patchWidth,
- uint32_t patchHeight,
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- const uint32_t * __restrict searchCenterX,
- const uint32_t * __restrict searchCenterY,
- uint32_t searchWidth,
- uint32_t searchHeight,
- int32_t filterLowVariance,
- uint32_t* __restrict bestX,
- uint32_t* __restrict bestY,
- uint32_t* __restrict bestNCC,
- int32_t findSubPixel,
- float32_t* __restrict subX,
- float32_t* __restrict subY,
- uint32_t numSearches );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs per-element bitwise-OR operation on two 8-bit single channel images.
-/// Two images should have the same size. dst(I)=src1(I) V src2(I) if mask(I) is not zero.
-///
-/// @param src1
-/// Pointer to the 8-bit source image 1.
-///
-/// @param src2
-/// Pointer to the 8-bit source image 2.
-///
-/// @param srcWidth
-/// Width of source images pointed by src1 and src2.
-///
-/// @param srcHeight
-/// Height of source images pointed by src1 and src2.
-///
-/// @param srcStride
-/// Stride of source images (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param dst
-/// Pointer to the 8-bit destination image.
-///
-/// @param dstStride
-/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param mask
-/// Pointer to the 8-bit single channel mask. It specifies elements of the destination array to be changed.
-/// The mask is optional. If there is no mask, the value is NULL.
-///
-/// @param maskStride
-/// Stride of the mask (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If there is no mask, the value is 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvBitwiseOru8(const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride,
- uint8_t * __restrict mask,
- uint32_t maskStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs per-element bitwise-OR operation on two 32-bit single channel images.
-/// Two images should have the same size. dst(I)=src1(I) V src2(I) if mask(I) is not zero.
-///
-/// @param src1
-/// Pointer to the 32-bit source image 1.
-///
-/// @param src2
-/// Pointer to the 32-bit source image 2.
-///
-/// @param srcWidth
-/// Width of source images pointed by src1 and src2.
-///
-/// @param srcHeight
-/// Height of source images pointed by src1 and src2.
-///
-/// @param srcStride
-/// Stride of source images (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param dst
-/// Pointer to the 8-bit destination image.
-///
-/// @param dstStride
-/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param mask
-/// Pointer to the 8-bit single channel mask. It specifies elements of the destination array to be changed.
-/// The mask is optional. If there is no mask, the value is NULL.
-///
-/// @param maskStride
-/// Stride of the mask (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If there is no mask, the value is 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvBitwiseOrs32(const int32_t* __restrict src1,
- const int32_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t * __restrict dst,
- uint32_t dstStride,
- uint8_t * __restrict mask,
- uint32_t maskStride);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Converts an image from RGB space to grayscale
-///
-/// @details
-///
-/// @param src
-/// Source 8-bit image, BGR888 format (R is lowest byte for the pixel)
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Source image width.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Source image height.
-///
-/// @param srcStride
-/// Stride of source image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If set to 0, srcStride=srcWidth as default
-///
-/// @param dst
-/// Destination 8-bit gray-scale image.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If set to 0, dstStride=srcStride as default
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvColorRGB888ToGrayu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Integral of the image tilted by 45 degrees
-///
-/// @details
-/// Calculates the tilted integral image of an input image
-/// and adds an zero-filled border on top. Left border not zero.
-/// dst[i,j]=sum (src[m,n]), where n according to
-/// descDBTargetId.
-///
-/// @param dbLUT
-/// A pointer to uint32_t [numDBLUT][2],
-/// which stores the starting index of descDB and
-/// the number of descriptors
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param numDBLUT
-/// The size of dbLUT
-///
-/// @param descDB
-/// A pointer to int8_t [numDescDB][36],
-/// which stores descriptors
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param descDBInvLenQ38
-/// A pointer to uint32_t [numDescDB],
-/// which stores the inverse length of descDB.
-/// The value is in Q38 format.
-///
-/// @param descDBTargetId
-/// A pointer to uint16_t [numDescDB],
-/// which stores the target id.
-///
-/// @param descDBOldIdx
-/// A pointer to uint32_t [numDescDB],
-/// which stores the old index of the desc before sorting
-///
-/// @param numDescDB
-/// Number of descriptor in the database.
-///
-/// @ingroup feature_detection
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvLinearSearchPrepare8x36s8( uint32_t * __restrict dbLUT,
- uint32_t numDBLUT,
- int8_t * __restrict descDB,
- uint32_t * __restrict descDBInvLenQ38,
- uint16_t * __restrict descDBTargetId,
- uint32_t * __restrict descDBOldIdx,
- uint32_t numDescDB );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Perform linear search of descriptor in a database
-///
-/// @param dbLUT
-/// A pointer to uint32_t [numDBLUT][2],
-/// which stores the starting index of descDB and
-/// the number of descriptors
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param numDBLUT
-/// The size of dbLUT
-///
-/// @param descDB
-/// A pointer to int8_t [numDescDB][36],
-/// which stores descriptors
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param descDBInvLenQ38
-/// A pointer to uint32_t [numDescDB],
-/// which stores the inverse length of descDB.
-/// The value is in Q38 format.
-///
-/// @param descDBTargetId
-/// A pointer to uint16_t [numDescDB],
-/// which stores the target id.
-///
-/// @param numDescDB
-/// Number of descriptor in the database.
-///
-/// @param srcDesc
-/// A pointer to int8_t [numSrcDesc][36],
-/// which stores descriptors.
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param srcDescInvLenQ38
-/// A pointer to uint32_t [numSrcDec],
-/// which stores the inverse length of srcDesc.
-/// The value is in Q38 format.
-///
-/// @param srcDescIdx
-/// A pointer to the dbLUT data
-///
-/// @param numSrcDesc
-/// Number of source descriptor
-///
-/// @param targetsToIgnore
-/// A list of target IDs to be ignored
-///
-/// @param numTargetsToIgnore
-/// Number of targets to be ignored
-///
-/// @param maxDistanceQ31
-/// Maximum distance for correspondences.
-/// In Q31 format.
-///
-/// @param correspondenceDBIdx
-/// A pointer to uint32_t [maxNumCorrespondences],
-/// which will be used by this function to output indices of featuresDB
-/// as a part of correspondences.
-///
-/// @param correspondenceSrcDescIdx
-/// A pointer to uint32_t [maxNumCorrespondences],
-/// which will be used by this function to output indices of descriptors
-/// as a part of correspondences.
-///
-/// @param correspondenceDistanceQ31
-/// A pointer to uint32_t [maxNumCorrespondences],
-/// which will be used by this function to output the distances
-/// as a part of correspondences.
-/// In Q31 format.
-///
-/// @param maxNumCorrespondences
-/// Maximum number of correspondences allowed
-///
-/// @param numCorrespondences
-/// Number of correspondences returned by this function
-///
-/// @ingroup feature_detection
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvLinearSearch8x36s8(
- const uint32_t * __restrict dbLUT,
- uint32_t numDBLUT,
- const int8_t * __restrict descDB,
- const uint32_t * __restrict descDBInvLenQ38,
- const uint16_t * __restrict descDBTargetId,
- uint32_t numDescDB,
- const int8_t * __restrict srcDesc,
- const uint32_t * __restrict srcDescInvLenQ38,
- const uint32_t * __restrict srcDescIdx,
- uint32_t numSrcDesc,
- const uint16_t * __restrict targetsToIgnore,
- uint32_t numTargetsToIgnore,
- uint32_t maxDistanceQ31,
- uint32_t * __restrict correspondenceDBIdx,
- uint32_t * __restrict correspondenceSrcDescIdx,
- uint32_t * __restrict correspondenceDistanceQ31,
- uint32_t maxNumCorrespondences,
- uint32_t * __restrict numCorrespondences );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds only extreme outer contours in a binary image. There is no nesting
-/// relationship between contours. It sets hierarchy[i][2]=hierarchy[i][3]=-1
-/// for all the contours.
-///
-/// @param src
-/// Grayscale image with one byte per pixel. Non-zero pixels are treated as
-/// 1's. Zero pixels remain 0's, so the image is treated as binary.
-///
-/// @param srcWidth
-/// Image width
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param maxNumContours
-/// Maximum number of contours can be found
-///
-/// @param numContours
-/// Number of actually found contours
-///
-/// @param numContourPoints
-/// Number of points in each found contour
-///
-/// @param contourStartPoints
-/// Pointers to the start point of each found contour
-///
-/// @param pointBuffer
-/// Pointer to point buffer for contour points' coordinates. It should
-/// be allocated before calling this function.
-///
-/// @param pointBufferSize
-/// Size of point buffer in terms of uint32_t
-///
-/// @param hierarchy
-/// Information about the image topology. It has numContours elements.
-/// For each contour i, the elements hierarchy[i][0], hiearchy[i][1],
-/// hiearchy[i][2], and hiearchy[i][3] are set to 0-based indices of the
-/// next and previous contours at the same hierarchical level, the first
-/// child contour and the parent contour, respectively. If for a contour i
-/// there are no next, previous, parent, or nested contours, the corresponding
-/// elements of hierarchy[i] will be negative.
-///
-/// @param contourHandle
-/// Pointer to assistant and intermediate data. It should be allocated by
-/// fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFindContoursExternalu8( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- int32_t hierarchy[][4],
- void* contourHandle );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds contours in a binary image without any hierarchical relationships.
-///
-/// @param src
-/// Grayscale image with one byte per pixel. Non-zero pixels are treated as
-/// 1's. Zero pixels remain 0's, so the image is treated as binary.
-///
-/// @param srcWidth
-/// Image width
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param maxNumContours
-/// Maximum number of contours can be found
-///
-/// @param numContours
-/// Number of actually found contours
-///
-/// @param numContourPoints
-/// Number of points in each found contour
-///
-/// @param contourStartPoints
-/// Pointers to the start point of each found contour
-///
-/// @param pointBuffer
-/// Pointer to point buffer for contour points' coordinates. It should
-/// be allocated before calling this function.
-///
-/// @param pointBufferSize
-/// Size of point buffer in terms of uint32_t
-///
-/// @param contourHandle
-/// Pointer to assistant and intermediate data. It should be allocated by
-/// fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFindContoursListu8( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- void* contourHandle );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds contours in a binary image and organizes them into a two-level
-/// hierarchy. At the top level, there are external boundaries of the
-/// components. At the second level, there are boundaries of the holes.
-/// If there is another contour inside a hole of a connected component,
-/// it is still put at the top level.
-///
-/// @param src
-/// Grayscale image with one byte per pixel. Non-zero pixels are treated as
-/// 1's. Zero pixels remain 0's, so the image is treated as binary.
-///
-/// @param srcWidth
-/// Image width
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param maxNumContours
-/// Maximum number of contours can be found (<= 126)
-///
-/// @param numContours
-/// Number of actually found contours
-///
-/// @param holeFlag
-/// Hole flag for each found contour to indicate whether it is a hole or not
-///
-/// @param numContourPoints
-/// Number of points in each found contour
-///
-/// @param contourStartPoints
-/// Pointers to the start point of each found contour
-///
-/// @param pointBuffer
-/// Pointer to point buffer for contour points' coordinates. It should
-/// be allocated before calling this function.
-///
-/// @param pointBufferSize
-/// Size of point buffer in terms of uint32_t
-///
-/// @param hierarchy
-/// Information about the image topology. It has numContours elements.
-/// For each contour i, the elements hierarchy[i][0], hiearchy[i][1],
-/// hiearchy[i][2], and hiearchy[i][3] are set to 0-based indices of the
-/// next and previous contours at the same hierarchical level, the first
-/// child contour and the parent contour, respectively. If for a contour i
-/// there are no next, previous, parent, or nested contours, the corresponding
-/// elements of hierarchy[i] will be negative.
-///
-/// @param contourHandle
-/// Pointer to assistant and intermediate data. It should be allocated by
-/// fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFindContoursCcompu8( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict holeFlag,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- int32_t hierarchy[][4],
- void* contourHandle );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds contours in a binary image and reconstructs a full hierarchy of
-/// nested contours
-///
-/// @param src
-/// Grayscale image with one byte per pixel. Non-zero pixels are treated as
-/// 1's. Zero pixels remain 0's, so the image is treated as binary.
-///
-/// @param srcWidth
-/// Image width
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param numContours
-/// Number of actually found contours
-///
-/// @param maxNumContours
-/// Maximum number of contours can be found (<= 126)
-///
-/// @param holeFlag
-/// Hole flag for each found contour to indicate whether it is a hole or not
-///
-/// @param numContourPoints
-/// Number of points in each found contour
-///
-/// @param contourStartPoints
-/// Pointers to the start point of each found contour
-///
-/// @param pointBuffer
-/// Pointer to point buffer for contour points' coordinates. It should
-/// be allocated before calling this function.
-///
-/// @param pointBufferSize
-/// Size of point buffer in terms of uint32_t
-///
-/// @param hierarchy
-/// Information about the image topology. It has numContours elements.
-/// For each contour i, the elements hierarchy[i][0], hiearchy[i][1],
-/// hiearchy[i][2], and hiearchy[i][3] are set to 0-based indices of the
-/// next and previous contours at the same hierarchical level, the first
-/// child contour and the parent contour, respectively. If for a contour i
-/// there are no next, previous, parent, or nested contours, the corresponding
-/// elements of hierarchy[i] will be negative.
-///
-/// @param contourHandle
-/// Pointer to assistant and intermediate data. It should be allocated by
-/// fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFindContoursTreeu8( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict holeFlag,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- int32_t hierarchy[][4],
- void* contourHandle );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Allocates assistant and intermediate data for contour
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @return
-/// Pointer to allocated data
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API void*
-fcvFindContoursAllocate( uint32_t srcStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Deallocates assistant and intermediate data for contour
-///
-/// @param contourHandle
-/// Pointer to assistant and intermediate data
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFindContoursDelete( void* contourHandle );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Solve linear equation system
-/// Ax = b
-///
-/// @details
-///
-///
-/// @param A
-/// The matrix contains coefficients of the linear equation system
-///
-/// @param numRows
-/// The number of rows for the matrix A
-///
-/// @param numCols
-/// The number of columns for the matrix A
-///
-/// @param b
-/// The right side value
-///
-/// @param x
-/// The solution vector
-///
-///
-/// @return
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSolvef32(const float32_t * __restrict A,
- int32_t numCols,
- int32_t numRows,
- const float32_t * __restrict b,
- float32_t * __restrict x);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Calculates a perspective transform from four pairs of the corresponding
-/// points.
-/// NOTE: in order to guarantee a valid output transform, any three points
-/// in src1 or src2 cannot be collinear.
-///
-/// @param src1
-/// Coordinates of quadrangle vertices in the source image
-///
-/// @param src2
-/// Coordinates of the corresponding quadrangle vertices in the destination
-/// image
-///
-/// @param transformCoefficient
-/// 3x3 matrix of a perspective transform
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvGetPerspectiveTransformf32( const float32_t src1[8],
- const float32_t src2[8],
- float32_t transformCoefficient[9] );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of a uint8_t single channel array to a given value.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value
-/// the input uint8_t value
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed.
-///
-/// @param maskStride
-/// Stride for the mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSetElementsu8( uint8_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- uint8_t value,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of an int32_t single channel array to a given value.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value
-/// the input int32_t value
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementss32( int32_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- int32_t value,
- const uint8_t * __restrict mask ,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of a float32_t single channel array to a given value.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value
-/// the input float32_t value
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsf32( float32_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- float32_t value,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of a uint8_t 4-channel array to a given 4-element scalar.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value1
-/// First uint8_t value of the Scalar
-///
-/// @param value2
-/// Second uint8_t value of the Scalar
-///
-/// @param value3
-/// Third uint8_t value of the Scalar
-///
-/// @param value4
-/// Fourth uint8_t value of the Scalar
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsc4u8( uint8_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- uint8_t value1,
- uint8_t value2,
- uint8_t value3,
- uint8_t value4,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of an int32_t 4-channel array to a given 4-element scalar.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value1
-/// First int32_t value of the Scalar
-///
-/// @param value2
-/// Second int32_t value of the Scalar
-///
-/// @param value3
-/// Third int32_t value of the Scalar
-///
-/// @param value4
-/// Fourth int32_t value of the Scalar
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed.
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsc4s32( int32_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- int32_t value1,
- int32_t value2,
- int32_t value3,
- int32_t value4,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of a float32_t 4-channel array to a given 4-element scalar.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value1
-/// First float32_t value of the Scalar
-///
-/// @param value2
-/// Second float32_t value of the Scalar
-///
-/// @param value3
-/// Third float32_t value of the Scalar
-///
-/// @param value4
-/// Fourth float32_t value of the Scalar
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsc4f32( float32_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- float32_t value1,
- float32_t value2,
- float32_t value3,
- float32_t value4,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of a uint8_t 3-channel array to a given 3-element scalar.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value1
-/// First uint8_t value of the Scalar
-///
-/// @param value2
-/// Second uint8_t value of the Scalar
-///
-/// @param value3
-/// Third uint8_t value of the Scalar
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsc3u8( uint8_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- uint8_t value1,
- uint8_t value2,
- uint8_t value3,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of an int32_t 3-channel array to a given 3-element scalar.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value1
-/// First int32_t value of the Scalar
-///
-/// @param value2
-/// Second int32_t value of the Scalar
-///
-/// @param value3
-/// Third int32_t value of the Scalar
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed.
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsc3s32( int32_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- int32_t value1,
- int32_t value2,
- int32_t value3,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of a float32_t 3-channel array to a given 3-element scalar.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value1
-/// First float32_t value of the Scalar
-///
-/// @param value2
-/// Second float32_t value of the Scalar
-///
-/// @param value3
-/// Third float32_t value of the Scalar
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsc3f32( float32_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- float32_t value1,
- float32_t value2,
- float32_t value3,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines an enumeration to list threshold types used in fcvAdaptiveThreshold
-//------------------------------------------------------------------------------
-
-typedef enum {
- FCV_THRESH_BINARY = 0, // value = value > threshold ? max_value : 0
- FCV_THRESH_BINARY_INV // value = value > threshold ? 0 : max_value
-} fcvThreshType;
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Binarizes a grayscale image based on an adaptive threshold value calculated from 3x3 Gaussian kernel.
-///
-/// @details
-/// For each pixel, the threshold is computed adaptively based on cross-correlation with a
-/// 3x3 Gaussian kernel minus value (parameter). The standard deviation is used for Gaussian kernel.
-/// For FCV_THRESH_BINARY threshold type, the pixel is set as maxValue if it's value is greater than the threshold;
-/// else, it is set as zero. For FCV_THRESH_BINARY_INV threshold type, the pixel is set as zero if it's value is greater than the threshold;
-/// else, it is set as maxValue.
-///
-/// @param src
-/// Pointer to the 8-bit input image.
-///
-/// @param srcWidth
-/// Width of source images pointed by src.
-///
-/// @param srcHeight
-/// Height of source images pointed by src.
-///
-/// @param srcStride
-/// Stride of source image (i.e., number of bytes between column 0
-/// of row 0 and column 0 of row 1).
-///
-/// @param maxValue
-/// The maximum integer value to be used. 0>1+8) *sizeof(uint32_t)
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param integralCrStride
-/// The stride of integralCr. (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2). If left at 0 integralCrStride is default to (srcWidth>>1+8) *sizeof(uint32_t)
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @return
-/// No return value.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvIntegrateImageYCbCr420PseudoPlanaru8(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint32_t* __restrict integralY,
- uint32_t* __restrict integralCb,
- uint32_t* __restrict integralCr,
- uint32_t integralYStride,
- uint32_t integralCbStride,
- uint32_t integralCrStride);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// This function finds the foreground.
-///
-/// @details
-/// This function tries to find a forgound in the current image (represented by: fgIntegralY,
-/// fgIntegralCb, fgIntegralCr) based on the current background model (represented by: bgIntegralY,
-/// bgIntegralCb, bgIntegralCr). For example, the tuple (bgIntegralY, bgIntegralCb, bgIntegralCr) may be
-/// from a picture shooting a wall. Then the tuple (fgIntegralY, fgIntegralCb, fgIntegralCr) may be
-/// the wall with a paint on it. Note that all the first six parameters are indicating integral images
-/// that's computed from a YUV420 image, which maybe computed from the function:
-/// fcvIntegrateImageYCbCr420PseudoPlanaru8. Generally the size of fgIntegralY and bgIntegralY are
-/// (srcWidth+1)*(srcHeight+1). And the size of fgIntegralU, fgIntegralV, bgIntegralU and bgIntegralV
-/// are (srcWidth/2+1)*(srcHeight/2+1). The value of the outputWidth and outputHeight are usually indicating
-/// the desired block size. For example, if the user wants a 20x15 blocks on a 800x480 image. Then
-/// outputWidth=800/20 and outputHeight=480/15. After return, if the value in the outputMask image is
-/// 255, then a moving block is indicated, otherwise a non-moving block is indicated.
-///
-/// @param bgIntegralY
-/// The input image/patch that's indicating the Y channel of the integral image of the background image.
-/// Size of buffer is srcYStride*srcHeight bytes
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param bgIntegralCb
-/// The input image/patch that's indicating the Cb channel of the integral image of the background image.
-/// Size of buffer is srcCbStride*srcHeight/2 bytes
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param bgIntegralCr
-/// The input image/patch that's indicating the Cr channel of the integral image of the background image.
-/// Size of buffer is srcCrStride*srcHeight/2 bytes
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param fgIntegralY
-/// The input image/patch that's indicating the Y channel of the integral image of the image
-/// on which we want to find the foreground.
-/// Size of buffer is srcYStride*srcHeight bytes
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param fgIntegralCb
-/// The input image/patch that's indicating the Cb channel of the integral image of the image
-/// on which we want to find the foreground.
-/// Size of buffer is srcCbStride*srcHeight/2 bytes
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param fgIntegralCr
-/// The input image/patch that's indicating the Cr channel of the integral image of the image
-/// on which we want to find the foreground.
-/// Size of buffer is srcCrStride*srcHeight/2 bytes
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row. See the details.
-/// \n\b NOTE: must be a multiple of 16.
-///
-/// @param srcHeight
-/// The height of the source image. See the details.
-/// \n\b NOTE: must be a multiple of 2.
-///
-/// @param srcYStride
-/// The stride of the input source image's Y channel. (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2). If left at 0 srcStride is default to (srcWidth+8)*sizeof(uint32_t).
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcCbStride
-/// The stride of the input source image's Cb channel. (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2). If left at 0 srcStride is default to (srcWidth>>1+8)*sizeof(uint32_t).
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcCrStride
-/// The stride of the input source image's Cr channel. (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2). If left at 0 srcStride is default to (srcWidth>>1+8)*sizeof(uint32_t).
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param outputMask
-/// The output mask image. Each pixel represent the motion condition for a block in the original image.
-/// Size of buffer is outputMaskStride*outputHeight bytes
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param outputWidth
-/// The width of the output mask image.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param outputHeight
-/// The height of the output mask image.
-///
-/// @param outputMaskStride
-/// The stride of the output mask image. (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2). If left at 0 outputMaskStride is default to outputWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param threshold
-/// The threshold that's used to decide if a block is moving or not. (recommend the value of 20).
-///
-/// @return
-/// No return value.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFindForegroundIntegrateImageYCbCr420u32(
- const uint32_t * __restrict bgIntegralY,
- const uint32_t * __restrict bgIntegralCb,
- const uint32_t * __restrict bgIntegralCr,
- const uint32_t * __restrict fgIntegralY,
- const uint32_t * __restrict fgIntegralCb,
- const uint32_t * __restrict fgIntegralCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t * __restrict outputMask,
- uint32_t outputWidth,
- uint32_t outputHeight,
- uint32_t outputMaskStride,
- float32_t threshold );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// This function calculates the average value of an image.
-///
-/// @details
-/// This function sums all the pixel value in an image and divide the result by the number of pixels in the image.
-///
-/// @param src
-/// The input image/patch. Must be 32 bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param avgValue
-/// The output average value.
-///
-/// @return
-/// No return value.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvAverages32(
- const int32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t* __restrict avgValue);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// This function calculates the average value of an image.
-///
-/// @details
-/// This function sums all the pixel value in an image and divide the result by the number of pixels in the image.
-///
-/// @param src
-/// 8-bit image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param avgValue
-/// The output average value.
-///
-/// @return
-/// No return value.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvAverageu8(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t* __restrict avgValue);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Applies the meanshift procedure and obtains the final converged position
-///
-/// @details
-/// This function applies the meanshift procedure to an original image (usually a probability image) and obtains the final converged position.
-/// The converged position search will stop either it has reached the required accuracy or the maximum number of iterations.
-///
-/// @param src
-/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be 8 bit grayscale image.
-/// Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// The width of the input source image.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// The height of the input source image.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param window
-/// Pointer to the initial search window position which also returns the final converged window position.
-///
-/// @param criteria
-/// The criteria used to finish the MeanShift which consists of two termination criteria:
-/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
-///
-/// @return
-/// The actually number of iterations
-///
-/// @ingroup Motion_and_Object_Tracking
-//------------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvMeanShiftu8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Applies the meanshift procedure and obtains the final converged position
-///
-/// @details
-/// This function applies the meanshift procedure to an original image (usually a probability image) and obtains the final converged position.
-/// The converged position search will stop either it has reached the required accuracy or the maximum number of iterations.
-///
-/// @param src
-/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be int 32bit grayscale image.
-/// Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// The width of the input source image.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// The height of the input source image.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param window
-/// Pointer to the initial search window position which also returns the final converged window position.
-///
-/// @param criteria
-/// The criteria used to finish the MeanShift which consists of two termination criteria:
-/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
-///
-/// @return
-/// Number of iterations
-///
-/// @ingroup Motion_and_Object_Tracking
-//------------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvMeanShifts32(const int32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Applies the meanshift procedure and obtains the final converged position
-///
-/// @details
-/// This function applies the meanshift procedure to an original image (usually a probability image) and obtains the final converged position.
-/// The converged position search will stop either it has reached the required accuracy or the maximum number of iterations.
-///
-/// @param src
-/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be float 32bit grayscale image.
-/// Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// The width of the input source image.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// The height of the input source image.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param window
-/// Pointer to the initial search window position which also returns the final converged window position.
-///
-/// @param criteria
-/// The criteria used to finish the MeanShift which consists of two termination criteria:
-/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
-///
-/// @return
-/// Number of iterations
-///
-/// @ingroup Motion_and_Object_Tracking
-//------------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvMeanShiftf32(const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Applies the ConAdaTrack procedure and find the object center, size and orientation
-///
-/// @details
-/// This function applies the ConAdaTrack procedure to an original image (usually a probability image) and obtains the final converged object.
-/// The optimal object search will stop either it has reached the required accuracy or the maximum number of iterations.
-///
-/// @param src
-/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be 8bit grayscale image.
-/// Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// The width of the input source image.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// The height of the input source image.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param window
-/// Pointer to the initial search window position which also returns the final converged window position.
-///
-/// @param criteria
-/// The criteria used to finish the object search which consists of two termination criteria:
-/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
-///
-/// @param circuBox
-/// The circumscribed box around the object
-///
-/// @return
-/// Number of iterations
-///
-/// @ingroup Motion_and_Object_Tracking
-//------------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvConAdaTracku8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria,
- fcvBox2D* circuBox);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Applies the ConAdaTrack procedure and find the object center, size and orientation
-///
-/// @details
-/// This function applies the ConAdaTrack procedure to an original image (usually a probability image) and obtains the final converged object.
-/// The optimal object search will stop either it has reached the required accuracy or the maximum number of iterations.
-///
-/// @param src
-/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be int 32bit grayscale image.
-/// Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// The width of the input source image.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// The height of the input source image.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param window
-/// Pointer to the initial search window position which also returns the final converged window position.
-///
-/// @param criteria
-/// The criteria used to finish the object search which consists of two termination criteria:
-/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
-///
-/// @param circuBox
-/// The circumscribed box around the object
-///
-/// @return
-/// Number of iterations
-///
-/// @ingroup Motion_and_Object_Tracking
-//------------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvConAdaTracks32(const int32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria,
- fcvBox2D* circuBox);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Applies the ConAdaTrack procedure and find the object center, size and orientation
-///
-/// @details
-/// This function applies the ConAdaTrack procedure to an original image (usually a probability image) and obtains the final converged object.
-/// The optimal object search will stop either it has reached the required accuracy or the maximum number of iterations.
-///
-/// @param src
-/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be float 32bit grayscale image.
-/// Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// The width of the input source image.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// The height of the input source image.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param window
-/// Pointer to the initial search window position which also returns the final converged window position.
-///
-/// @param criteria
-/// The criteria used to finish the object search which consists of two termination criteria:
-/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
-///
-/// @param circuBox
-/// The circumscribed box around the object
-///
-/// @return
-/// Number of iterations
-///
-/// @ingroup Motion_and_Object_Tracking
-//------------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvConAdaTrackf32(const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria,
- fcvBox2D* circuBox);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Compute a singular value decomposition of a matrix of a float type
-/// A = U*diag[w]*Vt;
-/// It is used for solving problems like least-squares, under-determined linear systems, matrix
-/// inversion and so forth. The algorithm used here does not compute the full U and V matrices
-/// however it computes a condensed version of U and V described below which is sufficient to solve
-/// most problems which use SVD.
-///
-/// @details
-///
-///
-/// @param A
-/// The input matrix of dimensions m x n
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param m
-/// The number of rows of matrix A
-///
-/// @param n
-/// The number of columns of matrix A
-///
-/// @param w
-/// The pointer to the buffer that holds n singular values. When m>n it
-/// contains n singular values while when m 0 and less than or equal to 8.
-///
-/// @param dst
-/// Output unsigned 8-bit integer image. Size of buffer is dstStride*srcHeight bytes.
-/// The dimensions of the image are dstWidth = srcWidth - 2*radius,
-/// and dstHeight = srcHeight - 2*radius.
-
-///
-/// @param dstStride
-/// Stride of the output image in bytes.
-/// \n\b NOTE: dstWidth = srcWidth - 2*radius, dstHeight = srcHeight - 2*radius.
-/// \n\b WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
-///
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvGLBPu8(const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t radius,
- uint32_t neighbors,
- uint8_t *__restrict dst,
- uint32_t dstStride);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Refine corner location
-///
-/// @details
-/// Refine the detected corners location into sub-Pixels which is more precise than integer pixels
-///
-/// @param src
-/// Input uint8_t image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-///
-/// @param srcHeight
-/// Input image height.
-///
-/// @param srcStride
-/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param blockWidth
-/// Width of the location search window.
-///
-/// @param blockHeight
-/// Height of the location search window.
-///
-/// @param maxIterations
-/// Maximum number of iteration to refine
-///
-/// @param stopCriteria
-/// Improvement threshold, iteration stop if the corner position moves less by this value
-///
-/// @param xyInitial
-/// Pointer to the initial input array containing the interleaved x,y position of the corner
-///
-/// @param nCorners
-/// Number of the corners
-///
-/// @param xyOut
-/// Pointer to the output array containing the refined interleaved x,y position of the corner
-///
-/// @ingroup feature_detection
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvCornerRefineSubPixu8( const uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t blockWidth,
- uint32_t blockHeight,
- uint32_t maxIterations,
- float32_t stopCriteria,
- const uint32_t*__restrict xyInitial,
- uint32_t nCorners,
- float32_t * __restrict xyOut);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extract strong corners from image to track
-///
-/// @details
-/// Extract strong corners from image to track based on the according paper "Good Feature to Track" by J.Shi and C.Tomasi
-///
-/// @param src
-/// Input uint8_t image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-///
-/// @param srcHeight
-/// Input image height.
-///
-/// @param srcStride
-/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param distanceMin
-/// Minimum Euclidean distance between the found corners
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom
-///
-/// @param barrier
-/// Quality threshold
-///
-/// @param xy
-/// Pointer to the output array containing the interleaved x,y position of the detected features
-///
-/// @maxnumcorners
-/// Maximum number of features to detect
-///
-/// @numcorners
-/// Pointer to integer of actual detected features number
-///
-/// @ingroup feature_detection
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvGoodFeatureToTracku8( const uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t distanceMin,
- uint32_t border,
- float32_t barrier,
- uint32_t * __restrict xy,
- uint32_t maxnumcorners,
- uint32_t * __restrict numcorners);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Find multiple maxima along the normal direction of the line
-///
-/// @param src
-/// 8-bit input image
-///
-/// @param srcWidth
-/// Input image width
-///
-/// @param srcHeight
-/// Input image height
-///
-/// @param srcStride
-/// Input image stride
-///
-/// @param pos
-/// 2D position to start searching maximas in the input image
-///
-/// @param normal
-/// Normalized line normal at pos
-///
-/// @param maxDistance
-/// Search distance along the normal direction; [-normal*maxDistance, normal*maxDistance]
-///
-/// @param maxNumMaxima
-/// Maximum maxima to find, e.g., 5
-///
-/// @param minGradient
-/// Minimum 1D gradient of the pixels on the search line (normal direction)
-///
-/// @param maxAngleDiff
-/// Cosine value threshold to filter the pixels that have large angle difference
-///
-/// @param maxima
-/// List of found maxima 1D positions; Actuall 2D position of maxima = (normal * 1D position) + pos
-///
-/// @param numMaxima
-/// Number of found maxima
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFindMultipleMaximau8(const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- const float32_t* __restrict pos,
- const float32_t* __restrict normal,
- uint32_t maxDistance,
- uint32_t maxNumMaxima,
- int32_t minGradient,
- float32_t maxAngleDiff,
- float32_t* __restrict maxima,
- uint32_t* __restrict numMaxima);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extract the straight line segments from the image
-///
-/// @param srcPyr
-/// Pointer to an array of fcvPyramidLevel_v2. Only 2 levels at max will be used
-/// to extract the straight line segments.
-///
-/// @param pyrLevel
-/// Image pyramid level, if it is set to 1, then do not use multi-scale approach.
-/// pyrLevel should be greater than or equal to 1.
-///
-/// @param doBlurImage
-/// Do image-blurring inside the function (if the image is not blurred)
-///
-/// @param maxLineAngle
-/// Cosine threshold to stop following (extending) pixels, e.g., cos(22.5 deg)
-/// maxLineAngle should be between [0.5 - 1.0]
-///
-/// @param minLineLength
-/// Minimum line segment length in pixels
-///
-/// @param minMagnitude
-/// Minimum pixel gradient magnitude, e.g., 10
-///
-/// @param maxLineNum
-/// Maximum line segments from the image
-///
-/// @param indexBuffer
-/// Optionally store the index(:= y * image_width + x) of the pixels consisting of the line segments
-/// into pointsList in fcvLineSegment structure. e.g., One can provide the buffer[maxLineNum*(image width + height)]
-/// Pass NULL if it is not necessary.
-///
-/// @param lineSegments
-/// List of the detected line segments
-///
-/// @param numLineSegments
-/// Number of found line segments
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvImageDetectLineSegmentsu8(const fcvPyramidLevel_v2* __restrict srcPyr,
- uint32_t pyrLevel,
- uint32_t doBlurImage,
- float32_t maxLineAngle,
- uint32_t minLineLength,
- uint32_t minMagnitude,
- uint32_t maxLineNum,
- uint32_t* __restrict indexBuffer,
- fcvLineSegment* __restrict lineSegments,
- uint32_t* __restrict numLineSegments);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Sum of squared differences of one L-byte vector against N others.
-///
-/// @details
-/// SSD of one vector (a) against N other L-byte vectors
-/// ( b[0], b[1], ..., b[n-1] )
-/// using their given inverse lengths for normalization.
-/// \n\n SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLenA
-/// Inverse of vector A = 1/|A|
-///
-/// @param dim
-/// Number of element of vector A
-///
-/// @param bList
-/// Vectors b[0]...b[n-1].
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param invLenB
-/// Inverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param numB
-/// Number of B vectors.
-///
-/// @param distances
-/// Output of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }
-/// \n\b WARNING: should be 128-bit aligned.
-///
-///
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSumOfSquaredDiffsu8( const uint8_t* __restrict a,
- float32_t invLenA,
- uint32_t dim,
- const uint8_t* const * __restrict bList,
- const float32_t* __restrict invLenB,
- uint32_t numB,
- float32_t* __restrict distances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Sum of squared differences of one floating vector of L-elements against N others.
-///
-/// @details
-/// SSD of one vector (a) against N other L-elements vectors
-/// ( b[0], b[1], ..., b[n-1] )
-/// using their given inverse lengths for normalization.
-/// \n\n SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLenA
-/// Inverse of vector A = 1/|A|
-///
-/// @param dim
-/// Number of element of vector A
-///
-/// @param bList
-/// Vectors b[0]...b[n-1].
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param invLenB
-/// Inverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param numB
-/// Number of B vectors.
-///
-/// @param distances
-/// Output of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSumOfSquaredDiffsf32( const float32_t* __restrict a,
- float32_t invLenA,
- uint32_t dim,
- const float32_t* const * __restrict bList,
- const float32_t* __restrict invLenB,
- uint32_t numB,
- float32_t* __restrict distances );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// General function for computing cluster centers and cluster bindings
-/// for a set of points of dimension dim.
-///
-/// @param points
-/// Array of all points. Array size must be greater than
-/// numPoints * pointStride.
-///
-/// @param numPoints
-/// Number of points in points array.
-///
-/// @param dim
-/// dimension, e.g. 36
-///
-/// @param pointStride
-/// Byte distance between adjacent points in array
-///
-/// @param numPointsUsed
-/// Total number of points used for clustering, {0,1,...(numPointsUsed-1)}
-///
-/// @param numClusters
-/// Number of clusters
-///
-/// @param clusterCenters
-/// current cluster centers;
-/// elements are distant by clusterCenterStride
-///
-/// @param clusterCenterStride
-/// byte distance between adjacent cluster centers in array
-///
-/// @param newClusterCenters
-/// array for new cluster centers; should be numClusterCenters long
-///
-/// @param newClusterMemberCounts
-/// Element counts for each cluster; should be numClusterCenters long
-///
-/// @param clusterBindings
-/// Output indices of the clusters to which each vector belongs to, array must
-/// be numPointsUsed long.
-///
-/// @param sumOfClusterDistances
-/// the sum of distances between each cluster center to its belonging points. The
-/// size should be numClusterCenters*sizeof(float_32)
-///
-/// @return
-/// 0 if successfully clustered, otherwise error code
-///
-/// @remark
-/// This is general clusterer. There are no assumptions on points other
-/// than they belong to a vector space
-///
-/// @ingroup clustering_and_search
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvClusterEuclideanu8( const uint8_t* __restrict points,
- int32_t numPoints,
- int32_t dim,
- int32_t pointStride,
- int32_t numPointsUsed,
- int32_t numClusters,
- float32_t* __restrict clusterCenters,
- int32_t clusterCenterStride,
- float32_t* __restrict newClusterCenters,
- uint32_t* __restrict clusterMemberCounts,
- uint32_t* __restrict clusterBindings,
- float32_t* sumOfClusterDistances );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix transpose of one uint8_t type matrix.
-///
-/// @param src
-/// Source matrix.The size of src is srcStride*srcHeight.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param srcWidth
-/// Width of the source matrix.
-///
-/// @param srcHeight
-/// Height of the source matrix.
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// Transpose of the source matrix. The size of dst is dstStride*srcWidth.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcHeight.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvTransposeu8( const uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix transpose of one uint16_t type matrix.
-///
-/// @param src
-/// Source matrix. The size of src is srcStride*srcHeight.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param srcWidth
-/// Width of the source matrix.
-///
-/// @param srcHeight
-/// Height of the source matrix.
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// Transpose of the source matrix. The size of dst is dstStride*srcWidth.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcHeight*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvTransposeu16( const uint16_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint16_t * __restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix transpose of one float32_t type matrix.
-///
-/// @param src
-/// Source matrix. The size of src is srcStride*srcHeight.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param srcWidth
-/// Width of the source matrix.
-///
-/// @param srcHeight
-/// Height of the source matrix.
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// Transpose of the source matrix. The size of dst is dstStride*srcWidth.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcHeight*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvTransposef32( const float32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t * __restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Flip one uint8_t type matrix. If src and dst point to the same address
-/// and srcStride equals to dstStride, it will do in-place flip.
-///
-/// @param src
-/// Source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param srcWidth
-/// Width of the source matrix.
-///
-/// @param srcHeight
-/// Height of the source matrix.
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix. If src equals to dst and srcStride equals to dstStride,
-/// it will do in-place flip.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dir
-/// Flip direction (FASTCV_FLIP_HORIZ, FASTCV_FLIP_VERT or FASTCV_FLIP_BOTH).
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFlipu8( const uint8_t * src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * dst,
- uint32_t dstStride,
- fcvFlipDir dir );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Flip one uint16_t type matrix. If src and dst point to the same address,
-/// and srcStride equals to dstStride, it will do in-place flip.
-///
-/// @param src
-/// Source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param srcWidth
-/// Width of the source matrix.
-///
-/// @param srcHeight
-/// Height of the source matrix.
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix. If src equals to dst and srcStride equals to dstStride,
-/// it will do in-place flip.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dir
-/// Flip direction (FASTCV_FLIP_HORIZ, FASTCV_FLIP_VERT or FASTCV_FLIP_BOTH).
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFlipu16( const uint16_t * src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint16_t * dst,
- uint32_t dstStride,
- fcvFlipDir dir );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Flips an interleaved RGB image
-///
-/// @details
-/// Flips one uint8_t type interleaved RGB image . If src and dst point to the same address
-/// and srcStride equals to dstStride, it will do in-place flip.
-///
-/// @param src
-/// Input unsigned 8-bit integer image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the image.
-///
-/// @param srcHeight
-/// Height of the source image.
-///
-/// @param srcStride
-/// Stride of the Image in bytes.
-/// \n\b NOTE: if 0, srcStride is set as 3 x srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as 3 x srcWidth if not 0.
-///
-/// @param dst
-/// Output unsigned 8-bit integer image. Size of buffer is dstStride*srcHeight bytes.
-/// If src equals to dst and srcStride equals to dstStride,it will do in-place flip.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of the output image in bytes.
-/// \n\b NOTE: if 0, dstStride is set as 3 x srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as 3 x srcWidth if not 0.
-///
-/// @param dir
-/// Flip direction (FASTCV_FLIP_HORIZ, FASTCV_FLIP_VERT or FASTCV_FLIP_BOTH).
-///
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API fcvStatus
-fcvFlipRGB888u8(const uint8_t * src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * dst,
- uint32_t dstStride,
- fcvFlipDir dir);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Rotate one uint8_t type image.
-///
-/// @param src
-/// Source image.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param srcWidth
-/// Width of the source image.
-///
-/// @param srcHeight
-/// Height of the source image.
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result image.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth
-/// (FASTCV_ROTATE_180) or srcHeight (FASTCV_ROTATE_90 or FASTCV_ROTATE_270).
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param degree
-/// Rotate degree (FASTCV_ROTATE_90, FASTCV_ROTATE_180 or FASTCV_ROTATE_270).
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvRotateImageu8( const uint8_t * src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * dst,
- uint32_t dstStride,
- fcvRotateDegree degree );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Rotate one interleaved uint8_t type image (e.g. UV channel in NV21).
-///
-/// @param src
-/// Source image.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param srcWidth
-/// Number of interleaved pairs in one row.
-/// For example, srcWidth = 4 in UVUVUVUV image row.
-///
-/// @param srcHeight
-/// Height of the source image.
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to 2*srcWidth.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result image.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to 2*srcWidth
-/// (FASTCV_ROTATE_180) or 2*srcHeight (FASTCV_ROTATE_90 or FASTCV_ROTATE_270).
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param degree
-/// Rotate degree (FASTCV_ROTATE_90, FASTCV_ROTATE_180 or FASTCV_ROTATE_270).
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvRotateImageInterleavedu8( const uint8_t * src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * dst,
- uint32_t dstStride,
- fcvRotateDegree degree );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Element-wise multiplication of two uint8_t type matrices.
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (uint16_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvElementMultiplyu8u16( const uint8_t * src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t * src2,
- uint32_t src2Stride,
- uint16_t * __restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Element-wise multiplication of two float32_t type matrices.
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (float32_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvElementMultiplyf32( const float32_t * src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const float32_t * src2,
- uint32_t src2Stride,
- float32_t * __restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix multiplication of two int8_t type matrices.
-///
-/// @param src1
-/// First source matrix. The size of src1 is src1Stride*src1Height.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src1Width
-/// Width of the first source matrix.
-/// \n\b NOTE: src1Width should not be larger than 131072
-///
-/// @param src1Height
-/// Height of the first source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to src1Width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix. The size of src2 is src2Stride*src1Width.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Width
-/// Width of the second source matrix.
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to src2Width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (int32_t type). The size of dst is dstStride*src1Height.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to src2Width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvMatrixMultiplys8s32( const int8_t * __restrict src1,
- uint32_t src1Width,
- uint32_t src1Height,
- uint32_t src1Stride,
- const int8_t * __restrict src2,
- uint32_t src2Width,
- uint32_t src2Stride,
- int32_t * __restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix multiplication of two float32_t type matrices.
-///
-/// @param src1
-/// First source matrix. The size of src1 is src1Stride*src1Height.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src1Width
-/// Width of the first source matrix.
-///
-/// @param src1Height
-/// Height of the first source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to src1Width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix. The size of src2 is src2Stride*src1Width.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Width
-/// Width of the second source matrix.
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to src2Width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (int32_t type). The size of dst is dstStride*src1Height.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to src2Width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvMatrixMultiplyf32( const float32_t * __restrict src1,
- uint32_t src1Width,
- uint32_t src1Height,
- uint32_t src1Stride,
- const float32_t * __restrict src2,
- uint32_t src2Width,
- uint32_t src2Stride,
- float32_t * __restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of two uint8_t type blocks.
-///
-/// @param src1
-/// First source block.
-///
-/// @param blockWidth
-/// Width of the source block.
-///
-/// @param blockHeight
-/// Height of the source block.
-/// \n\b NOTE: blockWidth*blockHeight should not be larger than 65536
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to src1Width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source block.
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to src2Width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// Block dot product (uint32_t).
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvBlockDotProductu8( const uint8_t * __restrict src1,
- uint32_t blockWidth,
- uint32_t blockHeight,
- uint32_t src1Stride,
- const uint8_t * __restrict src2,
- uint32_t src2Stride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of two float32_t type blocks.
-///
-/// @param src1
-/// First source block.
-///
-/// @param blockWidth
-/// Width of the source block.
-///
-/// @param blockHeight
-/// Height of the source block.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to src1Width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source block.
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to src2Width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// Block dot product (float32_t).
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API float32_t
-fcvBlockDotProductf32( const float32_t * __restrict src1,
- uint32_t blockWidth,
- uint32_t blockHeight,
- uint32_t src1Stride,
- const float32_t * __restrict src2,
- uint32_t src2Stride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix addition of two uint8_t type matrices.
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (uint16_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvAddu8u16( const uint8_t * __restrict src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t * __restrict src2,
- uint32_t src2Stride,
- uint16_t * __restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix addition of two int16_t type matrices with saturation.
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (int16_t type). The result will be saturated to
-/// int16_t.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvAdds16( const int16_t * __restrict src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const int16_t * __restrict src2,
- uint32_t src2Stride,
- int16_t * __restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix addition of two float32_t type matrices.
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (float32_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvAddf32( const float32_t * __restrict src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const float32_t * __restrict src2,
- uint32_t src2Stride,
- float32_t * __restrict dst,
- uint32_t dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 8-bit patch values and their
-/// squares. This function supports bigger size patch with u64 for squared
-/// integral output.
-/// \n\b NOTE: No extra border lines, the integral output buffer size is the same
-/// as input image buffer size.
-///
-/// @details
-/// sum (X,Y) = sum_{x<=X,y<=Y} I(x,y)
-///
-/// @param src
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values).
-///
-/// @param dstIntgrl
-/// Integral image.
-/// \n\b NOTE: Memory must be >= srcWidth*srcHeight*4 bytes
-///
-/// @param dstIntgrlSqrd
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be >= srcWidth*srcHeight*8 bytes
-///
-/// @param dstIntgrlStride
-/// dstIntgrl Image stride (in bytes).
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth*4.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values).
-///
-/// @param dstIntgrlSqrdStride
-/// dstIntgrlSqrd Image stride (in bytes).
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth*8.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values).
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegrateImageu8u64( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t* __restrict dstIntgrl,
- uint64_t* __restrict dstIntgrlSqrd,
- uint32_t dstIntgrlStride,
- uint32_t dstIntgrlSqrdStride);
-
-
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalize the image according to histogram value of the pixel intensity.
-///
-/// @param src
-/// Pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param dst
-/// Pointer to output image with one byte per pixel
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-
-FASTCV_API void
-fcvImageHistogramEqualizeu8( const uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Calculate histogram at image patches.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageSpatialHistogramu8_v2(). In the 2.0.0 release,
-/// fcvImageSpatialHistogramu8_v2 will be renamed to fcvImageSpatialHistogramu8
-/// and the signature of fcvImageSpatialHistogramu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param numPatterns
-/// Number of patterns to be computed in the histogram
-///
-/// @param grid_x
-/// The number of grids along x dimension
-///
-/// @param grid_y
-/// The number of grids along y dimension
-///
-/// @param histogram
-/// Output histogram
-/// \n\b NOTE: Memory must be at least numPatterns*grid_x*grid_y*sizeof(float32_t)
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageSpatialHistogramu8(const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t numPatterns,
- uint32_t grid_x,
- uint32_t grid_y,
- float32_t*__restrict histogram);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data without normalization.
-/// This function computes the gradient of the input image by convolution with the
-/// 3x3 Sobel kernel. The Sobel kernel is not normalized in this function.
-///
-/// NOTE: it will replace the fcvFilterSobel3x3u8 in fastCV 2.0.0.
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient. The number of pixels in a row.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
-/// If NULL, the horizontal gradient will not be calculated.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// If NULL, the vertical gradient will not be calculated.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth.
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param borderType
-/// Define the behavior at the border.
-/// See definition of fcvBorderType.
-///
-/// @param borderValue
-/// Specifies the constant value for the borderType FASTCV_BORDER_CONSTANT.
-/// Ignored otherwise.
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterSobel3x3u8s16( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- uint32_t dxyStride,
- fcvBorderType borderType,
- uint8_t borderValue);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data without normalization.
-/// This function computes the gradient of the input image by convolution with the
-/// 5x5 Sobel kernel. The Sobel kernel is not normalized in this function.
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient. The number of pixels in a row.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
-/// If NULL, the horizontal gradient will not be calculated.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// If NULL, the vertical gradient will not be calculated.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth.
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param borderType
-/// Define the behavior at the border.
-/// See definition of fcvBorderType.
-///
-/// @param borderValue
-/// Specifies the constant value for the borderType FASTCV_BORDER_CONSTANT.
-/// Ignored otherwise.
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterSobel5x5u8s16( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- uint32_t dxyStride,
- fcvBorderType borderType,
- uint8_t borderValue);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data without normalization.
-/// This function computes the gradient of the input image by convolution with the
-/// 7x7 Sobel kernel. The Sobel kernel is not normalized in this function.
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient. The number of pixels in a row.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
-/// If NULL, the horizontal gradient will not be calculated.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// If NULL, the vertical gradient will not be calculated.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth.
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param borderType
-/// Define the behavior at the border.
-/// See definition of fcvBorderType.
-///
-/// @param borderValue
-/// Specifies the constant value for the borderType FASTCV_BORDER_CONSTANT.
-/// Ignored otherwise.
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterSobel7x7u8s16( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- uint32_t dxyStride,
- fcvBorderType borderType,
- uint8_t borderValue);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Canny edge detection with more controls to configurate the algorithm.
-///
-/// @details
-/// Canny edge detector applied to a 8 bit grayscale image.
-/// The results are stored as a binarized image (0x0 - not an edge, 0xFF - edge).
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of the input image in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param kernelSize
-/// The Sobel kernel size for calculating gradient. Supported sizes are 3, 5 and 7.
-///
-/// @param lowThresh
-/// For all the intermediate pixels along the edge, the norm of the
-/// gradient at the pixel locations should be greater than 'lowThresh'.
-///
-/// @param highThresh
-/// For an edge starting point, i.e. either the first or last
-/// pixel of the edge, the norm of the gradient at the pixel should be
-/// greater than 'highThresh'.
-///
-/// @param normType
-/// The norm definition to calculate the gradient magnitude. See fcvNormType.
-///
-/// @param dst
-/// Output 8-bit binarized image containing the edge detection results.
-/// Size of buffer is dstStride*srcHeight bytes.
-/// Edges are marked with pixels of 0xFF. The rest pixels have values of 0.
-///
-/// @param dstStride
-/// Stride of the output image in bytes.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param gx
-/// Buffer to store horizontal gradient. Must be (gradStride)*(srcHeight) bytes in size.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param gy
-/// Buffer to store vertical gradient. Must be (gradStride)*(srcHeight) bytes in size.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param gradStride
-/// Stride (in bytes) of 'gx' and 'gy' gradient arrays,
-/// is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in the gradient arrays dx or dy.
-/// If left at 0 gradStride is default to 2 * srcWidth.
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterCannyu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t kernelSize,
- int32_t lowThresh,
- int32_t highThresh,
- fcvNormType normType,
- uint8_t* __restrict dst,
- uint32_t dstStride,
- int16_t* __restrict gx,
- int16_t* __restrict gy,
- uint32_t gradStride);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Converts the bit depth of a single-channel uint8 image to int16_t type
-///
-/// @param src
-/// Input uint8_t image. The size of buffer is srcStride*srcHeight bytes
-/// \n\b NOTE: should be 128-bit aligned
-///
-/// @param srcWidth
-/// Input image width
-///
-/// @param srcHeight
-/// Input image height
-///
-/// @param srcStride
-/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-/// if srcStride is equal to 0, it will be set to srcWidth
-/// \n\b NOTE: should be a multiple of 8
-///
-/// @param shift
-/// The number of bits to be right-shifted to adjust the output
-/// \n\b NOTE: range from 0 to 8
-///
-/// @param dst
-/// Output image which has the same dimension as the input image in int16_t type
-/// \n\b NOTE: should be 128-bit aligned
-///
-/// @param dstStride
-/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-/// if dstStride is equal to 0, it will be set to srcWidth*2
-/// \n\b NOTE: should be a multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvConvertDepthu8s16(const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t shift,
- int16_t *__restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Converts the bit depth of a single-channel int16_t image to uint8_t type
-///
-/// @param src
-/// Input int16_t image. The size of buffer is srcStride*srcHeight bytes
-/// \n\b NOTE: should be 128-bit aligned
-///
-/// @param srcWidth
-/// Input image width
-///
-/// @param srcHeight
-/// Input image height
-///
-/// @param srcStride
-/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-/// if srcStride is equal to 0, it will be set to srcWidth*2
-/// \n\b NOTE: should be a multiple of 8
-///
-/// @param shift
-/// The number of bits to be left-shifted to adjust the output
-/// \n\b NOTE: range from 0 to 15
-///
-/// @param policy
-/// Conversion policy that decides how data overflow should be handled
-///
-/// @param dst
-/// Output image which has the same dimension as the input image in uint8_t type
-/// \n\b NOTE: should be 128-bit aligned
-///
-/// @param dstStride
-/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-/// if dstStride is equal to 0, it will be set to srcWidth
-/// \n\b NOTE: should be a multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvConvertDepths16u8(const int16_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t shift,
- fcvConvertPolicy policy,
- uint8_t *__restrict dst,
- uint32_t dstStride );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Recursive Bilateral Filtering
-///
-/// @details
-/// The algorithm is described in paper Recursive Bilateral Filtering, ECCV2012 by Prof Yang Qingxiong
-/// Different from traditional bilateral filtering, the bilateral filtering in this algorithm is actually performed in gradient domain.
-/// The results are ususally better than tradition bilateral filters. Filtering is carried out in a recursive way, and it is efficient.
-///
-/// @param src
-/// Input uint8_t image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-///
-/// @param srcHeight
-/// Input image height.
-///
-/// @param srcStride
-/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param dst
-/// Output uint8_t image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param sigmaColor
-/// Filter sigma in the color space. Typical value 0.03f. Increasing this value means increasing the influence of the neighboring
-///pixels of more different Color to the smoothing result.
-///
-/// @param sigmaSpace
-/// Filter sigma in the coordinate space. Typical value 0.1f. Increasing this value means increasing the influence of farther
-/// pixels to the smoothing result.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvBilateralFilterRecursiveu8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride,
- float32_t sigmaColor,
- float32_t sigmaSpace );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Grow the seeds within the image to meaningful regions,
-/// depending on the color or gray scale uniformity of the neighborhood pixels from the seeds.
-///
-/// @param src
-/// Pointer to 16-bit color (3-channel) or grayscale (1-channel) image.
-///
-/// @param srcWidth
-/// Width of src image, measured by pixels.
-///
-/// @param srcHeight
-/// Height of src image, measured by pixels.
-///
-/// @param srcStride
-/// Stride of src image, measured by bytes.
-/// WARNING: should be multiple of 8, and at least as much as srcWidth*numChannel if not 0.
-///
-/// @param numChannel
-/// Number of channels of src image. 1 for gray scale and 3 for color image.
-///
-/// @param threshGrow
-/// Threshold to grow the seed into a region. Higher value: larger uniform region grown.
-/// Range of 3-channel image segmentation: 10~150.
-/// Range of 1-channel image segmentation: 3~25.
-///
-/// @param pointVector
-/// A 2D point vector of seeds (provided by user) within the image. For N seeds, it is saved as [x0,y0,x1,y1,...,xN-1,yN-1].
-///
-/// @param numSeed
-/// Number of seed points, equal to N used in pointVector.
-///
-/// @param mode
-/// Mode of seed grow. 0: distance measured with neighborhood pixel. 1: distance measured with seed pixel only.
-///
-/// @param segLabel
-/// Segmented labels. 1 channel with same size of src. Pixel belonging to the same region is uniformly labeled by a non-zero number. Pixels not grown from any seeds are labeled 0.
-///
-/// @param segLabelStride
-/// Stride of segmented labels, measured by bytes.
-/// WARNING: should be multiple of 8, and at least as much as srcWidth*4 if not 0.
-///
-/// @return
-/// 0 if successful.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvImageSegmentationSeedRegionGrows16( const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t numChannel,
- uint32_t threshGrow,
- const uint32_t* __restrict pointVector,
- uint32_t numSeed,
- uint8_t mode,
- uint32_t* __restrict segLabel,
- uint32_t segLabelStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Calculate the local subtractive and contrastive normalization of the image.
-/// For each pixel of the image, the mean and optionally standard deviation
-/// is calculated for the patch centered around the pixel. Then the pixel is
-/// normalized by the local mean and optionally standard deviation.
-///
-/// @param src
-/// The input image. Must be 8 bit grayscale image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE:should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of src image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory.
-/// \n\b NOTE: should be a multiple of 8. If left at 0 srcStride is default to srcWidth.
-///
-/// @param patchWidth
-/// Width in pixels of the patch to calculate local mean and standard deviation.
-///
-/// @param patchHeight
-/// Height in pixels of the patch to calculate local mean and standard deviation.
-///
-/// @param useStdDev (0 or 1)
-/// if 1, the dst will be normalized with standard deviation.
-///
-/// @param dst
-/// The output image.
-/// Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE:should be 128-bit aligned.
-///
-/// @param dstStride
-/// The stride of the output image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: should be a multiple of 8. If left at 0 dstStride is default to srcWidth.
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API fcvStatus
-fcvNormalizeLocalBoxu8( const uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t patchWidth,
- uint32_t patchHeight,
- uint32_t useStdDev,
- int8_t * __restrict dst,
- uint32_t dstStride);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Calculate the local subtractive and contrastive normalization of the image.
-/// For each pixel of the image, the mean and optionally standard deviation
-/// is calculated for the patch centered around the pixel. Then the pixel is
-/// normalized by the local mean and optionally standard deviation.
-///
-/// @param src
-/// The input image. Must be 32-bit float image. Size of buffer is
-/// srcStride*srcHeight*sizeof(float32_t) bytes.
-/// \n\b NOTE:should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of src image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory.
-/// \n\b NOTE: should be a multiple of 8. If left at 0 srcStride is default to srcWidth*sizeof(float32_t).
-///
-/// @param patchWidth
-/// Width in pixels of the patch to calculate local mean and standard deviation.
-///
-/// @param patchHeight
-/// Height in pixels of the patch to calculate local mean and standard deviation.
-///
-/// @param useStdDev (0 or 1)
-/// if 1, the dst will be normalized with standard deviation.
-///
-/// @param dst
-/// The output image.
-/// Size of buffer is dstStride*srcHeight*sizeof(float32_t) bytes.
-/// \n\b NOTE:should be 128-bit aligned.
-///
-/// @param dstStride
-/// The stride of the output image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: should be a multiple of 8. If left at 0 dstStride is default to srcWidth*sizeof(float32_t).
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API fcvStatus
-fcvNormalizeLocalBoxf32( const float32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t patchWidth,
- uint32_t patchHeight,
- uint32_t useStdDev,
- float32_t * __restrict dst,
- uint32_t dstStride);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Combine two channels in an interleaved fashion
-///
-/// @details
-/// Interleave data from src1 and src2 to dst.
-/// Data in src1 [d0 d1 d2 d3...]
-/// Data in src2 [t0 t1 t2 t3...]
-/// Results in dst [d0 t0 d1 t1 d2 t2 d3 t3...]
-/// \n\b NOTE: Perform the same functionality as fcvInterleaveu8.
-///
-/// @param src1
-/// One of the input images ( For example, Cb or Cr component)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source image.
-///
-/// @param height
-/// Height of the source image.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// One of the input images ( For example, Cb or Cr component)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// The result image (uint8_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvChannelCombine2Planesu8( const uint8_t *__restrict src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t *__restrict src2,
- uint32_t src2Stride,
- uint8_t *__restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Combine three channels in an interleaved fashion
-///
-/// @details
-/// Interleave data from src1, src2 and src3 to dst.
-/// Data in src1 [d0 d1 d2 d3...]
-/// Data in src2 [t0 t1 t2 t3...]
-/// Data in src3 [s0 s1 s2 s3...]
-/// Results in dst [d0 t0 s0 d1 t1 s1 d2 t2 s2 d3 t3 s3...]
-///
-/// @param src1
-/// One of the input images ( For example, R or G or B component)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source image.
-///
-/// @param height
-/// Height of the source image.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// One of the input images ( For example, R or G or B component)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src3
-/// One of the input images ( For example, R or G or B component)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src3Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src3Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// The result image (uint8_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*3.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvChannelCombine3Planesu8(const uint8_t *__restrict src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t *__restrict src2,
- uint32_t src2Stride,
- const uint8_t *__restrict src3,
- uint32_t src3Stride,
- uint8_t *__restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Combine four channels in an interleaved fashion
-///
-/// @details
-/// Interleave data from src1, src2, src3 and src4 to dst.
-/// Data in src1 [d0 d1 d2 d3...]
-/// Data in src2 [t0 t1 t2 t3...]
-/// Data in src3 [s0 s1 s2 s3...]
-/// Data in src3 [r0 r1 r2 r3...]
-/// Results in dst [d0 t0 s0 r0 d1 t1 s1 r1 d2 t2 s2 r2 d3 t3 s3 r3...]
-///
-/// @param src1
-/// One of the input images ( For example, R or G or B or A component)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source image.
-///
-/// @param height
-/// Height of the source image.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// One of the input images ( For example, R or G or B or A component)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src3
-/// One of the input images ( For example, R or G or B or A component)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src3Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src3Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src4
-/// One of the input images ( For example, R or G or B or A component)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src4Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src4Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// The result image (uint8_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*4.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvChannelCombine4Planesu8(const uint8_t *__restrict src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t *__restrict src2,
- uint32_t src2Stride,
- const uint8_t *__restrict src3,
- uint32_t src3Stride,
- const uint8_t *__restrict src4,
- uint32_t src4Stride,
- uint8_t *__restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extract channel as a single uint8_t type plane from an interleaved or multi-planar image format
-///
-/// @details
-///
-///
-/// @param src1
-/// The first plane in source image. For example, an intervealved RGB/RGBA plane or the Y plane.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source image.
-///
-/// @param height
-/// Height of the source image.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory.
-/// If left at 0 src1Stride is default to the size required by corresponding image format.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// The second plane in souce image if available; otherwise, left at 0.
-/// For example, the intervealved CbCr plane in FASTCV_NV12/FASTCV_NV21; or the Cb plane in FASTCV_IYUV/FASTCV_YUV4.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory.
-/// If left at 0, src2Stride is default to width for FASTCV_NV12/FASTCV_NV21/FASTCV_YUV4 and width/2 for FASTCV_IYUV.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src3
-/// The third plane in souce image if available; otherwise, left at 0.
-/// For example, the Cr plane in FASTCV_IYUV/FASTCV_YUV4.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src3Stride
-/// Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory.
-/// If left at 0 src3Stride is default to width for FASTCV_YUV4, and width/2 for FASTCV_IYUV.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param srcChannel
-/// The index of the image channel to be extracted. Refer to fcvChannelType for details.
-///
-/// @param srcFormat
-/// The format of the source image. Different image formats require different src
-/// and dst size. Refer to fcvImageFormat for details.
-///
-/// @param dst
-/// The result image (a uint8_t type plane).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory.
-/// If left at 0, dstStride is default to the size required by corresponding image format.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvChannelExtractu8( const uint8_t *__restrict src1,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t src1Stride,
- const uint8_t *__restrict src2,
- uint32_t src2Stride,
- const uint8_t *__restrict src3,
- uint32_t src3Stride,
- fcvChannelType srcChannel,
- fcvImageFormat srcFormat,
- uint8_t *__restrict dst,
- uint32_t dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with MxN median filter (M,N have to be odd numbers)
-///
-/// @details
-/// Borders of m pixels in horizontal direction and n in vertical direction
-/// are replaced with the source pixels, where m = (M-1)/2, n = (N-1)/2
-/// The NxN median filter applies on the image area
-/// | a(n,m) , a(n,m+1), ..., a(n,srcWidth-m-1) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-n-1,m), ..., ..., a(srcHeight-n-1,srcWidth-m-1) |\n
-///
-/// @param src
-/// Input 16-bit signed image. Size of buffer is srcStride*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth * 2.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*2 if not 0.
-///
-/// @param M
-/// Filter kernel width
-/// \n\b NOTE: kernel width should be an odd number
-///
-/// @param N
-/// Filter kernel height
-/// \n\b NOTE: kernel height should be an odd number
-///
-/// @param dst
-/// Output 16-bit image. Size of buffer is dstStride*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth * 2
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*2 if not 0.
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterMedianMxNs16( const int16_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t M,
- uint32_t N,
- int16_t* __restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Computes the convolution of an image with an M x N Kernel
-///
-/// @details
-/// The function computes the convolution of an unsigned char input image
-/// with an M x N kernel of type short. The output is of type short
-/// and is of the same size as the input image. The convolution is computed
-/// based on the type of Border handling selected.
-///
-///
-/// @param kernel
-/// Input M x N short kernel matrix. The size of buffer is M*N*sizeof(int16_t) bytes
-/// The kernel can be normalized before passing in by making use of the shift parameter.
-///
-///
-/// @param M
-/// Width of the kernel
-///
-/// @param N
-/// Height of the kernel
-///
-/// @param shift
-/// This parameter can be used to normalize the input kernel by converting the data into
-/// fixed point values. Shift can be considered as Q factor of kernel.
-///
-/// @param src
-/// Input uint8_t image. The size of buffer is srcStride*srcHeight bytes
-/// \n\b NOTE: should be 128-bit aligned
-///
-/// @param srcWidth
-/// Input image width
-///
-/// @param srcHeight
-/// Input image height
-///
-/// @param srcStride
-/// Input image stride, i.e. the gap (in terms of bytes) between the first element
-/// of a row and that of the successive row. If srcStride is equal to 0,
-/// it will be set to srcWidth.
-/// \n\b NOTE: should be a multiple of 8
-///
-/// @param dst
-/// Output image which has the same dimensions as the input matrix.
-/// The output is of type short, and must be allocated as dstStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned
-///
-/// @param dstStride
-/// Output image stride, i.e. the gap (in terms of bytes) between the first element
-/// of a row and that of the successive row. If dstStride is equal to 0,
-/// it will be set to srcWidth * sizeof(int16_t).
-/// \n\b NOTE: should be a multiple of 8
-///
-/// @param borderType
-/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
-/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
-/// border values will be set to 0.
-///
-/// @param borderValue
-/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
-/// set this value as 0. Can take values between 0 to 255.
-///
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterConvolveMxNu8s16( const int16_t* __restrict kernel,
- uint32_t M,
- uint32_t N,
- int8_t shift,
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride,
- fcvBorderType borderType,
- uint8_t borderValue );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Computes the convolution of a image with an M x N Kernel
-///
-/// @details
-/// The function computes the convolution of an unsigned char input image
-/// with an M x N kernel of type short. The output is of type unsigned char
-/// and is of the same size as the input image. The convolution is computed
-/// based on the type of Border handling selected.
-///
-///
-/// @param kernel
-/// Input M x N short kernel matrix. The size of buffer is M*N*sizeof(int16_t) bytes
-/// The kernel can be normalized before passing in by making use of the shift parameter.
-///
-///
-/// @param M
-/// Width of the kernel
-///
-/// @param N
-/// Height of the kernel
-///
-/// @param shift
-/// This parameter can be used to normalize the input kernel by converting the data into
-/// fixed point values. Shift can be considered as Q factor of kernel.
-///
-/// @param src
-/// Input uint8_t image. The size of buffer is srcStride*srcHeight bytes
-/// \n\b NOTE: should be 128-bit aligned
-///
-/// @param srcWidth
-/// Input image width
-///
-/// @param srcHeight
-/// Input image height
-///
-/// @param srcStride
-/// Input image stride, i.e. the gap (in terms of bytes) between the first element
-/// of a row and that of the successive row. If srcStride is equal to 0,
-/// it will be set to srcWidth.
-/// \n\b NOTE: should be a multiple of 8
-///
-/// @param dst
-/// Output image which has the same dimensions as the input matrix.
-/// The output is of type unsigned char, and must be allocated as dstStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned
-///
-/// @param dstStride
-/// Output image stride, i.e. the gap (in terms of bytes) between the first element
-/// of a row and that of the successive row. If dstStride is equal to 0,
-/// it will be set to srcWidth.
-/// \n\b NOTE: should be a multiple of 8
-///
-/// @param borderType
-/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
-/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
-/// border values will be set to 0.
-///
-/// @param borderValue
-/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
-/// set this value as 0. Can take values between 0 and 255.
-///
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterConvolveMxNu8(const int16_t* __restrict kernel,
- uint32_t M,
- uint32_t N,
- int8_t shift,
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride,
- fcvBorderType borderType,
- uint8_t borderValue);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Smooth a uint8_t image with a 3x3 box filter with border handling scheme specified by user
-///
-/// @details
-/// smooth with 3x3 box kernel and normalize:
-/// \n[ 1 1 1
-/// \n 1 1 1
-/// \n 1 1 1 ]/9
-///
-/// @param src
-/// Input uint8_t image.
-///
-/// @param srcWidth
-/// Input image width.
-///
-/// @param srcHeight
-/// Input image height.
-///
-/// @param srcStride
-/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param dst
-/// Output image which has the same type, and size as the input image.
-///
-/// @param dstStride
-/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param borderType
-/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
-/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
-/// border values will be set to 0.
-///
-/// @param borderValue
-/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
-/// set this value as 0. Can take values between 0 and 255.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvBoxFilter3x3u8_v2( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride,
- fcvBorderType borderType,
- uint8_t borderValue);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Erode a grayscale image by taking the local minima of 3x3 nbhd window
-/// with border handling scheme specified by user
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterErode3x3u8_v2() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterErode3x3u8,
-/// \a fcvFilterErode3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterErode3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterErode3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit eroded image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param borderType
-/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
-/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
-/// border values will be set to 255.
-///
-/// @param borderValue
-/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
-/// set this value as 0. Can take values between 0 and 255.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterErode3x3u8_v3( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride,
- fcvBorderType borderType,
- uint8_t borderValue);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Erode a grayscale image by taking the local minima of NxN neighborhood window.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param N
-/// Dimension of the neighborhood window.
-/// \n\b WARNING: must be an odd number
-///
-/// @param dst
-/// Output 8-bit eroded image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterErodeNxNu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t N,
- uint8_t* __restrict dst,
- uint32_t dstStride);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window
-/// with border handling scheme specified by user
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterDilate3x3u8_v2() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterDilate3x3u8,
-/// \a fcvFilterDilate3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterDilate3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterDilate3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit dilated image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param borderType
-/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
-/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
-/// border values will be set to 0.
-///
-/// @param borderValue
-/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
-/// set this value as 0. Can take values between 0 and 255.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterDilate3x3u8_v3( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride,
- fcvBorderType borderType,
- uint8_t borderValue);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dilate a grayscale image by taking the local maxima of NxN neighborhood window.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param N
-/// Dimension of the neighborhood window.
-/// \n\b WARNING: must be an odd number
-///
-/// @param dst
-/// Output 8-bit dilated image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param tmp
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Size = width * height
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterDilateNxNu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t N,
- uint8_t* __restrict dst,
- uint32_t dstStride);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 3x3 Gaussian filter
-/// with border handling scheme specified by user
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterGaussian3x3u8_v2() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterGaussian3x3u8,
-/// \a fcvFilterGaussian3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterGaussian3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterGaussian3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Convolution with 3x3 Gaussian kernel:
-/// \n 1 2 1
-/// \n 2 4 2
-/// \n 1 2 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
-///
-/// @param borderType
-/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
-/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
-/// border is blurred by 0-padding adjacent values.
-///
-/// @param borderValue
-/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
-/// set this value as 0. Can take values between 0 and 255.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterGaussian3x3u8_v3( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride,
- fcvBorderType borderType,
- uint8_t borderValue);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 3x3 median filter
-/// with border handling scheme specified by user
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvFilterMedian3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterMedian3x3u8,
-/// \a fcvFilterMedian3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterMedian3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterMedian3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Border values are extrapolated according to borderType.
-/// The 3x3 mask convolves with the whole image area.
-///
-/// @param srcImg
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dstImg
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param borderType
-/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
-/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
-/// border values are ignored. The 3x3 mask convolves with the following image area
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param borderValue
-/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
-/// set this value as 0. Can take values between 0 and 255.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFilterMedian3x3u8_v3( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride,
- fcvBorderType borderType,
- uint8_t borderValue);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Calculate histogram at image patches.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvImageSpatialHistogramu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageSpatialHistogramu8,
-/// \a fcvImageSpatialHistogramu8_v2 will be removed, and the current signature
-/// for \a fcvImageSpatialHistogramu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageSpatialHistogramu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param numPatterns
-/// Number of patterns to be computed in the histogram
-///
-/// @param grid_x
-/// The number of grids along x dimension
-///
-/// @param grid_y
-/// The number of grids along y dimension
-///
-/// @param histogram
-/// Output histogram
-/// \n\b NOTE: Memory must be at least numPatterns*grid_x*grid_y*sizeof(float32_t)
-///
-/// @param normalize_factor
-/// Scale factor with float32_t type to normalize result. When set to 0, the result is
-/// normalized by (srcWidth/grid_x) * (srcHeight/grid_y)
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvImageSpatialHistogramu8_v2( const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t numPatterns,
- uint32_t grid_x,
- uint32_t grid_y,
- float32_t*__restrict histogram,
- float32_t normalize_factor);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Image downscaling using bilinear method
-///
-/// @param src
-/// Input image
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-///
-/// @param srcHeight
-/// Input image height
-///
-/// @param srcStride
-/// Stride of input image (i.e., number of bytes between column 0
-/// of row 0 and column 0 of row 1).
-/// If left at 0, srcStride is default to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param dst
-/// Output image
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Output image width
-///
-/// @param dstHeight
-/// Output image height
-///
-/// @param dstStride
-/// Stride of image (i.e., number of bytes between column 0
-/// of row 0 and column 0 of row 1).
-/// If left at 0, dstStride is default to dstWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @return
-/// No return value.
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleDownBLu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Applies a Table Look-up transformation to a single-channel uint8 image
-///
-/// @details
-/// Each pixel in the input image is used to index into a look-up table and the indexed look-up table
-/// value is then put into the output image
-///
-/// @param src
-/// Input uint8_t image. The size of buffer is srcStride*srcHeight bytes
-/// \n\b NOTE: should be 128-bit aligned
-///
-/// @param srcWidth
-/// Input image width
-///
-/// @param srcHeight
-/// Input image height
-///
-/// @param srcStride
-/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-/// if srcStride is equal to 0, it will be set to srcWidth
-/// \n\b NOTE: should be a multiple of 8
-///
-/// @param lut
-/// The Look-up Table given as a 256-element array of type uint8_t
-///
-/// @param dst
-/// Output image which has the same dimension as the input image in uint8_t type
-/// \n\b NOTE: should be 128-bit aligned
-///
-/// @param dstStride
-/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-/// if dstStride is equal to 0, it will be set to srcWidth
-/// \n\b NOTE: should be a multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvTableLookupu8( const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- const uint8_t *__restrict lut,
- uint8_t *__restrict dst,
- uint32_t dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Warps a grayscale image using the a perspective projection transformation
-/// matrix (also known as a homography). This type of transformation is an
-/// invertible transformation which maps straight lines to straight lines.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvWarpPerspectiveu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvWarpPerspectiveu8,
-/// \a fcvWarpPerspectiveu8_v3 will be removed, and the current signature
-/// for \a fcvWarpPerspectiveu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvWarpPerspectiveu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Warps an image taking into consideration the perspective scaling.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Input image height.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcStride
-/// Input image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Warped output image. Size of buffer is dstStride*dstHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Dst image width.
-/// \n\b NOTE: data should be multiple of 8.
-///
-/// @param dstHeight
-/// Dst image height.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param dstStride
-/// Output image stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
-///
-/// @param projectionMatrix
-/// 3x3 perspective transformation matrix (generally a homography). The
-/// matrix stored in homography is row major ordering: \n
-/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
-/// | a11, a12, a13 |\n
-/// | a21, a22, a23 |\n
-/// | a31, a32, a33 |\n
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// Note:
-/// The projection matrix follows the so-called inverse mapping convention.
-/// It is applied to the dst coordinates to produce the corresponding
-/// src coordinates. In other 3rd party tools, the so-called forward mapping
-/// convention may be used, where the projection matrix refers to the one
-/// applied to the src coordinates to produce the dst coordinates.
-/// When comparing with 3rd party results, please make sure
-/// the same convention of projection matrices are assumed. If not,
-/// please transform the projection matrix into an equivalent form under
-/// the forward mapping convention before feeding it into 3rd party tools.
-///
-/// @interpolation
-/// Specifies the interpolation method to be used.
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvWarpPerspectiveu8_v3( const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t *__restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- float *__restrict projectionMatrix,
- fcvInterpolationType interpolation );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Warps a grayscale image using the a perspective projection transformation
-/// matrix (also known as a homography). This type of transformation is an
-/// invertible transformation which maps straight lines to straight lines.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvWarpPerspectiveu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvWarpPerspectiveu8,
-/// \a fcvWarpPerspectiveu8_v4 will be removed, and the current signature
-/// for \a fcvWarpPerspectiveu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvWarpPerspectiveu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Warps an image taking into consideration the perspective scaling.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Input image height.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcStride
-/// Input image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Warped output image. Size of buffer is dstStride*dstHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Dst image width.
-/// \n\b NOTE: data should be multiple of 8.
-///
-/// @param dstHeight
-/// Dst image height.
-/// \n\b NOTE: should be multiple of 8
-///
-/// @param dstStride
-/// Output image stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
-///
-/// @param projectionMatrix
-/// 3x3 perspective transformation matrix (generally a homography). The
-/// matrix stored in homography is row major ordering: \n
-/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
-/// | a11, a12, a13 |\n
-/// | a21, a22, a23 |\n
-/// | a31, a32, a33 |\n
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// Note:
-/// The projection matrix follows the so-called inverse mapping convention.
-/// It is applied to the dst coordinates to produce the corresponding
-/// src coordinates. In other 3rd party tools, the so-called forward mapping
-/// convention may be used, where the projection matrix refers to the one
-/// applied to the src coordinates to produce the dst coordinates.
-/// When comparing with 3rd party results, please make sure
-/// the same convention of projection matrices are assumed. If not,
-/// please transform the projection matrix into an equivalent form under
-/// the forward mapping convention before feeding it into 3rd party tools.
-///
-/// @interpolation
-/// Specifies the interpolation method to be used.
-///
-/// @param borderType
-/// The border mode for dst pixels not mapped to the src image.
-/// Supported modes are FASTCV_BORDER_UNDEFINED and FASTCV_BORDER_CONSTANT.
-///
-/// @param borderValue
-/// The user-specified constant pixel value,
-/// in case FASTCV_BORDER_CONSTANT is chosen for borderType.
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvWarpPerspectiveu8_v4( const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t *__restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- float *__restrict projectionMatrix,
- fcvInterpolationType interpolation,
- fcvBorderType borderType,
- uint8_t borderValue
-);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Applies a generic geometrical transformation to a greyscale uint8 image.
-/// The interpolation method is specified through a parameter.
-///
-/// @details
-/// The greyscale of each pixel in the destination image is obtained from a location of the source image
-/// through a per-element mapping as defined in the mapping matrices. The mapping has subpixel precision,
-/// thus interpolations are involved.
-///
-/// @param src
-/// Input uint8_t image. The size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Input image height.
-///
-/// @param srcStride
-/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-/// if srcStride is equal to 0, it will be set to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param dst
-/// Output image which has the same type, and size as the input image. The size of buffer is dstStride*dstHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Output image width.
-///
-/// @param dstHeight
-/// Output image height.
-///
-/// @param dstStride
-/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-/// if dstStride is equal to 0, it will be set to dstWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param mapX
-/// a floating point matrix, each element is the column coordinate of the mapped location in the src image. E.g. if dst(i,j) is
-/// mapped to src(ii,jj), then mapX(i,j) =jj.
-/// the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param mapY
-/// a floating point matrix, each element is the row coordinate of the mapped location in the src image.E.g. if dst(i,j) is
-/// mapped to src(ii,jj), then mapY(i,j) =ii.
-/// the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param mapStride
-/// the stride of the mapX and mapY
-/// if mapStride is equal to 0, it will be set to dstWidth*sizeof(float32_t).
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param interpolation
-/// the interpolation method to derive the dst pixel value.
-/// supported methods are nearest neighbor, bilinear and area.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvRemapu8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- const float32_t* __restrict mapX,
- const float32_t* __restrict mapY,
- uint32_t mapStride,
- fcvInterpolationType interpolation
-);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Applies a generic geometrical transformation to a greyscale uint8 image.
-/// The interpolation method is specified through a parameter.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvRemapu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvRemapu8,
-/// \a fcvRemapu8_v2 will be removed, and the current signature
-/// for \a fcvRemapu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvRemapu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// The greyscale of each pixel in the destination image is obtained from a location of the source image
-/// through a per-element mapping as defined in the mapping matrices. The mapping has subpixel precision,
-/// thus interpolations are involved.
-///
-/// @param src
-/// Input uint8_t image. The size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param srcHeight
-/// Input image height.
-///
-/// @param srcStride
-/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-/// if srcStride is equal to 0, it will be set to srcWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param dst
-/// Output image which has the same type, and size as the input image. The size of buffer is dstStride*dstHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Output image width.
-///
-/// @param dstHeight
-/// Output image height.
-///
-/// @param dstStride
-/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-/// if dstStride is equal to 0, it will be set to dstWidth.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param mapX
-/// a floating point matrix, each element is the column coordinate of the mapped location in the src image. E.g. if dst(i,j) is
-/// mapped to src(ii,jj), then mapX(i,j) =jj.
-/// the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param mapY
-/// a floating point matrix, each element is the row coordinate of the mapped location in the src image.E.g. if dst(i,j) is
-/// mapped to src(ii,jj), then mapY(i,j) =ii.
-/// the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
-/// \n\b NOTE: should be 128-bit aligned.
-///
-/// @param mapStride
-/// the stride of the mapX and mapY
-/// if mapStride is equal to 0, it will be set to dstWidth*sizeof(float32_t).
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param interpolation
-/// the interpolation method to derive the dst pixel value.
-/// supported methods are nearest neighbor, bilinear and area.
-///
-/// @param borderType
-/// The border mode for dst pixels not mapped to the src image.
-/// Supported modes are FASTCV_BORDER_UNDEFINED and FASTCV_BORDER_CONSTANT.
-///
-/// @param borderValue
-/// The user-specified constant pixel value,
-/// in case FASTCV_BORDER_CONSTANT is chosen for borderType.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvRemapu8_v2(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- const float32_t* __restrict mapX,
- const float32_t* __restrict mapY,
- uint32_t mapStride,
- fcvInterpolationType interpolation,
- fcvBorderType borderType,
- uint8_t borderValue
-);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Gradient Magnitude Computation from two int16_t type matrices.
-///
-/// @details
-/// The function takes two gradient matrices in int16_t and computes the
-/// magnitude in int16_t.
-/// \n\b NOTE: Saturation is used when computed magnitude value is larger than max limit of int16_t.
-///
-/// @param src1
-/// The gradient matrix in X direction.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// The gradient matrix in Y direction.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (int16_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvMagnitudes16( const int16_t *__restrict src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const int16_t *__restrict src2,
- uint32_t src2Stride,
- int16_t *__restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Gradient Phase Computation from two int16_t type matrices.
-///
-/// @details
-/// The function takes two gradient matrices in int16_t and computes the
-/// phase for each pixel, storing results in a uint8_t matrix. The phase angle is translated
-/// to [0, 2*PI) and then mapped to range [0, 255).
-///
-/// @param src1
-/// The gradient matrix in X direction.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// The gradient matrix in Y direction.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (uint8_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvPhases16 ( const int16_t *__restrict src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const int16_t *__restrict src2,
- uint32_t src2Stride,
- uint8_t *__restrict dst,
- uint32_t dstStride );
-
-
-//--------------------------------------------------------------------------------
-/// Computes the 1D or 2D Fast Fourier Transform of a matrix.
-///
-/// @details
-/// Computes the 1D or 2D Fast Fourier Transform of a real valued matrix. For the
-/// 2D case, The width and height of the input and output matrix must be powers of 2.
-/// For the 1D case, the height of the matrices must be 1, while the width must be a power of 2.
-///
-/// @param src
-/// An 8 bit unsigned real valued input matrix. The dimensions of the matrix must be powers
-/// of 2 for the 2D case, and in the 1D case, the height must be 1, while the width must be
-/// a power of 2.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param srcWidth
-/// Width of the source matrix.
-/// \n\b NOTE: Must be a power of 2
-///
-/// @param srcHeight
-/// Height of the source matrix.
-/// \n\b NOTE: Must be a power of 2 for the 2D case, and must be set to 1 for the 1D case
-///
-/// @param srcStride
-/// Stride of the input matrix. Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is set to srcWidth.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// The computed FFT matrix. The FFT coefficients are stored in interleaved fashion, i.e.,
-/// Re1 Im1 Re2 Im2 and so on. Hence the dimensions of the dst are (2 x srcWidth, srcHeight)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride of the output matrix. Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0, dstStride is set to 2 x srcWidth x sizeof(float32_t).
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvFFTu8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t* __restrict dst,
- uint32_t dstStride);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Computes the 1D or 2D Inverse Fast Fourier Transform of a matrix.
-///
-/// @details
-/// Computes the 1D or 2D Inverse Fast Fourier Transform of a complex valued matrix. For the
-/// 2D case, The width and height of the input and output matrix must be powers of 2.
-/// For the 1D case, the height of the matrices must be 1, while the width must be a power of 2.
-///
-/// @param src
-/// An 32 bit floating point complex valued input matrix. The data in the matrix must be stored
-/// in an interleaved fashion, i.e., Re1 Im1 Re2 Im2 and so on. The dimensions of the matrix must
-/// be powers of 2 for the 2D case, and in the 1D case, the height must be 1, while the width must be
-/// a power of 2.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param srcWidth
-/// Width of the source matrix. The width here is the number of floating point units in the matrix. Since
-/// the data is interleaved fashion, i.e., Re1 Im1 Re2 Im2 and so on, the width is the total number of real
-/// and complex units in the matrix. For example, if the Matrix has data values Re1 Im1 Re2 Im2 Re3 Im3 Re4 Im4,
-/// then the width here is 8 units.
-/// \n\b NOTE: Must be a power of 2
-///
-/// @param srcHeight
-/// Height of the source matrix.
-/// \n\b NOTE: Must be a power of 2 for the 2D case, and must be set to 1 for the 1D case
-///
-/// @param srcStride
-/// Stride of the input matrix. Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is set to srcWidth x sizeof(float32_t).
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// The computed IFFT matrix. The matrix is real valued and has no imaginary components.
-/// Hence the dimensions of the dst are (srcWidth / 2 , srcHeight)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride of the output matrix. Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0, dstStride is set to (srcWidth / 2).
-/// \n\b WARNING: should be multiple of 8
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvIFFTf32( const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Scale an image Horizontaly and/or Vertically by arbitrary ratio.
-/// The scaling ratios are automatically determined from the specified
-/// source image size and destination image size.
-///
-/// @details
-/// Scale up or down the source image of size srcWidth-by-srcHeight
-/// to the destination image of size dstWidth-by-dstHeight.
-/// NOTE: dstWidth > 0 && dstHeight > 0.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Source Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Source Image height.
-///
-/// @param srcStride
-/// Stride of source image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If set to 0, srcStride=srcWidth as default
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*dstHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Destination Image width.
-///
-/// @param dstHeight
-/// Destination Image height.
-///
-/// @param dstStride
-/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If set to 0, dstStride=dstWidth as default
-///
-/// @param interpolation
-/// The interpolation method used for scaling. Please see fcvInterpolationType.
-/// FASTCV_INTERPOLATION_TYPE_NEAREST_NEIGHBOR:
-/// Nearest neighbor interpolation.
-/// FASTCV_INTERPOLATION_TYPE_BILINEAR:
-/// Bilinear interpolation.
-/// FASTCV_INTERPOLATION_TYPE_AREA:
-/// Interpolation by area. Output values are determined by weighted averages of
-/// the source pixels covered by the destination pixel. The averaging weight
-/// for each source pixel is proportional to its area overlapping with
-/// the destination pixel. Interpolation by area may produce more precise
-/// images for scale down operations.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other values otherwise.
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvScaleu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- fcvInterpolationType interpolation);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Scale an image Horizontaly and/or Vertically by arbitrary ratio.
-/// The scaling ratios are automatically determined from the specified
-/// source image size and destination image size.
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvScaleu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvScaleu8,
-/// \a fcvScaleu8_v2 will be removed, and the current signature
-/// for \a fcvScaleu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvWarpPerspectiveu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Scale up or down the source image of size srcWidth-by-srcHeight
-/// to the destination image of size dstWidth-by-dstHeight.
-/// NOTE: dstWidth > 0 && dstHeight > 0.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Source Image width.
-/// \n\b WARNING: should be multiple of 8.
-///
-/// @param srcHeight
-/// Source Image height.
-///
-/// @param srcStride
-/// Stride of source image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If set to 0, srcStride=srcWidth as default
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*dstHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstWidth
-/// Destination Image width.
-///
-/// @param dstHeight
-/// Destination Image height.
-///
-/// @param dstStride
-/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If set to 0, dstStride=dstWidth as default
-///
-/// @param interpolation
-/// The interpolation method used for scaling. Please see fcvInterpolationType.
-/// FASTCV_INTERPOLATION_TYPE_NEAREST_NEIGHBOR:
-/// Nearest neighbor interpolation.
-/// FASTCV_INTERPOLATION_TYPE_BILINEAR:
-/// Bilinear interpolation.
-/// FASTCV_INTERPOLATION_TYPE_AREA:
-/// Interpolation by area. Output values are determined by weighted averages of
-/// the source pixels covered by the destination pixel. The averaging weight
-/// for each source pixel is proportional to its area overlapping with
-/// the destination pixel. Interpolation by area may produce more precise
-/// images for scale down operations.
-///
-/// @param borderType
-/// The border mode for dst pixels not mapped to the src image.
-/// Supported modes are FASTCV_BORDER_UNDEFINED, FASTCV_BORDER_CONSTANT
-/// and FASTCV_BORDER_REPLICATE.
-///
-/// @param borderValue
-/// The user-specified constant pixel value,
-/// in case FASTCV_BORDER_CONSTANT is chosen for borderType.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other values otherwise.
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvScaleu8_v2( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- fcvInterpolationType interpolation,
- fcvBorderType borderType,
- uint8_t borderValue);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Perspective warp two images using the same transformation.
-/// Bi-linear interpolation is used where applicable.
-///
-/// @details
-/// Perspective warp two images (or buffer) using the same transformation in one function
-/// call. This can be used, for example, to warp a grayscale image and an alpha image at
-/// the same time, or warp two color channels (for example u and v de-interleaved for YUV).
-///
-/// @param src1
-/// First input 8-bit image. Size of buffer is src1Stride*srcHeight bytes.
-///
-/// @param src2
-/// Second input 8-bit image. Size of buffer is src2Stride*srcHeight bytes.
-///
-/// @param srcWidth
-/// Input image width.
-///
-/// @param srcHeight
-/// Input image height.
-///
-/// @param src1Stride
-/// Input image 1 stride, i.e. the gap (in terms of bytes) between the first element
-/// of a row and that of the successive row. If srcStride is equal to 0,
-/// it will be set to srcWidth.
-///
-/// @param src2Stride
-/// Input image 2 stride, i.e. the gap (in terms of bytes) between the first element
-/// of a row and that of the successive row. If srcStride is equal to 0,
-/// it will be set to srcWidth.
-///
-/// @param dst1
-/// First warped output image (correspond to src1). Size of buffer is dst1Stride*dstHeight bytes.
-///
-/// @param dst2
-/// Second warped output image (correspond to src2). Size of buffer is dst2Stride*dstHeight bytes.
-///
-/// @param dstWidth
-/// Dst image width.
-///
-/// @param dstHeight
-/// Dst image height.
-///
-/// @param dst1Stride
-/// Output image 1 stride, i.e. the gap (in terms of bytes) between the first element
-/// of a row and that of the successive row. If srcStride is equal to 0,
-/// it will be set to dstWidth.
-///
-/// @param dst2Stride
-/// Output image 2 stride, i.e. the gap (in terms of bytes) between the first element
-/// of a row and that of the successive row. If srcStride is equal to 0,
-/// it will be set to dstWidth.
-///
-/// @param warpmatrix
-/// 3x3 perspective transformation matrix (generally a homography).
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcv2PlaneWarpPerspectiveu8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t src1Stride,
- uint32_t src2Stride,
- uint8_t* __restrict dst1,
- uint8_t* __restrict dst2,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dst1Stride,
- uint32_t dst2Stride,
- float32_t* __restrict warpmatrix );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Downscale a grayscale image by a factor of two using a 3x3 Gaussian filter kernel
-///
-/// @details
-/// This function first blurs the input image using a 3x3 Gaussian kernel, and then downsamples
-/// the image by selecting every other row and column. The dimensions of the destination image are
-/// computed as follows : dstWidth = (srcWidth + 1)/2 , dstHeight = (srcHeight + 1)/2
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-///
-/// @param srcWidth
-/// Width of the input image.
-///
-/// @param srcHeight
-/// Height of the input image
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit downscale image of size (srcWidth + 1) / 2 x (srcHeight + 1) / 2.
-/// \n\b NOTE: border values have been taken care of w.r.t. the pixel coordinate.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as (srcWidth+1)/2.
-/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as (srcWidth+1)/2 if not 0.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvScaleDownBy2Gaussian3x3u8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Sum of squared differences of one L-byte vector against N others.
-///
-/// @details
-/// SSD of one vector (a) against N other L-byte vectors
-/// ( b[0], b[1], ..., b[n-1] )
-/// using their given inverse lengths for normalization.
-/// \n\n SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLenA
-/// Inverse of vector A = 1/|A|
-///
-/// @param dim
-/// Number of element of vector A
-///
-/// @param bList
-/// Vectors b[0]...b[n-1].
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param invLenB
-/// Inverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param numB
-/// Number of B vectors.
-///
-/// @param distances
-/// Output of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSumOfSquaredDiffss8( const int8_t* __restrict a,
- float32_t invLenA,
- uint32_t dim,
- const int8_t* const * __restrict bList,
- const float32_t* __restrict invLenB,
- uint32_t numB,
- float32_t* __restrict distances );
-
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Adds a scalar value to every element of a Matrix.
-///
-/// @details
-/// Adds a floating point scalar value to each element of the source Matrix
-/// and stores the result of the addition in the corresponding element
-/// of the destination matrix.
-///
-/// @param src
-/// Input floating point matrix. Size of buffer is srcStride*srcHeight bytes.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param scalar
-/// The floating point scalar to be added to the source matrix.
-///
-/// @param dst
-/// Output 32-bit floating point matrix. Size of buffer is dstStride*srcHeight bytes.
-///
-/// @param dstStride
-/// Stride of the output matrix in bytes.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvAddScalarf32(const float32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t scalar,
- float32_t * __restrict dst,
- uint32_t dstStride);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Adds a scalar value to every element of a Matrix.
-///
-/// @details
-/// Adds a signed 16-bit integer scalar value to each element of the source Matrix
-/// and stores the result of the addition in the corresponding element
-/// of the destination matrix.
-/// \n\b NOTE : If the sum of the scalar and matrix element exceeds the maximum value
-/// of a signed 16-bit integer, the result is clipped to this maximum value, while
-/// if the sum goes below the minimum value of a signed 16-bit integer, it is clipped
-/// to this minimum value.
-///
-/// @param src
-/// Input signed 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param scalar
-/// The signed 16-bit integer scalar to be added to the source matrix.
-///
-/// @param dst
-/// Output 16-bit signed integer matrix. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of the output matrix in bytes.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvAddScalars16(const int16_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t scalar,
- int16_t * __restrict dst,
- uint32_t dstStride);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Multiplies a scalar value to every element of a Matrix.
-///
-/// @details
-/// Multiplies a floating point scalar value to each element of the source Matrix
-/// and stores the result of the multiplication in the corresponding element
-/// of the destination matrix.
-///
-/// @param src
-/// Input floating point matrix. Size of buffer is srcStride*srcHeight bytes.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param scalar
-/// The floating point scalar to be multiplied to the source matrix.
-///
-/// @param dst
-/// Output 32-bit floating point matrix. Size of buffer is dstStride*srcHeight bytes.
-///
-/// @param dstStride
-/// Stride of the output matrix in bytes.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvMultiplyScalarf32(const float32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t scalar,
- float32_t * __restrict dst,
- uint32_t dstStride);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Multiplies a scalar value to every element of a Matrix.
-///
-/// @details
-/// Multiplies a signed 16-bit scalar value to each element of the source Matrix
-/// and stores the result of the multiplication in the corresponding element
-/// of the destination matrix.
-/// \n\b NOTE : If the product of the scalar and matrix element exceeds the maximum value
-/// of a signed 16-bit integer, the result is clipped to this maximum value, while
-/// if the product goes below the minimum value of a signed 16-bit integer, it is clipped
-/// to this minimum value. The API can also handle fractional scalars. Use fixed point conversion
-/// and use the shift parameter to decide the number of bits by which the result is shifted by. This
-/// affects the precision of the result. If you wish to perform pure integer multiplication, set the
-/// shift parameter to 0.
-///
-/// @param src
-/// Input signed 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param scalar
-/// The signed 8-bit integer scalar to be multiplied to the source matrix.
-///
-/// @param shift
-/// The number of bits that the result has to be shifted by. Used to handle fractional scalar multiplication.
-/// If your input scalar is a pure integer, set shift to 0.
-///
-/// @param dst
-/// Output signed 16-bit integer matrix. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of the output matrix in bytes.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvMultiplyScalars16( const int16_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int8_t scalar,
- int8_t shift,
- int16_t * __restrict dst,
- uint32_t dstStride);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds the minimum and maximum values, and their location in a matrix
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMinMaxLocu8_v2(). In the 2.0.0 release,
-/// fcvMinMaxLocu8_v2 will be renamed to fcvMinMaxLocu8
-/// and the signature of fcvMinMaxLocu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Finds the minimum and maximum values in a matrix, and returns them. In addition
-/// to this, it also returns the location (x,y) of the minimum and maximum values thus
-/// found.
-///
-/// @param src
-/// Input unsigned 8-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param minVal
-/// This variable stores the minimum value of the src matrix found by the function
-///
-/// @param maxVal
-/// This variable stores the maximum value of the src matrix found by the function
-///
-/// @param minLocX
-/// The X coordinate of the minimum value's location returned by the function
-///
-/// @param minLocY
-/// The Y coordinate of the minimum value's location returned by the function
-///
-/// @param maxLocX
-/// The X coordinate of the maximum value's location returned by the function
-///
-/// @param maxLocY
-/// The Y coordinate of the maximum value's location returned by the function
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvMinMaxLocu8(const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t *__restrict minVal,
- uint8_t *__restrict maxVal,
- uint32_t *__restrict minLocX,
- uint32_t *__restrict minLocY,
- uint32_t *__restrict maxLocX,
- uint32_t *__restrict maxLocY);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds the minimum and maximum values, and their location in a matrix
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMinMaxLocu16_v2(). In the 2.0.0 release,
-/// fcvMinMaxLocu16_v2 will be renamed to fcvMinMaxLocu16
-/// and the signature of fcvMinMaxLocu16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Finds the minimum and maximum values in a matrix, and returns them. In addition
-/// to this, it also returns the location (x,y) of the minimum and maximum values thus
-/// found.
-///
-/// @param src
-/// Input unsigned 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param minVal
-/// This variable stores the minimum value of the src matrix found by the function
-///
-/// @param maxVal
-/// This variable stores the maximum value of the src matrix found by the function
-///
-/// @param minLocX
-/// The X coordinate of the minimum value's location returned by the function
-///
-/// @param minLocY
-/// The Y coordinate of the minimum value's location returned by the function
-///
-/// @param maxLocX
-/// The X coordinate of the maximum value's location returned by the function
-///
-/// @param maxLocY
-/// The Y coordinate of the maximum value's location returned by the function
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvMinMaxLocu16(const uint16_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint16_t *__restrict minVal,
- uint16_t *__restrict maxVal,
- uint32_t *__restrict minLocX,
- uint32_t *__restrict minLocY,
- uint32_t *__restrict maxLocX,
- uint32_t *__restrict maxLocY);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds the minimum and maximum values, and their location in a matrix
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMinMaxLocs16_v2(). In the 2.0.0 release,
-/// fcvMinMaxLocs16_v2 will be renamed to fcvMinMaxLocs16
-/// and the signature of fcvMinMaxLocs16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Finds the minimum and maximum values in a matrix, and returns them. In addition
-/// to this, it also returns the location (x,y) of the minimum and maximum values thus
-/// found.
-///
-/// @param src
-/// Input signed 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param minVal
-/// This variable stores the minimum value of the src matrix found by the function
-///
-/// @param maxVal
-/// This variable stores the maximum value of the src matrix found by the function
-///
-/// @param minLocX
-/// The X coordinate of the minimum value's location returned by the function
-///
-/// @param minLocY
-/// The Y coordinate of the minimum value's location returned by the function
-///
-/// @param maxLocX
-/// The X coordinate of the maximum value's location returned by the function
-///
-/// @param maxLocY
-/// The Y coordinate of the maximum value's location returned by the function
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvMinMaxLocs16(const int16_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t *__restrict minVal,
- int16_t *__restrict maxVal,
- uint32_t *__restrict minLocX,
- uint32_t *__restrict minLocY,
- uint32_t *__restrict maxLocX,
- uint32_t *__restrict maxLocY);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds the minimum and maximum values, and their location in a matrix
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMinMaxLocu32_v2(). In the 2.0.0 release,
-/// fcvMinMaxLocu32_v2 will be renamed to fcvMinMaxLocu32
-/// and the signature of fcvMinMaxLocu32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Finds the minimum and maximum values in a matrix, and returns them. In addition
-/// to this, it also returns the location (x,y) of the minimum and maximum values thus
-/// found.
-///
-/// @param src
-/// Input unsigned 32-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param minVal
-/// This variable stores the minimum value of the src matrix found by the function
-///
-/// @param maxVal
-/// This variable stores the maximum value of the src matrix found by the function
-///
-/// @param minLocX
-/// The X coordinate of the minimum value's location returned by the function
-///
-/// @param minLocY
-/// The Y coordinate of the minimum value's location returned by the function
-///
-/// @param maxLocX
-/// The X coordinate of the maximum value's location returned by the function
-///
-/// @param maxLocY
-/// The Y coordinate of the maximum value's location returned by the function
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvMinMaxLocu32(const uint32_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t *__restrict minVal,
- uint32_t *__restrict maxVal,
- uint32_t *__restrict minLocX,
- uint32_t *__restrict minLocY,
- uint32_t *__restrict maxLocX,
- uint32_t *__restrict maxLocY);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds the minimum and maximum values, and their location in a matrix
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMinMaxLocs32_v2(). In the 2.0.0 release,
-/// fcvMinMaxLocs32_v2 will be renamed to fcvMinMaxLocs32
-/// and the signature of fcvMinMaxLocs32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Finds the minimum and maximum values in a matrix, and returns them. In addition
-/// to this, it also returns the location (x,y) of the minimum and maximum values thus
-/// found.
-///
-/// @param src
-/// Input signed 32-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param minVal
-/// This variable stores the minimum value of the src matrix found by the function
-///
-/// @param maxVal
-/// This variable stores the maximum value of the src matrix found by the function
-///
-/// @param minLocX
-/// The X coordinate of the minimum value's location returned by the function
-///
-/// @param minLocY
-/// The Y coordinate of the minimum value's location returned by the function
-///
-/// @param maxLocX
-/// The X coordinate of the maximum value's location returned by the function
-///
-/// @param maxLocY
-/// The Y coordinate of the maximum value's location returned by the function
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvMinMaxLocs32(const int32_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t *__restrict minVal,
- int32_t *__restrict maxVal,
- uint32_t *__restrict minLocX,
- uint32_t *__restrict minLocY,
- uint32_t *__restrict maxLocX,
- uint32_t *__restrict maxLocY);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds the minimum and maximum values, and their location in a matrix
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMinMaxLocf32_v2(). In the 2.0.0 release,
-/// fcvMinMaxLocf32_v2 will be renamed to fcvMinMaxLocf32
-/// and the signature of fcvMinMaxLocf32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Finds the minimum and maximum values in a matrix, and returns them. In addition
-/// to this, it also returns the location (x,y) of the minimum and maximum values thus
-/// found.
-///
-/// @param src
-/// Input unsigned 32-bit floating point matrix. Size of buffer is srcStride*srcHeight bytes.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param minVal
-/// This variable stores the minimum value of the src matrix found by the function
-///
-/// @param maxVal
-/// This variable stores the maximum value of the src matrix found by the function
-///
-/// @param minLocX
-/// The X coordinate of the minimum value's location returned by the function
-///
-/// @param minLocY
-/// The Y coordinate of the minimum value's location returned by the function
-///
-/// @param maxLocX
-/// The X coordinate of the maximum value's location returned by the function
-///
-/// @param maxLocY
-/// The Y coordinate of the maximum value's location returned by the function
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvMinMaxLocf32(const float32_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t *__restrict minVal,
- float32_t *__restrict maxVal,
- uint32_t *__restrict minLocX,
- uint32_t *__restrict minLocY,
- uint32_t *__restrict maxLocX,
- uint32_t *__restrict maxLocY);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds the minimum and maximum values, and their locations in a matrix
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMinMaxLocf32_v2(). In the 2.0.0 release,
-/// fcvMinMaxLocf32_v2 will be renamed to fcvMinMaxLocf32
-/// and the signature of fcvMinMaxLocf32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Finds the minimum and maximum values in a matrix, and returns them. In addition
-/// to this, it also returns the location (x,y) of the minimum and maximum values thus
-/// found. If there are multiple minima/maxima, the function returns them all. If the
-/// the number of minima and maxima are greater than the capacity of the minLoc and
-/// maxLoc arrays, then the function returns as many locations as the capacity of these
-/// arrays.
-///
-/// @param src
-/// Input 32-bit floating point matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(float32_t) if not 0.
-///
-/// @param minVal
-/// This variable stores the minimum value of the src matrix found by the function
-///
-/// @param maxVal
-/// This variable stores the maximum value of the src matrix found by the function
-///
-/// @param minLocX
-/// An array of X coordinates of the minimum value's location returned by the function
-/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
-///
-/// @param minLocY
-/// An array of Y coordinates of the minimum value's location returned by the function
-/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
-///
-/// @param maxLocX
-/// An array of X coordinates of the maximum value's location returned by the function
-/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
-///
-/// @param maxLocY
-/// An array of Y coordinates of the maximum value's location returned by the function
-/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
-///
-/// @param minCount
-/// The number of minima found by the function
-///
-/// @param maxCount
-/// The number of maxima found by the function
-///
-/// @param nMinLocSize
-/// The maximum number of minima requested by the user to be found in the input image src.
-/// The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
-///
-/// @param nMaxLocSize
-/// The maximum number of maxima requested by the user to be found in the input image src.
-/// The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API fcvStatus
-fcvMinMaxLocf32_v2(const float32_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t *__restrict minVal,
- float32_t *__restrict maxVal,
- uint32_t *__restrict minLocX,
- uint32_t *__restrict minLocY,
- uint32_t *__restrict maxLocX,
- uint32_t *__restrict maxLocY,
- uint32_t *__restrict minCount,
- uint32_t *__restrict maxCount,
- uint32_t nMinLocSize,
- uint32_t nMaxLocSize);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds the minimum and maximum values, and their locations in a matrix
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMinMaxLocu8_v2(). In the 2.0.0 release,
-/// fcvMinMaxLocu8_v2 will be renamed to fcvMinMaxLocu8
-/// and the signature of fcvMinMaxLocu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Finds the minimum and maximum values in a matrix, and returns them. In addition
-/// to this, it also returns the location (x,y) of the minimum and maximum values thus
-/// found. If there are multiple minima/maxima, the function returns them all. If the
-/// the number of minima and maxima are greater than the capacity of the minLoc and
-/// maxLoc arrays, then the function returns as many locations as the capacity of these
-/// arrays.
-///
-/// @param src
-/// Input unsigned 8-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(uint8_t) if not 0.
-///
-/// @param minVal
-/// This variable stores the minimum value of the src matrix found by the function
-///
-/// @param maxVal
-/// This variable stores the maximum value of the src matrix found by the function
-///
-/// @param minLocX
-/// An array of X coordinates of the minimum value's location returned by the function
-/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
-///
-/// @param minLocY
-/// An array of Y coordinates of the minimum value's location returned by the function
-/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
-///
-/// @param maxLocX
-/// An array of X coordinates of the maximum value's location returned by the function
-/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
-///
-/// @param maxLocY
-/// An array of Y coordinates of the maximum value's location returned by the function
-/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
-///
-/// @param minCount
-/// The number of minima found by the function
-///
-/// @param maxCount
-/// The number of maxima found by the function
-///
-/// @param nMinLocSize
-/// The maximum number of minima requested by the user to be found in the input image src.
-/// The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
-///
-/// @param nMaxLocSize
-/// The maximum number of maxima requested by the user to be found in the input image src.
-/// The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvMinMaxLocu8_v2(const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t *__restrict minVal,
- uint8_t *__restrict maxVal,
- uint32_t *__restrict minLocX,
- uint32_t *__restrict minLocY,
- uint32_t *__restrict maxLocX,
- uint32_t *__restrict maxLocY,
- uint32_t *__restrict minCount,
- uint32_t *__restrict maxCount,
- uint32_t nMinLocSize,
- uint32_t nMaxLocSize);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds the minimum and maximum values, and their locations in a matrix
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMinMaxLocu16_v2(). In the 2.0.0 release,
-/// fcvMinMaxLocu16_v2 will be renamed to fcvMinMaxLocu16
-/// and the signature of fcvMinMaxLocu16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Finds the minimum and maximum values in a matrix, and returns them. In addition
-/// to this, it also returns the location (x,y) of the minimum and maximum values thus
-/// found. If there are multiple minima/maxima, the function returns them all. If the
-/// the number of minima and maxima are greater than the capacity of the minLoc and
-/// maxLoc arrays, then the function returns as many locations as the capacity of these
-/// arrays.
-///
-/// @param src
-/// Input unsigned 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(uint16_t) if not 0.
-///
-/// @param minVal
-/// This variable stores the minimum value of the src matrix found by the function
-///
-/// @param maxVal
-/// This variable stores the maximum value of the src matrix found by the function
-///
-/// @param minLocX
-/// An array of X coordinates of the minimum value's location returned by the function
-/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
-///
-/// @param minLocY
-/// An array of Y coordinates of the minimum value's location returned by the function
-/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
-///
-/// @param maxLocX
-/// An array of X coordinates of the maximum value's location returned by the function
-/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
-///
-/// @param maxLocY
-/// An array of Y coordinates of the maximum value's location returned by the function
-/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
-///
-/// @param minCount
-/// The number of minima found by the function
-///
-/// @param maxCount
-/// The number of maxima found by the function
-///
-/// @param nMinLocSize
-/// The maximum number of minima requested by the user to be found in the input image src.
-/// The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
-///
-/// @param nMaxLocSize
-/// The maximum number of maxima requested by the user to be found in the input image src.
-/// The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API fcvStatus
-fcvMinMaxLocu16_v2(const uint16_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint16_t *__restrict minVal,
- uint16_t *__restrict maxVal,
- uint32_t *__restrict minLocX,
- uint32_t *__restrict minLocY,
- uint32_t *__restrict maxLocX,
- uint32_t *__restrict maxLocY,
- uint32_t *__restrict minCount,
- uint32_t *__restrict maxCount,
- uint32_t nMinLocSize,
- uint32_t nMaxLocSize);
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds the minimum and maximum values, and their locations in a matrix
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMinMaxLocs16_v2(). In the 2.0.0 release,
-/// fcvMinMaxLocs16_v2 will be renamed to fcvMinMaxLocs16
-/// and the signature of fcvMinMaxLocs16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Finds the minimum and maximum values in a matrix, and returns them. In addition
-/// to this, it also returns the location (x,y) of the minimum and maximum values thus
-/// found. If there are multiple minima/maxima, the function returns them all. If the
-/// the number of minima and maxima are greater than the capacity of the minLoc and
-/// maxLoc arrays, then the function returns as many locations as the capacity of these
-/// arrays.
-///
-/// @param src
-/// Input signed 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(int16_t) if not 0.
-///
-/// @param minVal
-/// This variable stores the minimum value of the src matrix found by the function
-///
-/// @param maxVal
-/// This variable stores the maximum value of the src matrix found by the function
-///
-/// @param minLocX
-/// An array of X coordinates of the minimum value's location returned by the function
-/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
-///
-/// @param minLocY
-/// An array of Y coordinates of the minimum value's location returned by the function
-/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
-///
-/// @param maxLocX
-/// An array of X coordinates of the maximum value's location returned by the function
-/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
-///
-/// @param maxLocY
-/// An array of Y coordinates of the maximum value's location returned by the function
-/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
-///
-/// @param minCount
-/// The number of minima found by the function
-///
-/// @param maxCount
-/// The number of maxima found by the function
-///
-/// @param nMinLocSize
-/// The maximum number of minima requested by the user to be found in the input image src.
-/// The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
-///
-/// @param nMaxLocSize
-/// The maximum number of maxima requested by the user to be found in the input image src.
-/// The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API fcvStatus
-fcvMinMaxLocs16_v2(const int16_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t *__restrict minVal,
- int16_t *__restrict maxVal,
- uint32_t *__restrict minLocX,
- uint32_t *__restrict minLocY,
- uint32_t *__restrict maxLocX,
- uint32_t *__restrict maxLocY,
- uint32_t *__restrict minCount,
- uint32_t *__restrict maxCount,
- uint32_t nMinLocSize,
- uint32_t nMaxLocSize);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds the minimum and maximum values, and their locations in a matrix
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMinMaxLocu32_v2(). In the 2.0.0 release,
-/// fcvMinMaxLocu32_v2 will be renamed to fcvMinMaxLocu32
-/// and the signature of fcvMinMaxLocu32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Finds the minimum and maximum values in a matrix, and returns them. In addition
-/// to this, it also returns the location (x,y) of the minimum and maximum values thus
-/// found. If there are multiple minima/maxima, the function returns them all. If the
-/// the number of minima and maxima are greater than the capacity of the minLoc and
-/// maxLoc arrays, then the function returns as many locations as the capacity of these
-/// arrays.
-///
-/// @param src
-/// Input unsigned 32-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(uint32_t) if not 0.
-///
-/// @param minVal
-/// This variable stores the minimum value of the src matrix found by the function
-///
-/// @param maxVal
-/// This variable stores the maximum value of the src matrix found by the function
-///
-/// @param minLocX
-/// An array of X coordinates of the minimum value's location returned by the function
-/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
-///
-/// @param minLocY
-/// An array of Y coordinates of the minimum value's location returned by the function
-/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
-///
-/// @param maxLocX
-/// An array of X coordinates of the maximum value's location returned by the function
-/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
-///
-/// @param maxLocY
-/// An array of Y coordinates of the maximum value's location returned by the function
-/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
-///
-/// @param minCount
-/// The number of minima found by the function
-///
-/// @param maxCount
-/// The number of maxima found by the function
-///
-/// @param nMinLocSize
-/// The maximum number of minima requested by the user to be found in the input image src.
-/// The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
-///
-/// @param nMaxLocSize
-/// The maximum number of maxima requested by the user to be found in the input image src.
-/// The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API fcvStatus
-fcvMinMaxLocu32_v2(const uint32_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t *__restrict minVal,
- uint32_t *__restrict maxVal,
- uint32_t *__restrict minLocX,
- uint32_t *__restrict minLocY,
- uint32_t *__restrict maxLocX,
- uint32_t *__restrict maxLocY,
- uint32_t *__restrict minCount,
- uint32_t *__restrict maxCount,
- uint32_t nMinLocSize,
- uint32_t nMaxLocSize);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds the minimum and maximum values, and their locations in a matrix
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvMinMaxLocs32_v2(). In the 2.0.0 release,
-/// fcvMinMaxLocs32_v2 will be renamed to fcvMinMaxLocs32
-/// and the signature of fcvMinMaxLocs32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Finds the minimum and maximum values in a matrix, and returns them. In addition
-/// to this, it also returns the location (x,y) of the minimum and maximum values thus
-/// found. If there are multiple minima/maxima, the function returns them all. If the
-/// the number of minima and maxima are greater than the capacity of the minLoc and
-/// maxLoc arrays, then the function returns as many locations as the capacity of these
-/// arrays.
-///
-/// @param src
-/// Input signed 32-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Matrix.
-///
-/// @param srcHeight
-/// Height of the Matrix.
-///
-/// @param srcStride
-/// Stride of the Matrix in bytes.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(int32_t) if not 0.
-///
-/// @param minVal
-/// This variable stores the minimum value of the src matrix found by the function
-///
-/// @param maxVal
-/// This variable stores the maximum value of the src matrix found by the function
-///
-/// @param minLocX
-/// An array of X coordinates of the minimum value's location returned by the function
-/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
-///
-/// @param minLocY
-/// An array of Y coordinates of the minimum value's location returned by the function
-/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
-///
-/// @param maxLocX
-/// An array of X coordinates of the maximum value's location returned by the function
-/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
-///
-/// @param maxLocY
-/// An array of Y coordinates of the maximum value's location returned by the function
-/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
-///
-/// @param minCount
-/// The number of minima found by the function
-///
-/// @param maxCount
-/// The number of maxima found by the function
-///
-/// @param nMinLocSize
-/// The maximum number of minima requested by the user to be found in the input image src.
-/// The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
-///
-/// @param nMaxLocSize
-/// The maximum number of maxima requested by the user to be found in the input image src.
-/// The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API fcvStatus
-fcvMinMaxLocs32_v2(const int32_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t *__restrict minVal,
- int32_t *__restrict maxVal,
- uint32_t *__restrict minLocX,
- uint32_t *__restrict minLocY,
- uint32_t *__restrict maxLocX,
- uint32_t *__restrict maxLocY,
- uint32_t *__restrict minCount,
- uint32_t *__restrict maxCount,
- uint32_t nMinLocSize,
- uint32_t nMaxLocSize);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Transposes an interleaved RGB image
-///
-/// @details
-/// Computes the transpose of an interleaved RGB image src, and stores the result in
-/// dst
-///
-/// @param src
-/// Input unsigned 8-bit integer image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the Image.
-///
-/// @param srcHeight
-/// Height of the Image.
-///
-/// @param srcStride
-/// Stride of the Image in bytes.
-/// \n\b NOTE: if 0, srcStride is set as 3 x srcWidth.
-/// \n\b WARNING: should be multiple of 8, and at least as much as 3 x srcWidth if not 0.
-///
-/// @param dst
-/// Output unsigned 8-bit integer image. Size of buffer is dstStride*srcWidth bytes.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of the output image in bytes.
-/// \n\b NOTE: if 0, srcStride is set as 3 x srcHeight.
-/// \n\b WARNING: should be multiple of 8, and at least as much as 3 x srcHeight if not 0.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvTransposeRGB888u8(const uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the cross-product of N pairs of 3x1 vectors
-///
-/// @details
-/// Computes the cross-product of N pairs of 3x1 vectors. For each pair of 3x1 vectors,
-/// ai and bi, the output vector ci is given by ci = ai x bi
-///
-/// @param a
-/// Input buffer containing "N" 3x1 Vectors. Must be of length N * 3. The layout of the array is
-/// as follows x0 y0 z0 x1 y1 z1 .......
-///
-/// @param b
-/// Input buffer containing "N" 3x1 Vectors. Must be of length N * 3. The layout of the array is
-/// as follows x0 y0 z0 x1 y1 z1 .......
-///
-/// @param c
-/// Output buffer containing the resultant "N" 3x1 Vectors. Each 3 x 1 Vector in c is computed from the corresponding
-/// 3 x 1 pairs in a & b. Must be of length N * 3.
-///
-/// @param N
-/// Number of vector pairs. For example if N = 10, then a, b and c will have to be 10 x 3 in length
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvCrossProduct3x1f32(const float32_t * __restrict a,
- const float32_t * __restrict b,
- float32_t * __restrict c,
- uint32_t N);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Solves a Linear System of Equations using LU-Decomposition
-///
-/// @details
-/// Solves a Linear System of Equations using LU Decomposition. Given
-/// a system defined by A x = b, the function decomposes A into a lower
-/// triangular matrix L and an upper triangular matrix U. It then computes x
-/// by first solving L y = B by forward substitution for y, and then solving
-/// the system of linear equations U x = y by backward substitution for x.
-/// \n\b NOTE : Pivoting is used here to ensure that any non singular matrix
-/// can be solved. This is because not all Matrices have a LU decomposition.
-/// Pivoting helps to overcome this issue.
-///
-/// @param A
-/// Input coefficient matrix of the linear system of dimension N x N
-/// \n\b WARNING: must be square.
-///
-/// @param b
-/// Component vector of the linear system of dimension N x 1
-///
-/// @param N
-/// Dimension of the input Matrix A and component vector b
-///
-/// @param pivot
-/// An N x 1 pivot array which is populated as follows : For each k = 0, 1,...., N-1
-/// The ith element of pivot contains the row interchanged with row i when k = i.
-/// Pivoting is used both for numerical stability and also ensuring that an LU factorization
-/// exists for the input matrix A.
-///
-/// @param x
-/// The solution of the linear system, an N x 1 Vector.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvSolveLUf32(float32_t* __restrict A,
- float32_t* __restrict b,
- uint32_t N,
- uint8_t* __restrict pivot,
- float32_t* __restrict x);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Bitwise AND operation for each element of two uint8_t matrices
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (uint8_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvBitwiseAndu8(const uint8_t * src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t *__restrict src2,
- uint32_t src2Stride,
- uint8_t * dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Bitwise Exclusive Or operation for each element of two uint8_t matrices
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (uint8_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvBitwiseXoru8( const uint8_t * src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t *__restrict src2,
- uint32_t src2Stride,
- uint8_t * dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Bitwise Not operation for each element of two uint8_t matrices
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (uint8_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvBitwiseNotu8(const uint8_t * src,
- uint32_t width,
- uint32_t height,
- uint32_t srcStride,
- uint8_t * dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix addition of two uint8_t type matrices to one uint8_t matrix
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param policy
-/// Conversion policy that decides how data overflow should be handled
-///
-/// @param dst
-/// the result matrix (uint8_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvAddu8(const uint8_t * src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t * __restrict src2,
- uint32_t src2Stride,
- fcvConvertPolicy policy,
- uint8_t * dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix addition of two int16_t type matrices which allows in-place operation
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param policy
-/// Conversion policy that decides how data overflow should be handled
-///
-/// @param dst
-/// the result matrix (int16_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvAdds16_v2( const int16_t * src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const int16_t * __restrict src2,
- uint32_t src2Stride,
- fcvConvertPolicy policy,
- int16_t * dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix addition of one uint16_t type matrix and one uint8_t matrix
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param policy
-/// Conversion policy that decides how data overflow should be handled
-///
-/// @param dst
-/// the result matrix (uint16_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvAddu16u8u16 (const uint16_t * src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t * __restrict src2,
- uint32_t src2Stride,
- fcvConvertPolicy policy,
- uint16_t * dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix substration of two uint8_t type matrices
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param policy
-/// Conversion policy that decides how data overflow should be handled
-///
-/// @param dst
-/// the result matrix (uint8_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvSubtractu8 ( const uint8_t * src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t * __restrict src2,
- uint32_t src2Stride,
- fcvConvertPolicy policy,
- uint8_t * dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix substration of two uint16_t type matrices
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param policy
-/// Conversion policy that decides how data overflow should be handled
-///
-/// @param dst
-/// the result matrix (int16_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvSubtracts16 (const int16_t * src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const int16_t * __restrict src2,
- uint32_t src2Stride,
- fcvConvertPolicy policy,
- int16_t * dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Matrix substration of two uint8_t type matrices
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param dst
-/// the result matrix (int16_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvSubtractu8s16 ( const uint8_t * __restrict src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t * __restrict src2,
- uint32_t src2Stride,
- int16_t * __restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Element-wise multiplication of two int16_t type matrices
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param scaleFactor
-/// The number of bits to be shifted to scale the result. When scaleFactor > 0, results
-/// are right-shifted; when scaleFactor < 0, results are left-shifted by absolute value
-/// of scaleFactor
-///
-/// @param policy
-/// Conversion policy that decides how data overflow should be handled
-///
-/// @param dst
-/// the result matrix (int16_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvElementMultiplys16( const int16_t * src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const int16_t * src2,
- uint32_t src2Stride,
- int8_t scaleFactor,
- fcvConvertPolicy policy,
- int16_t *__restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Element-wise multiplication of two uint8_t type matrices
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param scaleFactor
-/// The number of bits to be shifted to scale the result. When scaleFactor > 0, results
-/// are right-shifted; when scaleFactor < 0, results are left-shifted by absolute value
-/// of scaleFactor
-///
-/// @param policy
-/// Conversion policy that decides how data overflow should be handled
-///
-/// @param dst
-/// the result matrix (int16_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvElementMultiplyu8s16( const uint8_t * src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t * src2,
- uint32_t src2Stride,
- int8_t scaleFactor,
- fcvConvertPolicy policy,
- int16_t *__restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Element-wise multiplication of two uint8_t type matrices
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param scaleFactor
-/// The number of bits to be shifted to scale the result. When scaleFactor > 0, results
-/// are right-shifted; when scaleFactor < 0, results are left-shifted by absolute value
-/// of scaleFactor
-///
-/// @param policy
-/// Conversion policy that decides how data overflow should be handled
-///
-/// @param dst
-/// the result matrix (uint8_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvElementMultiplyu8( const uint8_t * src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint8_t * src2,
- uint32_t src2Stride,
- int8_t scaleFactor,
- fcvConvertPolicy policy,
- uint8_t *__restrict dst,
- uint32_t dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Calculate the weighted sum of two uint8_t type matrices
-///
-/// @details
-/// Specifically, when 0 <= alpha <= 1 and beta = 1-alpha, the function accumulates a weighted value from
-/// an input image to an output image
-/// \n\b NOTE: alpha and beta should be within the range of (-128.0, 127.996) and have up to three digits decimal precision
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param alpha
-/// The weight value applied to src1 matrix, provided by float32_t type
-///
-/// @param beta
-/// The weight value applied to src2 matrix, provided by float32_t type
-///
-/// @param dst
-/// the result matrix (uint8_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success,
-/// other values upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvAddWeightedu8(const uint8_t * src1,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t src1Stride,
- const uint8_t *__restrict src2,
- uint32_t src2Stride,
- float32_t alpha,
- float32_t beta,
- uint8_t * dst,
- uint32_t dstStride);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Add a squared value of one type uint8 matrix to the other type uint16 type matrix
-///
-/// @param src1
-/// First source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param width
-/// Width of the source matrix.
-///
-/// @param height
-/// Height of the source matrix.
-///
-/// @param src1Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param src2
-/// Second source matrix.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param src2Stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param scaleFactor
-/// The number of bits to be shifted to scale the result. When scaleFactor > 0, results
-/// are right-shifted; when scaleFactor < 0, results are left-shifted by absolute value
-/// of scaleFactor
-///
-/// @param dst
-/// the result matrix (uint16_t type).
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
-/// \n\b WARNING: should be multiple of 8
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvAddSquaredu8u16(const uint8_t *__restrict src1,
- uint32_t width,
- uint32_t height,
- uint32_t src1Stride,
- const uint16_t * src2,
- uint32_t src2Stride,
- int8_t scaleFactor,
- uint16_t * dst,
- uint32_t dstStride);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Swap Chroma component order.
-///
-/// @details
-/// This function swaps the interleaved Chroma component order from CbCr to
-/// CrCb or from CrCb to CbCr.
-///
-/// @param src
-/// Pointer to the input image
-/// \n\b NOTE: should be 128-bit aligned
-///
-/// @param srcWidth
-/// Input image width in the number of CbCr or CrCb pairs.
-///
-/// @param srcHeight
-/// The Chroma component height.
-///
-/// @param srcStride
-/// Stride of input image in bytes (i.e., number of bytes between column 0 of row 0
-/// and column 0 of row 1). If left at 0, srcStride is default to srcWidth * 2.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @param dst
-/// Pointer to the output image
-/// \n\b WARNING: size must match input image.
-/// \n\b NOTE: should be 128-bit aligned
-///
-/// @param dstStride
-/// Stride of output image in bytes (i.e., number of bytes between column 0 of
-/// row 0 and column 0 of row 1). If left at 0, dstStride is default to
-/// srcWidth * 2.
-/// \n\b NOTE: should be a multiple of 8.
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorCbCrSwapu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Converts an image from RGB space to HSV space.
-///
-/// @details
-///
-/// @param src
-/// Source 24-bit image, RGB888 format (R is MSB byte for the pixel)
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Source image width.
-///
-/// @param srcHeight
-/// Source image height.
-///
-/// @param srcStride
-/// Stride of source image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If set to 0, srcStride=srcWidth*3 as default
-///
-/// @param dst
-/// Destination 24-bit image. HSV888 format (H is MSB byte for the pixel)
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If set to 0, dstStride=srcWidth*3 as default
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-FASTCV_API fcvStatus
-fcvColorRGB888ToHSV888u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride);
-
-
-//------------------------------------------------------------------------------/
-/// @brief
-/// SVM prediction for two classes
-///
-/// @details
-/// The function returns the confidence scores for test vectors using the equation:
-/// confidence(i) = sum_j( svCoef[j] * Kernel(vec_i, sv_j) - rho;
-/// The SVM model(svCoef, sv, rho) can be obtained using the training function of libSVM or openCV.
-///
-/// @param kernelType
-/// kernelType options: 'FASTCV_SVM_LINEAR','FASTCV_SVM_POLY','FASTCV_SVM_RBF','FASTCV_SVM_SIGMOID'.
-/// FASTCV_SVM_LINEAR: Kernel(xi, xj) = xi'*xj
-/// FASTCV_SVM_POLY: Kernel(xi, xi) = (gamma * xi' * xj + coef0)^degree, (gamma>0 , degree is positive integer).
-/// FASTCV_SVM_RBF: Kernel(xi,xj) = exp(-gamma*||xi-xj||^2), (gamma>0).
-/// FASTCV_SVM_SIGMOID: Kernel(xi, xj) = tanh(gamma * xi' * xj + coef0)
-///
-/// @param degree
-/// Parameter degree of a kernel function (FASTCV_SVM_POLY).
-/// \n\b NOTE: Degree should be positive integer.
-///
-/// @param gamma
-/// Parameter of a kernel function (FASTCV_SVM_POLY / FASTCV_SVM_RBF / FASTCV_SVM_SIGMOID).
-/// \n\b NOTE: gamma > 0 for FASTCV_SVM_Ploy and FASTCV_SVM_RBF
-///
-/// @param coef0
-/// Parameter coef0 of a kernel function (FASTCV_SVM_LINEAR / FASTCV_SVM_POLY / FASTCV_SVM_SIGMOID).
-///
-/// @param sv
-/// Support vectors.
-///
-/// @param svLen
-/// Feature length, (support vector length = feature length).
-///
-/// @param svNum
-/// Number of support vectors.
-///
-/// @param svStride
-/// support vector stride.
-/// Stride of support vector 2D matrix (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, svStride is set as svLen*sizeof(float32_t).
-/// \n\b WARNING: should be multiple of 8, and at least as much as svLen if not 0.
-///
-/// @param svCoef
-/// Coefficent of support vectors, length equals to the Number of SV.
-///
-/// @param rho
-/// SVM bias.
-///
-/// @param vec
-/// Test vectors, it has same width as sv.
-///
-/// @param vecNum
-/// Number of test vectors.
-///
-/// @param vecStride
-/// Stride of test vectors.
-/// Stride of test vector 2D matrix (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, vecStride is set as svLen*sizeof(float32_t).
-/// \n\b WARNING: should be multiple of 8, and at least as much as svLen if not 0.
-///
-/// @param confidence
-/// Output, store confidence value of each test vector. The length is vecNum.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup machine_learning
-//------------------------------------------------------------------------------/
-
-FASTCV_API fcvStatus
-fcvSVMPredict2Classf32( fcvSVMKernelType kernelType,
- uint32_t degree,
- float32_t gamma,
- float32_t coef0,
- const float32_t* __restrict sv,
- uint32_t svLen,
- uint32_t svNum,
- uint32_t svStride,
- const float32_t* __restrict svCoef,
- float32_t rho,
- const float32_t* __restrict vec,
- uint32_t vecNum,
- uint32_t vecStride,
- float32_t* __restrict confidence );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Optical flow (with stride so ROI can be supported)
-///
-/// \n\b ATTENTION: This function is a duplication of
-/// fcvTrackLKOpticalFlowu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvTrackLKOpticalFlowu8,
-/// \a fcvTrackLKOpticalFlowu8_v3 will be removed, and the current signature
-/// for \a fcvTrackLKOpticalFlowu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvTrackLKOpticalFlowu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src1
-/// Input image from frame #1.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param src2
-/// Input image from frame #2.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param width
-/// Input image width.
-///
-/// @param height
-/// Input image height.
-///
-/// @param stride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to width.
-/// NOTE: should be a multiple of 8.
-///
-/// @param src1Pyr
-/// Image Pyramid of src1 (with stride)
-/// \n\b WARNING: obtained by calling fcvPyramidCreateu8_v3
-///
-/// @param src2Pyr
-/// Image Pyradmid of src2 (with stride)
-/// \n\b WARNING: obtained by calling fcvPyramidCreateu8_v3
-///
-/// @param featureXY
-/// Pointer to X,Y floating point, sub-pixel coordinates for features to
-/// track. Stored as X,Y tuples. featureXY array storage must
-/// be >= featureLen*2.
-///
-/// @param featureXY_out
-/// Pointer to X,Y floating point, sub-pixel coordinates for tracked features
-/// Stored as X,Y tuples. featureXY array storage must
-/// be >= featureLen*2.
-///
-/// @param featureXY_estimate
-/// Pointer to X,Y floating point, sub-pixel coordinates for estimated features
-/// on the new frame stored as X,Y tuples. featureXY array storage must
-/// has the same length as featureXY
-///
-/// @param featureStatus
-/// Pointer to integer array for status of each feature defined in
-/// featureXY. featureStatus array storage must
-/// be >= featureLen.
-///
-/// @param featureLen
-/// Number of features in featuresXY and featureStatus array.
-///
-/// @param windowWidth
-/// Width of window for optical flow searching. Must be odd number.
-/// \n\b NOTE: suggested value 5, 7 or 9
-///
-/// @param windowHeight
-/// Height of window for optical flow searching. Must be odd number.
-/// \n\b NOTE:: suggested value 5, 7 or 9
-///
-/// @param nPyramidLevels
-/// Number of pyramid levels.
-/// \n\b NOTE: suggested value 3 or 4 depending on size of image
-///
-/// @param termCriteria
-/// The enum parameter to specify termination criteria. See fcvTerminationCriteria for details
-///
-/// @param maxIterations
-/// Maximum number of LK iterations to perform per pyramid level if
-/// FASTCV_TERM_CRITERIA_ITERATIONS is set as the termCriteria
-/// \n\b NOTE: will be saturated to range [1, 100]; suggested value 5 or 7
-///
-/// @param maxEpsilon
-/// Epsilon value in float32_t for error measure to determine the iteration
-/// \n\b NOTE: the value should be within [0, 10]; suggested value 0.03*0.03
-///
-/// @param use_initial_estimate
-/// The flag indicatiing if to use initial estimations stored in featureXY_estimate
-/// to start the search.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup object_detection
-// -----------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvTrackLKOpticalFlowu8_v3 ( const uint8_t *__restrict src1,
- const uint8_t *__restrict src2,
- uint32_t width,
- uint32_t height,
- uint32_t stride,
- const fcvPyramidLevel_v2 * __restrict src1Pyr,
- const fcvPyramidLevel_v2 * __restrict src2Pyr,
- const float32_t * __restrict featureXY,
- const float32_t * __restrict featureXY_estimate,
- float32_t * __restrict featureXY_out,
- int32_t * __restrict featureStatus,
- int32_t featureLen,
- int32_t windowWidth,
- int32_t windowHeight,
- int32_t nPyramidLevels,
- fcvTerminationCriteria termCriteria,
- int32_t maxIterations,
- float32_t maxEpsilon,
- int32_t use_initial_estimate);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Undistort a disparity image and optionally convert the undistorted disparity image into a
-/// depth image.
-///
-/// @param src
-/// Pointer to the disparity input image
-///
-/// @param srcWidth
-/// Width of the disparity input image in pixel. The number of pixels in a row.
-///
-/// @param srcHeight
-/// Height of the disparity input image in pixel.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*sizeof(float32_t)
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param mask
-/// Pointer to the returned foreground mask image.
-/// It's a 1-channel image, same width and height as src.
-/// If an entry set to 1, there will be a valid undistorted dispartity or depth value.
-/// If an entry set to 0, there will be no valid undistorted dispartity or depth value.
-///
-/// @param maskStride
-/// Stride of the foreground mask image. It's the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 MaskStride is default to srcWidth.
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param pixelDistortion
-/// Pointer to the pixel distortion value for each pixel in the image. It has the same dimensions
-/// as the input image src.
-///
-/// @param pixelDistortionStride
-/// Stride of pixel distortion value for each pixel in the image.
-/// It's the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory.
-/// If left at 0 pixelDistortionStride is default to srcWidth*sizeof(float32_t).
-/// \n\b WARNING: should be multiple of 8
-///
-/// @param convertDepth
-/// This parameter is a flag to enable or disable the conversion of disparity to depth.
-/// If set to 1, then the undistorted disparity values will be converted to depth
-/// and returned in the dst buffer.
-/// If set to 0, then the undistorted disparity will be returned in the dst buffer.
-///
-/// @param imageDistortion
-/// ImageDistortion contains two elements. The First part contains the spatial distortion pattern,
-/// and the second part contains the decay of the distortion effect.
-///
-/// @param depthParam
-/// Parameters used to transform disparity to depth values.
-/// The equation is
-/// undistortedDepthValue = 1 / (undistortedDisparityValue * depthParam[0] + depthParam[1])
-///
-/// @param dst
-/// Output matrix which has the same width, length and channel number as src.
-/// The buffer contains undistorted disparity values if convertDepth is set to 0 and
-/// contains the undistorted depth values if convertDepth is set to 1
-///
-/// @param dstStride
-/// Stride for output image, i.e. the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*sizeof(float32_t)
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvUndistortDisparityConvertDepthf32(const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- const uint8_t* __restrict mask,
- uint32_t maskStride,
- const float32_t* __restrict pixelDistortion,
- uint32_t pixelDistortionStride,
- uint32_t convertDepth,
- const float32_t* __restrict imageDistortion,
- const float32_t* __restrict depthParam,
- float32_t* __restrict dst,
- uint32_t dstStride);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Registers an input Depth Image with an input Color Image
-///
-/// @param src
-/// Pointer to the input depth image
-///
-/// @param srcWidth
-/// The width of the input depth image.
-///
-/// @param srcHeight
-/// The height of the input depth image
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*sizeof(float32_t).
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param Kdinv
-/// Kdinv is an array of 9 elements representing the inverse of the 3x3 depth camera matrix
-/// arranged row wise.
-///
-/// @param Kc
-/// Kc is an array of 9 elements which represents the 3x3 color camera intrinsic parameters
-/// arranged row wise
-///
-/// @param Rd2c
-/// Rd2c is an array of 9 element which represents the 3D Rotation (3x3) matrix from the Depth
-/// Camera to the Color Camera arranged row wise
-///
-/// @param Td2c
-/// Td2c is an array of 3 element which represents the transform parameter from the Depth
-/// Camera to the Color Camera.
-///
-/// @param dst
-/// Output matrix which has the same width, length and channel number as src
-///
-/// @param dstStride
-/// Stride for output image, i.e. the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*sizeof(float32_t)
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvRegisterDepthImagef32(const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- const float32_t* __restrict Kdinv,
- const float32_t* __restrict Kc,
- const float32_t* __restrict Rd2c,
- const float32_t* __restrict Td2c,
- float32_t* __restrict dst,
- uint32_t dstStride);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Convert depth image into 3D point Cloud
-///
-/// @param src
-/// Pointer to the depth image
-///
-/// @param srcWidth
-/// Width of the depth image in pixel. The number of pixels in a row.
-///
-/// @param srcHeight
-/// Height of the depth image in pixel
-///
-/// @param srcStride
-/// Stride of depth image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*sizeof(float32_t).
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @param Kdinv
-/// Kdinv is an array of 9 elements representing the inverse of the 3x3 depth camera matrix
-/// arranged row wise.
-//
-/// @param dst
-/// Pointer to the 3D point cloud in an interleaved fashion x0,y0,z0,x1,y1,z1.
-/// It has a width of 3*srcWidth and has the same height as the src buffer.
-///
-/// @param dstStride
-/// Stride for output image, i.e. the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to 3*srcWidth*sizeof(float32_t)
-/// \n\b NOTE: should be multiple of 8.
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-FASTCV_API fcvStatus
-fcvConvertDepthImageToPointCloudf32(const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- const float32_t* __restrict Kdinv,
- float32_t* __restrict dst,
- uint32_t dstStride);
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Extract Histogram of Oriented Gradients (HOG) descriptor given an image's gradient strength
-/// and orientation
-///
-/// @param strength
-/// The gradient strength at each pixel.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param width
-/// Input window width.
-///
-/// @param height
-/// Input window height.
-///
-/// @param strengthStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 strengthStride is default to width*2.
-/// NOTE: should be a multiple of 8.
-///
-/// @param orientation
-/// Gradient orientation at each pixel. When normMethod is FASTCV_HOG_NORM_REGULAR or
-/// FASTCV_HOG_NORM_RENORMALIZATION, orientation should be within range of [0, 179]; while
-/// FASTCV_HOG_NORM_FHOG is used, orientation should be within [0, 359] to meet its contrast-
-/// sensitive requirements.
-/// \n\b WARNING: should be 128-bit aligned.
-///
-/// @param orientationStride
-/// Stride is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 orientationStride is default to width*2.
-/// NOTE: should be a multiple of 8.
-///
-/// @param cellSize
-/// The size of one cell in pixels. The typical cell size is 4.
-///
-/// @param blockSize
-/// Block size in pixels. It must be a multiple of cellSize.
-/// \n\b WARNING: When normMethod is FASTCV_HOG_NORM_FHOG, blockSize is by default equal to cellSize
-///
-/// @param blockStep
-/// Block step in pixels when sliding the block over the image. If the blockStep
-/// is a multiple of cellSize, faster approach would be taken when normMethod
-/// is FASTCV_HOG_NORM_REGULAR or FASTCV_HOG_NORM_RENORMALIZATION.
-/// \n\b WARNING: When normMethod is FASTCV_HOG_NORM_FHOG, blockStep is by default equal to cellSize
-///
-/// @param binSize
-/// Number of bins in the gradient histogram. Typical binSize is 9.
-///
-/// @param normMethod
-/// The enum parameter to specify the normalization method for HOG descriptor construction. See
-/// fcvHOGNormMethod for details.
-///
-/// @param hogVector
-/// The output descriptor vector in uint16_t. The length of the vector is obtained by fcvGetHOGVectorLengthu32
-///
-/// @return
-/// FASTCV_SUCCESS upon success.
-/// Other status codes upon failure.
-///
-/// @ingroup object_detection
-// -----------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvExtractHOGu16(const uint16_t* __restrict strength,
- uint32_t width,
- uint32_t height,
- uint32_t strengthStride,
- const uint16_t* __restrict orientation,
- uint32_t orientationStride,
- uint32_t cellSize,
- uint32_t blockSize,
- uint32_t blockStep,
- uint32_t binSize,
- fcvHOGNormMethod normMethod,
- uint16_t* __restrict hogVector,
- uint32_t flen,
- void* handle);
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Calculate the length of the output vector for HOG extraction
-///
-/// @param width
-/// Input window width.
-///
-/// @param height
-/// Input window height.
-///
-/// @param cellSize
-/// The size of one cell in pixels. The typical cell size is 4.
-///
-/// @param blockSize
-/// Block size in pixels. It must be a multiple of cellSize.
-/// \n\b WARNING: When normMethod is FASTCV_HOG_NORM_FHOG, blockStep is by default equal to cellSize
-///
-/// @param blockStep
-/// Block step in pixels when sliding the block over the image. If the blockStep
-/// is a multiple of cellSize, faster approach would be taken when normMethod
-/// is FASTCV_HOG_NORM_REGULAR or FASTCV_HOG_NORM_RENORMALIZATION.
-/// \n\b WARNING: When normMethod is FASTCV_HOG_NORM_FHOG, blockStep is by default equal to cellSize
-///
-/// @param binSize
-/// Number of bins in the gradient histogram. Typical binSize is 9.
-///
-/// @param normMethod
-/// The enum parameter to specify the normalization method for HOG descriptor construction. See
-/// fcvHOGNormMethod for details.
-///
-/// @param
-/// The length of HOG vector in uint32_t
-///
-/// @param hogHandle
-/// Output. the hogHandle to be used in subsequent calls.
-///
-/// @ingroup object_detection
-// -----------------------------------------------------------------------------
-
-FASTCV_API fcvStatus
-fcvHOGInit(uint32_t width,
- uint32_t height,
- uint32_t cellSize,
- uint32_t blockSize,
- uint32_t blockStep,
- uint32_t binSize,
- fcvHOGNormMethod normMethod,
- uint32_t *vecLength,
- void **hogHandle
- );
-//------------------------------------------------------------------------------
-/// @brief Function to release HOG resources.
-/// @param hogHandle
-/// Handle to be used to free up HOG resources.
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void fcvHOGDeInit(void* hogHandle);
-
-
-
-#ifdef __cplusplus
-}//extern "C"
-#endif
-
-#endif
+#ifndef FASTCV_H
+#define FASTCV_H
+
+/**=============================================================================
+
+@file
+ fastcv.h
+
+@brief
+ Public API
+
+
+Copyright (c) 2011-2015 Qualcomm Technologies, Inc.
+All Rights Reserved.
+Confidential and Proprietary - Qualcomm Technologies, Inc.
+
+=============================================================================**/
+
+/**=============================================================================
+@mainpage FastCV Public API Documentation
+
+@version 1.7.1
+
+@section Overview Overview
+
+FastCV provides two main features to computer vision application developers:
+ - First, it provides a library of frequently used computer vision (CV)
+ functions, optimized to run efficiently on mobile devices.
+ - Second, it provides a clean processor-agnostic hardware acceleration API,
+ under which chipset vendors can hardware accelerate FastCV functions on
+ their hardware.
+
+FastCV 1.7.1 supports Android and Windows mobile developers.
+FastCV 1.7.1 is available for download for free from developer.qualcomm.com.
+
+FastCV 1.7.1 is released as a unified binary, a single binary containing two
+implementations of the library.
+ - The first implementation runs on ARM processor, and is referred to as
+ the "FastCV for ARM."
+ - The second implementation runs only on Qualcomm Snapdragon
+ chipsets, and is called "FastCV for Snapdragon."
+
+Releases are generally motivated for the following reasons:
+ - Changes to previously released APIs
+ - Addition of new functions
+ - Performance improvements and/or bug fixes - also known as implementation
+ modifications
+
+ Each motivation has a varying degree of impact on the user of the library.
+ The general release numbering scheme captures this variety of motivations.
+
+ Given release ID: A.B.C
+
+ An increase in "A" indicates that a previously released API has changed,
+ so a developer may encounter compilation issues which require modification
+ of their code in order to adhear to the modified API. Qualcomm will make
+ every effort to minimize these changes. Additionally, new functions and
+ implementation modifications may be present.
+
+ An increase in "B" indicates that new functions have been added to the
+ library, so additional functionality is available, however existing APIs
+ have not changed. Additionally, implementation modifications may be
+ present.
+
+ An increase in "C" indicates that implementation modifications only have
+ been made.
+
+@defgroup math_vector Math / Vector Operations
+@details Commonly used vector & math functions
+
+@defgroup image_processing Image processing
+@details Image filtering, convolution and scaling operations
+
+@defgroup image_transform Image transformation
+@details Warp perspective, affine transformations
+
+@defgroup feature_detection Feature detection
+@details Fast corner detection, harris corner detection, canny edge detection, etc.
+
+@defgroup object_detection Object detection
+@details Object detection functions such as NCC template match, etc.
+
+@defgroup 3D_reconstruction 3D reconstruction
+@details Homography, pose evaluation functions
+
+@defgroup color_conversion Color conversion
+@details Commonly used formats supported: e.g., YUV, RGB, YCrCb, etc.
+
+@defgroup clustering_and_search Clustering and search
+@details K clusters best fitting of a set of input points
+
+@defgroup Motion_and_Object_Tracking Motion and object tracking
+@details Supports and tracking functions
+
+@defgroup Structural_Analysis_and_Drawing Shape and drawing
+@details Contour and polygon drawing functions
+
+@defgroup mem_management Memory Management
+@details Functions to allocate and deallocate memory for use with fastCV.
+
+@defgroup misc Miscellaneous
+@details Support functions
+
+@defgroup machine_learning Machine Learning
+@details Machine learning functions such as SVM prediction, etc.
+
+**/
+
+//==============================================================================
+// Defines
+//==============================================================================
+
+#ifdef __GNUC__
+ /// Macro to align memory at 4-bytes (32-bits) for GNU-based compilers.
+ #define FASTCV_ALIGN32( VAR ) (VAR) __attribute__ ((aligned(4)))
+ /// Macro to align memory at 8-bytes (64-bits) for GNU-based compilers.
+ #define FASTCV_ALIGN64( VAR ) (VAR) __attribute__ ((aligned(8)))
+ /// Macro to align memory at 16-bytes (128-bits) for GNU-based compilers.
+ #define FASTCV_ALIGN128( VAR ) (VAR) __attribute__ ((aligned(16)))
+ #ifdef BUILDING_SO
+ /// MACRO enables function to be visible in shared-library case.
+ #define FASTCV_API __attribute__ ((visibility ("default")))
+ #else
+ /// MACRO empty for non-shared-library case.
+ #define FASTCV_API
+ #endif
+#else
+ /// Macro to align memory at 4-bytes (32-bits) for MSVC compiler.
+ #define FASTCV_ALIGN32( VAR ) __declspec(align(4)) (VAR)
+ /// Macro to align memory at 8-bytes (64-bits) for MSVC compiler.
+ #define FASTCV_ALIGN64( VAR ) __declspec(align(8)) (VAR)
+ /// Macro to align memory at 16-bytes (128-bits) for MSVC compiler.
+ #define FASTCV_ALIGN128( VAR ) __declspec(align(16)) (VAR)
+ #ifdef BUILDING_DLL
+ /// MACRO enables function to be visible in shared-library case.
+ #define FASTCV_API __declspec(dllexport)
+ #else
+ /// MACRO empty for non-shared-library case.
+ #define FASTCV_API
+ #endif
+#endif
+
+//==============================================================================
+// Included modules
+//==============================================================================
+
+#include
+#include
+typedef float float32_t;
+typedef double float64_t;
+
+//==============================================================================
+// Declarations
+//==============================================================================
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines operational mode of interface to allow the end developer to
+/// dictate how the target optimized implementation should behave.
+//------------------------------------------------------------------------------
+typedef enum
+{
+ /// Target-optimized implementation uses lowest power consuming
+ /// implementation.
+ FASTCV_OP_LOW_POWER = 0,
+
+ /// Target-optimized implementation uses highest performance implementation.
+ FASTCV_OP_PERFORMANCE = 1,
+
+ /// Target-optimized implementation offloads as much of the CPU as possible.
+ FASTCV_OP_CPU_OFFLOAD = 2,
+
+ /// Target-optimized implementation uses CPU highest performance implementation.
+ FASTCV_OP_CPU_PERFORMANCE = 3,
+
+ /// Values >= 0x80000000 are reserved
+ FASTCV_OP_RESERVED = 0x80000000
+
+} fcvOperationMode;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines the flip directions for matrix flip functions.
+//------------------------------------------------------------------------------
+typedef enum
+{
+ /// Flip horizontally.
+ FASTCV_FLIP_HORIZ = 1,
+
+ /// Flip vertically.
+ FASTCV_FLIP_VERT = 2,
+
+ /// Flip horizontally and vertically.
+ FASTCV_FLIP_BOTH = 3
+
+} fcvFlipDir;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines the clockwise rotation degrees for image rotation functions.
+//------------------------------------------------------------------------------
+typedef enum
+{
+ /// Rotate 90 degrees clockwise.
+ FASTCV_ROTATE_90 = 1,
+
+ /// Rotate 180 degrees clockwise.
+ FASTCV_ROTATE_180 = 2,
+
+ /// Rotate 270 degrees clockwise.
+ FASTCV_ROTATE_270 = 3
+
+} fcvRotateDegree;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines the interpolation types.
+//------------------------------------------------------------------------------
+
+typedef enum
+{
+ /// Nearest neighbor interpolation
+ FASTCV_INTERPOLATION_TYPE_NEAREST_NEIGHBOR = 0,
+
+ /// Bilinear interpolation
+ FASTCV_INTERPOLATION_TYPE_BILINEAR,
+
+ /// Interpolation by area
+ FASTCV_INTERPOLATION_TYPE_AREA
+
+} fcvInterpolationType;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines the policy to handle integer overflow.
+//------------------------------------------------------------------------------
+
+typedef enum
+{
+ /// Do nothing to the overflow.
+ /// Let the overflowed number wrap around.
+ /// May save runtime if overflow unlikely to occur,
+ /// or users do not care about overflow.
+ FASTCV_CONVERT_POLICY_WRAP = 0,
+
+ /// Clamped to the maximum interger if overflow,
+ /// clamped to the minimum integer if underflow.
+ /// May require more runtime than FASTCV_CONVERT_POLICY_WRAP.
+ FASTCV_CONVERT_POLICY_SATURATE
+
+} fcvConvertPolicy;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines the border types.
+//------------------------------------------------------------------------------
+
+typedef enum
+{
+ /// Border behavior undefined, left to the implementation.
+ FASTCV_BORDER_UNDEFINED = 0,
+
+ /// For out-of-bound pixels, apply a user-specified constant value.
+ FASTCV_BORDER_CONSTANT,
+
+ /// For out-of-bound pixels, apply values from the nearest edge pixels.
+ FASTCV_BORDER_REPLICATE
+
+} fcvBorderType;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines the norm for a vector.
+//------------------------------------------------------------------------------
+
+typedef enum
+{
+ /// L1 norm. The norm is the sum of absolute values of every component in a vector.
+ FASTCV_NORM_L1,
+
+ /// L2 norm, i.e., the Euclidean norm of a vector.
+ FASTCV_NORM_L2
+
+} fcvNormType;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines all supported channel indices
+//------------------------------------------------------------------------------
+
+typedef enum
+{
+ /// The first channel of the image.
+ FASTCV_CHANNEL_0,
+
+ /// The second channel of the image.
+ FASTCV_CHANNEL_1,
+
+ /// The third channel of the image.
+ FASTCV_CHANNEL_2,
+
+ /// The fourth channel of the image.
+ FASTCV_CHANNEL_3,
+
+ /// The RED channel of the image.
+ FASTCV_CHANNEL_R,
+
+ /// The GREEN channel of the image.
+ FASTCV_CHANNEL_G,
+
+ /// The BLUE channel of the image.
+ FASTCV_CHANNEL_B,
+
+ /// The ALPHA channel of the image.
+ FASTCV_CHANNEL_A,
+
+ /// The LUMA channel of the image.
+ FASTCV_CHANNEL_Y,
+
+ /// The Cb/U channel of the image.
+ FASTCV_CHANNEL_U,
+
+ /// The Cr/V/Value channel of the image.
+ FASTCV_CHANNEL_V
+
+} fcvChannelType;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines all supported image formats based on the FOURCC definition
+//------------------------------------------------------------------------------
+
+typedef enum
+{
+ /// A single plane of 24 bit pixel as 3 interleaved 8 bit units of R then G then B data.
+ FASTCV_RGB,
+
+ /// A single plane of 32 bit pixel as 4 interleaved 8 bit units of R then G then B data, then a ”don’t care?byte.
+ FASTCV_RGBX,
+
+ /// A 2 plane YUV format of Luma (Y) and interleaved UV data at 4:2:0 sampling.
+ /// For a frame of width W and height H, Y plane has the size of W * H, while the UV plane has the size of W * H/2.
+ /// The extracted U or V plane is then expected to be W/2 * H/2.
+ FASTCV_NV12,
+
+ /// A 2 plane YUV format of Luma (Y) and interleaved VU data at 4:2:0 sampling.
+ /// For a frame of width W and height H, Y plane has the size of W * H, while the VU plane has the size of W * H/2.
+ /// The extracted U or V plane is then expected to be W/2 * H/2.
+ FASTCV_NV21,
+
+ /// A single plane of 32 bit macro pixel of U0, Y0, V0, Y1 bytes.
+ /// For a frame of width W and height H, its buffer size is at least 2*W * H.
+ /// The extracted Y plane is expected to be W * H while the U or V plane is expected to be W/2 * H.
+ FASTCV_UYVY,
+
+ /// A single plane of 32 bit macro pixel of Y0, U0, Y1, V0 bytes.
+ /// For a frame of width W and height H, its buffer size is at least 2*W * H.
+ /// The extracted Y plane is expected to be W * H while the U or V plane is expected to be W/2 * H.
+ FASTCV_YUYV,
+
+ /// A 3 plane of 8 bit 4:2:0 sampled Y, U, V planes.
+ /// For a frame of width W and height H, Y plane has the size of W * H, while the U or I plane each has a size of W/2 * H/2.
+ FASTCV_IYUV,
+
+ /// A 3 plane of 8 bit 4:4:4 sampled Y, U, V planes.
+ /// For a frame of width W and height H, Y or U or V plane each has the size of W * H.
+ FASTCV_YUV4
+
+} fcvImageFormat;
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines the status returned by a function.
+//------------------------------------------------------------------------------
+typedef enum
+{
+ //// Success
+ FASTCV_SUCCESS = 0,
+
+ /// General failure
+ FASTCV_EFAIL,
+
+ /// Unaligned pointer parameter
+ FASTCV_EUNALIGNPARAM,
+
+ /// Bad parameters
+ FASTCV_EBADPARAM,
+
+ /// Called at invalid state
+ FASTCV_EINVALSTATE,
+
+ /// Insufficient resources, memory, thread...
+ FASTCV_ENORES,
+
+ /// Unsupported feature
+ FASTCV_EUNSUPPORTED,
+
+ /// Hardware QDSP failed to respond
+ FASTCV_EHWQDSP,
+
+ /// Hardware GPU failed to respond
+ FASTCV_EHWGPU
+
+} fcvStatus;
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines the kernel functions of SVM prediction.
+//------------------------------------------------------------------------------
+typedef enum
+{
+ FASTCV_SVM_LINEAR,
+ FASTCV_SVM_POLY,
+ FASTCV_SVM_RBF,
+ FASTCV_SVM_SIGMOID
+} fcvSVMKernelType;
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines the different scaling options for the pyramid
+//------------------------------------------------------------------------------
+typedef enum
+{
+ FASTCV_PYRAMID_SCALE_HALF,
+ FASTCV_PYRAMID_SCALE_ORB
+} fcvPyramidScale;
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines the termination criteria list.
+//------------------------------------------------------------------------------
+typedef enum
+{
+ /// Indicates a termination after a set number of iterations
+ FASTCV_TERM_CRITERIA_ITERATIONS,
+
+ /// Indicates a termination after matching against the value of eplison provided to the function
+ FASTCV_TERM_CRITERIA_EPSILON,
+
+ /// Indicates that both an iterations and eplison method are employed. Whichever one matches first causes the termination.
+ FASTCV_TERM_CRITERIA_BOTH,
+} fcvTerminationCriteria;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines the normalization method in the HOG extraction process
+//------------------------------------------------------------------------------
+typedef enum
+{
+ /// Do the regular normalization method
+ FASTCV_HOG_NORM_REGULAR = 0,
+
+ /// Do re-normalization
+ FASTCV_HOG_NORM_RENORMALIZATION = 1,
+
+ /// Use F-HOG method
+ FASTCV_HOG_NORM_FHOG = 2,
+
+} fcvHOGNormMethod;
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines the vaiance estimator type
+//------------------------------------------------------------------------------
+typedef enum
+{
+ /// Sums the squared deviation and devides by (n-1)
+ /// As known as sample variance
+ FASTCV_UNBIASED_VARIANCE_ESTIMATOR = 0,
+
+ /// Sums the squared deviation and devides by n
+ /// As known as population variance
+ FASTCV_BIASED_VARIANCE_ESTIMATOR = 1,
+
+} fcvVarianceEstimator;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines a structure to contain points correspondence data.
+//------------------------------------------------------------------------------
+typedef struct
+{
+ /// Tuples of 3 values: xFrom,yFrom,zFrom. Float array which this points to
+ /// must be greater than or equal to 3 * numCorrespondences.
+ const float32_t* from;
+ /*~ FIELD fcvCorrespondences.from
+ VARRAY LENGTH ( fcvCorrespondences.numCorrespondences * \
+ (fcvCorrespondences.fromStride ? fcvCorrespondences.fromStride : 3) ) */
+
+ /// Tuples of 2 values: xTo,yTo. Float array which this points to
+ /// must be greater than or equal to 2 * numCorrespondences.
+ const float32_t* to;
+ /*~ FIELD fcvCorrespondences.to
+ VARRAY LENGTH ( fcvCorrespondences.numCorrespondences * \
+ (fcvCorrespondences.toStride ? fcvCorrespondences.toStride : 2) ) */
+
+ /// Distance in bytes between two coordinates in the from array.
+ /// If this parameter is set to 2 or 3, a dense array is assume (stride will
+ /// be sizeof(float) times 2 or 3). The minimum value of fromStride
+ /// should be 2.
+ uint32_t fromStride;
+
+ /// Distance in bytes between two coordinates in the to array.
+ /// If this parameter is set to 2, a dense array is assume (stride will
+ /// be 2 * sizeof(float)). The minimum value of toStride
+ /// should be 2.
+ uint32_t toStride;
+
+ /// Number of points in points correspondences.
+ uint32_t numCorrespondences;
+
+ /// Array of inlier indices for corrs array. Processing will only occur on
+ /// the indices supplied in this array. Array which this points to must be
+ /// at least numIndices long.
+ const uint16_t* indices;
+ /*~ FIELD fcvCorrespondences.indices VARRAY LENGTH (fcvCorrespondences.numIndices) */
+
+ /// Length of indices array.
+ uint32_t numIndices;
+} fcvCorrespondences;
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Structure representing an image pyramid level
+//------------------------------------------------------------------------------
+
+typedef struct
+{
+ const void* ptr;
+ unsigned int width;
+ unsigned int height;
+} fcvPyramidLevel ;
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Structure representing an image pyramid level (version2 with stride)
+//------------------------------------------------------------------------------
+
+typedef struct
+{
+ const void* ptr;
+ unsigned int width;
+ unsigned int height;
+ unsigned int stride;
+} fcvPyramidLevel_v2 ;
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Structure describing node of a tree;
+/// Assumption is that nodes of all trees are stored in in a single array
+/// and all indices refer to this array
+/// @remark
+/// if indices of both children are negative the node is a leaf
+// ----------------------------------------------------------------------------
+typedef struct fcvKDTreeNodef32
+{
+ /// the split value at the node
+ float32_t divVal;
+
+ /// dimension at which the split is made;
+ /// if this is a leaf (both children equal to -1) then this is
+ /// the index of the dataset vector
+ int32_t divFeat;
+
+ /// index of the child node with dataset items to the left
+ /// of the split value
+ int32_t childLeft;
+
+ /// index of the child node with dataset items to the right
+ /// of the split value
+ int32_t childRight;
+
+} fcvKDTreeNodef32;
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// structure describing a branch (subtree)
+/// @remark
+/// branches are stored on the priority queue (heap) for backtracking
+// -----------------------------------------------------------------------------
+typedef struct fcvKDTreeBranchf32
+{
+ /// square of minimal distance from query for all nodes below
+ float32_t minDistSq;
+
+ /// index of the top node of the branch
+ int32_t topNode;
+
+} fcvKDTreeBranchf32;
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Structure with KDTrees data
+// -----------------------------------------------------------------------------
+typedef struct fcvKDTreeDatas8f32
+{
+ // info about the dataset for which KDTrees are constructed
+ /// the dataset of vectors
+ const int8_t *dataset;
+
+ /// array with inverse lengths of dataset vectors
+ const float32_t* invLen;
+
+ /// number of vectors in the dataset
+ int32_t numVectors;
+
+ // info about trees
+ /// indice of root nodes of trees
+ int32_t* trees;
+
+ /// array of nodes of all trees
+ fcvKDTreeNodef32* nodes;
+
+ /// number of all nodes
+ int32_t numNodes;
+
+ /// capacity of node array
+ int32_t maxNumNodes;
+
+ // info used during lookups
+ /// priority queue
+ fcvKDTreeBranchf32* heap;
+
+ /// number of branches on the priority queue
+ int32_t numBranches;
+
+ /// capactiy of the priority queue
+ int32_t maxNumBranches;
+
+ /// array of indices to vectors in the dataset;
+ /// during searches used to mark checkID;
+ /// should have numVectors capacity
+ int32_t* vind;
+
+ /// unique ID for each lookup
+ int32_t checkID;
+
+ /// number of nearest neighbors to find
+ int32_t numNNs;
+
+} fcvKDTreeDatas8f32;
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// fixed point kdtrees
+/// Structure describing node of tree;
+/// Assumption is that nodes of all trees are stored in in a single array
+/// and all indices refer to this array
+/// @remark
+/// if indices of both children are negative the node is a leaf
+// ----------------------------------------------------------------------------
+typedef struct fcvKDTreeNodes32
+{
+ /// the split value at the node
+ int32_t divVal;
+
+ /// dimension at which the split is made;
+ /// if this is a leaf (both children equal to -1) then this is
+ /// the index of the dataset vector
+ int32_t divFeat;
+
+ /// index of the child node with dataset items to the left
+ /// of the split value
+ int32_t childLeft;
+
+ /// index of the child node with dataset items to the right
+ /// of the split value
+ int32_t childRight;
+
+} fcvKDTreeNodes32;
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// fixed point kdtrees
+/// structure describing a branch (subtree)
+/// @remark
+/// branches are stored on the priority queue (heap) for backtracking
+// -----------------------------------------------------------------------------
+typedef struct fcvKDTreeBranchs32
+{
+ /// square of minimal distance from query for all nodes below
+ int32_t minDistSq;
+
+ /// index of the top node of the branch
+ int32_t topNode;
+
+} fcvKDTreeBranchs32;
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// fixed point kdtrees
+/// Structure with KDTrees data
+// -----------------------------------------------------------------------------
+typedef struct fcvKDTreeDatas8s32
+{
+ // info about the dataset for which KDTrees are constructed
+ /// the dataset of vectors
+ const int8_t *dataset;
+
+ /// array with inverse lengths of dataset vectors
+ const int32_t* invLen;
+
+ /// number of vectors in the dataset
+ int32_t numVectors;
+
+ // info about trees
+ /// indices of root nodes of all trees
+ int32_t* trees;
+
+ /// number of trees used
+ int32_t numTrees;
+
+ /// array of nodes of all trees
+ fcvKDTreeNodes32* nodes;
+
+ /// number of all nodes
+ int32_t numNodes;
+
+ /// capacity of node array
+ int32_t maxNumNodes;
+
+ // info used during lookups
+ /// priority queue
+ fcvKDTreeBranchs32* heap;
+
+ /// number of branches on the priority queue
+ int32_t numBranches;
+
+ /// capactiy of the priority queue
+ int32_t maxNumBranches;
+
+ /// array of indices to vectors in the dataset;
+ /// during searches used to mark checkID;
+ /// should have numVectors capacity
+ int32_t* vind;
+
+ /// unique ID for each lookup
+ int32_t checkID;
+
+ /// number of nearest neighbors to find
+ int32_t numNNs;
+
+} fcvKDTreeDatas8s32;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines a struct of rectangle
+//------------------------------------------------------------------------------
+typedef struct
+{
+ ///x-coordinate of the top-left corner
+ int32_t x;
+ ///y-coordinate of the top-left corner
+ int32_t y;
+ ///width of the rectangle
+ uint32_t width;
+ ///height of the rectangle
+ uint32_t height;
+} fcvRectangleInt;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines a struct of termination criteria
+//------------------------------------------------------------------------------
+typedef struct
+{
+ /// Maxmimum number of iteration
+ int32_t max_iter;
+ ///
+ float32_t epsilon;
+}fcvTermCriteria;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines a struct of 2D box used for tracking
+//------------------------------------------------------------------------------
+typedef struct
+{
+ // Center of the box
+ ///x-coordinate of the 2D point
+ int32_t x;
+ ///y-coordinate of the 2D point
+ int32_t y;
+ // The box size
+ int32_t columns;
+ int32_t rows;
+ // The orientation of the principal axis
+ int32_t orientation;
+}fcvBox2D;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines a struct of image moments
+//------------------------------------------------------------------------------
+typedef struct {
+ // spatial moments
+ float32_t m00, m10, m01, m20, m11, m02, m30, m21, m12, m03;
+ // central moments
+ float32_t mu20, mu11, mu02, mu30, mu21, mu12, mu03;
+ // m00 != 0 ? 1/sqrt(m00) : 0
+ float32_t inv_sqrt_m00;
+} fcvMoments;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines a struct of code word
+//------------------------------------------------------------------------------
+typedef struct fcvBGCodeWord
+{
+ /// Pointer to next codebook element
+ struct fcvBGCodeWord* next;
+
+ /// Last update time
+ int32_t tLastUpdate;
+
+ /// Longest period of inactivity
+ int32_t stale;
+ /// Min value of pixel for each channel
+ uint8_t min0, min1, min2;
+
+ /// Max value of pixel for each channel
+ uint8_t max0, max1, max2;
+
+ /// Min value of learning boundary for each channel
+ uint8_t learnLow0, learnLow1, learnLow2;
+
+ /// Max value of learning boundary for each channel
+ uint8_t learnHigh0, learnHigh1, learnHigh2;
+} fcvBGCodeWord;
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines a struct for circle
+//------------------------------------------------------------------------------
+typedef struct fcvCircle
+{
+ int32_t x;
+ int32_t y;
+ int32_t radius;
+} fcvCircle;
+
+
+typedef struct fcvPoint2D
+{
+ float x;
+ float y;
+} fcvPoint2D;
+
+typedef struct fcvLine
+{
+ fcvPoint2D start;
+ fcvPoint2D end;
+} fcvLine;
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines a struct for parameters for line segment detection
+//------------------------------------------------------------------------------
+typedef struct fcvLineSegment {
+ fcvPoint2D start, end; ///< Two ending points
+ float32_t normal[2]; ///< Orientation, average of the gradient direction
+ uint32_t nPoints; ///< (Optional) Number of pixels in pointsList
+ int32_t pointsStartIndex; ///< (Optional) Starting index of the pixel positions contributed to line segment fitting stored in indexBuffer
+ uint32_t sumMag; ///< Sum of all pixels gradient magnitude
+} fcvLineSegment;
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Parameters for fusing a depth map into a cuboid fusion block
+///
+/// @details
+/// This structure describes a single cuboid block that shall be fused
+/// with data from a depth map. All coordinates must be pre-transformed
+/// into the coordinate frame of the depth frame.
+///
+//------------------------------------------------------------------------------
+typedef struct fcvDepthFusionBlockConfig {
+ uint32_t flags; ///< Option specified as a bit field - 0x0000:N/A, 0x0001:run clipping
+ float32_t ramp; ///< Fusion ramp: maximum allowed distance between volume sample position and depth map sample position
+ float32_t p0[3], ///< Location of the 1st sample in the volume
+ dX[3], ///< One sample step in X-direction in the volume
+ dY[3], ///< One sample step in Y-direction in the volume
+ dZ[3]; ///< One sample step in Z-direction in the volume
+ uint32_t volumeIndex; ///< Index of the volume to be updated
+} fcvDepthFusionBlockConfig;
+
+//==============================================================================
+// UTILITY FUNCTIONS
+//==============================================================================
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Retrieves version of FastCV library.
+///
+/// @param version
+/// Pointer to location to put string.
+///
+/// @param versionLength
+/// Length of storage for version string.
+///
+/// @ingroup misc
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvGetVersion( char* version,
+ unsigned int versionLength );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Selects HW units for all routines at run-time.
+/// \n\b WARNING: Should be called once at the very beginning to update mode
+///
+/// @param mode
+/// See enum for details.
+///
+/// @return
+/// 0 if successful.
+/// 999 if minmum HW requirement not met.
+/// other #'s if unsuccessful.
+///
+/// @ingroup misc
+//---------------------------------------------------------------------------
+
+FASTCV_API int
+fcvSetOperationMode( fcvOperationMode mode );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Clean up FastCV resources. Must be called before the program exits.
+///
+/// @ingroup misc
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCleanUp( void );
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Allocates memory for Pyramid
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvPyramidAllocate_v2(). In the 2.0.0 release,
+/// fcvPyramidAllocate_v2 will be renamed to fcvPyramidAllocate
+/// and the signature of fcvPyramidAllocate as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param pyr
+/// Pointer to an array of fcvPyramidLevel
+///
+/// @param baseWidth
+/// Width of the base level: the value assigned to pyr[0].width
+///
+/// @param baseHeight
+/// Height of the base level: the value assigned to pyr[0].height
+///
+/// @param bytesPerPixel
+/// Number of bytes per pixel:
+/// \n e.g for uint8_t pyramid, bytesPerPixel = 1
+/// \n for int32_t pyramid, bytesPerPixel = 4
+///
+/// @param numLevels
+/// number of levels in the pyramid
+///
+/// @param allocateBase
+/// \n if set to 1, memory will be allocated for the base level
+/// \n if set to 0, memory for the base level is allocated by the callee
+/// \n\b WARNING: How this parameter is set will impact how the memory is freed.
+/// Please refer to fcvPyramidDelete for details.
+///
+/// @ingroup mem_management
+//----------------------------------------------------------------------------
+
+FASTCV_API int
+fcvPyramidAllocate( fcvPyramidLevel* pyr,
+ unsigned int baseWidth,
+ unsigned int baseHeight,
+ unsigned int bytesPerPixel,
+ unsigned int numLevels,
+ int allocateBase );
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Allocates memory for Pyramid
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvPyramidAllocate() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvPyramidAllocate,
+/// \a fcvPyramidAllocate_v2 will be removed, and the current signature
+/// for \a fcvPyramidAllocate will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvPyramidAllocate when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param pyr
+/// Pointer to an array of fcvPyramidLevel_v2
+///
+/// @param baseWidth
+/// Width of the base level: the value assigned to pyr[0].width
+///
+/// @param baseHeight
+/// Height of the base level: the value assigned to pyr[0].height
+///
+/// @param baseStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory.
+/// Stride of the base level: the value assigned to pyr[0].stride
+/// \n \b NOTE: stride of non-base pyramid image is the same as
+/// width*bytesPerPixel of the non-base pyramid image
+///
+/// @param bytesPerPixel
+/// Number of bytes per pixel:
+/// \n e.g for uint8_t pyramid, bytesPerPixel = 1
+/// \n for int32_t pyramid, bytesPerPixel = 4
+///
+/// @param numLevels
+/// number of levels in the pyramid
+///
+/// @param allocateBase
+/// \n if set to 1, memory will be allocated for the base level
+/// \n if set to 0, memory for the base level is allocated by the callee
+/// \n\b WARNING: How this parameter is set will impact how the memory is freed.
+/// Please refer to fcvPyramidDelete for details.
+///
+/// @ingroup mem_management
+//----------------------------------------------------------------------------
+
+FASTCV_API int
+fcvPyramidAllocate_v2( fcvPyramidLevel_v2* pyr,
+ uint32_t baseWidth,
+ uint32_t baseHeight,
+ uint32_t baseStride,
+ uint32_t bytesPerPixel,
+ uint32_t numLevels,
+ int32_t allocateBase );
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Allocates memory for Pyramid
+/// DO NOT USE THIS API unless for testing purposes.
+/// This API can be removed without notice.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvPyramidAllocate_v2() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvPyramidAllocate,
+/// \a fcvPyramidAllocate_v3 will be removed, and the current signature
+/// for \a fcvPyramidAllocate will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvPyramidAllocate when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param pyr
+/// Pointer to an array of fcvPyramidLevel_v2
+///
+/// @param baseWidth
+/// Width of the base level: the value assigned to pyr[0].width
+///
+/// @param baseHeight
+/// Height of the base level: the value assigned to pyr[0].height
+///
+/// @param baseStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory.
+/// Stride of the base level: the value assigned to pyr[0].stride
+/// \n \b NOTE: stride of non-base pyramid image is the same as
+/// width*bytesPerPixel of the non-base pyramid image
+///
+/// @param bytesPerPixel
+/// Number of bytes per pixel:
+/// \n e.g for uint8_t pyramid, bytesPerPixel = 1
+/// \n for int32_t pyramid, bytesPerPixel = 4
+///
+/// @param alignment
+/// Used to specify the alignment of each pyramid level other than the base. Must be a multiple
+/// of 8. If set to 0, the alignment will be set as 8 bits.
+///
+/// @param numLevels
+/// number of levels in the pyramid
+///
+/// @param scale
+/// Defines the type of scaling used for each pyramid level.
+/// FASTCV_PYRAMID_SCALE_HALF downscales each level of the pyramid by a factor of 2.
+/// FASTCV_PYRAMID_SCALE_ORB downscales each level of the pyramid by a factor of 1/(2)^(1/4),
+/// which is approximated as 0.8408964f
+///
+/// @param allocateBase
+/// \n if set to 1, memory will be allocated for the base level
+/// \n if set to 0, memory for the base level is allocated by the callee
+/// \n\b WARNING: How this parameter is set will impact how the memory is freed.
+/// Please refer to fcvPyramidDelete_v2 for details.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup mem_management
+//----------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvPyramidAllocate_v3(fcvPyramidLevel_v2* __restrict pyr,
+ uint32_t baseWidth,
+ uint32_t baseHeight,
+ uint32_t baseStride,
+ uint32_t bytesPerPixel,
+ uint32_t alignment,
+ uint32_t numLevels,
+ fcvPyramidScale scale,
+ int32_t allocateBase);
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Deallocates an array of fcvPyramidLevel. Can be used for any
+/// type(f32/s8/u8).
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvPyramidDelete_v2(). In the 2.0.0 release,
+/// fcvPyramidDelete_v2 will be renamed to fcvPyramidDelete
+/// and the signature of fcvPyramidDelete as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param pyr
+/// pyramid to deallocate
+///
+/// @param numLevels
+/// Number of levels in the pyramid
+///
+/// @param startLevel
+/// Start level of the pyramid
+/// \n\b WARNING: if pyr was allocated with allocateBase=0 which means baselevel memory
+/// was allocated outside of fcvPyramidAllocate, then startLevel
+/// for fcvPyramidDelete has to be set to 1 (or higher).
+///
+/// @ingroup mem_management
+//----------------------------------------------------------------------------
+
+FASTCV_API void
+fcvPyramidDelete( fcvPyramidLevel* pyr,
+ unsigned int numLevels,
+ unsigned int startLevel );
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Deallocates an array of fcvPyramidLevel. Can be used for any
+/// type(f32/s8/u8).
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvPyramidDelete() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvPyramidDelete,
+/// \a fcvPyramidDelete_v2 will be removed, and the current signature
+/// for \a fcvPyramidDelete will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvPyramidDelete when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param pyr
+/// pyramid to deallocate
+///
+/// @param numLevels
+/// Number of levels in the pyramid
+///
+/// @param startLevel
+/// Start level of the pyramid
+/// \n\b WARNING: if pyr was allocated with allocateBase=0 which means baselevel memory
+/// was allocated outside of fcvPyramidAllocate, then startLevel
+/// for fcvPyramidDelete_v2 has to be set to 1 (or higher).
+///
+/// @ingroup mem_management
+//----------------------------------------------------------------------------
+
+FASTCV_API void
+fcvPyramidDelete_v2( fcvPyramidLevel_v2* pyr,
+ uint32_t numLevels,
+ uint32_t startLevel );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Allocates aligned memory.
+///
+/// @param nBytes
+/// Number of bytes.
+///
+/// @param byteAlignment
+/// Alignment specified in bytes (e.g., 16 = 128-bit alignment).
+/// \n\b WARNING: must be < 255 bytes
+///
+/// @return
+/// SUCCESS: pointer to aligned memory
+/// FAILURE: 0
+///
+/// @ingroup mem_management
+//------------------------------------------------------------------------------
+
+FASTCV_API void*
+fcvMemAlloc( unsigned int nBytes,
+ unsigned int byteAlignment );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Frees memory allocated by fcvMemAlloc().
+///
+/// @param ptr
+/// Pointer to memory.
+///
+/// @ingroup mem_management
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvMemFree( void* ptr );
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Initialize the Memory sub-system in FastCV. The sub-system handles
+/// temporary/scratch memory requirements from several FastCV functions
+/// that do not have parameters to have this supplied by the users of those
+/// functions.
+///
+/// \b Important:
+/// \n 1. Every call to this function should be followed by a call to
+/// fcvMemDeInit().
+/// \n 2. This function (and the fcvMemDeInit) only needs to called once per
+/// process.
+/// \n 3. Any call to FastCV functions that uses internal temporary memory
+/// outside of fcvMemInit and fcvMemDeInit pair will use non-optimum memory
+/// allocation.
+/// \n 4. A call to this function without a corresponding call to fcvMemDeInit
+/// can result in memory leak.
+///
+/// @ingroup mem_management
+// -----------------------------------------------------------------------------
+FASTCV_API void
+fcvMemInit(void);
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Initialize the Memory sub-system in FastCV with pre-allocated buffer.
+/// The sub-system handles temporary/scratch memory requirements from several
+/// FastCV functions that do not have parameters to have this supplied by the
+/// users of those functions.
+///
+/// \b Important:
+/// \n 1. Every call to this function should be followed by a call to
+/// fcvMemDeInit().
+/// \n 2. This function (and the fcvMemDeInit) only needs to called once per
+/// process.
+/// \n 3. Any call to FastCV functions that uses internal temporary memory
+/// outside of fcvMemInit and fcvMemDeInit pair will use non-optimum memory
+/// allocation.
+/// \n 4. A call to this function without a corresponding call to fcvMemDeInit
+/// can result in memory leak.
+///
+/// @param preAllocBytes
+/// Number of bytes for the pre-allocated buffer.
+///
+/// @ingroup mem_management
+// -----------------------------------------------------------------------------
+FASTCV_API void
+fcvMemInitPreAlloc( uint32_t preAllocBytes );
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// De-Initialize the Memory sub-system initialized by fcvMemInit() function.
+///
+/// \b Important:
+/// \n 1. Call to this function without a corresponding call to fcvMemInit will
+/// result in no-op.
+///
+/// @ingroup mem_management
+// -----------------------------------------------------------------------------
+FASTCV_API void
+fcvMemDeInit(void);
+
+//End - Utility functions
+
+
+//==============================================================================
+// FUNCTIONS
+//==============================================================================
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Blurs an image with 3x3 median filter
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterMedian3x3u8_v2(). In the 2.0.0 release,
+/// fcvFilterMedian3x3u8_v2 will be renamed to fcvFilterMedian3x3u8
+/// and the signature of fcvFilterMedian3x3u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Border values are ignored. The 3x3 mask convolves with the image area
+/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
+/// | ... , ..., ..., ... |\n
+/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
+///
+/// @param srcImg
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight byte.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dstImg
+/// Output 8-bit image. Size of buffer is srcWidth*srcHeight byte.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterMedian3x3u8( const uint8_t* __restrict srcImg,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dstImg );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Blurs an image with 3x3 median filter
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterMedian3x3u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterMedian3x3u8,
+/// \a fcvFilterMedian3x3u8_v2 will be removed, and the current signature
+/// for \a fcvFilterMedian3x3u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterMedian3x3u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Border values are ignored. The 3x3 mask convolves with the image area
+/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
+/// | ... , ..., ..., ... |\n
+/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
+///
+/// @param srcImg
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight byte.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dstImg
+/// Output 8-bit image. Size of buffer is dstStride*srcHeight byte.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride.
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterMedian3x3u8_v2( const uint8_t* __restrict srcImg,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dstImg,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Blurs an image with 3x3 Gaussian filter
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterGaussian3x3u8_v2(). In the 2.0.0 release,
+/// fcvFilterGaussian3x3u8_v2 will be renamed to fcvFilterGaussian3x3u8
+/// and the signature of fcvFilterGaussian3x3u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Gaussian kernel:
+/// \n 1 2 1
+/// \n 2 4 2
+/// \n 1 2 1
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight byte.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Output 8-bit image. Destination buffer size is srcWidth*srcHeight.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param blurBorder
+/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
+/// borders up to half-kernel width are ignored (e.g. 1 pixel in the 3x3
+/// case).
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterGaussian3x3u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst,
+ int blurBorder );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Blurs an image with 3x3 Gaussian filter
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterGaussian3x3u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterGaussian3x3u8,
+/// \a fcvFilterGaussian3x3u8_v2 will be removed, and the current signature
+/// for \a fcvFilterGaussian3x3u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterGaussian3x3u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Convolution with 3x3 Gaussian kernel:
+/// \n 1 2 1
+/// \n 2 4 2
+/// \n 1 2 1
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride.
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
+///
+/// @param blurBorder
+/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
+/// borders up to half-kernel width are ignored (e.g. 1 pixel in the 3x3
+/// case).
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterGaussian3x3u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride,
+ int blurBorder );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Blurs an image with 5x5 Gaussian filter
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterGaussian5x5u8_v2(). In the 2.0.0 release,
+/// fcvFilterGaussian5x5u8_v2 will be renamed to fcvFilterGaussian5x5u8
+/// and the signature of fcvFilterGaussian5x5u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Convolution with 5x5 Gaussian kernel:
+/// \n 1 4 6 4 1
+/// \n 4 16 24 16 4
+/// \n 6 24 36 24 6
+/// \n 4 16 24 16 4
+/// \n 1 4 6 4 1
+///
+/// @param src
+/// Input int data (can be sq. of gradient, etc). Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param blurBorder
+/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
+/// borders up to half-kernel width are ignored (e.g. 2 pixel in the 5x5
+/// case).
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterGaussian5x5u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst,
+ int blurBorder );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Blurs an image with 5x5 Gaussian filter
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterGaussian5x5u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterGaussian5x5u8,
+/// \a fcvFilterGaussian5x5u8_v2 will be removed, and the current signature
+/// for \a fcvFilterGaussian5x5u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterGaussian5x5u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Convolution with 5x5 Gaussian kernel:
+/// \n 1 4 6 4 1
+/// \n 4 16 24 16 4
+/// \n 6 24 36 24 6
+/// \n 4 16 24 16 4
+/// \n 1 4 6 4 1
+///
+/// @param src
+/// Input int data (can be sq. of gradient, etc). Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride.
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
+///
+/// @param blurBorder
+/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
+/// borders up to half-kernel width are ignored (e.g. 2 pixel in the 5x5
+/// case).
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterGaussian5x5u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride,
+ int blurBorder );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Blurs an image with 11x11 Gaussian filter
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterGaussian11x11u8_v2(). In the 2.0.0 release,
+/// fcvFilterGaussian11x11u8_v2 will be renamed to fcvFilterGaussian11x11u8
+/// and the signature of fcvFilterGaussian11x11u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Convolution with 11x11 Gaussian kernel:
+/// \n 1 10 45 120 210 252 210 120 45 10 1
+/// \n 10 100 450 1200 2100 2520 2100 1200 450 100 10
+/// \n 45 450 2025 5400 9450 11340 9450 5400 2025 450 45
+/// \n 120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
+/// \n 210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
+/// \n 252 2520 11340 30240 52920 63504 52920 30240 11340 2520 252
+/// \n 210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
+/// \n 120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
+/// \n 45 450 2025 5400 9450 11340 9450 5400 2025 450 45
+/// \n 10 100 450 1200 2100 2520 2100 1200 450 100 10
+/// \n 1 10 45 120 210 252 210 120 45 10 , 1
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param blurBorder
+/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
+/// borders up to half-kernel width are ignored (e.g. 5 pixel in the 11x11
+/// case).
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterGaussian11x11u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst,
+ int blurBorder );
+
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Blurs an image with 11x11 Gaussian filter
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterGaussian11x11u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterGaussian11x11u8,
+/// \a fcvFilterGaussian11x11u8_v2 will be removed, and the current signature
+/// for \a fcvFilterGaussian11x11u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterGaussian11x11u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Convolution with 11x11 Gaussian kernel:
+/// \n 1 10 45 120 210 252 210 120 45 10 1
+/// \n 10 100 450 1200 2100 2520 2100 1200 450 100 10
+/// \n 45 450 2025 5400 9450 11340 9450 5400 2025 450 45
+/// \n 120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
+/// \n 210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
+/// \n 252 2520 11340 30240 52920 63504 52920 30240 11340 2520 252
+/// \n 210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
+/// \n 120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
+/// \n 45 450 2025 5400 9450 11340 9450 5400 2025 450 45
+/// \n 10 100 450 1200 2100 2520 2100 1200 450 100 10
+/// \n 1 10 45 120 210 252 210 120 45 10 , 1
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride.
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param blurBorder
+/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
+/// borders up to half-kernel width are ignored (e.g. 5 pixel in the 11x11
+/// case).
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterGaussian11x11u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride,
+ int blurBorder );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Color conversion from YUV (YCrCb) 4:2:0 PesudoPlanar (Interleaved) to RGB 8888.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvColorYCrCb420PseudoPlanarToRGB8888u8. In the 2.0.0 release,
+/// the signature of fcvColorYUV420toRGB8888u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// 8-bit image of input YUV 4:2:0 values.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// The input are one Y plane followed by one interleaved and 2D (both
+/// horizontally and vertically) sub-sampled CrCb plane:
+/// Y plane : Y00 Y01 Y02 Y03 ...
+/// Y10 Y11 Y12 Y13 ...
+/// Interleaved and 2D sub-sampled plane: Cr0 Cb0 Cr1 Cb1 ...
+///
+/// @param dst
+/// 32-bit image of output RGB 8888 values. R is at LSB.
+/// \n\b WARNING: size must match input yuv420.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+///
+///
+/// @ingroup color_conversion
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvColorYUV420toRGB8888u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint32_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Color conversion from YUV (YCrCb) 4:2:0 PesudoPlanar (Interleaved CrCb) to RGB 888.
+///
+/// \n\b ATTENTION: The name of this function will be changed when the 2.0.0 release
+/// of this library is made.
+/// Until 2.0.0, the developer should use this implementation with the expectation of
+/// moving to a different name when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// 8-bit image of input YUV picture.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// The input are one Y plane followed by one interleaved and 2D (both
+/// horizontally and vertically) sub-sampled CrCb plane:
+/// Y plane : Y00 Y01 Y02 Y03 ...
+/// Y10 Y11 Y12 Y13 ...
+/// Interleaved and 2D sub-sampled plane: Cr0 Cb0 Cr1 Cb1 ...
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcYStride
+/// Stride (in bytes) of input image Y component (i.e., number of bytes between
+/// column 0 of row 1 and column 0 of row 2).
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values).
+///
+/// @param srcCStride
+/// Stride (in bytes) of input image Chroma component (i.e., number of bytes between
+/// column 0 of row 1 and column 0 of row 2)
+/// \n\b WARNING: should be multiple of 4 (4 * 1-byte values).
+///
+/// @param dst
+/// 32-bit image of output RGB 8888 values. R in LSB.
+/// \n\b WARNING: size must match input yuv420.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of output RGB image (i.e., number of bytes between column 0 of
+/// row 1 and column 0 of row 2)
+/// \n\b WARNING: should be multiple of 32 (8 * 4-byte values).
+///
+///
+///
+/// @ingroup color_conversion
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvColorYCrCb420PseudoPlanarToRGB8888u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcYStride,
+ unsigned int srcCStride,
+ uint32_t* __restrict dst,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Color conversion from YUV (YCbCr) 4:2:0 PesudoPlanar (Interleaved CbCr) to RGB 565.
+///
+/// \n\b ATTENTION: The name of this function will be changed when the 2.0.0 release
+/// of this library is made.
+/// Until 2.0.0, the developer should use this implementation with the expectation of
+/// moving to a different name when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// 8-bit image of input YUV 4:2:0 values.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// The input are one Y plane followed by one interleaved and 2D (both
+/// horizontally and vertically) sub-sampled CbCr plane:
+/// Y plane : Y00 Y01 Y02 Y03 ...
+/// Y10 Y11 Y12 Y13 ...
+/// Interleaved and 2D sub-sampled plane: Cb0 Cr0 Cb1 Cr1 ...
+///
+/// @param dst
+/// 16-bit image of output RGB 565 values. R in LSBs.
+/// 2 pixels are packed into one 32-bit output
+/// \n\b WARNING: size must match input yuv420.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 4
+///
+/// @param srcHeight
+/// Image height.
+///
+///
+///
+/// @ingroup color_conversion
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvColorYUV420toRGB565u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint32_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Color conversion from YCbCr H1V1 to RGB 888.
+///
+/// @details
+/// Color conversion from YCbCr H1V1 (YCbCr 4:4:4 planar) to RGB 888.
+/// \n R = Y + 1.40200*(Cr-128)
+/// \n G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)
+/// \n B = Y + 1.77200*(CB-128)
+///
+/// @param src
+/// 8-bit image of input values. Stored as YCbCr H1V1 planar format in 8x8 blocks for Y,Cb,Cr.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// 8-bit image of output RGB 888 values. R in LSB.
+/// \n\b WARNING: size must match input crcb.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup color_conversion
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvColorYCrCbH1V1toRGB888u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Color conversion from YCbCr H2V2 to RGB 888.
+///
+/// @details
+/// Color conversion from YCbCr H2V2 (YCbCr 4:2:0 planar) to RGB 888.
+/// \n R = Y + 1.40200*(Cr-128)
+/// \n G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)
+/// \n B = Y + 1.77200*(CB-128)
+///
+/// @param ysrc
+/// 8-bit input values. Stored as YCbCr H2V2 planar format in 16x16 blocks for Y, 8x8 blocks for Cb, Cr.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// 8-bit image of output RGB 888 values. R in LSB.
+/// \n\b WARNING: size must match input crcb.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup color_conversion
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvColorYCrCbH2V2toRGB888u8( const uint8_t* __restrict ysrc,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Color conversion from YCbCr H2V1 to RGB 888.
+///
+/// @details
+/// Color conversion from YCbCr H2V1 (YCbCr 4:2:2) to RGB 888.
+/// \n R = Y + 1.40200*(Cr-128)
+/// \n G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)
+/// \n B = Y + 1.77200*(CB-128)
+///
+/// @param src
+/// 8-bit input values. Stored as YCbCr H2V1 planar format in 16x8 blocks for Y, 8x8 blocks for Cb, Cr.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// 8-bit image of output RGB 888 values. R in LSB.
+/// \n\b WARNING: size must match input crcb.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup color_conversion
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvColorYCrCbH2V1toRGB888u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Color conversion from YCbCr H1V2 to RGB 888.
+///
+/// @details
+/// Color conversion from YCbCr H1V2 (YCbCr 4:2:2) to RGB 888.
+/// \n R = Y + 1.40200*(Cr-128)
+/// \n G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)
+/// \n B = Y + 1.77200*(CB-128)
+///
+/// @param ysrc
+/// 8-bit input values. Stored as YCbCr H1V2 planar format in 8x16 blocks for Y, 8x8 blocks for Cb, Cr.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// 8-bit image of output RGB 888 values. R in LSB.
+/// \n\b WARNING: size must match input crcb.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup color_conversion
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvColorYCrCbH1V2toRGB888u8( const uint8_t* __restrict ysrc,
+
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Color conversion from RGB 888 to YCrCb.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvColorRGB888toYCrCbu8_v2(). In the 2.0.0 release,
+/// fcvColorRGB888toYCrCbu8_v2 will be renamed to fcvColorRGB888toYCrCbu8
+/// and the signature of fcvColorRGB888toYCrCbu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Color conversion from RGB 888 to YCrCb 4:4:4 interleaved.
+///
+/// @param src
+/// 8-bit input values.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// 8-bit output values. Stored as Y, Cr, Cb interleaved format.
+/// \n\b WARNING: size must match input crcb.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup color_conversion
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvColorRGB888toYCrCbu8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Color conversion from RGB 888 to YCrCb 4:4:4 (Full interleaved, similar to
+/// 3-channel RGB).
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvColorRGB888toYCrCbu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvColorRGB888toYCrCbu8,
+/// \a fcvColorRGB888toYCrCbu8_v2 will be removed, and the current signature
+/// for \a fcvColorRGB888toYCrCbu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvColorRGB888toYCrCbu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Color conversion from RGB 888 to YCrCb 4:4:4 interleaved.
+///
+/// @param src
+/// 8-bit input values.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride (in bytes).
+/// \n\b WARNING: Must be at least 3*srcWidth.
+///
+/// @param dst
+/// 8-bit output values. Stored as Y, Cr, Cb interleaved format.
+/// \n\b WARNING: size must match input crcb.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride (in bytes).
+/// \n\b WARNING: Must be at least 3*srcWidth.
+///
+///
+///
+/// @ingroup color_conversion
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvColorRGB888toYCrCbu8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Create a 36-dimension gradient based descriptor on 17x17 patch.
+///
+/// @details
+///
+/// @param patch
+/// Input luminance data for 17x17 patch to describe.
+///
+/// @param descriptorChar
+/// Output descriptor vector. 36 x 8-bit vector. Normalized and quantized to range [-127, 127]
+///
+/// @param descriptorNormSq
+/// Output squared norm (L2 norm) of the descriptor vector.
+///
+///
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvDescriptor17x17u8To36s8( const uint8_t* __restrict patch,
+ int8_t* __restrict descriptorChar,
+ int32_t* __restrict descriptorNormSq );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Dot product of two 8-bit vectors.
+///
+/// @param a
+/// Vector.
+///
+/// @param b
+/// Vector.
+///
+/// @param abSize
+/// Number of elements in A and B.
+///
+/// @return
+/// Dot product .
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API int32_t
+fcvDotProducts8( const int8_t* __restrict a,
+ const int8_t* __restrict b,
+ unsigned int abSize );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dot product of two 8-bit vectors.
+///
+/// @param a
+/// Vector A.
+///
+/// @param b
+/// Vector B.
+///
+/// @param abSize
+/// Number of elements in A and B.
+///
+/// @return
+/// Dot product .
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvDotProductu8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b,
+ unsigned int abSize );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Dot product of two 36-byte vectors.
+///
+/// @param a
+/// Vector.
+///
+/// @param b
+/// Vector.
+///
+/// @return
+/// Dot product .
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API int32_t
+fcvDotProduct36x1s8( const int8_t* __restrict a,
+ const int8_t* __restrict b );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Dot product of one 36-byte vector against 4 others.
+///
+/// @details
+/// Dot product of 36-byte vector (a) against 4 others (b,c,d,e):\n
+/// , , ,
+///
+/// @param a
+/// Vector.
+///
+/// @param b
+/// Vector.
+///
+/// @param c
+/// Vector.
+///
+/// @param d
+/// Vector.
+///
+/// @param e
+/// Vector.
+///
+/// @param dotProducts
+/// Output of the 4 results { , , , }.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProduct36x4s8( const int8_t* __restrict a,
+ const int8_t* __restrict b,
+ const int8_t* __restrict c,
+ const int8_t* __restrict d,
+ const int8_t* __restrict e,
+ int32_t* __restrict dotProducts );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Normalized dot product of one 36-byte vector against 4 others.
+///
+/// @details
+/// Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):\n
+/// , , ,
+/// using their given inverse lengths for normalization.
+///
+/// @param a
+/// Vector.
+///
+/// @param invLengthA
+/// Inverse of vector A.
+///
+/// @param b0
+/// Vector.
+///
+/// @param b1
+/// Vector.
+///
+/// @param b2
+/// Vector.
+///
+/// @param b3
+/// Vector.
+///
+/// @param invLengthsB
+/// Pointer to an array of the inverse values of each B vector.
+/// The pointer must point to 4 floating point values.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @param dotProducts
+/// Output of the 4 results { , , , }.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProductNorm36x4s8( const int8_t* __restrict a,
+ float invLengthA,
+ const int8_t* __restrict b0,
+ const int8_t* __restrict b1,
+ const int8_t* __restrict b2,
+ const int8_t* __restrict b3,
+ float* __restrict invLengthsB,
+ float* __restrict dotProducts );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dot product of two 36-byte vectors.
+///
+/// @param a
+/// Vector.
+///
+/// @param b
+/// Vector.
+///
+/// @return
+/// Dot product .
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvDotProduct36x1u8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dot product of one 36-byte vector against 4 others.
+///
+/// @details
+/// Dot product of 36-byte vector (a) against 4 others (b,c,d,e):\n
+/// , , ,
+///
+/// @param a
+/// Vector.
+///
+/// @param b
+/// Vector.
+///
+/// @param c
+/// Vector.
+///
+/// @param d
+/// Vector.
+///
+/// @param e
+/// Vector.
+///
+/// @param dotProducts
+/// Output of the 4 results { , , , }.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProduct36x4u8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b,
+ const uint8_t* __restrict c,
+ const uint8_t* __restrict d,
+ const uint8_t* __restrict e,
+ uint32_t* __restrict dotProducts );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Normalized dot product of one 36-byte vector against 4 others.
+///
+/// @details
+/// Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):\n
+/// , , ,
+/// using their given inverse lengths for normalization.
+///
+/// @param a
+/// Vector.
+///
+/// @param invLengthA
+/// Inverse of vector A.
+///
+/// @param b0
+/// Vector.
+///
+/// @param b1
+/// Vector.
+///
+/// @param b2
+/// Vector.
+///
+/// @param b3
+/// Vector.
+///
+/// @param invLengthsB
+/// Pointer to an array of the inverse values of each B vector.
+/// The pointer must point to 4 floating point values.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @param dotProducts
+/// Output of the 4 results { , , , }.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProductNorm36x4u8( const uint8_t* __restrict a,
+ float invLengthA,
+ const uint8_t* __restrict b0,
+ const uint8_t* __restrict b1,
+ const uint8_t* __restrict b2,
+ const uint8_t* __restrict b3,
+ float* __restrict invLengthsB,
+ float* __restrict dotProducts );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Dot product of two 64-byte vectors.
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @return
+/// Dot product .
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API int32_t
+fcvDotProduct64x1s8( const int8_t* __restrict a,
+ const int8_t* __restrict b );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Dot product of one 64-byte vector against 4 others.
+///
+/// @details
+/// Dot product of vector (a) against 4 others (b,c,d,e):\n
+/// , , ,
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param c
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param d
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param e
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dotProducts
+/// Output of the 4 results { , , , }.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProduct64x4s8( const int8_t* __restrict a,
+ const int8_t* __restrict b,
+ const int8_t* __restrict c,
+ const int8_t* __restrict d,
+ const int8_t* __restrict e,
+ int32_t* __restrict dotProducts );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Normalized dot product of one 64-byte vector against 4 others.
+///
+/// @details
+/// Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):\n
+/// , , ,
+/// using their given inverse lengths for normalization.
+///
+/// @param a
+/// Vector.
+///
+/// @param invLengthA
+/// Inverse of vector A.
+///
+/// @param b0
+/// Vector.
+///
+/// @param b1
+/// Vector.
+///
+/// @param b2
+/// Vector.
+///
+/// @param b3
+/// Vector.
+///
+/// @param invLengthsB
+/// Pointer to an array of the inverse values of each B vector.
+/// The pointer must point to 4 floating point values.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @param dotProducts
+/// Output of the 4 results { , , , }.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProductNorm64x4s8( const int8_t* __restrict a,
+ float invLengthA,
+ const int8_t* __restrict b0,
+ const int8_t* __restrict b1,
+ const int8_t* __restrict b2,
+ const int8_t* __restrict b3,
+ float* __restrict invLengthsB,
+ float* __restrict dotProducts );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dot product of two 64-byte vectors.
+///
+/// @param a
+/// Vector.
+///
+/// @param b
+/// Vector.
+///
+/// @return
+/// Dot product .
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvDotProduct64x1u8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dot product of one 64-byte vector against 4 others.
+///
+/// @details
+/// Dot product of 36-byte vector (a) against 4 others (b,c,d,e):\n
+/// , , ,
+///
+/// @param a
+/// Vector.
+///
+/// @param b
+/// Vector.
+///
+/// @param c
+/// Vector.
+///
+/// @param d
+/// Vector.
+///
+/// @param e
+/// Vector.
+///
+/// @param dotProducts
+/// Output of the 4 results { , , , }.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProduct64x4u8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b,
+ const uint8_t* __restrict c,
+ const uint8_t* __restrict d,
+ const uint8_t* __restrict e,
+ uint32_t* __restrict dotProducts );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Normalized dot product of one 64-byte vector against 4 others.
+///
+/// @details
+/// Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):\n
+/// , , ,
+/// using their given inverse lengths for normalization.
+///
+/// @param a
+/// Vector.
+///
+/// @param invLengthA
+/// Inverse of vector A.
+///
+/// @param b0
+/// Vector.
+///
+/// @param b1
+/// Vector.
+///
+/// @param b2
+/// Vector.
+///
+/// @param b3
+/// Vector.
+///
+/// @param invLengthsB
+/// Pointer to an array of the inverse values of each B vector.
+/// The pointer must point to 4 floating point values.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @param dotProducts
+/// Output of the 4 results { , , , }.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProductNorm64x4u8( const uint8_t* __restrict a,
+ float invLengthA,
+ const uint8_t* __restrict b0,
+ const uint8_t* __restrict b1,
+ const uint8_t* __restrict b2,
+ const uint8_t* __restrict b3,
+ float* __restrict invLengthsB,
+ float* __restrict dotProducts );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Dot product of two 128-byte vectors.
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @return
+/// Dot product .
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API int32_t
+fcvDotProduct128x1s8( const int8_t* __restrict a,
+ const int8_t* __restrict b );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Dot product of one 128-byte vector against 4 others.
+///
+/// @details
+/// Dot product of vector (a) against 4 others (b,c,d,e):\n
+/// , , ,
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param c
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param d
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param e
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dotProducts
+/// Output of the 4 results { , , , }.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProduct128x4s8( const int8_t* __restrict a,
+ const int8_t* __restrict b,
+ const int8_t* __restrict c,
+ const int8_t* __restrict d,
+ const int8_t* __restrict e,
+ int32_t* __restrict dotProducts );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Normalized dot product of one 128-byte vector against 4 others.
+///
+/// @details
+/// Dot product of vector (a) against 4 others (b0,b1,b2,b3):\n
+/// , , ,
+/// using their given inverse lengths for normalization.
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param invLengthA
+/// Inverse of vector A.
+///
+/// @param b0
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b1
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b2
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b3
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param invLengthsB
+/// Pointer to an array of the inverse values of each B vector.
+/// The pointer must point to 4 floating point values.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @param dotProducts
+/// Output of the 4 results { , , , }.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProductNorm128x4s8( const int8_t* __restrict a,
+ float invLengthA,
+ const int8_t* __restrict b0,
+ const int8_t* __restrict b1,
+ const int8_t* __restrict b2,
+ const int8_t* __restrict b3,
+ float* __restrict invLengthsB,
+ float* __restrict dotProducts );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dot product of two 128-byte vectors.
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @return
+/// Dot product .
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvDotProduct128x1u8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dot product of one 128-byte vector against 4 others.
+///
+/// @details
+/// Dot product of vector (a) against 4 others (b,c,d,e):\n
+/// , , ,
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param c
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param d
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param e
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dotProducts
+/// Output of the 4 results { , , , }.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProduct128x4u8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b,
+ const uint8_t* __restrict c,
+ const uint8_t* __restrict d,
+ const uint8_t* __restrict e,
+ uint32_t* __restrict dotProducts );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Normalized dot product of one 128-byte vector against 4 others.
+///
+/// @details
+/// Dot product of vector (a) against 4 others (b0,b1,b2,b3):\n
+/// , , ,
+/// using their given inverse lengths for normalization.
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param invLengthA
+/// Inverse of vector A.
+///
+/// @param b0
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b1
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b2
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b3
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param invLengthsB
+/// Pointer to an array of the inverse values of each B vector.
+/// The pointer must point to 4 floating point values.
+///
+/// @param dotProducts
+/// Output of the 4 results { , , , }.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProductNorm128x4u8( const uint8_t* __restrict a,
+ float invLengthA,
+ const uint8_t* __restrict b0,
+ const uint8_t* __restrict b1,
+ const uint8_t* __restrict b2,
+ const uint8_t* __restrict b3,
+ float* __restrict invLengthsB,
+ float* __restrict dotProducts );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dot product of 1 patch (8x8 byte square) with several (n) 8x8 squares
+/// along a line of pixels in an image.
+///
+/// @param patchPixels
+/// Pointer to 8-bit patch pixel values linearly laid out in memory.
+///
+/// @param imagePixels
+/// Pointer to 8-bit image pixel values linearly laid out in memory.
+///
+/// @param imgW
+/// Width in pixels of the source image.
+///
+/// @param imgH
+/// Height in pixels of the source image.
+///
+/// @param nX
+/// X location on image of starting search pixel.
+///
+/// @param nY
+/// Y location on image of starting search pixel.
+///
+/// @param nNum
+/// Number of pixels (in X direction) on image to sweep.
+///
+/// @param dotProducts
+/// Output dot product values of nNum pixels.
+/// \n\b WARNING: array size must be a multiple of 4 (e.g., 4, 8, 12, ...)
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProduct8x8u8( const uint8_t* __restrict patchPixels,
+ const uint8_t* __restrict imagePixels,
+ unsigned short imgW,
+ unsigned short imgH,
+ int nX,
+ int nY,
+ unsigned int nNum,
+ int32_t* __restrict dotProducts );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dot product of 1 patch (8x8 byte square) with 8x8 squares in 11x12
+/// rectangle around the center search pixel (iX,iY).
+///
+/// @param patchPixels
+/// Pointer to 8-bit patch pixel values linearly laid out in memory.
+///
+/// @param imagePixels
+/// Pointer to 8-bit image pixel values linearly laid out in memory.
+///
+/// @param imgW
+/// Width in pixels of the image.
+///
+/// @param imgH
+/// Height in pixels of the image.
+///
+/// @param iX
+/// X location on image of the center of the search window.
+///
+/// @param iY
+/// Y location on image of the center of the search window.
+///
+/// @param dotProducts
+/// Output 11x12 dot product values.
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvDotProduct11x12u8( const uint8_t* __restrict patchPixels,
+ const uint8_t* __restrict imagePixels,
+ unsigned short imgW,
+ unsigned short imgH,
+ int iX,
+ int iY,
+ int32_t* __restrict dotProducts );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// 3x3 Sobel edge filter
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterSobel3x3u8_v2(). In the 2.0.0 release,
+/// fcvFilterSobel3x3u8_v2 will be renamed to fcvFilterSobel3x3u8
+/// and the signature of fcvFilterSobel3x3u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// This function calculates an image derivative by convolving the image with an appropriate 3x3 kernel.
+/// Border values are ignored. The 3x3 mask convolves with the image area
+/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
+/// | ... , ..., ..., ... |\n
+/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Output 8-bit image of |dx|+|dy|. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b NOTE: dst is saturated to 255
+/// \n\b WARNING: data should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterSobel3x3u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// 3x3 Sobel edge filter
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterSobel3x3u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterSobel3x3u8,
+/// \a fcvFilterSobel3x3u8_v2 will be removed, and the current signature
+/// for \a fcvFilterSobel3x3u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterSobel3x3u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// This function calculates an image derivative by convolving the image with an appropriate 3x3 kernel.
+/// Border values are ignored. The 3x3 mask convolves with the image area
+/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
+/// | ... , ..., ..., ... |\n
+/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit image of |dx|+|dy|. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b NOTE: dst is saturated to 255
+/// \n\b WARNING: data should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride.
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterSobel3x3u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Canny edge filter
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterCanny3x3u8_v2(). In the 2.0.0 release,
+/// fcvFilterCanny3x3u8_v2 will be renamed to fcvFilterCanny3x3u8
+/// and the signature of fcvFilterCanny3x3u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Canny edge detector applied to a 8 bit grayscale image. The min threshold
+/// is set to 0 and the max threshold is set to 15. The aperture size used
+/// is set to 3. This function will output the edge, since its working with a
+/// 3x3 window, it leaves one row/col of pixels at the corners
+/// map stored as a binarized image (0x0 - not an edge, 0xFF - edge).
+/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
+/// | ... , ..., ..., ... |\n
+/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Output 8-bit image containing the edge detection results.
+/// Size of buffer is srcWidth*srcHeight bytes.
+///
+/// @param lowThresh
+/// For all the intermediate pixels along the edge, the magnitude of the
+/// gradient at the pixel locations should be greater than 'low'
+/// (sqrt(gx^2 + gy^2) > low, where gx and gy are X and Y gradient)
+///
+/// @param highThresh
+/// For an edge starting point, i.e. either the first or last
+/// pixel of the edge, the magnitude of the gradient at the pixel should be
+/// greater than 'high' (sqrt(gx^2 + gy^2) > high, where gx and gy are X and
+/// Y gradient).
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterCanny3x3u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst,
+ int lowThresh,
+ int highThresh );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Canny edge filter
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterCanny3x3u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterCanny3x3u8,
+/// \a fcvFilterCanny3x3u8_v2 will be removed, and the current signature
+/// for \a fcvFilterCanny3x3u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterCanny3x3u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Canny edge detector applied to a 8 bit grayscale image. The Canny edge
+/// detector uses min/max threshold to classify an edge. The min threshold
+/// is set to 0 and the max threshold is set to 15. The aperture size used
+/// in the Canny edge detector will be same as the filter footprint in the
+/// Sobel edge detector and is set to 3. This function will output the edge
+/// map stored as a binarized image (0x0 - not an edge, 0xFF - edge), since
+/// it works with 3x3 windows, it leaves 1 row/col of pixels at the corners.
+/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
+/// | ... , ..., ..., ... |\n
+/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit image containing the edge detection results.
+/// Size of buffer is dstStride*srcHeight bytes.
+///
+/// @param dstStride
+/// Output stride.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param lowThresh
+/// For all the intermediate pixels along the edge, the magnitude of the
+/// gradient at the pixel locations should be greater than 'low'
+/// (sqrt(gx^2 + gy^2) > low, where gx and gy are X and Y gradient)
+///
+/// @param highThresh
+/// For an edge starting point, i.e. either the first or last
+/// pixel of the edge, the magnitude of the gradient at the pixel should be
+/// greater than 'high' (sqrt(gx^2 + gy^2) > high, where gx and gy are X and
+/// Y gradient).
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterCanny3x3u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride,
+ int lowThresh,
+ int highThresh );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Canny edge filter
+///
+/// \n\b ATTENTION: This function is in the extension lib.
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterCanny3x3u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterCanny3x3u8,
+/// \a fcvFilterCanny3x3u8_v3 will be removed, and the current signature
+/// for \a fcvFilterCanny3x3u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterCanny3x3u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Canny edge detector applied to a 8 bit grayscale image. The Canny edge
+/// detector uses min/max threshold to classify an edge. The min threshold
+/// is set to 0 and the max threshold is set to 15. The aperture size used
+/// in the Canny edge detector will be same as the filter footprint in the
+/// Sobel edge detector and is set to 3. This function will output the edge
+/// map stored as a binarized image (0x0 - not an edge, 0xFF - edge), since
+/// it works with 3x3 windows, it leaves 1 row/col of pixels at the corners.
+/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
+/// | ... , ..., ..., ... |\n
+/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit image containing the edge detection results.
+/// Size of buffer is dstStride*srcHeight bytes.
+///
+/// @param dstStride
+/// Output stride.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param gx
+/// gradient in X direction.
+/// \n\b NOTE: use NULL if do not need the gradient output.
+///
+/// @param gy
+/// gradient in Y direction.
+/// \n\b NOTE: use NULL if do not need the gradient output.
+///
+/// @param gradStride
+/// Output stride for gx and gy.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth*2.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param lowThresh
+/// For all the intermediate pixels along the edge, the magnitude of the
+/// gradient at the pixel locations should be greater than 'low'
+/// (sqrt(gx^2 + gy^2) > low, where gx and gy are X and Y gradient)
+///
+/// @param highThresh
+/// For an edge starting point, i.e. either the first or last
+/// pixel of the edge, the magnitude of the gradient at the pixel should be
+/// greater than 'high' (sqrt(gx^2 + gy^2) > high, where gx and gy are X and
+/// Y gradient).
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvFilterCanny3x3u8_v3( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride,
+ int16_t* __restrict gx,
+ int16_t* __restrict gy,
+ unsigned int gradStride,
+ int lowThresh,
+ int highThresh );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Performs image difference by subracting src2 from src1. dst=src1-src2.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageDiffu8_v2(). In the 2.0.0 release,
+/// fcvImageDiffu8_v2 will be renamed to fcvImageDiffu8
+/// and the signature of fcvImageDiffu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// dst[i,j] = (uint8_t) max( min((short)(src1[i,j]-src2[i,j]), 255), 0 );
+///
+/// @param src1
+/// First source image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param src2
+/// Second source image, must be same size as src1.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Destination. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b NOTE: Must be same size as src1 and src2.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageDiffu8( const uint8_t* __restrict src1,
+ const uint8_t* __restrict src2,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Performs image difference by subracting src2 from src1. dst=src1-src2.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvImageDiffu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvImageDiffu8,
+/// \a fcvImageDiffu8_v2 will be removed, and the current signature
+/// for \a fcvImageDiffu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvImageDiffu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// dst[i,j] = (uint8_t) max( min((short)(src1[i,j]-src2[i,j]), 255), 0 );
+///
+/// @param src1
+/// First source image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param src2
+/// Second source image, must be same size as src1.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Destination. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b NOTE: Must be same size as src1 and src2.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageDiffu8_v2( const uint8_t* __restrict src1,
+ const uint8_t* __restrict src2,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride );
+
+
+//--------------------------------------------------------------------------
+/// @brief
+/// Compute image difference src1-src2
+///
+/// @param src1
+/// Input image1 of int16 type. Size of buffer is srcStride*srcHeight*2 bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param src2
+/// Input image2, must have same size as src1
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Input image height
+///
+/// @param srcStride
+/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output image, saturated for int16 type. Size of buffer is dstStride*srcHeight*2 bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @ingroup image_processing
+////------------------------------------------------------------------------
+FASTCV_API void
+fcvImageDiffs16( const int16_t* __restrict src1,
+ const int16_t* __restrict src2,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict dst,
+ unsigned int dstStride );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Performs image difference by subracting src2 from src1. dst=src1-src2.
+///
+/// @details
+///
+/// @param src1
+/// First source image. Size of buffer is srcStride*srcHeight*4 bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param src2
+/// Second source image, must be same size as src1.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Destination. Size of buffer is dstStride*srcHeight*4 bytes.
+/// \n\b NOTE: Must be same size as src1 and src2.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvImageDifff32( const float* __restrict src1,
+ const float* __restrict src2,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ float* __restrict dst,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Performs image difference by promoting both src1 and src 2 to
+/// floating point values and then subracting src2 from src1. dst=src1-src2.
+///
+/// @details
+///
+/// @param src1
+/// First source image
+///
+/// @param src2
+/// Second source image, must be same size as src1.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param dst
+/// Destination image in float type
+/// \n\b NOTE: Must be same size as src1 and src2.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvImageDiffu8f32( const uint8_t* __restrict src1,
+ const uint8_t* __restrict src2,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ float* __restrict dst,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Performs image difference by subracting src2 from src1.
+/// dst = ( src1 >> 1) - ( src2 >> 1).
+///
+/// @details
+///
+/// @param src1
+/// First source image
+///
+/// @param src2
+/// Second source image, must be same size as src1.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param dst
+/// Destination image in int8 type
+/// \n\b NOTE: Must be same size as src1 and src2.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvImageDiffu8s8( const uint8_t* __restrict src1,
+ const uint8_t* __restrict src2,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int8_t* __restrict dst,
+ unsigned int dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Creates 2D gradient from source illuminance data.
+/// This function considers only the left/right neighbors
+/// for x-gradients and top/bottom neighbors for y-gradients.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageGradientInterleaveds16_v2(). In the 2.0.0 release,
+/// fcvImageGradientInterleaveds16_v2 will be renamed to fcvImageGradientInterleaveds16
+/// and the signature of fcvImageGradientInterleaveds16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param gradients
+/// Buffer to store gradient. Must be 2*(width-1)*(height-1) in size.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientInterleaveds16( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict gradients
+ );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Creates 2D gradient from source illuminance data.
+/// This function considers only the left/right neighbors
+/// for x-gradients and top/bottom neighbors for y-gradients.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvImageGradientInterleaveds16() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvImageGradientInterleaveds16,
+/// \a fcvImageGradientInterleaveds16_v2 will be removed, and the current signature
+/// for \a fcvImageGradientInterleaveds16 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvImageGradientInterleaveds16 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param gradients
+/// Buffer to store gradient. Must be 2*(width-1)*(height-1) in size.
+///
+/// @param gradStride
+/// Stride in bytes of the interleaved gradients array.
+/// \n\b NOTE: if 0, srcStride is set as 4*(srcWidth-2).
+/// \n\b WARNING: should be multiple of 16 ( 8 * 2-byte values ), and at least as much as 4*(srcWidth-2) if not 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientInterleaveds16_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict gradients,
+ unsigned int gradStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Function to initialize MSER. To invoke MSER functionality, 3 functions have to be called:
+/// fcvMserInit, fcvMseru8, fcvMserRelease.
+/// Image width has to be greater than 50, and image height has to be greater than 5.
+/// Pixels at the image boundary are not processed. If boundary pixels are important
+/// for a particular application, please consider padding the input image with dummy
+/// pixels of one pixel wide.
+/// Here is the typical usage:
+/// void *mserHandle;
+/// if (fcvMserInit (width,........,&mserHandle))
+/// {
+/// fcvMseru8 (mserHandle,...);
+/// fcvMserRelease(mserHandle);
+/// }
+///
+/// @param width
+/// Width of the image for which MSER has to be done.
+///
+/// @param height
+/// Height of the image for which MSER has to be done.
+///
+/// @param delta
+/// Delta to be used in MSER algorithm (the difference in grayscale values
+/// within which the region is stable ).
+/// Typical value range [0.8 8], typical value 2
+///
+/// @param minArea
+/// Minimum area (number of pixels) of a mser contour.
+/// Typical value range [10 50], typical value 30
+///
+/// @param maxArea
+/// Maximum area (number of pixels) of a mser contour.
+/// Typical value 14400 or 0.25*width*height
+///
+/// @param maxVariation
+/// Maximum variation in grayscale between 2 levels allowed.
+/// Typical value range [0.1 1.0], typical value 0.15
+///
+/// @param minDiversity
+/// Minimum diversity in grayscale between 2 levels allowed.
+/// Typical value range [0.1 1.0], typical value 0.2
+///
+/// @param mserHandle
+/// Output. the mserHandle to be used in subsequent calls.
+///
+/// @return
+/// 1 if successful.
+/// 0 if unsuccessful, mserHandle is invalid.
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+FASTCV_API int
+fcvMserInit(const unsigned int width,
+ const unsigned int height,
+ unsigned int delta,
+ unsigned int minArea,
+ unsigned int maxArea,
+ float maxVariation,
+ float minDiversity,
+ void ** mserHandle );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Function to release MSER resources.
+///
+/// @param mserHandle
+/// Handle to be used to free up MSER resources.
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvMserRelease(void *mserHandle);
+
+///---------------------------------------------------------------------------
+/// @brief
+/// Function to invoke MSER.
+/// Image width has to be greater than 50, and image height has to be greater than 5.
+/// Pixels at the image boundary are not processed. If boundary pixels are important
+/// for a particular application, please consider padding the input image with dummy
+/// pixels of one pixel wide.
+/// Here is the typical usage:
+/// void *mserHandle;
+/// if (fcvMserInit (width,........,&mserHandle))
+/// {
+/// fcvMseru8 (mserHandle,...);
+/// fcvMserRelease(mserHandle);
+/// }
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMseru8_v2(). In the 2.0.0 release,
+/// fcvMseru8_v2 will be renamed to fcvMseru8.
+/// and the signature of fcvMseru8 as it appears now, will be removed.
+/// \n\n
+///
+/// @param mserHandle
+/// The MSER Handle returned by init.
+///
+/// @param srcPtr
+/// Pointer to an image array (unsigned char ) for which MSER has to be done.
+///
+/// @param srcWidth
+/// Width of the source image.
+/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserInit.
+///
+/// @param srcHeight
+/// Height of the source image.
+/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserInit.
+///
+/// @param srcStride
+/// Stride of the source image.
+///
+/// @param maxContours
+/// Maximum contours that will be returned.
+///
+/// @param numContours
+/// Output, Number of MSER contours in the region.
+///
+/// @param numPointsInContour
+/// Output, Number of points in each contour. This will have values filled up for the
+/// first (*numContours) values. This memory has to be allocated by the caller.
+///
+/// @param pointsArraySize
+/// Size of the output points Array.
+/// Typical size: (# of pixels in source image) * 30
+///
+/// @param pointsArray
+/// Output. This is the points in all the contours. This is a linear array, whose memory
+/// has to be allocated by the caller.
+/// Typical allocation size: pointArraySize.
+/// pointsArray[0...numPointsInContour[0]-1] defines the first MSER region,
+/// pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region
+/// and so on.
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvMseru8( void *mserHandle,
+ const uint8_t* __restrict srcPtr,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ unsigned int maxContours,
+ unsigned int * __restrict numContours,
+ unsigned int * __restrict numPointsInContour,
+ unsigned int pointsArraySize,
+ unsigned int * __restrict pointsArray);
+
+///---------------------------------------------------------------------------
+/// @brief
+/// Function to invoke MSER, with additional outputs for each contour.
+/// Image width has to be greater than 50, and image height has to be greater than 5.
+/// Pixels at the image boundary are not processed. If boundary pixels are important
+/// for a particular application, please consider padding the input image with dummy
+/// pixels of one pixel wide.
+/// Here is the typical usage:
+/// void *mserHandle;
+/// if (fcvMserInit (width,........,&mserHandle))
+/// {
+/// fcvMserExtu8 (mserHandle,...);
+/// fcvMserRelease(mserHandle);
+/// }
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMserExtu8_v2(). In the 2.0.0 release,
+/// fcvMserExtu8_v2 will be renamed to fcvMserExtu8.
+/// and the signature of fcvMserExtu8 as it appears now, will be removed.
+/// \n\n
+///
+/// @param mserHandle
+/// The MSER Handle returned by init.
+///
+/// @param srcPtr
+/// Pointer to an image array (unsigned char ) for which MSER has to be done.
+///
+/// @param srcWidth
+/// Width of the source image.
+/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserInit.
+///
+/// @param srcHeight
+/// Height of the source image.
+/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserInit.
+///
+/// @param srcStride
+/// Stride of the source image.
+///
+/// @param maxContours
+/// Maximum contours that will be returned.
+/// Application dependent. OCR usually requires 100-1000 contours.
+/// Segmentation usually requires 50-100
+///
+/// @param numContours
+/// Output, Number of MSER contours in the region.
+///
+/// @param numPointsInContour
+/// Output, Number of points in each contour. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller.
+///
+/// @param pointsArraySize
+/// Size of the output points Array.
+/// Typical size: (# of pixels in source image)*30
+///
+/// @param pointsArray
+/// Output. This is the points in all the contours. This is a linear array, whose memory
+/// has to be allocated by the caller.
+/// Typical allocation size: pointArraySize.
+/// pointsArray[0...numPointsInContour[0]-1] defines the first MSER region;
+/// pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region
+/// and so on.
+///
+/// @param contourVariation
+/// Output, Variation for each contour from previous grey level.
+/// This will have values filled up for the first (*numContours) values.
+/// This memory has to be allocated by the caller with size of maxContours.
+///
+/// @param contourPolarity
+/// Output, Polarity for each contour. This value is 1 if this is a MSER+ region,
+/// -1 if this is a MSER- region. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller with size of maxContours.
+///
+/// @param contourNodeId
+/// Output, Node id for each contour. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller with size of maxContours
+///
+/// @param contourNodeCounter
+/// Output, Node counter for each contour. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller with size of maxContours.
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvMserExtu8( void *mserHandle,
+ const uint8_t* __restrict srcPtr,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ unsigned int maxContours,
+ unsigned int * __restrict numContours,
+ unsigned int * __restrict numPointsInContour,
+ unsigned int * __restrict pointsArray,
+ unsigned int pointsArraySize,
+ unsigned int * __restrict contourVariation,
+ int * __restrict contourPolarity,
+ unsigned int * __restrict contourNodeId,
+ unsigned int * __restrict contourNodeCounter);
+
+///---------------------------------------------------------------------------
+/// @brief
+/// Function to invoke MSER with a smaller memory footprint and the (optional) output of contour bound boxes.
+/// Image width has to be greater than 50, and image height has to be greater than 5.
+/// Pixels at the image boundary are not processed. If boundary pixels are important
+/// for a particular application, please consider padding the input image with dummy
+/// pixels of one pixel wide.
+/// Here is the typical usage:
+/// void *mserHandle;
+/// if (fcvMserInit (width,........,&mserHandle))
+/// {
+/// if ( !fcvMseru8_v2 (mserHandle,...) )
+/// {
+/// // Error handle
+/// }
+/// fcvMserRelease(mserHandle);
+/// }
+///
+/// @param mserHandle
+/// The MSER Handle returned by init.
+///
+/// @param srcPtr
+/// Pointer to an image array (unsigned char ) for which MSER has to be done.
+///
+/// @param srcWidth
+/// Width of the source image.
+/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserInit.
+///
+/// @param srcHeight
+/// Height of the source image.
+/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserInit.
+///
+/// @param srcStride
+/// Stride of the source image.
+///
+/// @param maxContours
+/// Maximum contours that will be returned.
+///
+/// @param numContours
+/// Output, Number of MSER contours in the region.
+///
+/// @param recArray
+/// Output, This is the bounding rectangle info for each contour.
+/// If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours.
+/// Typical allocation size: 4*maxContours.
+/// rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour,
+/// rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
+///
+/// @param numPointsInContour
+/// Output, Number of points in each contour. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller.
+///
+/// @param pointsArraySize
+/// Size of the output points Array.
+/// Typical size: (# of pixels in source image) * 30
+///
+/// @param pointsArray
+/// Output. This is the points in all the contours. This is a linear array, whose memory
+/// has to be allocated by the caller.
+/// Typical allocation size: pointArraySize.
+/// pointsArray[0...numPointsInContour[0]-1] defines the first MSER region,
+/// pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region
+/// and so on.
+///
+/// @return
+/// 1 if successful.
+/// 0 if failure, e.g., to indicate detected contours are greater than maxContours.
+/// In that case, please consider increasing maxContours.
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+FASTCV_API int
+fcvMseru8_v2( void *mserHandle,
+ const uint8_t* __restrict srcPtr,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t maxContours,
+ uint32_t* __restrict numContours,
+ uint16_t* __restrict recArray,
+ uint32_t* __restrict numPointsInContour,
+ uint32_t pointsArraySize,
+ uint16_t* __restrict pointsArray);
+
+///---------------------------------------------------------------------------
+/// @brief
+/// Function to invoke MSER with a smaller memory footprint,
+/// the (optional) output of contour bound boxes, and additional information.
+/// Image width has to be greater than 50, and image height has to be greater than 5.
+/// Pixels at the image boundary are not processed. If boundary pixels are important
+/// for a particular application, please consider padding the input image with dummy
+/// pixels of one pixel wide.
+/// Here is the typical usage:
+/// void *mserHandle;
+/// if (fcvMserInit (width,........,&mserHandle))
+/// {
+/// if ( !fcvMserExtu8_v2 (mserHandle,...) )
+/// {
+/// // Error handle
+/// }
+/// fcvMserRelease(mserHandle);
+/// }
+///
+/// @param mserHandle
+/// The MSER Handle returned by init.
+///
+/// @param srcPtr
+/// Pointer to an image array (unsigned char ) for which MSER has to be done.
+///
+/// @param srcWidth
+/// Width of the source image.
+/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserInit.
+///
+/// @param srcHeight
+/// Height of the source image.
+/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserInit.
+///
+/// @param srcStride
+/// Stride of the source image.
+///
+/// @param maxContours
+/// Maximum contours that will be returned.
+///
+/// @param numContours
+/// Output, Number of MSER contours in the region.
+///
+/// @param recArray
+/// Output, This is the bounding rectangle info for each contour.
+/// If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours.
+/// Typical allocation size: 4*maxContours.
+/// rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour,
+/// rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
+///
+/// @param numPointsInContour
+/// Output, Number of points in each contour. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller.
+///
+/// @param pointsArraySize
+/// Size of the output points Array.
+/// Typical size: (# of pixels in source image) * 30
+///
+/// @param pointsArray
+/// Output. This is the points in all the contours. This is a linear array, whose memory
+/// has to be allocated by the caller.
+/// Typical allocation size: pointArraySize.
+/// pointsArray[0...numPointsInContour[0]-1] defines the first MSER region,
+/// pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region
+/// and so on.
+///
+/// @param contourVariation
+/// Output, Variation for each contour from previous grey level.
+/// This will have values filled up for the first (*numContours) values.
+/// This memory has to be allocated by the caller with size of maxContours.
+///
+/// @param contourPolarity
+/// Output, Polarity for each contour. This value is 1 if this is a MSER+ region,
+/// -1 if this is a MSER- region. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller with size of maxContours.
+///
+/// @param contourNodeId
+/// Output, Node id for each contour. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller with size of maxContours
+///
+/// @param contourNodeCounter
+/// Output, Node counter for each contour. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller with size of maxContours.
+///
+/// @return
+/// 1 if successful.
+/// 0 if failure, e.g., to indicate detected contours are greater than maxContours.
+/// In that case, please consider increasing maxContours.
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+FASTCV_API int
+fcvMserExtu8_v2( void *mserHandle,
+ const uint8_t* __restrict srcPtr,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t maxContours,
+ uint32_t* __restrict numContours,
+ uint16_t* __restrict recArray,
+ uint32_t* __restrict numPointsInContour,
+ uint32_t pointsArraySize,
+ uint16_t* __restrict pointsArray,
+ uint32_t* __restrict contourVariation,
+ int8_t* __restrict contourPolarity,
+ uint32_t* __restrict contourNodeId,
+ uint32_t* __restrict contourNodeCounter);
+
+///---------------------------------------------------------------------------
+/// @brief
+/// Function to invoke MSER with a smaller memory footprint,
+/// the (optional) output of contour bound boxes, and additional information.
+/// Image width has to be greater than 50, and image height has to be greater than 5.
+/// Pixels at the image boundary are not processed. If boundary pixels are important
+/// for a particular application, please consider padding the input image with dummy
+/// pixels of one pixel wide.
+/// Here is the typical usage:
+/// void *mserHandle;
+/// if (fcvMserInit (width,........,&mserHandle))
+/// {
+/// if ( !fcvMserExtu8_v3 (mserHandle,...) )
+/// {
+/// // Error handle
+/// }
+/// fcvMserRelease(mserHandle);
+/// }
+///
+/// @param mserHandle
+/// The MSER Handle returned by init.
+///
+/// @param srcPtr
+/// Pointer to an image array (unsigned char ) for which MSER has to be done.
+///
+/// @param srcWidth
+/// Width of the source image.
+/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserInit.
+///
+/// @param srcHeight
+/// Height of the source image.
+/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserInit.
+///
+/// @param srcStride
+/// Stride of the source image.
+///
+/// @param maxContours
+/// Maximum contours that will be returned.
+///
+/// @param numContours
+/// Output, Number of MSER contours in the region.
+///
+/// @param recArray
+/// Output, This is the bounding rectangle info for each contour.
+/// If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours.
+/// Typical allocation size: 4*maxContours.
+/// rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour,
+/// rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
+///
+/// @param staPointsInPath
+/// Output. Return the index of contour starting points in pathArray.
+/// This memory has to be allocated by the caller. The allocated size should be maxContours*sizeof(uint32_t).
+///
+/// @param numPointsInContour
+/// Output, Number of points in each contour. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller.
+///
+/// @param pathArraySize
+/// Input. The size of output pathArray in terms of how many uint16_t numbers. Must be srcWidth*srcHeight*4.
+/// Note: this parameter is not measured in terms of bytes.
+///
+/// @param pathArray
+/// Output. This is the compressed representation of points in all the contours. This is a linear array, whose memory
+/// has to be allocated by the caller.
+/// Typical allocation size: pathArraySize*sizeof(uint16_t).
+/// For example:
+/// pathArray[ staPointsInPath[0] ] : x coord of the FIRST point in the FIRST mser region.
+/// pathArray[ staPointsInPath[0] + 1 ] : y coord of the FIRST point in the FIRST mser region.
+/// pathArray[ staPointsInPath[0] + 2 ] : x coord of the SECOND point in the FIRST mser region.
+/// pathArray[ staPointsInPath[0] + 3 ] : y coord of the SECOND point in the FIRST mser region.
+/// . . .
+/// pathArray[ staPointsInPath[0] + 2*numPointsInContour[0] - 2 ] : x coord of the LAST point in the FIRST mser region.
+/// pathArray[ staPointsInPath[0] + 2*numPointsInContour[0] - 1 ] : y coord of the LAST point in the FIRST mser region.
+/// and
+/// pathArray[ staPointsInPath[1] ] : x coord of the FIRST point in the SECOND mser region.
+/// pathArray[ staPointsInPath[1] + 1 ] : y coord of the FIRST point in the SECOND mser region.
+/// pathArray[ staPointsInPath[1] + 2 ] : x coord of the SECOND point in the SECOND mser region.
+/// pathArray[ staPointsInPath[1] + 3 ] : y coord of the SECOND point in the SECOND mser region.
+/// . . .
+/// pathArray[ staPointsInPath[1] + 2*numPointsInContour[1] - 2 ] : x coord of the LAST point in the SECOND mser region.
+/// pathArray[ staPointsInPath[1] + 2*numPointsInContour[1] - 1 ] : y coord of the LAST point in the SECOND mser region.
+/// . . .
+///
+/// @param contourVariation
+/// Output, Variation for each contour from previous grey level.
+/// This will have values filled up for the first (*numContours) values.
+/// This memory has to be allocated by the caller with size of maxContours.
+///
+/// @param contourPolarity
+/// Output, Polarity for each contour. This value is 1 if this is a MSER+ region,
+/// -1 if this is a MSER- region. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller with size of maxContours.
+///
+/// @param contourNodeId
+/// Output, Node id for each contour. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller with size of maxContours
+///
+/// @param contourNodeCounter
+/// Output, Node counter for each contour. This will have values filled up
+/// for the first (*numContours) values. This memory has to be allocated by
+/// the caller with size of maxContours.
+///
+/// @return
+/// 1 if successful.
+/// 0 if failure, e.g., to indicate detected contours are greater than maxContours.
+/// In that case, please consider increasing maxContours.
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+FASTCV_API int
+fcvMserExtu8_v3( void *mserHandle,
+ const uint8_t* __restrict srcPtr,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t maxContours,
+ uint32_t* __restrict numContours,
+ uint16_t* __restrict recArray,
+ uint32_t* __restrict staPointsInPath,
+ uint32_t* __restrict numPointsInContour,
+ uint32_t pathArraySize,
+ uint16_t* __restrict pathArray,
+ uint32_t* __restrict contourVariation,
+ int8_t* __restrict contourPolarity,
+ uint32_t* __restrict contourNodeId,
+ uint32_t* __restrict contourNodeCounter);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Function to initialize 8-neighbor MSER. To invoke 8-neighbor MSER functionality, 3 functions have to be called:
+/// fcvMserNN8Init, fcvMserNN8u8, fcvMserRelease.
+/// Image width has to be greater than 50, and image height has to be greater than 5.
+/// Pixels at the image boundary are not processed. If boundary pixels are important
+/// for a particular application, please consider padding the input image with dummy
+/// pixels of one pixel wide.
+/// Here is the typical usage:
+/// void *mserHandle;
+/// if (fcvMserNN8Init (width,........,&mserHandle))
+/// {
+/// if ( !fcvMserNN8u8 (mserHandle,...) )
+/// {
+/// // Error handle
+/// }
+/// fcvMserRelease(mserHandle);
+/// }
+///
+/// @param width
+/// Width of the image for which MSER has to be done.
+///
+/// @param height
+/// Height of the image for which MSER has to be done.
+///
+/// @param delta
+/// Delta to be used in MSER algorithm (the difference in grayscale values
+/// within which the region is stable ).
+/// Typical value range [0.8 8], typical value 2
+///
+/// @param minArea
+/// Minimum area (number of pixels) of a mser contour.
+/// Typical value range [10 50], typical value 30
+///
+/// @param maxArea
+/// Maximum area (number of pixels) of a mser contour.
+/// Typical value 14400 or 0.25*width*height
+///
+/// @param maxVariation
+/// Maximum variation in grayscale between 2 levels allowed.
+/// Typical value range [0.1 1.0], typical value 0.15
+///
+/// @param minDiversity
+/// Minimum diversity in grayscale between 2 levels allowed.
+/// Typical value range [0.1 1.0], typical value 0.2
+///
+/// @param mserHandle
+/// Output. the mserHandle to be used in subsequent calls.
+///
+/// @return
+/// 1 if successful.
+/// 0 if unsuccessful, mserHandle is invalid.
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+FASTCV_API int
+fcvMserNN8Init(const uint32_t width,
+ const uint32_t height,
+ uint32_t delta,
+ uint32_t minArea ,
+ uint32_t maxArea ,
+ float32_t maxVariation ,
+ float32_t minDiversity ,
+ void **mserHandle );
+
+///---------------------------------------------------------------------------
+/// @brief
+/// Function to invoke 8-neighbor MSER.
+/// Image width has to be greater than 50, and image height has to be greater than 5.
+/// Pixels at the image boundary are not processed. If boundary pixels are important
+/// for a particular application, please consider padding the input image with dummy
+/// pixels of one pixel wide.
+/// Here is the typical usage:
+/// void *mserHandle;
+/// if (fcvMserNN8Init (width,........,&mserHandle))
+/// {
+/// if ( !fcvMserNN8u8 (mserHandle,...) )
+/// {
+/// // Error handle
+/// }
+/// fcvMserRelease(mserHandle);
+/// }
+///
+/// @param mserHandle
+/// The MSER Handle returned by init.
+///
+/// @param srcPtr
+/// Pointer to an image array (unsigned char ) for which MSER has to be done.
+///
+/// @param srcWidth
+/// Width of the source image.
+/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserNN8Init.
+///
+/// @param srcHeight
+/// Height of the source image.
+/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserNN8Init.
+///
+/// @param srcStride
+/// Stride of the source image.
+///
+/// @param maxContours
+/// Maximum contours that will be returned.
+///
+/// @param numContours
+/// Output, Number of MSER contours in the region.
+///
+/// @param recArray
+/// Output, This is the bounding rectangle info for each contour.
+/// If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours.
+/// Typical allocation size: 4*maxContours.
+/// rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour,
+/// rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
+///
+/// @param numPointsInContour
+/// Output, Number of points in each contour. This will have values filled up for the
+/// first (*numContours) values. This memory has to be allocated by the caller.
+///
+/// @param pointsArraySize
+/// Size of the output points Array.
+/// Typical size: (# of pixels in source image) * 30
+///
+/// @param pointsArray
+/// Output. This is the points in all the contours. This is a linear array, whose memory
+/// has to be allocated by the caller.
+/// Typical allocation size: pointArraySize.
+/// pointsArray[0...numPointsInContour[0]-1] defines the first MSER region,
+/// pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region
+/// and so on.
+///
+/// @return
+/// 1 if successful.
+/// 0 if failure, e.g., to indicate detected contours are greater than maxContours.
+/// In that case, please consider increasing maxContours.
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+FASTCV_API int
+fcvMserNN8u8 ( void *mserHandle,
+ const uint8_t* __restrict srcPtr,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t maxContours,
+ uint32_t* __restrict numContours,
+ uint16_t* __restrict recArray,
+ uint32_t* __restrict numPointsInContour,
+ uint32_t pointsArraySize,
+ uint16_t* __restrict pointsArray);
+
+///---------------------------------------------------------------------------
+/// @brief
+/// Function to invoke 8-neighbor MSER, , with additional outputs for each contour.
+/// Image width has to be greater than 50, and image height has to be greater than 5.
+/// Pixels at the image boundary are not processed. If boundary pixels are important
+/// for a particular application, please consider padding the input image with dummy
+/// pixels of one pixel wide.
+/// Here is the typical usage:
+/// void *mserHandle;
+/// if (fcvMserNN8Init (width,........,&mserHandle))
+/// {
+/// if ( !fcvMserExtNN8u8 (mserHandle,...) )
+/// {
+/// // Error handle
+/// }
+/// fcvMserRelease(mserHandle);
+/// }
+///
+/// @param mserHandle
+/// The MSER Handle returned by init.
+///
+/// @param srcPtr
+/// Pointer to an image array (unsigned char ) for which MSER has to be done.
+///
+/// @param srcWidth
+/// Width of the source image.
+/// \n\b NOTE: srcWidth must be <= the width passed to fcvMserNN8Init.
+///
+/// @param srcHeight
+/// Height of the source image.
+/// \n\b NOTE: srcHeight must be <= the height passed to fcvMserNN8Init.
+///
+/// @param srcStride
+/// Stride of the source image.
+///
+/// @param maxContours
+/// Maximum contours that will be returned.
+///
+/// @param numContours
+/// Output, Number of MSER contours in the region.
+///
+/// @param recArray
+/// Output, This is the bounding rectangle info for each contour.
+/// If recArray is specified as NULL, MSER will skip finding the bounding rectangles of the contours.
+/// Typical allocation size: 4*maxContours.
+/// rectArray[0..3] defines the xMin, xMax, yMax, yMin positions of the first MSER contour,
+/// rectArray[4..7] defines the xMin, xMax, yMax, yMin positions of the second MSER contour, and so on.
+///
+/// @return
+/// 1 if successful.
+/// 0 if failure, e.g., to indicate detected contours are greater than maxContours.
+/// In that case, please consider increasing maxContours.
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+FASTCV_API int
+fcvMserExtNN8u8(void *mserHandle,
+ const uint8_t* __restrict srcPtr,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t maxContours,
+ uint32_t* __restrict numContours,
+ uint16_t* __restrict recArray,
+ uint32_t* __restrict numPointsInContour,
+ uint32_t pointsArraySize,
+ uint16_t* __restrict pointsArray,
+ uint32_t* __restrict contourVariation,
+ int8_t* __restrict contourPolarity,
+ uint32_t* __restrict contourNodeId,
+ uint32_t* __restrict contourNodeCounter);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Creates 2D gradient from source illuminance data.
+/// This function considers only the left/right neighbors
+/// for x-gradients and top/bottom neighbors for y-gradients.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageGradientInterleavedf32_v2(). In the 2.0.0 release,
+/// fcvImageGradientInterleavedf32_v2 will be renamed to fcvImageGradientInterleavedf32
+/// and the signature of fcvImageGradientInterleavedf32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param gradients
+/// Buffer to store gradient. Must be 2*(width-1)*(height-1) in size.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientInterleavedf32( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ float* __restrict gradients );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Creates 2D gradient from source illuminance data.
+/// This function considers only the left/right neighbors
+/// for x-gradients and top/bottom neighbors for y-gradients.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvImageGradientInterleavedf32() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvImageGradientInterleavedf32,
+/// \a fcvImageGradientInterleavedf32_v2 will be removed, and the current signature
+/// for \a fcvImageGradientInterleavedf32 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvImageGradientInterleavedf32 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param gradients
+/// Buffer to store gradient. Must be 2*(width-1)*(height-1) in size.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param gradStride
+/// Stride (in bytes) of the interleaved gradients array.
+/// \n\b NOTE: if 0, srcStride is set as (srcWidth-2)*2*sizeof(float).
+/// \n\b WARNING: should be multiple of 32 ( 8 * 4-byte values ), and at least as much as 8 * srcWidth if not 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientInterleavedf32_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ float* __restrict gradients,
+ unsigned int gradStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Creates 2D gradient from source illuminance data.
+/// This function considers only the left/right neighbors
+/// for x-gradients and top/bottom neighbors for y-gradients.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageGradientPlanars16_v2(). In the 2.0.0 release,
+/// fcvImageGradientPlanars16_v2 will be renamed to fcvImageGradientPlanars16
+/// and the signature of fcvImageGradientPlanars16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (srcWidth)*(srcHeight) in size.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (srcWidth)*(srcHeight) in size.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientPlanars16( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict dx,
+ int16_t* __restrict dy );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Creates 2D gradient from source illuminance data.
+/// This function considers only the left/right neighbors
+/// for x-gradients and top/bottom neighbors for y-gradients.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvImageGradientPlanars16() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvImageGradientPlanars16,
+/// \a fcvImageGradientPlanars16_v2 will be removed, and the current signature
+/// for \a fcvImageGradientPlanars16 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvImageGradientPlanars16 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (srcWidth)*(srcHeight) in size.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (srcWidth)*(srcHeight) in size.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dxyStride
+/// Stride (in bytes) of 'dx' and 'dy' arrays.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 16 (8 * 2-bytes per gradient value), and at least as much as srcWidth if not 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientPlanars16_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict dx,
+ int16_t* __restrict dy,
+ unsigned int dxyStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Creates 2D gradient from source illuminance data.
+/// This function considers only the left/right neighbors
+/// for x-gradients and top/bottom neighbors for y-gradients.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageGradientPlanarf32_v2(). In the 2.0.0 release,
+/// fcvImageGradientPlanarf32_v2 will be renamed to fcvImageGradientPlanarf32
+/// and the signature of fcvImageGradientPlanarf32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (width)*(height) in size.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (width)*(height) in size.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientPlanarf32( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ float* __restrict dx,
+ float* __restrict dy );
+
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Creates 2D gradient from source illuminance data.
+/// This function considers only the left/right neighbors
+/// for x-gradients and top/bottom neighbors for y-gradients.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvImageGradientPlanarf32() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvImageGradientPlanarf32,
+/// \a fcvImageGradientPlanarf32_v2 will be removed, and the current signature
+/// for \a fcvImageGradientPlanarf32 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvImageGradientPlanarf32 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (srcWidth)*(srcHeight) in size.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (srcWidth)*(srcHeight) in size.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dxyStride
+/// Stride of Gradient values ('dx' and 'dy' arrays) measured in bytes.
+/// \n\b NOTE: if 0, srcStride is set as 4*srcWidth.
+/// \n\b WARNING: should be multiple of 32 (8 * 4-bytes per gradient value), and at least as much as 4*srcWidth if not 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientPlanarf32_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ float* __restrict dx,
+ float* __restrict dy,
+ unsigned int dxyStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Extracts FAST corners from the image. This function tests the whole image
+/// for corners (apart from the border). FAST-9 looks for continuous segments on the
+/// pixel ring of 9 pixels or more.
+///
+/// @param src
+/// Pointer to grayscale image with one byte per pixel
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width
+/// \n\b WARNING: should be a multiple of 8.
+/// \n\b WARNING: must be <= 2048.
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2). If 0 is passed, srcStride is set to width.
+/// \n\b WARNING: should be a multiple of 8.
+///
+/// @param barrier
+/// FAST threshold. The threshold is used to compare difference between intensity value of
+/// the central pixel and pixels on a circle surrounding this pixel.
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+/// \n\b WARNING: If border < 3, it will be default to 3.
+/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
+///
+/// @param xy
+/// pointer to the output array containing the interleaved x,y position of the
+/// detected corners
+/// \n e.g. struct { int x, y; } xy;
+/// \n\b WARNING: should be 128-bit aligned.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exits when the maximum number of
+/// corners is exceeded
+///
+/// @param nCorners
+/// pointer to an integer storing the number of corners detected
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerFast9u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int barrier,
+ unsigned int border,
+ uint32_t* __restrict xy,
+ unsigned int nCornersMax,
+ uint32_t* __restrict nCorners );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Extracts FAST corners from the image. This function takes a bit mask so
+/// that only image areas masked with '0' are tested for corners (if these
+/// areas are also not part of the border). FAST-9 looks for continuous segments on the
+/// pixel ring of 9 pixels or more.
+///
+/// @param src
+/// pointer to grayscale image with one byte per pixel
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// image width
+/// \n\b WARNING: must be <= 2048.
+/// \n\b WARNING: should be a multiple of 8.
+///
+/// @param srcHeight
+/// image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b WARNING: should be a multiple of 8. If left at 0 srcStride is default to srcWidth.
+///
+/// @param barrier
+/// FAST threshold. The threshold is used to compare difference between intensity value of
+/// the central pixel and pixels on a circle surrounding this pixel.
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+/// \n\b WARNING: If border < 3, it will be default to 3.
+/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
+///
+/// @param xy
+/// pointer to the output array containing the interleaved x,y position of the
+/// detected corners
+/// \n\b WARNING: should be 128-bit aligned.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exits when the maximum number of corners
+/// is exceeded
+///
+/// @param nCorners
+/// pointer to an integer storing the number of corners detected
+///
+/// @param mask
+/// Per-pixel mask for each pixel represented in input image.
+/// If a bit set to 0, pixel will be a candidate for corner detection.
+/// If a bit set to 1, pixel will be ignored.
+///
+/// @param maskWidth
+/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
+/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
+///
+/// @param maskHeight
+/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
+/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerFast9InMasku8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int barrier,
+ unsigned int border,
+ uint32_t* __restrict xy,
+ unsigned int nCornersMax,
+ uint32_t* __restrict nCorners,
+ const uint8_t* __restrict mask,
+ unsigned int maskWidth,
+ unsigned int maskHeight );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Extracts FAST corners from the image. This function tests the whole image
+/// for corners (apart from the border). FAST-10 looks for continuous segments on the
+/// pixel ring of 10 pixels or more.
+///
+/// @param src
+/// Pointer to grayscale image with one byte per pixel
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width
+/// \n\b WARNING: should be a multiple of 8.
+/// \n\b WARNING: must be <= 2048.
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2). If 0 is passed, srcStride is set to width.
+///
+/// @param barrier
+/// FAST threshold. The threshold is used to compare difference between intensity value of
+/// the central pixel and pixels on a circle surrounding this pixel.
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+/// \n\b WARNING: If border < 3, it will be default to 3.
+/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
+///
+/// @param xy
+/// pointer to the output array containing the interleaved x,y position of the
+/// detected corners
+/// \n e.g. struct { int x, y; } xy;
+/// \n\b WARNING: should be 128-bit aligned.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exists when the maximum number of
+/// corners is exceeded
+///
+/// @param nCorners
+/// pointer to an integer storing the number of corners detected
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerFast10u8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int32_t barrier,
+ uint32_t border,
+ uint32_t* __restrict xy,
+ uint32_t nCornersMax,
+ uint32_t* __restrict nCorners);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Extracts FAST corners from the image. This function takes a bit mask so
+/// that only image areas masked with '0' are tested for corners (if these
+/// areas are also not part of the border). FAST-10 looks for continuous segments on the
+/// pixel ring of 10 pixels or more.
+///
+/// @param src
+/// pointer to grayscale image with one byte per pixel
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// image width
+/// \n\b WARNING: must be <= 2048.
+/// \n\b WARNING: should be a multiple of 8.
+///
+/// @param srcHeight
+/// image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param barrier
+/// FAST threshold. The threshold is used to compare difference between intensity value of
+/// the central pixel and pixels on a circle surrounding this pixel.
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+/// \n\b WARNING: If border < 3, it will be default to 3.
+/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
+///
+/// @param xy
+/// pointer to the output array containing the interleaved x,y position of the
+/// detected corners
+/// \n\b WARNING: should be 128-bit aligned.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exists when the maximum number of corners
+/// is exceeded
+///
+/// @param nCorners
+/// pointer to an integer storing the number of corners detected
+///
+/// @param mask
+/// Per-pixel mask for each pixel represented in input image.
+/// If a bit set to 0, pixel will be a candidate for corner detection.
+/// If a bit set to 1, pixel will be ignored.
+///
+/// @param maskWidth
+/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
+/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
+///
+/// @param maskHeight
+/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
+/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerFast10InMasku8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int32_t barrier,
+ uint32_t border,
+ uint32_t* __restrict xy,
+ uint32_t nCornersMax,
+ uint32_t* __restrict nCorners,
+ const uint8_t* __restrict mask,
+ uint32_t maskWidth,
+ uint32_t maskHeight );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Extracts Harris corners from the image. This function tests the whole
+/// image for corners (apart from the border).
+///
+/// @param src
+/// Pointer to grayscale image with one byte per pixel
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width
+/// \n\b WARNING: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+///
+/// @param xy
+/// pointer to the output array containing the interleaved x,y position of the
+/// detected corners
+/// \n\b WARNING: should be 128-bit aligned.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exits when the maximum number of
+/// corners is exceeded
+///
+/// @param nCorners
+/// pointer to an integer storing the number of corners detected
+///
+/// @param threshold
+/// Minimum "Harris Score" or "Harris Corner Response" of a pixel for it to be
+/// regarded as a corner.
+///
+/// @return
+/// 0 if successful.
+///
+///
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerHarrisu8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ unsigned int border,
+ uint32_t* __restrict xy,
+ unsigned int nCornersMax,
+ uint32_t* __restrict nCorners,
+ int threshold );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Local Harris Max applies the Harris Corner algorithm on an 11x11 patch
+/// within an image to determine if a corner is present.
+///
+/// @param src
+/// Pointer to grayscale image with one byte per pixel
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width
+/// \n\b WARNING: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2). If srcStride == 0, then will use srcWidth.
+///
+/// @param posX
+/// Center X coordinate of the search window
+///
+/// @param posY
+/// Center Y coordinate of the search window
+///
+/// @param maxX
+/// pointer to the X coordinate identified as a corner
+///
+/// @param maxY
+/// pointer to the Y coordinate identified as a corner
+///
+/// @param maxScore
+/// pointer to the Harris score associated with the corner
+///
+/// @return
+/// 0 if no corner is found (maxX, maxY, and maxScore are invalid)
+/// or if posX and/or posY position the patch outside of the range of
+/// the source image.
+/// 1 if a corner is found (maxX, maxY, and maxScore are valid)
+///
+///
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API unsigned int
+fcvLocalHarrisMaxu8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ unsigned int posX,
+ unsigned int posY,
+ unsigned int *maxX,
+ unsigned int *maxY,
+ int *maxScore);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Extracts Harris corners from the image. This function takes a bit mask so
+/// that only image areas masked with '0' are tested for corners (if these
+/// areas are also not part of the border).
+///
+/// @param src
+/// pointer to grayscale image with one byte per pixel
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// image width
+/// \n\b WARNING: should be a multiple of 8.
+///
+/// @param srcHeight
+/// image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+///
+/// @param xy
+/// pointer to the output array containing the interleaved x,y position of the
+/// detected corners
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exits when the maximum number of corners
+/// is exceeded
+///
+/// @param nCorners
+/// pointer to an integer storing the number of corners detected
+///
+/// @param threshold
+/// Minimum "Harris Score" or "Harris Corner Respose" of a pixel for it to be
+/// regarded as a corner.
+///
+/// @param mask
+/// Per-pixel mask for each pixel represented in input image.
+/// If a bit set to 0, pixel will be a candidate for corner detection.
+/// If a bit set to 1, pixel will be ignored.
+///
+/// @param maskWidth
+/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
+/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
+///
+/// @param maskHeight
+/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
+/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
+///
+/// @return
+/// 0 if successful.
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerHarrisInMasku8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ unsigned int border,
+ uint32_t* __restrict xy,
+ unsigned int nCornersMax,
+ uint32_t* __restrict nCorners,
+ int threshold,
+ const uint8_t* __restrict mask,
+ unsigned int maskWidth,
+ unsigned int maskHeight );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Extracts Harris corners from the image. This function tests the whole
+/// image for corners (apart from the border). It is an improved version
+/// which is more robust to low contrast images.
+///
+/// @param src
+/// Pointer to grayscale image with one byte per pixel
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b WARNING: should be a multiple of 8.
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+///
+/// @param xy
+/// pointer to the output array containing the interleaved x,y position of the
+/// detected corners
+/// \n\b WARNING: should be 128-bit aligned.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exits when the maximum number of
+/// corners is exceeded
+///
+/// @param nCorners
+/// pointer to an integer storing the number of corners detected
+///
+/// @param threshold
+/// Minimum "Harris Score" or "Harris Corner Response" of a pixel for it to be
+/// regarded as a corner.
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerHarrisAdaptiveu8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t border,
+ float32_t* __restrict xy,
+ uint32_t nCornersMax,
+ uint32_t* __restrict nCorners,
+ int32_t threshold);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Extracts Harris corners from the image.
+/// \n\b ATTENTION: Compared to fcvCornerHarrisu8, this API gives more accurate results
+/// in exchange for slower execution time.\n\n
+///
+/// DO NOT USE THIS API unless for testing purposes.
+/// This API can be removed without notice.
+///
+/// @details
+/// This function extracts Harris Corner features from the image. The input is
+/// an unsigned 8 bit image. Based on the values of the kernel size, the block size,
+/// the sensitivity, the function generates a Harris Response map (Harris Score).
+/// This map is then thresholded using the threshold parameter to locate local maxima.
+/// Additionally, if the Non Maximum Suppression flag is enabled, the function performs
+/// non maximum suppression of the thresholded response using the min distance parameter
+/// to calculate the neighborhood.
+///
+/// @param src
+/// Input unsigned 8 bit image from which corner features are to be detected
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width
+///
+/// @param srcHeight
+/// Input Image height
+///
+/// @param srcStride
+/// Input image stride, i.e. the gap (in terms of bytes) between the first element
+/// of a row and that of the successive row. If srcStride is equal to 0,
+/// it will be set to srcWidth.
+/// \n\b NOTE: should be a multiple of 8
+///
+/// @param harrisResp
+/// The computed Harris Response Map of the image. If the @param normalizeResponse flag is set,
+/// then all values in the map are normalized between 0 and 255. If the @param normalizeResponse flag
+/// is not set, then the map is not normalized to this range.
+/// This buffer MUST be allocated as srcWidth*srcHeight*sizeof(float32_t).
+///
+/// @param respStride
+/// Harris response stride, i.e. the gap (in terms of bytes) between the first element
+/// of a row and that of the successive row. If respStride is equal to 0,
+/// it will be set to srcWidth * sizeof(float32_t).
+/// \n\b NOTE: should be a multiple of 8
+///
+/// @param xy
+/// pointer to the output array containing the interleaved x,y positions of the
+/// detected corners.
+/// \n\b WARNING: should be 128-bit aligned.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+///
+/// @param nCornersMax
+/// Maximum number of corners that should be detected. The function exits when the
+/// maximum number of corners is exceeded.
+/// \n\b NOTE: This number should account for the number of key points before non-maximum suppression.
+///
+/// @param nCorners
+/// pointer to an integer storing the number of corners detected
+///
+/// @param threshold
+/// Minimum "Harris Score" or "Harris Corner Response" of a pixel for it to be
+/// regarded as a corner. If the @param normalizeResponse flag is set, then this parameter MUST be a value between
+/// 0 and 255. If the @param normalizeResponse flag is not set, then this parameter can be any value in the range of
+/// int32_t. This parameter is used to threshold @param harrisResp to detect corner features.
+///
+/// @param sensitivity
+/// This parameter represents the sensitivity threshold from the Harris Stephens
+/// equation. Typical values are between 0.04 and 0.06
+///
+/// @param kernelSize
+/// Size of the Sobel Kernel used to compute the gradients from the input image
+/// MUST be 3,5 or 7.
+///
+/// @param blockSize
+/// Size of an average block for computing a derivative covariation matrix over each
+/// pixel neighborhood.
+///
+/// @param nmsEnabled
+/// A flag to enable or disable non maximum suppression. Set flag to 1 to enable it and
+/// 0 to disable.
+/// \n\b NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key
+/// points before NMS
+///
+/// @param minDistance
+/// The radial euclidean distance to perform non-maximum suppression.
+///
+/// @param normalizeResponse
+/// This parameter is a flag to enable or disable normalization of the harris response.
+/// If it is set, then it enables normalization of the response to the range between 0 and 255. If it
+/// is not set, then the response is NOT normalized to this range.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+FASTCV_API fcvStatus
+fcvCornerHarrisScoreu8(const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ float32_t* __restrict harrisResp,
+ uint32_t respStride,
+ uint32_t* __restrict xy,
+ uint32_t nCornersMax,
+ uint32_t* __restrict nCorners,
+ float32_t threshold,
+ float32_t sensitivity,
+ uint32_t kernelSize,
+ uint32_t blockSize,
+ uint32_t nmsEnabled,
+ float32_t minDistance,
+ uint32_t normalizeResponse);
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Computes affine trans. for a given set of corresponding features points
+/// using a linear least square colver based on Cholkesky decomposition.
+///
+/// @param corrs
+/// Correspondence data struct containing coords of points in two frames
+///
+/// @param affine
+/// 3 x 3 affine matrix (computed best fit affine transformation)
+///
+/// @ingroup 3D_reconstruction
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvGeomAffineFitf32( const fcvCorrespondences* __restrict corrs,
+ float* __restrict affine );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Evaluates specified affine transformation against provided points
+/// correspondences. Checks which correspondence members have a projection
+/// error that is smaller than the given one (maxSquErr).
+///
+/// @param corrs
+/// Pointer to correspondences structure.
+///
+/// @param affine
+/// Affine matrix representing relationship between ptTo and ptFrom
+/// correspondences stored as 3x3 floating point matrix formatted as
+/// @todo r0h0, r0h1
+/// Pointer storage must be at least a 9-element floating point array.
+///
+/// @param maxsqerr
+/// Maximum error value squared.
+///
+/// @param inliers
+/// Output array for those indices that passed the test - the array MUST
+/// be able to store numIndices items.
+///
+/// @param numinliers
+/// Output number of corrs that passed the test.
+///
+/// @return
+/// 0 if successfull
+/// -1 if error value square is >= maxsqerr
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvGeomAffineEvaluatef32( const fcvCorrespondences* __restrict corrs,
+ float* __restrict affine,
+ float maxsqerr,
+ uint16_t* __restrict inliers,
+ int32_t* numinliers );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Performs cholesky homography fitting on specified points correspondences.
+/// \n
+/// \n [x_to] [ a11 a12 a13 ] [ x_from ]
+/// \n [y_to] = [ a21 a22 a23 ] * [ y_from ]
+/// \n [ 1 ] [ a31 a32 a33 ] [ 1 ]
+/// \n note that all the correspondences are considered, if correspondence pairs
+/// are smaller than 4, the API returns. If correspondence pairs are larger than
+/// 4, the API takes all the correspondences into consideration using least
+/// squared method.
+///
+/// @details
+/// Output precision is within 3e-3
+///
+/// @param corrs
+/// Pointer to correspondences structure.
+///
+/// @param homography
+/// 3x3 floating point matrix formatted as @todo r0h0, r0h1
+/// Pointer storage must be at least a 9-element floating point array.
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvGeomHomographyFitf32( const fcvCorrespondences* __restrict corrs,
+ float* __restrict homography );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Evaluates specified homography against provided points correspondences.
+/// Check which correspondence members have a projection error that is
+/// smaller than the given one (maxSquErr).
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvGeomHomographyEvaluatef32_v2(). In the 2.0.0 release,
+/// fcvGeomHomographyEvaluatef32_v2 will be renamed to fcvGeomHomographyEvaluatef32
+/// and the signature of fcvGeomHomographyEvaluatef32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param corrs
+/// Pointer to correspondences structure.
+///
+/// @param homography
+/// Homography representing relationship between ptTo and ptFrom
+/// correspondences stored as 3x3 floating point matrix formatted as
+/// @todo r0h0, r0h1
+/// Pointer storage must be at least a 9-element floating point array.
+///
+/// @param maxsqerr
+/// Maximum error value squared.
+///
+/// @param inliers
+/// Output array for those indices that passed the test - the array MUST
+/// be able to store numIndices items.
+///
+/// @param numinliers
+/// Output number of corrs that passed the test.
+///
+/// @return
+/// 0 that error is less than maximum error, -1 greater or equal to maximum
+/// error.
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvGeomHomographyEvaluatef32( const fcvCorrespondences* __restrict corrs,
+ float* __restrict homography,
+ float maxsqerr,
+ uint16_t* __restrict inliers,
+ int32_t* numinliers );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Evaluates specified homography against provided points correspondences.
+/// Check which correspondence members have a projection error that is
+/// smaller than the given one (maxSquErr).
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvGeomHomographyEvaluatef32() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvGeomHomographyEvaluatef32,
+/// \a fcvGeomHomographyEvaluatef32_v2 will be removed, and the current signature
+/// for \a fcvGeomHomographyEvaluatef32 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvGeomHomographyEvaluatef32 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param corrs
+/// Pointer to correspondences structure.
+///
+/// @param homography
+/// Homography representing relationship between ptTo and ptFrom
+/// correspondences stored as 3x3 floating point matrix formatted as
+/// @todo r0h0, r0h1
+/// Pointer storage must be at least a 9-element floating point array.
+///
+/// @param maxsqerr
+/// Maximum error value squared.
+///
+/// @param inliers
+/// Output array for those indices that passed the test - the array MUST
+/// be able to store numIndices items.
+///
+/// @param errinliers
+/// Output array for the error of indices of correspondences that passed
+/// the test.
+///
+/// @param numinliers
+/// Output number of corrs that passed the test.
+///
+/// @return
+/// 0 that error is less than maximum error, -1 greater or equal to maximum
+/// error.
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvGeomHomographyEvaluatef32_v2( const fcvCorrespondences* __restrict corrs,
+ float32_t* __restrict homography,
+ float32_t maxsqerr,
+ uint16_t* __restrict inliers,
+ float32_t*__restrict errinliers,
+ int32_t* numinliers );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Performs cholesky pose fitting on specified points correspondences.
+/// Takes a pose and uses the correspondences to refine it using iterative
+/// Gauss-Newton optimization.
+///
+/// @param corrs
+/// Pointer to correspondences structure.
+///
+/// @param minIterations
+/// Minimum number of iterations to refine.
+///
+/// @param maxIterations
+/// Maximum number of iterations to refine.
+///
+/// @param stopCriteria
+/// Improvement threshold, iterations stop if improvement is less than this
+/// value.
+///
+/// @param initpose
+/// Pose representing initial pose
+/// correspondences stored as a
+/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
+/// matrix and t is the translation vector. The matrix stored in pose is row
+/// major ordering: \n
+/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
+/// matrix is: \n
+/// | a11, a12, a13 , a14|\n
+/// | a21, a22, a23, a24 |\n
+/// | a31, a32, a33, a34 |\n
+/// Pointer storage must be at least a 12-element floating point array.
+///
+/// @param refinedpose
+/// Pose representing refined pose
+/// correspondences stored as a
+/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
+/// matrix and t is the translation vector. The matrix stored in pose is row
+/// major ordering: \n
+/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
+/// matrix is: \n
+/// | a11, a12, a13 , a14|\n
+/// | a21, a22, a23, a24 |\n
+/// | a31, a32, a33, a34 |\n
+/// Pointer storage must be at least a 12-element floating point array.
+///
+/// @return
+/// Final reprojection error.
+///
+///
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+
+FASTCV_API float
+fcvGeomPoseRefineGNf32( const fcvCorrespondences* __restrict corrs,
+ short minIterations,
+ short maxIterations,
+ float stopCriteria,
+ float* initpose,
+ float* refinedpose );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Update and compute the differential pose based on the specified points correspondences
+/// This function and fcvGeomPoseOptimizeGNf32
+/// can be used iteratively to perform poseRefine GN.
+///
+/// @param projected
+/// 2D position after projection
+///
+/// @param reprojErr
+/// 2D reprojection error in camera coordinates (not in pixels!)
+///
+/// @param invz
+/// Inverse depth (z)
+///
+/// @param reprojVariance
+/// Reprojection variance in camera coordinates
+///
+/// @param numpts
+/// Number of points
+///
+/// @param pose
+/// Pose representing differential pose
+/// correspondences stored as a
+/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
+/// matrix and t is the translation vector. The matrix stored in pose is row
+/// major ordering: \n
+/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
+/// matrix is: \n
+/// | a11, a12, a13 , a14|\n
+/// | a21, a22, a23, a24 |\n
+/// | a31, a32, a33, a34 |\n
+/// Pointer storage must be at least a 12-element floating point array.
+///
+/// @return
+/// 0 if successfully clustered, otherwise error code
+///
+///
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvGeomPoseUpdatef32(
+ const float* __restrict projected,
+ const float* __restrict reprojErr,
+ const float* __restrict invz,
+ const float* __restrict reprojVariance,
+ unsigned int numpts,
+ float* __restrict pose );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Update the pose based on the specified points correspondences
+/// using Gauss-Newton optimization. This function and fcvGeomPoseEvaluateErrorf32
+/// can be used iteratively to perform poseRefine GN.
+///
+/// @param projected
+/// 2D position after projection
+///
+/// @param reprojErr
+/// 2D reprojection error in camera coordinates (not in pixels!)
+///
+/// @param invz
+/// Inverse depth (z)
+///
+/// @param reprojVariance
+/// Reprojection variance in camera coordinates
+///
+/// @param numpts
+/// Number of points
+///
+/// @param pose
+/// Pose representing updated pose
+/// correspondences stored as a
+/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
+/// matrix and t is the translation vector. The matrix stored in pose is row
+/// major ordering: \n
+/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
+/// matrix is: \n
+/// | a11, a12, a13 , a14|\n
+/// | a21, a22, a23, a24 |\n
+/// | a31, a32, a33, a34 |\n
+/// Pointer storage must be at least a 12-element floating point array.
+///
+/// @return
+/// 0 if successfully clustered, otherwise error code
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvGeomPoseOptimizeGNf32( const float* __restrict projected,
+ const float* __restrict reprojErr,
+ const float* __restrict invz,
+ const float* __restrict reprojVariance,
+ unsigned int numpts,
+ float* __restrict pose );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Calculate the reprojection error based on the input pose.
+/// This function and fcvGeomPoseOptimizef32 can be used iteratively
+/// to perform poseRefine (GN or LM)..
+///
+/// @param corrs
+/// Pointer to correspondences structure.
+///
+/// @param pose
+/// Pose representing updated pose
+/// correspondences stored as a
+/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
+/// matrix and t is the translation vector. The matrix stored in pose is row
+/// major ordering: \n
+/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
+/// matrix is: \n
+/// | a11, a12, a13 , a14|\n
+/// | a21, a22, a23, a24 |\n
+/// | a31, a32, a33, a34 |\n
+/// Pointer storage must be at least a 12-element floating point array.
+///
+/// @param projected
+/// 2D position after projection
+///
+/// @param reprojErr
+/// 2D reprojection error in camera coordinates (not in pixels!)
+///
+/// @param invz
+/// Inverse depth (z)
+///
+/// @param reprojVariance
+/// Reprojection variance in camera coordinates
+///
+/// @return
+/// Reprojection error.
+///
+///
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+
+FASTCV_API float
+fcvGeomPoseEvaluateErrorf32( const fcvCorrespondences* __restrict corrs,
+ const float* __restrict pose,
+ float* __restrict projected,
+ float* __restrict reprojErr,
+ float* __restrict invz,
+ float* __restrict reprojVariance );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Checks which members have a projection error that is smaller than the
+/// given one.
+///
+/// @param corrs
+/// Pointer to correspondences structure.
+///
+/// @param pose
+/// Pose representing relationship between ptTo and ptFrom
+/// correspondences stored as a
+/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
+/// matrix and t is the translation vector. The matrix stored in pose is row
+/// major ordering: \n
+/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
+/// matrix is: \n
+/// | a11, a12, a13 , a14|\n
+/// | a21, a22, a23, a24 |\n
+/// | a31, a32, a33, a34 |\n
+/// Pointer storage must be at least a 12-element floating point array.
+///
+/// @param maxSquErr
+/// Maximum error value squared.
+///
+/// @param inliers
+/// Output array for those indices that passed the test - the array MUST
+/// be able to store numIndices items.
+///
+/// @param numInliers
+/// Output number of corrs that passed the test.
+///
+/// @return
+/// 0 that error is less than maximum error, -1 greater or equal to maximum
+/// error.
+///
+///
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvGeomPoseEvaluatef32( const fcvCorrespondences* __restrict corrs,
+ const float* pose,
+ float maxSquErr,
+ uint16_t* __restrict inliers,
+ uint32_t* numInliers );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Estimates a 6DOF pose
+/// \n\b NOTE: Given the coordinates of three 3D points (in world reference frame),
+/// and their corresponding perspective projections in an image,
+/// this algorithm determines the position and orientation of the camera in
+/// the world reference frame. The function provides up to four solutions
+/// that can be disambiguated using a fourth point.
+/// When used in conjunction with RANSAC, this function can perform efficient outlier rejection.
+/// Two degenerate cases should be avoided when using this function:
+/// - Indeterminate configuration:
+/// When the three points are collinear in space, there will be a family of poses mapping the
+/// three points to the same image points.
+/// - Unstable configuration:
+/// The camera center is located on a circular cylinder passing through the three points and
+/// the camera optical axis is perpendicular to the plane derived by the three points.
+/// With this configuration, a small change in the position of the three points will
+/// result in a large change of the estimated pose..
+///
+/// @param corrs
+/// 2D-3D correspondence points
+///
+/// @param pose
+/// computed pose (numPoses * 12 data)
+///
+/// @param numPoses (max = 4)
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvGeom3PointPoseEstimatef32( const fcvCorrespondences* __restrict corrs,
+ float* pose,
+ int32_t* numPoses );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// 3x3 correlation with non-separable kernel.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterCorr3x3s8_v2(). In the 2.0.0 release,
+/// fcvFilterCorr3x3s8_v2 will be renamed to fcvFilterCorr3x3s8
+/// and the signature of fcvFilterCorr3x3s8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param kernel
+/// 2-D 3x3 kernel.
+/// \n\b NOTE: Normalized to Q4.4
+///
+/// @param src
+/// Input image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: must be an even number
+///
+/// @param srcHeight
+/// Image height.
+/// \n\b NOTE: must be an even number
+///
+/// @param dst
+/// Output convolution. Border values are ignored in this function.
+/// Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b NOTE: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterCorr3x3s8( const int8_t* __restrict kernel,
+ const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// 3x3 correlation with non-separable kernel.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterCorr3x3s8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterCorr3x3s8,
+/// \a fcvFilterCorr3x3s8_v2 will be removed, and the current signature
+/// for \a fcvFilterCorr3x3s8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterCorr3x3s8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param kernel
+/// 2-D 3x3 kernel.
+/// \n\b NOTE: Normalized to Q4.4
+///
+/// @param src
+/// Input image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: must be an even number
+///
+/// @param srcHeight
+/// Image height.
+/// \n\b NOTE: must be an even number
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output convolution. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b NOTE: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride. Border values are ignored in this function.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterCorr3x3s8_v2( const int8_t* __restrict kernel,
+ const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// NxN correlation with non-separable kernel.
+/// Border values are ignored in this function. The filling of dst starts
+/// at (N/2,N/2) and ends at (srcWidth-1-N/2,srcHeight-1-N/2).
+/// \n\b NOTE: The border is N/2 wide pixel strips at top, bottom, left and right of image.
+///
+/// @param kernel
+/// 2-D NxN kernel of float32_t.
+///
+/// @param N
+/// Dimension of kernel.
+///
+/// @param src
+/// Input image of unit8_t. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Src image stride, stride of image is the number of bytes between column 0 of
+/// row 1 and column 0 of row 2 in data memory.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output correlation. Size of buffer is dstStride*srcHeight*sizeof(float32_t) bytes.
+/// \n\b NOTE: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride, stride of image is the number of bytes between column 0 of
+/// row 1 and column 0 of row 2 in data memory.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth*sizeof(float32_t).
+/// \n\b WARNING: should be multiple of 8, and at least as much as
+/// srcWidth*sizeof(float32_t) if not 0.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterCorrNxNu8f32( const float32_t* __restrict kernel,
+ uint32_t N,
+ const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ float32_t* __restrict dst,
+ uint32_t dstStride );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// NxN correlation with non-separable kernel.
+/// Border values are ignored in this function. The filling of dst starts
+/// at (N/2,N/2) and ends at (srcWidth-1-N/2,srcHeight-1-N/2).
+/// \n\b NOTE: The border is N/2 wide pixel strips at top, bottom, left and right of image.
+///
+/// @param kernel
+/// 2-D NxN kernel of int8_t.
+///
+/// @param N
+/// Dimension of kernel.
+///
+/// @param shift
+/// The right shift count used to normalize output. Shift can be considered as Q factor of kernel.
+///
+/// @param src
+/// Input image of unit8_t. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Src image stride, stride of image is the number of bytes between column 0 of
+/// row 1 and column 0 of row 2 in data memory.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output correlation. Size of buffer is dstStride*srcHeight*sizeof(int16_t) bytes.
+/// \n\b NOTE: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride, stride of image is the number of bytes between column 0 of
+/// row 1 and column 0 of row 2 in data memory.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth*sizeof(int16_t).
+/// \n\b WARNING: should be multiple of 8, and at least as much as
+/// srcWidth*sizeof(int16_t) if not 0.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterCorrNxNu8s16( const int8_t* __restrict kernel,
+ uint32_t N,
+ int8_t shift,
+ const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int16_t* __restrict dst,
+ uint32_t dstStride );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// NxN correlation with non-separable kernel.
+/// Border values are ignored in this function. The filling of dst starts
+/// at (N/2,N/2) and ends at (srcWidth-1-N/2,srcHeight-1-N/2).
+/// \n\b NOTE: The border is N/2 wide pixel strips at top, bottom, left and right of image.
+///
+/// @param kernel
+/// 2-D NxN kernel of int8_t.
+///
+/// @param N
+/// Dimension of kernel.
+///
+/// @param shift
+/// The right shift count used to normalize output. Shift can be considered as Q factor of kernel.
+///
+/// @param src
+/// Input image of unit8_t. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Src image stride, stride of image is the number of bytes between column 0 of
+/// row 1 and column 0 of row 2 in data memory.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output correlation. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b NOTE: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride, stride of image is the number of bytes between column 0 of
+/// row 1 and column 0 of row 2 in data memory.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as
+/// srcWidth if not 0.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterCorrNxNu8( const int8_t* __restrict kernel,
+ uint32_t N,
+ int8_t shift,
+ const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// 9x9 correlation with separable kernel.
+/// If src and dst point to the same address, it will do in-place.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterCorrSep9x9s16_v2(). In the 2.0.0 release,
+/// fcvFilterCorrSep9x9s16_v2 will be renamed to fcvFilterCorrSep9x9s16
+/// and the signature of fcvFilterCorrSep9x9s16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param kernel
+/// 1-D kernel in Q15.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param src
+/// Input image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+/// \n\b WARNING: must be > 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param tmp
+/// Temporary image buffer used internally.
+/// Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dst
+/// Output correlation. Border values are ignored in this function.
+/// Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterCorrSep9x9s16( const int16_t* __restrict kernel,
+ const int16_t* src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ int16_t* __restrict tmp,
+ int16_t* dst );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// 9x9 FIR filter (convolution) with seperable kernel.
+/// If srcImg and dstImg point to the same address
+/// and srcStride equals to dstStride, it will do in-place.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterCorrSep9x9s16() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterCorrSep9x9s16,
+/// \a fcvFilterCorrSep9x9s16_v2 will be removed, and the current signature
+/// for \a fcvFilterCorrSep9x9s16 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterCorrSep9x9s16 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param kernel
+/// 1-D kernel.
+///
+/// @param srcImg
+/// Input image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param srcWidth
+/// Image tile width.
+///
+/// @param srcHeight
+/// Image tile height.
+///
+/// @param srcStride
+/// source Image width
+///
+/// @param tmpImg
+/// Temporary image scratch space used internally.
+/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstImg
+/// Output correlation. Border values are ignored in this function.
+/// Size of buffer is dstStride*srcHeight bytes.
+/// \n\b NOTE: Size = width * heigth
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstStride
+/// dst Image width
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+FASTCV_API void
+fcvFilterCorrSep9x9s16_v2( const int16_t* __restrict kernel,
+ const int16_t* srcImg,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict tmpImg,
+ int16_t* dstImg,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// 11x11 correlation with separable kernel.
+/// If src and dst point to the same address, it will do in-place.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterCorrSep11x11s16_v2(). In the 2.0.0 release,
+/// fcvFilterCorrSep11x11s16_v2 will be renamed to fcvFilterCorrSep11x11s16
+/// and the signature of fcvFilterCorrSep11x11s16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param kernel
+/// 1-D kernel.
+/// \n\b NOTE: array must be >=12 elements with kernel[11]=0
+/// \n\b WARNING: should be 128-bit aligned.
+/// \n\b NOTE: Normalized to Q1.15
+///
+/// @param src
+/// Input image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+/// \n\b WARNING: must be > 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param tmpImg
+/// Temporary image scratch space used internally.
+/// \n\b NOTE: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dst
+/// Output correlation. Border values are ignored in this function.
+/// Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b NOTE: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterCorrSep11x11s16( const int16_t* __restrict kernel,
+ const int16_t* src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ int16_t* __restrict tmpImg,
+ int16_t* dst );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// 11x11 FIR filter (convolution) with seperable kernel.
+/// If srcImg and dstImg point to the same address
+/// and srcStride equals to dstStride, it will do in-place.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterCorrSep11x11s16() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterCorrSep11x11s16,
+/// \a fcvFilterCorrSep11x11s16_v2 will be removed, and the current signature
+/// for \a fcvFilterCorrSep11x11s16 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterCorrSep11x11s16 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param kernel
+/// 1-D kernel.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param srcImg
+/// Input image. Size of buffer is srStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param srcWidth
+/// Image tile width.
+/// \n\b WARNING: should be multiple of 8.
+/// \n\b WARNING: must be > 8.
+///
+/// @param srcHeight
+/// Image tile height.
+///
+/// @param srcStride
+/// source Image width
+///
+/// @param tmpImg
+/// Temporary image scratch space used internally.
+/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstImg
+/// Output correlation. Border values are ignored in this function.
+/// \n\b NOTE: Size = dstStride * srcHeigth
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstStride
+/// dst Image width
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+FASTCV_API void
+fcvFilterCorrSep11x11s16_v2( const int16_t* __restrict kernel,
+ const int16_t* srcImg,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict tmpImg,
+ int16_t* dstImg,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// 13x13 correlation with separable kernel.
+/// If src and dst point to the same address, it will do in-place.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterCorrSep13x13s16_v2(). In the 2.0.0 release,
+/// fcvFilterCorrSep13x13s16_v2 will be renamed to fcvFilterCorrSep13x13s16
+/// and the signature of fcvFilterCorrSep13x13s16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param kernel
+/// 1-D kernel.
+/// \n\b NOTE: Normalized to Q1.15
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param src
+/// Input image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+/// \n\b WARNING: must be > 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param tmpImg
+/// Temporary image scratch space used internally.
+/// \n\b NOTE: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dst
+/// Output correlation. Border values are ignored in this function.
+/// \n\b NOTE: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterCorrSep13x13s16( const int16_t* __restrict kernel,
+ const int16_t* src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ int16_t* __restrict tmpImg,
+ int16_t* dst );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// 13x13 FIR filter (convolution) with seperable kernel.
+/// If srcImg and dstImg point to the same address
+/// and srcStride equals to dstStride, it will do in-place.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterCorrSep13x13s16() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterCorrSep13x13s16,
+/// \a fcvFilterCorrSep13x13s16_v2 will be removed, and the current signature
+/// for \a fcvFilterCorrSep13x13s16 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterCorrSep13x13s16 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param kernel
+/// 1-D kernel.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcImg
+/// Input image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param srcWidth
+/// Image tile width.
+/// \n\b WARNING: should be multiple of 8.
+/// \n\b WARNING: must be > 8.
+///
+/// @param srcHeight
+/// Image tile height.
+///
+/// @param srcStride
+/// source Image width
+///
+/// @param tmpImg
+/// Temporary image scratch space used internally.
+/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstImg
+/// Output correlation. Border values are ignored in this function.
+/// \n\b NOTE: Size = dstStride * srcHeigth
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstStride
+/// dst Image width
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+FASTCV_API void
+fcvFilterCorrSep13x13s16_v2( const int16_t* __restrict kernel,
+ const int16_t* srcImg,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict tmpImg,
+ int16_t* dstImg,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// 15x15 correlation with separable kernel.
+/// If src and dst point to the same address, it will do in-place.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterCorrSep15x15s16_v2(). In the 2.0.0 release,
+/// fcvFilterCorrSep15x15s16_v2 will be renamed to fcvFilterCorrSep15x15s16
+/// and the signature of fcvFilterCorrSep15x15s16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param kernel
+/// 1-D kernel.
+/// \n\b NOTE: array must be 16 elements with kernel[15]=0
+/// \n\b NOTE: Normalized to Q1.15
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param src
+/// Input image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+/// \n\b WARNING: must be > 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param tmpImg
+/// Temporary image scratch space used internally.
+/// \n\b NOTE: Must be same size as src
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dst
+/// Output correlation. Border values are ignored in this function.
+/// \n\b NOTE: Must be same size as src
+/// \n\b NOTE: data should be 128-bit aligned
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterCorrSep15x15s16( const int16_t* __restrict kernel,
+ const int16_t* src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ int16_t* __restrict tmpImg,
+ int16_t* dst );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// 15x15 FIR filter (convolution) with seperable kernel.
+/// If srcImg and dstImg point to the same address
+/// and srcStride equals to dstStride, it will do in-place.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterCorrSep15x15s16() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterCorrSep15x15s16,
+/// \a fcvFilterCorrSep15x15s16_v2 will be removed, and the current signature
+/// for \a fcvFilterCorrSep15x15s16 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterCorrSep15x15s16 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param kernel
+/// 1-D kernel.
+/// \n\b NOTE: array must be 16 elements with kernel[15]=0
+/// \n\b NOTE: Normalized to Q1.15
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param srcImg
+/// Input image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param srcWidth
+/// Image tile width.
+/// \n\b WARNING: should be multiple of 8.
+/// \n\b WARNING: must be > 8.
+///
+/// @param srcHeight
+/// Image tile height.
+///
+/// @param srcStride
+/// source Image width
+///
+/// @param tmpImg
+/// Temporary image scratch space used internally.
+/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstImg
+/// Output correlation. Border values are ignored in this function.
+/// \n\b NOTE: Size = dstStride * srcHeigth
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstStride
+/// dst Image width
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+FASTCV_API void
+fcvFilterCorrSep15x15s16_v2( const int16_t* __restrict kernel,
+ const int16_t* srcImg,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict tmpImg,
+ int16_t* dstImg,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// 17x17 correlation with separable kernel.
+/// If src and dst point to the same address, it will do in-place.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterCorrSep17x17s16_v2(). In the 2.0.0 release,
+/// fcvFilterCorrSep17x17s16_v2 will be renamed to fcvFilterCorrSep17x17s16
+/// and the signature of fcvFilterCorrSep17x17s16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param kernel
+/// 1-D kernel.
+/// \n\b NOTE: Normalized to Q1.15
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param src
+/// Input image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+/// \n\b WARNING: must be > 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param tmpImg
+/// Temporary image scratch space used internally.
+/// \n\b NOTE: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dst
+/// Output correlation.. Border values are ignored in this function.
+/// \n\b NOTE: Must be same size as src
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterCorrSep17x17s16( const int16_t* __restrict kernel,
+ const int16_t* src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ int16_t* __restrict tmpImg,
+ int16_t* dst );
+
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// 17x17 FIR filter (convolution) with seperable kernel.
+/// If srcImg and dstImg point to the same address
+/// and srcStride equals to dstStride, it will do in-place.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterCorrSep17x17s16() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterCorrSep17x17s16,
+/// \a fcvFilterCorrSep17x17s16_v2 will be removed, and the current signature
+/// for \a fcvFilterCorrSep17x17s16 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterCorrSep17x17s16 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param kernel
+/// 1-D kernel.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param srcImg
+/// Input image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param srcWidth
+/// Image tile width.
+///
+/// @param srcHeight
+/// Image tile height.
+///
+/// @param srcStride
+/// source Image width
+///
+/// @param tmpImg
+/// Temporary image scratch space used internally.
+/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstImg
+/// Output correlation. Border values are ignored in this function.
+/// \n\b NOTE: Size = dstStride * srcHeigth
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstStride
+/// dst Image width
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+FASTCV_API void
+fcvFilterCorrSep17x17s16_v2( const int16_t* __restrict kernel,
+ const int16_t* srcImg,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict tmpImg,
+ int16_t* dstImg,
+ unsigned int dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// NxN correlation with separable kernel.
+/// If srcImg and dstImg point to the same address
+/// and srcStride equals to dstStride, it will do in-place.
+///
+/// @param kernel
+/// 1-D kernel.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param knlSize
+/// Seperable kernel size.
+///
+/// @param srcImg
+/// Input image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param srcWidth
+/// Image tile width.
+///
+/// @param srcHeight
+/// Image tile height.
+///
+/// @param srcStride
+/// source Image width
+///
+/// @param tmpImg
+/// Temporary image scratch space used internally.
+/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstImg
+/// Output correlation. Border values are ignored in this function.
+/// \n\b NOTE: Size = dstStride * srcHeigth
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstStride
+/// dst Image width
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterCorrSepNxNs16( const int16_t* __restrict kernel,
+ int knlSize,
+ const int16_t* srcImg,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict tmpImg,
+ int16_t* dstImg,
+ unsigned int dstStride );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// MxN correlation with separable kernel.
+///
+/// @param kernelX
+/// 1-D kernel of int8_t. The kernel is first applied to rows.
+/// kernelX has Q factor equal to shift.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param knlSizeX
+/// Seperable kernel size of kernelX.
+/// \n\b NOTE: kenrelX must be <= 32.
+///
+/// @param kernelY
+/// 1-D kernel of int8_t. The kernel is applied to columns after kernelX
+/// is applied. It could be the same buffer as kernelX which makes it a
+/// NxN symetric kernel.
+/// kernelY has Q factor equal to shift.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param knlSizeY
+/// Seperable kernel size of kernelY.
+///
+/// @param shift
+/// The Q factor of kernels. Output is right-shifted by 2*shift to compensate for two rounds of filtering
+///
+/// @param srcImg
+/// Input image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Src image stride, stride of image is the number of bytes between column 0 of
+/// row 1 and column 0 of row 2 in data memory.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dstImg
+/// Output correlation. Can do in-place filtering (i.e. dstImg=srcImg).
+/// \n\b NOTE: Size = dstStride * srcHeigth
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @param dstStride
+/// Output stride, stride of image is the number of bytes between column 0 of
+/// row 1 and column 0 of row 2 in data memory.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterCorrSepMxNu8( const int8_t* kernelX,
+ uint32_t knlSizeX,
+ const int8_t* kernelY,
+ uint32_t knlSizeY,
+ int8_t shift,
+ const uint8_t* srcImg,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* dstImg,
+ uint32_t dstStride);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Calculates the mean and variance of intensities of a rectangle in a
+/// grayscale image.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageIntensityStats_v2(). In the 2.0.0 release,
+/// fcvImageIntensityStats_v2 will be renamed to fcvImageIntensityStats
+/// and the signature of fcvImageIntensityStats as it appears now,
+/// will be removed.
+/// This API is the same as fcvImageIntensityStats_v2 with
+/// FASTCV_UNBIASED_VARIANCE_ESTIMATOR
+/// \n\n
+///
+/// @param src
+/// pointer to 8-bit grayscale image
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of source image
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param xBegin
+/// x coordinate of top left of rectangle
+///
+/// @param yBegin
+/// y coordinate of top left of rectangle
+///
+/// @param recWidth
+/// width of rectangular region
+///
+/// @param recHeight
+/// height of rectangular region
+///
+/// @param mean
+/// output of mean of region
+///
+/// @param variance
+/// output of variance of region
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageIntensityStats( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ int xBegin,
+ int yBegin,
+ unsigned int recWidth,
+ unsigned int recHeight,
+ float* mean,
+ float* variance );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Calculates the mean and variance of intensities of a rectangle in a
+/// grayscale image.
+///
+/// @param src
+/// pointer to 8-bit grayscale image
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of source image
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param xBegin
+/// x coordinate of top left of rectangle
+///
+/// @param yBegin
+/// y coordinate of top left of rectangle
+///
+/// @param recWidth
+/// width of rectangular region
+///
+/// @param recHeight
+/// height of rectangular region
+///
+/// @param mean
+/// output of mean of region
+///
+/// @param variance
+/// output of variance of region
+///
+/// @param varianceEstimator
+/// variance estimator
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvImageIntensityStats_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ int xBegin,
+ int yBegin,
+ uint32_t recWidth,
+ uint32_t recHeight,
+ float32_t* mean,
+ float32_t* variance,
+ fcvVarianceEstimator varianceEstimator);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a histogram of intensities for a rectangular region of a grayscale
+/// image. Bins each pixel into a histogram of size 256, depending on the
+/// intensity of the pixel (in the range 0 to 255).
+///
+/// @details
+///
+/// @param src
+/// pointer to 8-bit grayscale image
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of source image
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param xBegin
+/// x coordinate of top left of rectangle
+///
+/// @param yBegin
+/// y coordinate of top left of rectangle
+///
+/// @param recWidth
+/// Width of rectangular region
+///
+/// @param recHeight
+/// Height of rectangular region
+///
+/// @param histogram
+/// Array of size 256 for storing the histogram
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageIntensityHistogram( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ int xBegin,
+ int yBegin,
+ unsigned int recWidth,
+ unsigned int recHeight,
+ int32_t* histogram );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Builds an integral image of the incoming 8-bit image and adds an
+/// unfilled border on top and to the left.
+/// \n NOTE: border usually zero filled elsewhere.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvIntegratePatchu8_v2(). In the 2.0.0 release,
+/// fcvIntegratePatchu8_v2 will be renamed to fcvIntegratePatchu8
+/// and the signature of fcvIntegratePatchu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// sum (X,Y) = sum_{x (patchW+1)(patchH+1)
+///
+/// @param intgrlSqrdImgOut
+/// Integral image of squared values.
+/// \n\b NOTE: Memory must be > (patchW+1)(patchH+1)
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvIntegratePatchu8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ int patchX,
+ int patchY,
+ unsigned int patchW,
+ unsigned int patchH,
+ uint32_t* __restrict intgrlImgOut,
+ uint32_t* __restrict intgrlSqrdImgOut );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Builds an integral image of the incoming 8-bit patch values and their
+/// squares and adds an unfilled border on top and to the left.
+/// \n NOTE: border usually zero filled elsewhere.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvIntegratePatchu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvIntegratePatchu8,
+/// \a fcvIntegratePatchu8_v2 will be removed, and the current signature
+/// for \a fcvIntegratePatchu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvIntegratePatchu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// sum (X,Y) = sum_{x (patchW+1)(patchH+1)
+///
+/// @param intgrlSqrdImgOut
+/// Integral image of squared values.
+/// \n\b NOTE: Memory must be > (patchW+1)(patchH+1)
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvIntegratePatchu8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int patchX,
+ int patchY,
+ unsigned int patchW,
+ unsigned int patchH,
+ uint32_t* __restrict intgrlImgOut,
+ uint32_t* __restrict intgrlSqrdImgOut );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Builds an integral image of the incoming 8-bit patch values and their
+/// squares and adds an unfilled border on top and to the left.
+/// \n NOTE: border usually zero filled elsewhere.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvIntegratePatchu8() and fcvIntegratePatchu8_v2() with the addition of
+/// extra parameters. This function has been added to allow for backward
+/// compatibility with the original function. When the 2.0.0 release of this
+/// library is made, this function will be renamed to: \a fcvIntegratePatchu8,
+/// \a fcvIntegratePatchu8_v2 and fcvIntegratePatchu8_v3 will be removed, and
+/// the current signature for \a fcvIntegratePatchu8 and fcvIntegratePatchu8_v2
+/// will be removed. Until 2.0.0, the developer should use this implementation
+/// with the expectation of renaming it to \a fcvIntegratePatchu8 when
+/// transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// sum (X,Y) = sum_{x (patchW+1)(patchH+1)
+///
+/// @param intgrlStride
+/// Stride in bytes of the Integral Image
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param intgrlSqrdImgOut
+/// Integral image of squared values.
+/// \n\b NOTE: Memory must be > (patchW+1)(patchH+1)
+///
+/// @param intgrlSqrdStride
+/// Stride in bytes of the Squared Integral Image
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvIntegratePatchu8_v3(const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t patchX,
+ uint32_t patchY,
+ uint32_t patchW,
+ uint32_t patchH,
+ uint32_t* __restrict intgrlImgOut,
+ uint32_t intgrlStride,
+ uint32_t* __restrict intgrlSqrdImgOut,
+ uint32_t intgrlSqrdStride);
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Builds an integral image of the incoming 12x12 8-bit patch values and
+/// their squares. It also adds an unfilled border on top and to the left.
+/// \n NOTE: border usually zero filled elsewhere.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvIntegratePatch12x12u8_v2(). In the 2.0.0 release,
+/// fcvIntegratePatch12x12u8_v2 will be renamed to fcvIntegratePatch12x12u8
+/// and the signature of fcvIntegratePatch12x12u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// sum (X,Y) = sum_{x (12+1)(12+1)
+///
+/// @param intgrlSqrdImgOut
+/// Integral image of squared values.
+/// \n\b NOTE: Memory must be > (12+1)(12+1)
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvIntegratePatch12x12u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ int patchX,
+ int patchY,
+ uint32_t* __restrict intgrlImgOut,
+ uint32_t* __restrict intgrlSqrdImgOut );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Builds an integral image of the incoming 12x12 8-bit patch values and
+/// their squares. It also adds an unfilled border on top and to the left.
+/// \n NOTE: border usually zero filled elsewhere.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvIntegratePatch12x12u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvIntegratePatch12x12u8,
+/// \a fcvIntegratePatch12x12u8_v2 will be removed, and the current signature
+/// for \a fcvIntegratePatch12x12u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvIntegratePatch12x12u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// sum (X,Y) = sum_{x (12+1)(12+1)
+///
+/// @param intgrlSqrdImgOut
+/// Integral image of squared values.
+/// \n\b NOTE: Memory must be > (12+1)(12+1)
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvIntegratePatch12x12u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int patchX,
+ int patchY,
+ uint32_t* __restrict intgrlImgOut,
+ uint32_t* __restrict intgrlSqrdImgOut );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Builds an integral image of the incoming 18x18 8-bit patch values and
+/// their squares. It also adds an unfilled border on top and to the left.
+/// \n NOTE: border usually zero filled elsewhere.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvIntegratePatch18x18u8_v2(). In the 2.0.0 release,
+/// fcvIntegratePatch18x18u8_v2 will be renamed to fcvIntegratePatch18x18u8
+/// and the signature of fcvIntegratePatch18x18u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// sum (X,Y) = sum_{x (18+1)(18+1)
+///
+/// @param intgrlSqrdImgOut
+/// Integral image of squared values.
+/// \n\b NOTE: Memory must be > (18+1)(18+1)
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvIntegratePatch18x18u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ int patchX,
+ int patchY,
+ uint32_t* __restrict intgrlImgOut,
+ uint32_t* __restrict intgrlSqrdImgOut );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Builds an integral image of the incoming 18x18 8-bit patch values and
+/// their squares. It also adds an unfilled border on top and to the left.
+/// \n NOTE: border usually zero filled elsewhere.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvIntegratePatch18x18u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvIntegratePatch18x18u8,
+/// \a fcvIntegratePatch18x18u8_v2 will be removed, and the current signature
+/// for \a fcvIntegratePatch18x18u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvIntegratePatch18x18u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// sum (X,Y) = sum_{x (18+1)(18+1)
+///
+/// @param intgrlSqrdImgOut
+/// Integral image of squared values.
+/// \n\b NOTE: Memory must be > (18+1)(18+1)
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvIntegratePatch18x18u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int patchX,
+ int patchY,
+ uint32_t* __restrict intgrlImgOut,
+ uint32_t* __restrict intgrlSqrdImgOut );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Integrates one line of an image or any portion of an image that is
+/// contiguous in memory.
+///
+/// @param src
+/// Input image. Size of buffer is srcWidth bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Number of pixels.
+/// \n NOTE: bit width enforces numPxls < 2^16
+///
+/// @param intgrl
+/// Sum of values from specified pixels.
+///
+/// @param intgrlSqrd
+/// Sum of squared values from specified pixels.
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvIntegrateImageLineu8( const uint8_t* __restrict src,
+ uint16_t srcWidth,
+ uint32_t* intgrl,
+ uint32_t* intgrlSqrd );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Integrates 64 contiguous pixels of an image.
+///
+/// @param src
+/// Input image.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param intgrl
+/// Sum of values from specified pixels.
+///
+/// @param intgrlSqrd
+/// Sum of squared values from specified pixels.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvIntegrateImageLine64u8( const uint8_t* __restrict src,
+ uint16_t* intgrl,
+ uint32_t* intgrlSqrd );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// compute approximate mean and variance for the range of NFT4 float
+/// descriptors where descriptor elements along dimension are treated
+/// as random vars
+///
+/// @param src
+/// contiguous block of descriptors of dimension 36
+///
+/// @param first
+/// index of the first descriptor in range array vind for computing mean and var
+///
+/// @param last
+/// index of the last descriptor in range array vind for computing mean and range
+///
+/// @param vind
+/// array of randomized indexes of descriptors
+///
+/// @param means
+/// buffer for approximate means, must be 36 long
+///
+/// @param vars
+/// buffer for approximate variances, must be 36 long
+///
+/// @param temp
+/// bufffer, must be 46 long
+///
+/// @return
+/// 0 - success
+/// EFAULT - invalid address
+/// EINVAL - invalid argument
+///
+/// @remark
+/// If descriptor range is > 100 then only
+/// 100 samples are drawn from the range to compute
+/// approximate means and variances.
+///
+/// Variances computed here do not have to be true variances because their
+/// values do not matter in kdtrees. The only thing that matters is that
+/// the ordering relation of variances is preserved
+///
+///
+///
+/// @ingroup object_detection
+// -----------------------------------------------------------------------------
+
+FASTCV_API int
+fcvDescriptorSampledMeanAndVar36f32( const float* __restrict src,
+ int first,
+ int last,
+ int32_t* vind,
+ float* __restrict means,
+ float* __restrict vars,
+ float* __restrict temp );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Searches a 8x8 patch within radius around a center pixel for the max NCC.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvNCCPatchOnCircle8x8u8_v2(). In the 2.0.0 release,
+/// fcvNCCPatchOnCircle8x8u8_v2 will be renamed to fcvNCCPatchOnCircle8x8u8
+/// and the signature of fcvNCCPatchOnCircle8x8u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param patch
+/// Pointer to 8-bit patch pixel values linearly laid out in memory.
+///
+/// @param src
+/// Pointer to 8-bit image pixel values linearly laid out in memory.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width in pixels of the image.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height in pixels of the image.
+///
+/// @param search_center_x
+/// X location of search center in pixels of the image.
+///
+/// @param search_center_y
+/// Y location of search center in pixels of the image.
+///
+/// @param search_radius
+/// Radius of search in pixels. Must be <=5.
+///
+/// @param best_x
+/// Center X location on the image of the best NCC match. The center X has
+/// 4 pixels to the left and 3 to the right.
+///
+/// @param best_y
+/// Center Y location on the image of the best NCC match. The center Y has
+/// 4 pixels above and 3 pixels below.
+///
+/// @param bestNCC
+/// Largest value of the normalized cross-correlation found in the NCC search.
+/// It's quantized to integer value in Q7 (between -128 and 128).
+///
+/// @param findSubPixel (0 or 1)
+/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
+///
+/// @param subX
+/// Sub-pixel estimate for optimal NCC relative to best_x.
+/// \n e.g., float x = (float)best_x + subX;
+///
+/// @param subY
+/// Sub-pixel estimate for optimal NCC relative to best_y.
+///
+/// @return
+/// 0 = OK \n
+/// 1 = "search_radius" too large\n
+/// 2 = invalid "search_center_x,y"\n
+/// 3 = not found\n
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvNCCPatchOnCircle8x8u8( const uint8_t* __restrict patch,
+ const uint8_t* __restrict src,
+ unsigned short srcWidth,
+ unsigned short srcHeight,
+ unsigned short search_center_x,
+ unsigned short search_center_y,
+ unsigned short search_radius,
+ uint16_t* best_x,
+ uint16_t* best_y,
+ uint32_t* bestNCC,
+ int findSubPixel,
+ float* subX,
+ float* subY );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Searches a 8x8 patch within radius around a center pixel for the max NCC.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvNCCPatchOnCircle8x8u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvNCCPatchOnCircle8x8u8,
+/// \a fcvNCCPatchOnCircle8x8u8_v2 will be removed, and the current signature
+/// for \a fcvNCCPatchOnCircle8x8u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvNCCPatchOnCircle8x8u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param patch
+/// Pointer to 8-bit patch pixel values linearly laid out in memory.
+///
+/// @param src
+/// Pointer to 8-bit image pixel values linearly laid out in memory.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width in pixels of the image.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height in pixels of the image.
+///
+/// @param search_center_x
+/// X location of search center in pixels of the image.
+///
+/// @param search_center_y
+/// Y location of search center in pixels of the image.
+///
+/// @param search_radius
+/// Radius of search in pixels. Must be <=5.
+///
+/// @param filterLowVariance
+/// Minimum variance. Used to as threshold to compare against variance of
+/// 8x8 block of src or patch.
+///
+/// @param best_x
+/// Center X location on the image of the best NCC match. The center X has
+/// 4 pixels to the left and 3 to the right.
+///
+/// @param best_y
+/// Center Y location on the image of the best NCC match. The center Y has
+/// 4 pixels above and 3 pixels below.
+///
+/// @param bestNCC
+/// Largest value of the normalized cross-correlation found in the NCC search.
+/// It's quantized to integer value in Q7 (between -128 and 128).
+///
+/// @param findSubPixel (0 or 1)
+/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
+///
+/// @param subX
+/// Sub-pixel estimate for optimal NCC relative to best_x.
+/// \n e.g., float x = (float)best_x + subX;
+///
+/// @param subY
+/// Sub-pixel estimate for optimal NCC relative to best_y.
+///
+/// @return
+/// 0 = OK \n
+/// 1 = "search_radius" too large\n
+/// 2 = invalid "search_center_x,y"\n
+/// 3 = not found\n
+/// 4 = Patch has too low variance\n
+/// 5 = Image region has too low variance\n
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvNCCPatchOnCircle8x8u8_v2( const uint8_t* __restrict patch,
+ const uint8_t* __restrict src,
+ unsigned short srcWidth,
+ unsigned short srcHeight,
+ unsigned short search_center_x,
+ unsigned short search_center_y,
+ unsigned short search_radius,
+ int filterLowVariance,
+ uint16_t* best_x,
+ uint16_t* best_y,
+ uint32_t* bestNCC,
+ int findSubPixel,
+ float* subX,
+ float* subY );
+
+
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Searches a 8x8 patch within square region around a center pixel
+/// for the max NCC.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvNCCPatchOnSquare8x8u8_v2(). In the 2.0.0 release,
+/// fcvNCCPatchOnSquare8x8u8_v2 will be renamed to fcvNCCPatchOnSquare8x8u8
+/// and the signature of fcvNCCPatchOnSquare8x8u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param patch
+/// Pointer to 8-bit patch pixel values linearly laid out in memory.
+///
+/// @param src
+/// Pointer to 8-bit image pixel values linearly laid out in memory.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width in pixels of the image.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height in pixels of the image.
+///
+/// @param search_center_x
+/// Center X coordinate of the search window
+///
+/// @param search_center_y
+/// Center Y coordinate of the search window
+///
+/// @param search_w
+/// Width of search square in pixels
+/// \n\b WARNING: must be 11 or less.
+///
+/// @param best_x
+/// Center X location on the image of the best NCC match. The center X has
+/// 4 pixels to the left and 3 to the right.
+///
+/// @param best_y
+/// Center Y location on the image of the best NCC match. The center Y has
+/// 4 pixels above and 3 pixels below.
+///
+/// @param bestNCC
+/// NCC value of the best match block.
+/// It's quantized to integer value in Q7 (between -128 and 128).
+///
+/// @param doSubPixel (0 or 1)
+/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
+///
+/// @param subX
+/// Sub-pixel estimate for optimal NCC relative to best_x.
+/// \n e.g., float x = (float)best_x + subX;
+///
+/// @param subY
+/// Sub-pixel estimate for optimal NCC relative to best_y.
+///
+/// @return
+/// 0 = OK \n
+/// 1 = "search_radius" too large\n
+/// 2 = invalid "search_center_x,y"\n
+/// 3 = not found\n
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvNCCPatchOnSquare8x8u8( const uint8_t* __restrict patch,
+ const uint8_t* __restrict src,
+ unsigned short srcWidth,
+ unsigned short srcHeight,
+ unsigned short search_center_x,
+ unsigned short search_center_y,
+ unsigned short search_w,
+ uint16_t* best_x,
+ uint16_t* best_y,
+ uint32_t* bestNCC,
+ int doSubPixel,
+ float* subX,
+ float* subY );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Searches a 8x8 patch within square region around a center pixel
+/// for the max NCC.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvNCCPatchOnSquare8x8u8 with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvNCCPatchOnSquare8x8u8,
+/// \a fcvNCCPatchOnSquare8x8u8_v2 will be removed, and the current signature
+/// for \a fcvNCCPatchOnSquare8x8u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvNCCPatchOnSquare8x8u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param patch
+/// Pointer to 8-bit patch pixel values linearly laid out in memory.
+///
+/// @param src
+/// Pointer to 8-bit image pixel values linearly laid out in memory.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width in pixels of the image.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height in pixels of the image.
+///
+/// @param search_center_x
+/// Center X coordinate of the search window
+///
+/// @param search_center_y
+/// Center Y coordinate of the search window
+///
+/// @param search_w
+/// Width of search square in pixels
+/// \n\b WARNING: must be 11 or less.
+///
+/// @param filterLowVariance
+/// Minimum variance. Used to as threshold to compare against variance of
+/// 8x8 block of src or patch.
+///
+/// @param best_x
+/// Center X location on the image of the best NCC match. The center X has
+/// 4 pixels to the left and 3 to the right.
+///
+/// @param best_y
+/// Center Y location on the image of the best NCC match. The center Y has
+/// 4 pixels above and 3 pixels below.
+///
+/// @param bestNCC
+/// NCC value of the best match block.
+/// It's quantized to integer value in Q7 (between -128 and 128).
+///
+/// @param doSubPixel (0 or 1)
+/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
+///
+/// @param subX
+/// Sub-pixel estimate for optimal NCC relative to best_x.
+/// \n e.g., float x = (float)best_x + subX;
+///
+/// @param subY
+/// Sub-pixel estimate for optimal NCC relative to best_y.
+///
+/// @return
+/// 0 = OK \n
+/// 1 = "search_radius" too large\n
+/// 2 = invalid "search_center_x,y"\n
+/// 3 = not found\n
+/// 4 = Patch has too low variance\n
+/// 5 = Image region has too low variance\n
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvNCCPatchOnSquare8x8u8_v2( const uint8_t* __restrict patch,
+ const uint8_t* __restrict src,
+ unsigned short srcWidth,
+ unsigned short srcHeight,
+ unsigned short search_center_x,
+ unsigned short search_center_y,
+ unsigned short search_w,
+ int filterLowVariance,
+ uint16_t* best_x,
+ uint16_t* best_y,
+ uint32_t* bestNCC,
+ int doSubPixel,
+ float* subX,
+ float* subY );
+
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Sum of absolute differences of an image against an 8x8 template.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvSumOfAbsoluteDiffs8x8u8_v2(). In the 2.0.0 release,
+/// fcvSumOfAbsoluteDiffs8x8u8_v2 will be renamed to fcvSumOfAbsoluteDiffs8x8u8
+/// and the signature of fcvSumOfAbsoluteDiffs8x8u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// 8x8 sum of ||A-B||. The template patch is swept over the entire image and
+/// the results are put in dst.
+///
+/// @param patch
+/// 8x8 template
+///
+/// @param src
+/// Reference Image.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the src image.
+///
+/// @param srcHeight
+/// Height of the src image.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param dst
+/// The dst buffer shall be width X height bytes in length.
+/// Output of SAD(A,B). dst[4][4] correspondes to the 0,0 pixel of the template
+/// aligned with the 0,0 pixel of src. The dst border values not covered by
+/// entire 8x8 patch window will remain unmodified by the function. The caller
+/// should either initialize these to 0 or ignore.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvSumOfAbsoluteDiffs8x8u8( const uint8_t* __restrict patch,
+ const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint16_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Sum of absolute differences of an image against an 8x8 template.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvSumOfAbsoluteDiffs8x8u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvSumOfAbsoluteDiffs8x8u8,
+/// \a fcvSumOfAbsoluteDiffs8x8u8_v2 will be removed, and the current signature
+/// for \a fcvSumOfAbsoluteDiffs8x8u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvSumOfAbsoluteDiffs8x8u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// 8x8 sum of ||A-B||. The template patch is swept over the entire image and
+/// the results are put in dst.
+///
+/// @param patch
+/// 8x8 template
+///
+/// @param patchStride
+/// Stride of the 8x8 template buffer
+///
+/// @param dstStride
+/// Stride of the patch (in bytes) - i.e., how many bytes between column 0 of row N
+/// and column 0 of row N+1.
+///
+/// @param src
+/// Reference Image.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the src image.
+///
+/// @param srcHeight
+/// Height of the src image.
+///
+/// @param srcStride
+/// Stride of image (in bytes) - i.e., how many bytes between column 0 of row N
+/// and column 0 of row N+1.
+///
+/// @param dst
+/// The dst buffer shall be at least ( width x height ) values in length.
+/// Output of SAD(A,B). dst[4][4]correspondes to the 0,0 pixel of the template
+/// aligned with the 0,0 pixel of src. The dst border values not covered by
+/// entire 8x8 patch window will remain unmodified by the function. The caller
+/// should either initialize these to 0 or ignore.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of destination (in bytes) - i.e., how many bytes between column 0 of row N
+/// and column 0 of row N+1.
+///
+///
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvSumOfAbsoluteDiffs8x8u8_v2( const uint8_t* __restrict patch,
+ unsigned int patchStride,
+ const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint16_t* __restrict dst,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Down-scale the image to half width and height by averaging 2x2 pixels
+/// into one.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvScaleDownBy2u8_v2(). In the 2.0.0 release,
+/// fcvScaleDownBy2u8_v2 will be renamed to fcvScaleDownBy2u8
+/// and the signature of fcvScaleDownBy2u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// A box filter downsampling the next pixel, the pixel below, and the next
+/// pixel to the pixel below into one pixel.\n
+/// | px00 px01 px02 px03 |\n
+/// | px10 px11 px12 px13 |\n
+/// to:\n
+/// | (px00+px01+px10+px11)/4 (px02+px03+px12+px13)/4 |\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+/// \n\b NOTE:must be a multiple of 2
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is srcWidth*srcHeight/4 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvScaleDownBy2u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Down-scale the image to half width and height by averaging 2x2 pixels
+/// into one.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvScaleDownBy2u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvScaleDownBy2u8,
+/// \a fcvScaleDownBy2u8_v2 will be removed, and the current signature
+/// for \a fcvScaleDownBy2u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvScaleDownBy2u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// A box filter downsampling the next pixel, the pixel below, and the next
+/// pixel to the pixel below into one pixel.\n
+/// | px00 px01 px02 px03 |\n
+/// | px10 px11 px12 px13 |\n
+/// to:\n
+/// | (px00+px01+px10+px11)/4 (px02+px03+px12+px13)/4 |\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+/// \n\b NOTE:must be a multiple of 2
+///
+/// @param srcStride
+/// Image stride (in bytes).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is dstStride*srcHeight/2 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as srcWidth/2.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth/2 if not 0.
+///
+///
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvScaleDownBy2u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Downscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvScaleDownBy2Gaussian5x5u8_v2(). In the 2.0.0 release,
+/// fcvScaleDownBy2Gaussian5x5u8_v2 will be renamed to fcvScaleDownBy2Gaussian5x5u8
+/// and the signature of fcvScaleDownBy2Gaussian5x5u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Downsamples the image using a 5x5 Gaussian filter kernel.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+/// \n\b NOTE:must be a multiple of 2
+///
+/// @param dst
+/// Output 8-bit downscale image of size (width / 2) x (height / 2).
+/// \n\b NOTE: border values have been taken cared w.r.t. the pixel coordinate.
+///
+///
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvScaleDownBy2Gaussian5x5u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Downscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvScaleDownBy2Gaussian5x5u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvScaleDownBy2Gaussian5x5u8,
+/// \a fcvScaleDownBy2Gaussian5x5u8_v2 will be removed, and the current signature
+/// for \a fcvScaleDownBy2Gaussian5x5u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvScaleDownBy2Gaussian5x5u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Downsamples the image using a 5x5 Gaussian filter kernel.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride (in bytes).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit downscale image of size (width / 2) x (height / 2).
+/// \n\b NOTE: border values have been taken cared w.r.t. the pixel coordinate.
+///
+/// @param dstStride
+/// Output stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as srcWidth/2.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth/2 if not 0.
+///
+///
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvScaleDownBy2Gaussian5x5u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Downscale the image to quarter width and height by averaging 4x4 pixels
+/// into one..
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvScaleDownBy4u8_v2(). In the 2.0.0 release,
+/// fcvScaleDownBy4u8_v2 will be renamed to fcvScaleDownBy4u8
+/// and the signature of fcvScaleDownBy4u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// A 4x4 downsampling box filter across adjacent pixels is applied.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+/// \n\b NOTE:must be a multiple of 4
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is srcWidth*srcHeight/16 bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvScaleDownBy4u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Downscale the image to quarter width and height by averaging 4x4 pixels
+/// into one..
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvScaleDownBy4u8_v2() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvScaleDownBy4u8_v2,
+/// \a fcvScaleDownBy4u8_v2 will be removed, and the current signature
+/// for \a fcvScaleDownBy4u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvScaleDownBy4u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// A 4x4 downsampling box filter across adjacent pixels is applied.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+/// \n\b NOTE:must be a multiple of 4
+///
+/// @param srcStride
+/// Image stride (in bytes).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is dstStride*srcHeight/4 bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as srcWidth/4.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth/4 if not 0.
+///
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvScaleDownBy4u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Downscale the image to 2/3 width and height by averaging 3x3 pixels
+/// into one..
+///
+/// @details
+/// A 3x3 downsampling box filter across adjacent pixels is applied.
+///
+/// @param src
+/// Input 8-bit image.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: In case of non multiple of 3, it will crop to the closest multiple of 3
+///
+/// @param srcHeight
+/// Image height.
+/// \n\b NOTE: In case of non multiple of 3, it will crop to the closest multiple of 3
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2). If 0 is passed, srcStride is set to srcWidth.
+///
+/// @param dst
+/// Output 8-bit image.
+/// \n\b WARNING: should be 128-bit aligned.
+/// Memory must be pre-allocated at least srcWidth * srcHeight * 2 / 3
+/// dstWidth = srcWidth/3*2
+/// dstHeight = srcHeight/3*2
+///
+/// @param dstStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2). If 0 is passed, dstStride is set to dstWidth which is srcWidth *2/3.
+///
+/// @return
+/// 0 if successful
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvScaleDown3To2u8( const uint8_t* __restrict src,
+ unsigned srcWidth,
+ unsigned srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Downsample Horizontaly and/or Vertically by an *integer* scale.
+///
+/// @details
+/// Uses Nearest Neighbor method
+///
+/// @param src
+/// Input 8-bit image.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Source Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Source Image height.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2). If 0 is passed, srcStride is set to srcWidth.
+///
+/// @param dst
+/// Output 8-bit image.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Destination Image width.
+///
+/// @param dstHeight
+/// Destination Image height.
+///
+/// @param dstStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2). If 0 is passed, dstStride is set to dstWidth which is srcWidth *2/3.
+///
+/// @return
+/// 0 if successful
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvScaleDownNNu8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstWidth,
+ unsigned int dstHeight,
+ unsigned int dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Downsample Horizontaly and/or Vertically by an *integer* scale.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvScaleDownu8_v2(). In the 2.0.0 release,
+/// fcvScaleDownu8_v2 will be renamed to fcvScaleDownu8
+/// and the signature of fcvScaleDownu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Uses an box averaging filter of size MxN where M is the scale factor
+/// in horizontal dimension and N is the scale factor in the vertical
+/// dimension.
+/// \n \b NOTE: input dimensions should be multiple of output dimensions.
+/// \n NOTE: On different processors, some output pixel values may be off by 1
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Source Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Source Image height.
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is dstWidth*dstHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Destination Image width.
+///
+/// @param dstHeight
+/// Destination Image height.
+///
+///
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvScaleDownu8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst,
+ unsigned int dstWidth,
+ unsigned int dstHeight );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Downsample Horizontaly and/or Vertically by an *integer* scale.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvScaleDownu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvScaleDownu8,
+/// \a fcvScaleDownu8_v2 will be removed, and the current signature
+/// for \a fcvScaleDownu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvScaleDownu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Uses an box averaging filter of size MxN where M is the scale factor
+/// in horizontal dimension and N is the scale factor in the vertical
+/// dimension
+/// \n \b NOTE: input dimensions should be multiple of output dimensions.
+/// \n NOTE: On different processors, some output pixel values may be off by 1
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Source Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Source Image height.
+///
+/// @param srcStride
+/// Image stride (in bytes).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is dstStride*dstHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Destination Image width.
+///
+/// @param dstHeight
+/// Destination Image height.
+///
+/// @param dstStride
+/// Output stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
+///
+///
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvScaleDownu8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstWidth,
+ unsigned int dstHeight,
+ unsigned int dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Upscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvScaleUpBy2Gaussian5x5u8_v2(). In the 2.0.0 release,
+/// fcvScaleUpBy2Gaussian5x5u8_v2 will be renamed to fcvScaleUpBy2Gaussian5x5u8
+/// and the signature of fcvScaleUpBy2Gaussian5x5u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Upsamples the image using a 5x5 Gaussian filter kernel.
+/// /n/b NOTE: border values have been taken care with Gaussion coefficients.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Output 8-bit upsampled image of size (2*width) x (2*height).
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvScaleUpBy2Gaussian5x5u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Upscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvScaleUpBy2Gaussian5x5u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvScaleUpBy2Gaussian5x5u8,
+/// \a fcvScaleUpBy2Gaussian5x5u8_v2 will be removed, and the current signature
+/// for \a fcvScaleUpBy2Gaussian5x5u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvScaleUpBy2Gaussian5x5u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Upsamples the image using a 5x5 Gaussian filter kernel.
+/// /n/b NOTE: border values have been taken care with Gaussion coefficients.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcStride
+/// Image stride (in bytes).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Output 8-bit upsampled image of size (2*dstStride) x (2*srcHeight).
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as srcWidth*2.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth*2 if not 0.
+///
+///
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvScaleUpBy2Gaussian5x5u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride );
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Translate to float and normalize 36 8-bit elements
+///
+/// @param src
+/// Pointer to the first input vector
+///
+/// @param invLen
+/// Pointer to inverse length of the first input vector
+/// located right after each 36 element vector
+///
+/// @param numVecs
+/// Number of vectors to translate
+///
+/// @param reqNorm
+/// Required norm
+///
+/// @param srcStride
+/// Step in bytes to data of the next vector
+/// Each vector has 36 8-bit elements and 1 float invLen
+///
+/// @param dst
+/// Pointer to contiguous block for output vectors
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param stopBuild
+/// Allows other threads to break this function in the middle of processing.
+/// When set to 1, the function will exit on the next iteration.
+///
+/// @return
+/// 0 - success
+/// EFAULT - invalid address
+/// EINVAL - invalid argument
+///
+/// @ingroup math_vector
+// -----------------------------------------------------------------------------
+
+FASTCV_API int
+fcvVecNormalize36s8f32( const int8_t* __restrict src,
+ unsigned int srcStride,
+ const float* __restrict invLen,
+ unsigned int numVecs,
+ float reqNorm,
+ float* __restrict dst,
+ int32_t* stopBuild );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Sum of squared differences of one 36-byte vector against 4 others.
+///
+/// @details
+/// SSD of one vector (a) against 4 others (b0,b1,b2,b3) using their given
+/// inverse lengths for normalization.
+/// \n\n SSD(a,b0), SSD(a,b1), SSD(a,b2), SSD(a,b3)
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param invLenA
+/// Inverse of vector A = 1/|A|
+///
+/// @param b0
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b1
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b2
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param b3
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param invLenB
+/// Inverse of vectors b0...b3 = 1/|b0|,... 1/|b3|
+/// \n\b WARNING: array should be 128-bit aligned
+///
+/// @param distances
+/// Output of the 4 results { SSD(a,b0), SSD(a,b1), SSD(a,b2), SSD(a,b3) }.
+/// \n ACCURACY: 1.0e-6
+/// \n\b WARNING: array should be 128-bit aligned
+///
+///
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvSumOfSquaredDiffs36x4s8( const int8_t* __restrict a,
+ float invLenA,
+ const int8_t* __restrict b0,
+ const int8_t* __restrict b1,
+ const int8_t* __restrict b2,
+ const int8_t* __restrict b3,
+ const float* __restrict invLenB,
+ float* __restrict distances );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Sum of squared differences of one 36-byte vector against N others.
+///
+/// @details
+/// SSD of one vector (a) against N other 36-byte vectors
+/// ( b[0], b[1], ..., b[n-1] )
+/// using their given inverse lengths for normalization.
+/// \n\n SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param invLenA
+/// Inverse of vector A = 1/|A|
+///
+/// @param b
+/// Vectors b[0]...b[n-1].
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param invLenB
+/// Inverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param numB
+/// Number of B vectors.
+///
+/// @param distances
+/// Output of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }.
+/// \n ACCURACY: 1.0e-6
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvSumOfSquaredDiffs36xNs8( const int8_t* __restrict a,
+ float invLenA,
+ const int8_t* const * __restrict b,
+ const float* __restrict invLenB,
+ unsigned int numB,
+ float* __restrict distances );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Sorting of 8 float numbers
+///
+/// @details
+/// Perform sorting of 8 scores in ascending order (output of SumOfSquaredDiffs)
+///
+/// @param inScores
+/// Input 8 element float array
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param outScores
+/// Output is 8 element sorted float array
+/// \n\b WARNING: array should be 128-bit aligned
+///
+///
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvSort8Scoresf32( float* __restrict inScores, float* __restrict outScores );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Binarizes a grayscale image based on a threshold value.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterThresholdu8_v2(). In the 2.0.0 release,
+/// fcvFilterThresholdu8_v2 will be renamed to fcvFilterThresholdu8
+/// and the signature of fcvFilterThresholdu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Sets the pixel to max(255) if it's value is greater than the threshold;
+/// else, set the pixel to min(0).
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Output 8-bit binarized image. Size of buffer is srcWidth*srcHeight bytes.
+/// If src equals to dst, it will do in-place.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param threshold
+/// Threshold value for binarization.
+/// \n\b WARNING: must be larger than 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvFilterThresholdu8( const uint8_t* src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* dst,
+ unsigned int threshold );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Binarizes a grayscale image based on a threshold value.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterThresholdu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterThresholdu8,
+/// \a fcvFilterThresholdu8_v2 will be removed, and the current signature
+/// for \a fcvFilterThresholdu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterThresholdu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Sets the pixel to max(255) if it's value is greater than the threshold;
+/// else, set the pixel to min(0).
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes.
+/// If src equals to dst and srcStride equals to dstStride, it will do in-place.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
+///
+/// @param threshold
+/// Threshold value for binarization.
+/// \n\b WARNING: must be larger than 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterThresholdu8_v2( const uint8_t* src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* dst,
+ unsigned int dstStride,
+ unsigned int threshold );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Binarizes a grayscale image based on a threshold value.
+/// The binarized image will be in the two values selected by user.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterThresholdu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterThresholdu8,
+/// \a fcvFilterThresholdu8_v3 will be removed, and the current signature
+/// for \a fcvFilterThresholdu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterThresholdu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Sets the pixel to max(255) if it's value is greater than the threshold;
+/// else, set the pixel to min(0).
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes.
+/// If src equals to dst and srcStride equals to dstStride, it will do in-place.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
+///
+/// @param threshold
+/// Threshold value for binarization.
+/// \n\b WARNING: must be larger than 0.
+///
+/// @param trueValue
+/// The value in type of uint8_t assigned to the destination pixel if the source is larger than threshold
+///
+/// @param falseValue
+/// The value in type of uint8_t assigned to the destination pixel if the source is smaller than or equal to threshold
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterThresholdu8_v3( const uint8_t* src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* dst,
+ unsigned int dstStride,
+ unsigned int threshold,
+ uint8_t trueValue,
+ uint8_t falseValue);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Binarizes a grayscale image based on a pair of threshold values.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterThresholdRangeu8_v2(). In the 2.0.0 release,
+/// fcvFilterThresholdRangeu8_v2 will be renamed to fcvFilterThresholdRangeu8
+/// and the signature of fcvFilterThresholdRangeu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Sets the pixel to min(0) if it's value is greater than the higher threshold
+/// or smaller than the lower threshold;
+/// else, set the pixel to max(255).
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes.
+/// If src equals to dst and srcStride equals to dstStride, it will do in-place.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param lowThresh
+/// The lower threshold value for binarization.
+///
+/// @param highThresh
+/// The higher threshold value for binarization.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterThresholdRangeu8( const uint8_t* src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* dst,
+ uint32_t dstStride,
+ uint8_t lowThresh,
+ uint8_t highThresh );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Binarizes a grayscale image based on a pair of threshold values.
+/// The binarized image will be in the two values selected by user.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterThresholdRangeu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterThresholdRangeu8,
+/// \a fcvFilterThresholdRangeu8_v2 will be removed, and the current signature
+/// for \a fcvFilterThresholdRangeu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterThresholdRangeu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Sets the pixel to min(0) if it's value is greater than the higher threshold
+/// or smaller than the lower threshold;
+/// else, set the pixel to max(255).
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes.
+/// If src equals to dst and srcStride equals to dstStride, it will do in-place.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param lowThresh
+/// The lower threshold value for binarization.
+///
+/// @param highThresh
+/// The higher threshold value for binarization.
+///
+/// @param trueValue
+/// The value in type of uint8_t assigned to the destination pixel if the source is
+/// within the range inclusively defined by the pair of threshold values
+///
+/// @param falseValue
+/// The value in type of uint8_t assigned to the destination pixel if the source is
+/// out of the range defined by the pair of threshold values
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterThresholdRangeu8_v2( const uint8_t* src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* dst,
+ uint32_t dstStride,
+ uint8_t lowThresh,
+ uint8_t highThresh,
+ uint8_t trueValue,
+ uint8_t falseValue);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterDilate3x3u8_v2(). In the 2.0.0 release,
+/// fcvFilterDilate3x3u8_v2 will be renamed to fcvFilterDilate3x3u8
+/// and the signature of fcvFilterDilate3x3u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Output 8-bit dilated image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterDilate3x3u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterDilate3x3u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterDilate3x3u8,
+/// \a fcvFilterDilate3x3u8_v2 will be removed, and the current signature
+/// for \a fcvFilterDilate3x3u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterDilate3x3u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit dilated image. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of output image.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterDilate3x3u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Erode a grayscale image by taking the local minima of 3x3 neighborhood window.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterErode3x3u8_v2(). In the 2.0.0 release,
+/// fcvFilterErode3x3u8_v2 will be renamed to fcvFilterErode3x3u8
+/// and the signature of fcvFilterErode3x3u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Output 8-bit eroded image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterErode3x3u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Erode a grayscale image by taking the local minima of 3x3 nbhd window.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterErode3x3u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterErode3x3u8,
+/// \a fcvFilterErode3x3u8_v2 will be removed, and the current signature
+/// for \a fcvFilterErode3x3u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterErode3x3u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit eroded image. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of output image.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterErode3x3u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Warps the patch centered at nPos in the input image using the affine
+/// transform in nAffine
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvTransformAffine8x8u8_v2(). In the 2.0.0 release,
+/// fcvTransformAffine8x8u8_v2 will be renamed to fcvTransformAffine8x8u8
+/// and the signature of fcvTransformAffine8x8u8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image. Size of buffer is srcWidth*srcHeight bytes.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param nPos[ 2 ]
+/// Position in the image in 32 bit fixed point (Q16)
+/// \n\b NOTE: if any 1 coordinates of the warped square are inside the image, return 1 and
+/// \n leave function. Otherwise, return 0.
+/// \n\b WARNING: must be 64-bit aligned.
+///
+/// @param nAffine[ 2 ][ 2 ]
+/// Transformation matrix in 32 bit fixed point (Q16). The matrix stored
+/// in nAffine is using row major ordering: \n
+/// a11, a12, a21, a22 where the matrix is: \n
+/// | a11, a12 |\n
+/// | a21, a22 |\n
+///
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param nPatch
+/// Transformed patch.
+///
+/// @return
+/// 0 if the transformation is valid
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvTransformAffine8x8u8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ const int32_t* __restrict nPos,
+ const int32_t* __restrict nAffine,
+ uint8_t* __restrict nPatch );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Warps the patch centered at nPos in the input image using the affine
+/// transform in nAffine
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvTransformAffine8x8u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvTransformAffine8x8u8,
+/// \a fcvTransformAffine8x8u8_v2 will be removed, and the current signature
+/// for \a fcvTransformAffine8x8u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvTransformAffine8x8u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input image. Size of buffer is srcStride*srcHeight bytes.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Stride of image (in bytes) - i.e., how many bytes between column 0 of row N
+/// and column 0 of row N+1.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: must be at least as much as srcWidth if not 0.
+///
+/// @param nPos[ 2 ]
+/// Position in the image in 32 bit fixed point (Q16)
+/// \n\b NOTE: if any 1 coordinates of the warped square are inside the image, return 1 and
+/// \n leave function. Otherwise, return 0.
+/// \n\b WARNING: must be 64-bit aligned.
+///
+/// @param nAffine[ 2 ][ 2 ]
+/// Transformation matrix in 32 bit fixed point (Q16). The matrix stored
+/// in nAffine is using row major ordering: \n
+/// a11, a12, a21, a22 where the matrix is: \n
+/// | a11, a12 |\n
+/// | a21, a22 |\n
+///
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param patch
+/// Transformed patch.
+///
+/// @param patchStride
+/// Stride of patch (in bytes) - i.e., how many bytes between column 0 of row N
+/// and column 0 of row N+1.
+/// \n\b NOTE: if 0, srcStride is set as 8.
+/// \n\b WARNING: must be at least as much as 8 if not 0.
+///
+/// @return
+/// 0 if the transformation is valid
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvTransformAffine8x8u8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ const int32_t* __restrict nPos,
+ const int32_t* __restrict nAffine,
+ uint8_t* __restrict patch,
+ unsigned int patchStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Warps a grayscale image using the a perspective projection transformation
+/// matrix (also known as a homography). This type of transformation is an
+/// invertible transformation which maps straight lines to straight lines.
+/// Bi-linear interpolation is used where applicable.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvWarpPerspectiveu8_v2(). In the 2.0.0 release,
+/// fcvWarpPerspectiveu8_v2 will be renamed to fcvWarpPerspectiveu8
+/// and the signature of fcvWarpPerspectiveu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Warps an image taking into consideration the perspective scaling.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Input image height.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param dst
+/// Warped output image. Size of buffer is dstWidth*dstHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Dst image width.
+/// \n\b NOTE: data should be multiple of 8.
+///
+/// @param dstHeight
+/// Dst image height.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param projectionMatrix
+/// 3x3 perspective transformation matrix (generally a homography). The
+/// matrix stored in homography is row major ordering: \n
+/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
+/// | a11, a12, a13 |\n
+/// | a21, a22, a23 |\n
+/// | a31, a32, a33 |\n
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// Note:
+/// The projection matrix follows the so-called inverse mapping convention.
+/// It is applied to the dst coordinates to produce the corresponding
+/// src coordinates. In other 3rd party tools, the so-called forward mapping
+/// convention may be used, where the projection matrix refers to the one
+/// applied to the src coordinates to produce the dst coordinates.
+/// When comparing with 3rd party results, please make sure
+/// the same convention of projection matrices are assumed. If not,
+/// please transform the projection matrix into an equivalent form under
+/// the forward mapping convention before feeding it into 3rd party tools.
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvWarpPerspectiveu8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst,
+ unsigned int dstWidth,
+ unsigned int dstHeight,
+ float* __restrict projectionMatrix );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Warps a grayscale image using the a perspective projection transformation
+/// matrix (also known as a homography). This type of transformation is an
+/// invertible transformation which maps straight lines to straight lines.
+/// Bi-linear interpolation is used where applicable.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvWarpPerspectiveu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvWarpPerspectiveu8,
+/// \a fcvWarpPerspectiveu8_v2 will be removed, and the current signature
+/// for \a fcvWarpPerspectiveu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvWarpPerspectiveu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Warps an image taking into consideration the perspective scaling.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Input image height.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcStride
+/// Input image stride (in bytes).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Warped output image. Size of buffer is dstStride*dstHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Dst image width.
+/// \n\b NOTE: data should be multiple of 8.
+///
+/// @param dstHeight
+/// Dst image height.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param dstStride
+/// Output image stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
+///
+/// @param projectionMatrix
+/// 3x3 perspective transformation matrix (generally a homography). The
+/// matrix stored in homography is row major ordering: \n
+/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
+/// | a11, a12, a13 |\n
+/// | a21, a22, a23 |\n
+/// | a31, a32, a33 |\n
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// Note:
+/// The projection matrix follows the so-called inverse mapping convention.
+/// It is applied to the dst coordinates to produce the corresponding
+/// src coordinates. In other 3rd party tools, the so-called forward mapping
+/// convention may be used, where the projection matrix refers to the one
+/// applied to the src coordinates to produce the dst coordinates.
+/// When comparing with 3rd party results, please make sure
+/// the same convention of projection matrices are assumed. If not,
+/// please transform the projection matrix into an equivalent form under
+/// the forward mapping convention before feeding it into 3rd party tools.
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvWarpPerspectiveu8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstWidth,
+ unsigned int dstHeight,
+ unsigned int dstStride,
+ float* __restrict projectionMatrix );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Warps a 3 color channel image based on a 3x3 perspective projection matrix using
+/// bilinear interpolation.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcv3ChannelWarpPerspectiveu8_v2(). In the 2.0.0 release,
+/// fcv3ChannelWarpPerspectiveu8_v2 will be renamed to fcv3ChannelWarpPerspectiveu8
+/// and the signature of fcv3ChannelWarpPerspectiveu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image. Size of buffer is srcWidth*srcHeight*3 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Input image height.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param dst
+/// Warped output image. Size of buffer is dstWidth*dstHeight*3 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Output image width.
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param dstHeight
+/// Output image height.
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param projectionMatrix
+/// 3x3 perspective transformation matrix (generally a homography). The
+/// matrix stored in homography is row major ordering: \n
+/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
+/// | a11, a12, a13 |\n
+/// | a21, a22, a23 |\n
+/// | a31, a32, a33 |\n
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// Note:
+/// The projection matrix follows the so-called inverse mapping convention.
+/// It is applied to the dst coordinates to produce the corresponding
+/// src coordinates. In other 3rd party tools, the so-called forward mapping
+/// convention may be used, where the projection matrix refers to the one
+/// applied to the src coordinates to produce the dst coordinates.
+/// When comparing with 3rd party results, please make sure
+/// the same convention of projection matrices are assumed. If not,
+/// please transform the projection matrix into an equivalent form under
+/// the forward mapping convention before feeding it into 3rd party tools.
+///
+/// @ingroup image_transform
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcv3ChannelWarpPerspectiveu8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ uint8_t* __restrict dst,
+ unsigned int dstWidth,
+ unsigned int dstHeight,
+ float* __restrict projectionMatrix );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Warps a 3 color channel image based on a 3x3 perspective projection
+/// matrix using bilinear interpolation.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcv3ChannelWarpPerspectiveu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcv3ChannelWarpPerspectiveu8,
+/// \a fcv3ChannelWarpPerspectiveu8_v2 will be removed, and the current signature
+/// for \a fcv3ChannelWarpPerspectiveu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcv3ChannelWarpPerspectiveu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcHeight
+/// Input image height.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcStride
+/// Input image stride (in bytes).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth*3.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth*3 if not 0.
+///
+/// @param dst
+/// Warped output image. Size of buffer is dstStride*dstHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Output image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param dstHeight
+/// Output image height.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param dstStride
+/// Output image stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as dstWidth*3.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth*3 if not 0.
+///
+/// @param projectionMatrix
+/// 3x3 perspective transformation matrix (generally a homography). The
+/// matrix stored in homography is row major ordering: \n
+/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
+/// | a11, a12, a13 |\n
+/// | a21, a22, a23 |\n
+/// | a31, a32, a33 |\n
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// Note:
+/// The projection matrix follows the so-called inverse mapping convention.
+/// It is applied to the dst coordinates to produce the corresponding
+/// src coordinates. In other 3rd party tools, the so-called forward mapping
+/// convention may be used, where the projection matrix refers to the one
+/// applied to the src coordinates to produce the dst coordinates.
+/// When comparing with 3rd party results, please make sure
+/// the same convention of projection matrices are assumed. If not,
+/// please transform the projection matrix into an equivalent form under
+/// the forward mapping convention before feeding it into 3rd party tools.
+///
+/// @ingroup image_transform
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcv3ChannelWarpPerspectiveu8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ uint8_t* __restrict dst,
+ unsigned int dstWidth,
+ unsigned int dstHeight,
+ unsigned int dstStride,
+ float* __restrict projectionMatrix );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// General function for computing cluster centers and cluster bindings
+/// for a set of points of dimension dim.
+///
+/// @param points
+/// Array of all points. Array size must be greater than
+/// numPoints * dim.
+///
+/// @param numPoints
+/// Number of points in points array.
+///
+/// @param dim
+/// dimension, e.g. 36
+///
+/// @param pointStride
+/// Byte distance between adjacent points in array
+///
+/// @param indices
+/// Array of point indices in points array. Processing will only
+/// occur on points whose indices are in this array. Each index in array
+/// must be smaller numPoints.
+///
+/// @param numIndices
+/// Length of indices array. numIndieces must be <= numPoints.
+///
+/// @param numClusters
+/// Number of cluster centers
+///
+/// @param clusterCenters
+/// current cluster centers;
+/// elements are distant by clusterCenterStride
+///
+/// @param clusterCenterStride
+/// byte distance between adjacent cluster centers in array
+///
+/// @param newClusterCenters
+/// array for new cluster centers; should be numClusterCenters long
+///
+/// @param clusterMemberCounts
+/// Element counts for each cluster; should be numClusterCenters long
+///
+/// @param clusterBindings
+/// Output indices of the clusters to which each vector belongs to, array must
+/// be numIndices long.
+///
+/// @param sumOfClusterDistances
+/// Array for sum of distances of cluster elements to cluster centers;
+/// Must be numClusters long
+///
+/// @return
+/// 0 if successfully clustered, otherwise error code
+///
+/// @remark
+/// This is general clusterer. There are no assumptions on points other
+/// than they belong to a vector space
+///
+///
+///
+/// @ingroup clustering_and_search
+//---------------------------------------------------------------------------
+
+FASTCV_API int
+fcvClusterEuclideanf32( const float* __restrict points,
+ int numPoints, // actually not used but helpful
+ int dim,
+ int pointStride,
+ const size_t* __restrict indices,
+ int numIndices,
+ int numClusters,
+ float* __restrict clusterCenters,
+ int clusterCenterStride,
+ float* __restrict newClusterCenters,
+ size_t* __restrict clusterMemberCounts,
+ size_t* __restrict clusterBindings,
+ float* sumOfClusterDistances );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Function for computing cluster centers and cluster bindings
+/// for a set of normalized points of dimension dim. Cluster centers
+/// are also normalized (see remark below)
+///
+/// @param points
+/// Array of all points. Array size must be greater than
+/// numPoints * dim.
+///
+/// @param numPoints
+/// Number of points in points array.
+///
+/// @param dim
+/// dimension, e.g. 36
+///
+/// @param pointStride
+/// Byte distance between adjacent points in array
+///
+/// @param indices
+/// Array of point indices in points array. Processing will only
+/// occur on points whose indices are in this array. Each index in array
+/// must be smaller numPoints.
+///
+/// @param numIndices
+/// Length of indices array. numIndieces must be <= numPoints.
+///
+/// @param numClusters
+/// Number of cluster centers
+///
+/// @param clusterCenters
+/// current cluster centers;
+/// elements are distant by clusterCenterStride
+///
+/// @param clusterCenterStride
+/// byte distance between adjacent cluster centers in array
+///
+/// @param newClusterCenters
+/// array for new cluster centers; should be numClusterCenters long
+///
+/// @param clusterMemberCounts
+/// Element counts for each cluster; should be numClusterCenters long
+///
+/// @param clusterBindings
+/// Output indices of the clusters to which each vector belongs to, a
+/// rray must be numIndices long.
+///
+/// @param sumOfClusterDistances
+/// Array for sum of distances of cluster elements to cluster centers;
+/// Must be numClusters long
+///
+/// @return
+/// 0 if successfully clustered, otherwise error code
+///
+/// @remark
+/// this function assumes that points are normalized (e.g. NFT4
+/// descriptors). Cluster centers are also normalized. Normalized points
+/// are on a surface of unit sphere which is not a vector space but
+/// curved manifold of dimension (dim-1) embeded in Euclidean vector space
+/// of dimension dim
+///
+/// @ingroup clustering_and_search
+//---------------------------------------------------------------------------
+
+FASTCV_API int
+fcvClusterEuclideanNormedf32( const float* __restrict points,
+ int numPoints,
+ int dim,
+ int pointStride,
+ const size_t* __restrict indices,
+ int numIndices,
+ int numClusters,
+ float* __restrict clusterCenters,
+ int clusterCenterStride,
+ float* __restrict newClusterCenters,
+ size_t* __restrict clusterMemberCounts,
+ size_t* __restrict clusterBindings,
+ float* sumOfClusterDistances );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Function for computing cluster centers and cluster bindings
+/// for a set of normalized points of dimension 36. Cluster centers
+/// are also normalized (see remark below)
+///
+/// @param points
+/// Array of all points. Array size must be greater than
+/// numPoints * 36.
+///
+/// @param numPoints
+/// Number of points in points array.
+///
+/// @param pointStride
+/// Byte distance between adjacent points in array
+///
+/// @param indices
+/// Array of point indices in points array. Processing will only
+/// occur on points whose indices are in this array. Each index in array
+/// must be smaller numPoints.
+///
+/// @param numIndices
+/// Length of indices array. numIndieces must be <= numPoints.
+///
+/// @param numClusters
+/// Number of cluster centers
+///
+/// @param clusterCenters
+/// current cluster centers;
+/// elements are distant by clusterCenterStride
+///
+/// @param clusterCenterStride
+/// byte distance between adjacent cluster centers in array
+///
+/// @param newClusterCenters
+/// array for new cluster centers; should be numClusterCenters long
+///
+/// @param clusterMemberCounts
+/// Element counts for each cluster; should be numClusterCenters long
+///
+/// @param clusterBindings
+/// Output indices of the clusters to which each vector belongs to, a
+/// rray must be numIndices long.
+///
+/// @param sumOfClusterDistances
+/// Array for sum of distances of cluster elements to cluster centers;
+/// Must be numClusters long
+///
+/// @return
+/// 0 if successfully clustered, otherwise error code
+///
+/// @remark
+/// this function assumes that points are normalized (e.g. NFT4
+/// descriptors). Cluster centers are also normalized. Normalized points
+/// are on a surphace of unit sphere which is not a vector space but
+/// curved manifold of dimension (dim-1) embeded in Euclidean vector space
+/// of dimension dim
+///
+/// @ingroup clustering_and_search
+//---------------------------------------------------------------------------
+
+FASTCV_API int
+fcvClusterEuclideanNormed36f32( const float* __restrict points,
+ int numPoints,
+ int pointStride,
+ const size_t* __restrict indices,
+ int numIndices,
+ int numClusters,
+ float* __restrict clusterCenters,
+ int clusterCenterStride,
+ float* __restrict newClusterCenters,
+ size_t* __restrict clusterMemberCounts,
+ size_t* __restrict clusterBindings,
+ float* sumOfClusterDistances );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Blur with 5x5 Gaussian filter
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterGaussian5x5s16_v2(). In the 2.0.0 release,
+/// fcvFilterGaussian5x5s16_v2 will be renamed to fcvFilterGaussian5x5s16
+/// and the signature of fcvFilterGaussian5x5s16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Convolution with 5x5 Gaussian kernel:
+/// \n 1 4 6 4 1
+/// \n 4 16 24 16 4
+/// \n 6 24 36 24 6
+/// \n 4 16 24 16 4
+/// \n 1 4 6 4 1
+///
+/// @param src
+/// Input int data (can be sq. of gradient, etc).
+/// \n\b NOTE: Size of buffer is srcWidth*srcHeight*2 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Output int data. Size of buffer is srcWidth*srcHeight*2 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param blurBorder
+/// If set to 0, border is ignored.
+/// If set to 1, border is blurred by 0-padding adjacent values.
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterGaussian5x5s16( const int16_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ int16_t* __restrict dst,
+ int blurBorder );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Blur with 5x5 Gaussian filter
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterGaussian5x5s16() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterGaussian5x5s16,
+/// \a fcvFilterGaussian5x5s16_v2 will be removed, and the current signature
+/// for \a fcvFilterGaussian5x5s16 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterGaussian5x5s16 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Convolution with 5x5 Gaussian kernel:
+/// \n 1 4 6 4 1
+/// \n 4 16 24 16 4
+/// \n 6 24 36 24 6
+/// \n 4 16 24 16 4
+/// \n 1 4 6 4 1
+///
+/// @param src
+/// Input int data (can be sq. of gradient, etc).
+/// Size of buffer is srcStride*srcHeight*2 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth*2.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*2 if not 0.
+///
+/// @param dst
+/// Output int data. Size of buffer is dstStride*srcHeight*2 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride in bytes.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth*2.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*2 if not 0.
+///
+/// @param blurBorder
+/// If set to 0, border is ignored.
+/// If set to 1, border is blurred by 0-padding adjacent values.
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterGaussian5x5s16_v2( const int16_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict dst,
+ unsigned int dstStride,
+ int blurBorder );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Blur with 5x5 Gaussian filter
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterGaussian5x5s32_v2(). In the 2.0.0 release,
+/// fcvFilterGaussian5x5s32_v2 will be renamed to fcvFilterGaussian5x5s32
+/// and the signature of fcvFilterGaussian5x5s32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Convolution with 5x5 Gaussian kernel:
+/// \n 1 4 6 4 1
+/// \n 4 16 24 16 4
+/// \n 6 24 36 24 6
+/// \n 4 16 24 16 4
+/// \n 1 4 6 4 1
+///
+/// @param src
+/// Input int data (can be sq. of gradient, etc).
+/// Size of buffer is srcWidth*srcHeight*4 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param dst
+/// Output int data. Size of buffer is srcWidth*srcHeight*4 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param blurBorder
+/// If set to 0, border is ignored.
+/// If set to 1, border is blurred by 0-padding adjacent values.
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterGaussian5x5s32( const int32_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ int32_t* __restrict dst,
+ int blurBorder );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Blur with 5x5 Gaussian filter
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterGaussian5x5s32() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterGaussian5x5s32,
+/// \a fcvFilterGaussian5x5s32_v2 will be removed, and the current signature
+/// for \a fcvFilterGaussian5x5s32 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterGaussian5x5s32 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Convolution with 5x5 Gaussian kernel:
+/// \n 1 4 6 4 1
+/// \n 4 16 24 16 4
+/// \n 6 24 36 24 6
+/// \n 4 16 24 16 4
+/// \n 1 4 6 4 1
+///
+/// @param src
+/// Input int data (can be sq. of gradient, etc).
+/// Size of buffer is srcStride*srcHeight*4 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Input Image stride in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth*sizeof(int32_t).
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output int data. Size of buffer is dstStride*srcHeight*4 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output Image stride in bytes.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth*sizeof(int32_t).
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param blurBorder
+/// If set to 0, border is ignored.
+/// If set to 1, border is blurred by 0-padding adjacent values.
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFilterGaussian5x5s32_v2( const int32_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int32_t* __restrict dst,
+ unsigned int dstStride,
+ int blurBorder );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Segments an image (3 or 1 channel) into meaningful regions,
+/// depending on the color or gray scale uniformity of the neighborhood pixels.
+///
+/// @param src
+/// Pointer to 8-bit color (3-channel) or grayscale (1-channel) image.
+///
+/// @param srcWidth
+/// Width of src image, measured by pixels.
+///
+/// @param srcHeight
+/// Height of src image, measured by pixels.
+///
+/// @param srcStride
+/// Stride of src image, measured by bytes.
+/// WARNING: should be multiple of 8, and at least as much as srcWidth*numChannel if not 0.
+///
+/// @param numChannel
+/// Number of channels of src image. 1 for gray scale and 3 for color image.
+///
+/// @param thresholdSplit
+/// Threshold for region split. Higher value: larger uniform region segmented.
+/// Range of 3-channel image segmentation 20~500: 20~50 for heavy over-segmentation, 50~100 for median over-segmentation, 100~150 for light over-segmentation, 150~250 for normal segmentation, 250~400 for light under-segmentation, 400~500 for heavy under-segmentation.
+/// Range of 1-channel image segmentation 3~150: 3~10 for heavy over-segmentation, 10~15 for median over-segmentation, 15~25 for light over-segmentation, 25~50 for normal segmentation, 50~75 for light under-segmentation, 75~150 for heavy under-segmentation.
+///
+/// @param thresholdMerge
+/// Threshold for region merge, measured by the region area (pixels). Higher value: larger uniform region segmented. Range 10~1000 for VGA size image.
+/// Range of 3-channel image segmentation 10~1000: 10~30 for heavy over-segmentation, 30~60 for median over-segmentation, 60~150 for light over-segmentation, 150~400 for normal segmentation, 400~600 for light under-segmentation, 600~1000 for heavy under-segmentation.
+/// Same for the 1-channel image.
+/// For other image size, please tune the thresholdMerge value proportional to the VGA size.
+///
+/// @param segLabel
+/// Segmented labels. 1 channel with same size of src. Pixel belonging to the same region is uniformly labeled by a non-zero number.
+///
+/// @param segLabelStride
+/// Stride of segmented labels, measured by bytes.
+/// WARNING: should be multiple of 8, and at least as much as srcWidth*4 if not 0.
+///
+/// @param data
+/// data buffer for inner function buffer allocation. The buffer size is recommended below,
+/// for 3-channel image: *data = (uint8_t *) malloc ( srcWidth*srcHeight*18*sizeof(uint8_t) );
+/// for 1-channel image: *data = (uint8_t *) malloc ( srcWidth*srcHeight*16*sizeof(uint8_t) );
+///
+/// @return
+/// 0 if successful.
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+FASTCV_API uint32_t
+fcvImageSegmentationRegionGrow( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t numChannel,
+ uint32_t thresholdSplit,
+ uint32_t thresholdMerge,
+ uint32_t* __restrict segLabel,
+ uint32_t segLabelStride,
+ uint8_t* __restrict data );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Warps the patch centered at nPos in the input image using the affine
+/// transform in nAffine
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvTransformAffineu8_v2(). In the 2.0.0 release,
+/// fcvTransformAffineu8_v2 will be renamed to fcvTransformAffineu8
+/// and the signature of fcvTransformAffineu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image. Size of buffer is srcWidth*srcHeight bytes.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param position[ 2 ]
+/// Position in the image
+/// \n\b WARNING: must be 64-bit aligned.
+///
+/// @param affine[ 2 ][ 2 ]
+/// Transformation matrix. The matrix stored
+/// in affine is using row major ordering: \n
+/// a11, a12, a21, a22 where the matrix is: \n
+/// | a11, a12 |\n
+/// | a21, a22 |\n
+///
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param patch
+/// Transformed patch.
+///
+/// @param patchWidth
+/// Patch width.
+///
+/// @param patchHeight
+/// Patch height.
+///
+/// @return
+/// 0 if the transformation is valid
+///
+/// @ingroup image_transform
+//---------------------------------------------------------------------------
+
+FASTCV_API int
+fcvTransformAffineu8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ const float* __restrict position,
+ const float* __restrict affine,
+ uint8_t* __restrict patch,
+ unsigned int patchWidth,
+ unsigned int patchHeight );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Warps the patch centered at nPos in the input image using the affine
+/// transform in nAffine
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvTransformAffineu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvTransformAffineu8,
+/// \a fcvTransformAffineu8_v2 will be removed, and the current signature
+/// for \a fcvTransformAffineu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvTransformAffineu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input image. Size of buffer is srcStride*srcHeight bytes.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Stride of image (in bytes) - i.e., how many bytes between column 0 of row N
+/// and column 0 of row N+1.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: must be at least as much as srcWidth if not 0.
+///
+/// @param position[ 2 ]
+/// Position in the image
+/// \n\b WARNING: must be 64-bit aligned.
+///
+/// @param affine[ 2 ][ 2 ]
+/// Transformation matrix. The matrix stored
+/// in affine is using row major ordering: \n
+/// a11, a12, a21, a22 where the matrix is: \n
+/// | a11, a12 |\n
+/// | a21, a22 |\n
+///
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param patch
+/// Transformed patch.
+///
+/// @param patchWidth
+/// Patch width.
+///
+/// @param patchHeight
+/// Patch height.
+///
+/// @param patchStride
+/// Stride of patch (in bytes) - i.e., how many bytes between column 0 of row N
+/// and column 0 of row N+1.
+/// \n\b NOTE: if 0, patchStride is set as patchWidth.
+/// \n\b WARNING: must be at least as much as patchWidth if not 0.
+///
+/// @return
+/// 0 if the transformation is valid
+///
+/// @ingroup image_transform
+//---------------------------------------------------------------------------
+
+FASTCV_API int
+fcvTransformAffineu8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ const float* __restrict position,
+ const float* __restrict affine,
+ uint8_t* __restrict patch,
+ unsigned int patchWidth,
+ unsigned int patchHeight,
+ unsigned int patchStride );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Extracts a 17x17 rotation corrected patch from a 25x25 image.
+///
+/// @param src
+/// 25x25 input image in continuous memory.
+///
+/// @param dst
+/// 17x17 output patch.
+///
+/// @param orientation
+/// Rotation angle of patch relative to src.
+/// \n 10-bit fixed-point angle around unit circle.
+/// \n NOTE: 0 = 0 degrees and 1024 = 360 degrees.
+///
+/// @ingroup image_transform
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCopyRotated17x17u8( const uint8_t* __restrict src,
+ uint8_t* __restrict dst,
+ int orientation );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Counts "1" bits in supplied vector.
+///
+/// @param src
+/// Pointer to vector to count bits that are 1.
+///
+/// @param srcLength
+/// Length of the vector to count bits. Assumed that the remainder of bits modulo 8
+/// will be set to 0 a priori.
+///
+/// @return
+/// total number of "1" bits in supplied vector
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvBitCountu8( const uint8_t* __restrict src,
+ unsigned int srcLength );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Counts "1" bits in supplied 32-byte vector.
+///
+/// @param src
+/// Pointer to 32-byte vector(s) to count bits that are 1.
+///
+/// @return
+/// total number of "1" bits in supplied vector
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvBitCount32x1u8( const uint8_t* __restrict src );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Counts bits in supplied 4, 32-byte vectors.
+///
+/// @param a
+/// Pointer to 32-byte vector to count bits.
+///
+/// @param b
+/// Pointer to 32-byte vector to count bits.
+///
+/// @param c
+/// Pointer to 32-byte vector to count bits.
+///
+/// @param d
+/// Pointer to 32-byte vector to count bits.
+///
+/// @param bitCount
+/// Array to store the four resultant bit counts.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvBitCount32x4u8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b,
+ const uint8_t* __restrict c,
+ const uint8_t* __restrict d,
+ uint32_t* __restrict bitCount );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Counts bits in supplied 64-byte vector.
+///
+/// @param src
+/// Pointer to 64-byte vector(s) to count bits.
+///
+/// @return
+/// Bit count.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvBitCount64x1u8( const uint8_t* __restrict src );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Counts bits in supplied 4, 64-byte vectors.
+///
+/// @param a
+/// Pointer to 64-byte vector to count bits.
+///
+/// @param b
+/// Pointer to 64-byte vector to count bits.
+///
+/// @param c
+/// Pointer to 64-byte vector to count bits.
+///
+/// @param d
+/// Pointer to 64-byte vector to count bits.
+///
+/// @param bitCount
+/// Array to store the four resultant bit counts.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvBitCount64x4u8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b,
+ const uint8_t* __restrict c,
+ const uint8_t* __restrict d,
+ uint32_t* __restrict bitCount );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Counts bits in supplied vector of unsigned intergers.
+///
+/// @param src
+/// Pointer to vector(s) to count bits.
+///
+/// @param srcLength
+/// Number of elements in vector
+///
+/// @return
+/// Bit count.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvBitCountu32( const uint32_t* __restrict src,
+ unsigned int srcLength );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Computes the Hamming distance between the two supplied arbitrary length
+/// vectors.
+///
+/// @param a
+/// Pointer to vector to compute distance.
+///
+/// @param b
+/// Pointer to vector to compute distance.
+///
+/// @param abLength
+/// Length in bits of each of the vectors. Assumed that the remainder of
+/// bits modulo 8 will be set to 0 a priori.
+///
+/// @return
+/// Hamming distance between the two vectors.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvHammingDistanceu8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b,
+ unsigned int abLength );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Computes the Hamming distance between the two supplied 32-byte vectors.
+///
+/// @param a
+/// Pointer to 32-byte vector to compute distance.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param b
+/// Pointer to 32-byte vector to compute distance.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @return
+/// Hamming distance between the two vectors.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvHammingDistance32x1u8a4( const uint8_t* __restrict a,
+ const uint8_t* __restrict b );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Computes the Hamming distance between the two supplied 64-byte vectors.
+///
+/// @param a
+/// Pointer to 64-byte vector to compute distance.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param b
+/// Pointer to 64-byte vector to compute distance.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @return
+/// Hamming distance between the two vectors.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvHammingDistance64x1u8a4( const uint8_t* __restrict a,
+ const uint8_t* __restrict b );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Computes the Hamming distance between the two supplied 32-byte vectors.
+///
+/// @param a
+/// Pointer to 32-byte vector to compute distance.
+///
+/// @param b
+/// Pointer to 32-byte vector to compute distance.
+///
+/// @return
+/// Hamming distance between the two vectors.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvHammingDistance32x1u8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Computes the Hamming distance between the two supplied 64-byte vectors.
+///
+/// @param a
+/// Pointer to 64-byte vector to compute distance.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param b
+/// Pointer to 64-byte vector to compute distance.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @return
+/// Hamming distance between the two vectors.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvHammingDistance64x1u8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Computes the Hamming distance between A and each of B,C,D,E 32-byte vectors.
+///
+/// @param a
+/// Pointer to 32-byte vector to compute distance.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param b
+/// Pointer to 32-byte vector to compute distance from A.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param c
+/// Pointer to 32-byte vector to compute distance from A.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param d
+/// Pointer to 32-byte vector to compute distance from A.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param e
+/// Pointer to 32-byte vector to compute distance from A.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param hammingDistances
+/// Array to store each Hamming distance between the vectors.
+/// \n\b WARNING: should be 128-bit aligned
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvHammingDistance32x4u8a4( const uint8_t* __restrict a,
+ const uint8_t* __restrict b,
+ const uint8_t* __restrict c,
+ const uint8_t* __restrict d,
+ const uint8_t* __restrict e,
+ uint32_t* __restrict hammingDistances );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Computes the Hamming distance between A and each of B,C,D,E 64-byte
+/// vectors.
+///
+/// @param a
+/// Pointer to 32-byte vector to compute distance.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param b
+/// Pointer to 32-byte vector to compute distance from A.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param c
+/// Pointer to 32-byte vector to compute distance from A.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param d
+/// Pointer to 32-byte vector to compute distance from A.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param e
+/// Pointer to 32-byte vector to compute distance from A.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param hammingDistances
+/// Array to store each Hamming distance between the vectors.
+/// \n\b WARNING: should be 128-bit aligned
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvHammingDistance64x4u8a4( const uint8_t* __restrict a,
+ const uint8_t* __restrict b,
+ const uint8_t* __restrict c,
+ const uint8_t* __restrict d,
+ const uint8_t* __restrict e,
+ uint32_t* __restrict hammingDistances );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Computes the Hamming distance between A and each of B,C,D,E 64-byte vectors.
+///
+/// @param a
+/// Pointer to 64-byte vector to compute distance.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param b
+/// Pointer to 64-byte vector to compute distance from A.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param c
+/// Pointer to 64-byte vector to compute distance from A.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param d
+/// Pointer to 64-byte vector to compute distance from A.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param e
+/// Pointer to 64-byte vector to compute distance from A.
+/// \n\b WARNING: must be 32-bit aligned
+///
+/// @param hammingDistances
+/// Array to store each Hamming distance between the vectors.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvHammingDistance64x4u8( const uint8_t* __restrict a,
+ const uint8_t* __restrict b,
+ const uint8_t* __restrict c,
+ const uint8_t* __restrict d,
+ const uint8_t* __restrict e,
+ uint32_t* __restrict hammingDistances );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Extracts FAST corners and scores from the image
+///
+/// @param src
+/// 8-bit image
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width
+/// \n\b NOTE: should be a multiple of 8.
+/// \n\b WARNING: must be <= 2048.
+///
+/// @param srcHeight
+/// image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param barrier
+/// FAST threshold. The threshold is used to compare difference between intensity value of
+/// the central pixel and pixels on a circle surrounding this pixel.
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+/// \n\b WARNING: If border < 3, it will be default to 3.
+/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
+///
+/// @param xy
+/// pointer to the output array cointaining the interleaved x,y position of the
+/// detected corners.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param scores
+/// Pointer to the output array containing the scores of the detected corners.
+/// The score is the highest threshold that can still validate the detected corner.
+/// Must be greater than barrier. A higher score value indicates a stronger corner feature.
+/// For example, a corner of score 108 is stronger than a corner of score 50.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exits when the maximum number of
+/// corners is exceeded.
+///
+/// @param nCorners
+/// pointer to an integer storing the number of corners detected
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerFast9Scoreu8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int barrier,
+ unsigned int border,
+ uint32_t* __restrict xy,
+ uint32_t* __restrict scores,
+ unsigned int nCornersMax,
+ uint32_t* __restrict nCorners );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Extracts FAST corners and scores from the image
+///
+/// @param src
+/// Grayscale image with one byte per pixel
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// image width
+/// \n\b NOTE: should be a multiple of 8.
+/// \n\b WARNING: must be <= 2048.
+///
+/// @param srcHeight
+/// image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param barrier
+/// FAST threshold. The threshold is used to compare difference between intensity value of
+/// the central pixel and pixels on a circle surrounding this pixel.
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+/// \n\b WARNING: If border < 3, it will be default to 3.
+/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
+///
+/// @param xy
+/// Pointer to the output array cointaining the interleaved x,y position of the
+/// detected corners.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param scores
+/// Pointer to the output array containing the scores of the detected corners.
+/// The score is the highest threshold that can still validate the detected corner.
+/// Must be greater than barrier. A higher score value indicates a stronger corner feature.
+/// For example, a corner of score 108 is stronger than a corner of score 50.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exits when the maximum number of
+/// corners is exceeded.
+///
+/// @param nCorners
+/// pointer to an integer storing the number of corners detected
+///
+/// @param mask
+/// Per-pixel mask for each pixel represented in input image.
+/// If a bit set to 0, pixel will be a candidate for corner detection.
+/// If a bit set to 1, pixel will be ignored.
+///
+/// @param maskWidth
+/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
+/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
+///
+/// @param maskHeight
+/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
+/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerFast9InMaskScoreu8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int barrier,
+ unsigned int border,
+ uint32_t* __restrict xy,
+ uint32_t* __restrict scores,
+ unsigned int nCornersMax,
+ uint32_t* __restrict nCorners,
+ const uint8_t* __restrict mask,
+ unsigned int maskWidth,
+ unsigned int maskHeight );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Extracts FAST corners and scores from the image
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvCornerFast9Scoreu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvCornerFast9Scoreu8,
+/// \a fcvCornerFast9Scoreu8_v2 will be removed, and the current signature
+/// for \a fcvCornerFast9Scoreu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvCornerFast9Scoreu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// non-maximum suppression can be enabled to reduce the number of false corners.
+///
+/// @param src
+/// 8-bit image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width, the number of pixels in a row.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param barrier
+/// FAST threshold. The threshold is used to compare difference between intensity value of
+/// the central pixel and pixels on a circle surrounding this pixel.
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+/// \n\b WARNING: If border < 3, it will be default to 3.
+/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
+///
+/// @param xy
+/// Pointer to the output array cointaining the interleaved x,y position of the
+/// detected corners.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param scores
+/// Pointer to the output array containing the scores of the detected corners.
+/// The score is the highest threshold that can still validate the detected corner.
+/// Must be greater than barrier. A higher score value indicates a stronger corner feature.
+/// For example, a corner of score 108 is stronger than a corner of score 50.
+/// \n\b NOTE: should be 128-bit aligned.
+/// \n\b NOTE: size of buffer is @param nCornersMax
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exits when the maximum number of
+/// corners is exceeded.
+/// \n\b NOTE: This number should account for the number of key points before non-maximum suppression.
+///
+/// @param nCorners
+/// Pointer to an integer storing the number of corners detected
+///
+/// @param nmsEnabled
+/// Enable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
+/// \n\b NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key
+/// points before NMS
+///
+/// @param tempBuf
+/// Pointer to scratch buffer if nms is enabled, otherwise it can be NULL.
+/// Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerFast9Scoreu8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int barrier,
+ unsigned int border,
+ uint32_t* __restrict xy,
+ uint32_t* __restrict scores,
+ unsigned int nCornersMax,
+ uint32_t* __restrict nCorners,
+ uint32_t nmsEnabled,
+ void* __restrict tempBuf);
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Extracts FAST corners and scores from the image based on the mask. The mask specifies pixels
+/// to be ignored by the detector.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvCornerFast9InMaskScoreu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvCornerFast9InMaskScoreu8,
+/// \a fcvCornerFast9InMaskScoreu8_v2 will be removed, and the current signature
+/// for \a fcvCornerFast9InMaskScoreu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvCornerFast9InMaskScoreu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// non-maximum suppression can be enabled to reduce the number of false corners.
+///
+/// @param src
+/// 8-bit grayscale image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width, the number of pixels in a row.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param barrier
+/// FAST threshold. The threshold is used to compare difference between intensity value of
+/// the central pixel and pixels on a circle surrounding this pixel.
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+/// \n\b WARNING: If border < 3, it will be default to 3.
+/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
+///
+/// @param xy
+/// Pointer to the output array cointaining the interleaved x,y position of the
+/// detected corners.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param scores
+/// Pointer to the output array containing the scores of the detected corners.
+/// The score is the highest threshold that can still validate the detected corner.
+/// Must be greater than barrier. A higher score value indicates a stronger corner feature.
+/// For example, a corner of score 108 is stronger than a corner of score 50.
+/// \n\b NOTE: should be 128-bit aligned.
+/// \n\b NOTE: size of buffer is @param nCornersMax
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exits when the maximum number of
+/// corners is exceeded.
+/// \n\b NOTE: This number should account for the number of key points before non-maximum suppression.
+///
+/// @param nCorners
+/// Pointer to an integer storing the number of corners detected
+///
+/// @param mask
+/// Mask used to omit regions of the image. For allowed mask sizes refer to
+/// @param maskWidth and @param maskHeight . The mask is so defined to work with multiple
+/// scales if necessary. For any pixel set to '1' in the mask, the corresponding pixel in the image
+/// will be ignored.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param maskWidth
+/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
+/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
+///
+/// @param maskHeight
+/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
+/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
+///
+/// @param nmsEnabled
+/// Enable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
+/// \n\b NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key
+/// points before NMS
+///
+/// @param tempBuf
+/// Pointer to scratch buffer if nms is enabled, otherwise it can be NULL.
+/// Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerFast9InMaskScoreu8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int barrier,
+ unsigned int border,
+ uint32_t* __restrict xy,
+ uint32_t* __restrict scores,
+ unsigned int nCornersMax,
+ uint32_t* __restrict nCorners,
+ const uint8_t* __restrict mask,
+ unsigned int maskWidth,
+ unsigned int maskHeight,
+ uint32_t nmsEnabled,
+ void* __restrict tempBuf);
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Extracts FAST corners and scores from the image
+///
+/// @details
+/// non-maximum suppression can be enabled to reduce the number of false corners.
+///
+/// @param src
+/// 8-bit image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width, the number of pixels in a row.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param barrier
+/// FAST threshold. The threshold is used to compare difference between intensity value of
+/// the central pixel and pixels on a circle surrounding this pixel.
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+/// \n\b WARNING: If border < 3, it will be default to 3.
+/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
+///
+/// @param xy
+/// Pointer to the output array cointaining the interleaved x,y position of the
+/// detected corners.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param scores
+/// Pointer to the output array containing the scores of the detected corners.
+/// The score is the highest threshold that can still validate the detected corner.
+/// Must be greater than barrier. A higher score value indicates a stronger corner feature.
+/// For example, a corner of score 108 is stronger than a corner of score 50.
+/// \n\b NOTE: should be 128-bit aligned.
+/// \n\b NOTE: size of buffer is @param nCornersMax
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exits when the maximum number of
+/// corners is exceeded.
+/// \n\b NOTE: This number should account for the number of key points before non-maximum suppression.
+///
+/// @param nCorners
+/// pointer to an integer storing the number of corners detected
+///
+/// @param nmsEnabled
+/// Enable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
+/// \n\b NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key
+/// points before NMS
+///
+/// @param tempBuf
+/// Pointer to scratch buffer if nms is enabled, otherwise it can be NULL.
+/// Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @ingroup feature_detection
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerFast10Scoreu8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int32_t barrier,
+ uint32_t border,
+ uint32_t* __restrict xy,
+ uint32_t* __restrict scores,
+ uint32_t nCornersMax,
+ uint32_t* __restrict nCorners,
+ uint32_t nmsEnabled,
+ void* __restrict tempBuf);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Extracts FAST corners and scores from the image based on the mask. The mask specifies pixels
+/// to be ignored by the detector.
+///
+/// @param src
+/// 8-bit grayscale image where keypoints are detected
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// image width
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param barrier
+/// FAST threshold. The threshold is used to compare difference between intensity value of
+/// the central pixel and pixels on a circle surrounding this pixel.
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom,right,left of the image
+/// \n\b WARNING: If border < 3, it will be default to 3.
+/// \n\b WARNING: srcWidth and srcHeight must be > 2 x border
+///
+/// @param xy
+/// Pointer to the output array cointaining the interleaved x,y position of the
+/// detected corners.
+/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param scores
+/// Pointer to the output array containing the scores of the detected corners.
+/// The score is the highest threshold that can still validate the detected corner.
+/// Must be greater than barrier. A higher score value indicates a stronger corner feature.
+/// For example, a corner of score 108 is stronger than a corner of score 50.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param nCornersMax
+/// Maximum number of corners. The function exits when the maximum number of
+/// corners is exceeded.
+/// \n\b NOTE: This number should account for the number of key points before non-maximum suppression.
+///
+/// @param nCorners
+/// pointer to an integer storing the number of corners detected
+///
+/// @param mask
+/// Mask used to omit regions of the image. For allowed mask sizes refer to
+/// @param maskWidth and @param maskHeight. The mask is so defined to work with multiple
+/// scales if necessary. For any pixel set to '1' in the mask, the corresponding pixel in the image
+/// will be ignored.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param maskWidth
+/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
+/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
+///
+/// @param maskHeight
+/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
+/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
+///
+/// @param nmsEnabled
+/// Enable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
+/// \n\b NOTE: When NMS is enabled, be sure to assign large enough nCornersMax to store raw key
+/// points before NMS
+///
+/// @param tempBuf
+/// Pointer to scratch buffer if nms is enabled, otherwise it can be NULL.
+/// Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @ingroup feature_detection
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvCornerFast10InMaskScoreu8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int32_t barrier,
+ uint32_t border,
+ uint32_t* __restrict xy,
+ uint32_t* __restrict scores,
+ uint32_t nCornersMax,
+ uint32_t* __restrict nCorners,
+ const uint8_t* __restrict mask,
+ uint32_t maskWidth,
+ uint32_t maskHeight,
+ uint32_t nmsEnabled,
+ void* __restrict tempBuf);
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Optical flow. Bitwidth optimized implementation
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvTrackLKOpticalFlowu8_v2(). In the 2.0.0 release,
+/// fcvTrackLKOpticalFlowu8_v2 will be renamed to fcvTrackLKOpticalFlowu8
+/// and the signature of fcvTrackLKOpticalFlowu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src1
+/// Input image from frame #1.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param src2
+/// Input image from frame #2.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Input image height.
+///
+/// @param src1Pyr
+/// Image Pyradmid of src1
+/// \n\b WARNING: obtained by calling fcvPyramidCreateu8
+///
+/// @param src2Pyr
+/// Image Pyradmid of src2
+/// \n\b WARNING: obtained by calling fcvPyramidCreateu8
+///
+/// @param dx1Pyr
+/// Horizontal Sobel gradient pyramid for src1
+/// \n\b NOTE: To be left NULL. In this case the function will
+/// build the pyramid internally.
+///
+/// @param dy1Pyr
+/// Vertical Sobel grading pyraid for src1
+/// \n\b NOTE: To be left NULL. In this case the function will
+/// build the pyramid internally.
+///
+/// @param featureXY
+/// Pointer to X,Y floating point, sub-pixel coordinates for features to
+/// track. Stored as X,Y tuples. featureXY array storage must
+/// be >= featureLen*2.
+///
+/// @param featureXY_out
+/// Pointer to X,Y floating point, sub-pixel coordinates for tracked features
+/// Stored as X,Y tuples. featureXY array storage must
+/// be >= featureLen*2.
+///
+/// @param featureStatus
+/// Pointer to integer array for status of each feature defined in
+/// featureXY. featureStatus array storage must
+/// be >= featureLen.
+///
+/// @param featureLen
+/// Number of features in featuresXY and featureStatus array.
+///
+/// @param windowWidth
+/// Width of window for optical flow searching. Must be odd number.
+/// \n\b NOTE: suggested value 5, 7 or 9
+///
+/// @param windowHeight
+/// Height of window for optical flow searching. Must be odd number.
+/// \n\b NOTE:: suggested value 5, 7 or 9
+///
+/// @param maxIterations
+/// Maximum number of LK iterations to perform per pyramid level.
+/// \n\b NOTE: suggested value 5 or 7
+///
+/// @param nPyramidLevels
+/// Number of pyramid levels.
+/// \n\b NOTE: suggested value 3 or 4 depending on size of image
+///
+/// @param maxResidue
+/// Maximum feature residue above which feature is declared lost.
+/// \n\b NOTE: obsolete parameters, set to 0
+///
+/// @param minDisplacement
+/// Minimum displacement solved below which iterations are stopped.
+/// \n\b NOTE: obsolete parameters, set to 0
+///
+/// @param minEigenvalue
+/// Threshold for feature goodness. If it is set it to 0, the check is disabled.
+/// \n\b NOTE: If good features are passed to the function, then it is suggested
+/// that you set it to 0 to have faster function time
+/// \n\b NOTE: obsolete parameters, set to 0
+///
+/// @param lightingNormalized
+/// if 1 Enable lightning normalization
+/// \n if 0 Disable lightning normalization
+/// \n\b NOTE: obsolete parameters, set to 0
+///
+/// @ingroup object_detection
+// -----------------------------------------------------------------------------
+
+FASTCV_API void
+fcvTrackLKOpticalFlowu8( const uint8_t* __restrict src1,
+ const uint8_t* __restrict src2,
+ int srcWidth,
+ int srcHeight,
+ const fcvPyramidLevel* src1Pyr,
+ const fcvPyramidLevel* src2Pyr,
+ const fcvPyramidLevel* dx1Pyr,
+ const fcvPyramidLevel* dy1Pyr,
+ const float* featureXY,
+ float* featureXY_out,
+ int32_t* featureStatus,
+ int featureLen,
+ int windowWidth,
+ int windowHeight,
+ int maxIterations,
+ int nPyramidLevels,
+ float maxResidue,
+ float minDisplacement,
+ float minEigenvalue,
+ int lightingNormalized );
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Optical flow (with stride so ROI can be supported)
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvTrackLKOpticalFlowu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvTrackLKOpticalFlowu8,
+/// \a fcvTrackLKOpticalFlowu8_v2 will be removed, and the current signature
+/// for \a fcvTrackLKOpticalFlowu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a ffcvTrackLKOpticalFlowu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src1
+/// Input image from frame #1.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param src2
+/// Input image from frame #2.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param width
+/// Input image width.
+///
+/// @param height
+/// Input image height.
+///
+/// @param stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to width.
+/// NOTE: should be a multiple of 8.
+///
+/// @param src1Pyr
+/// Image Pyramid of src1 (with stride)
+/// \n\b WARNING: obtained by calling fcvPyramidCreateu8_v2
+///
+/// @param src2Pyr
+/// Image Pyradmid of src2 (with stride)
+/// \n\b WARNING: obtained by calling fcvPyramidCreateu8_v2
+///
+/// @param featureXY
+/// Pointer to X,Y floating point, sub-pixel coordinates for features to
+/// track. Stored as X,Y tuples. featureXY array storage must
+/// be >= featureLen*2.
+///
+/// @param featureXY_out
+/// Pointer to X,Y floating point, sub-pixel coordinates for tracked features
+/// Stored as X,Y tuples. featureXY array storage must
+/// be >= featureLen*2.
+///
+/// @param featureStatus
+/// Pointer to integer array for status of each feature defined in
+/// featureXY. featureStatus array storage must
+/// be >= featureLen.
+///
+/// @param featureLen
+/// Number of features in featuresXY and featureStatus array.
+///
+/// @param windowWidth
+/// Width of window for optical flow searching. Must be odd number.
+/// \n\b NOTE: suggested value 5, 7 or 9
+///
+/// @param windowHeight
+/// Height of window for optical flow searching. Must be odd number.
+/// \n\b NOTE:: suggested value 5, 7 or 9
+///
+/// @param maxIterations
+/// Maximum number of LK iterations to perform per pyramid level.
+/// \n\b NOTE: suggested value 5 or 7
+///
+/// @param nPyramidLevels
+/// Number of pyramid levels.
+/// \n\b NOTE: suggested value 3 or 4 depending on size of image
+///
+/// @ingroup object_detection
+// -----------------------------------------------------------------------------
+
+FASTCV_API void
+fcvTrackLKOpticalFlowu8_v2( const uint8_t* __restrict src1,
+ const uint8_t* __restrict src2,
+ uint32_t width,
+ uint32_t height,
+ uint32_t stride,
+ const fcvPyramidLevel_v2 *src1Pyr,
+ const fcvPyramidLevel_v2 *src2Pyr,
+ const float32_t* featureXY,
+ float32_t* featureXY_out,
+ int32_t* featureStatus,
+ int32_t featureLen,
+ int32_t windowWidth,
+ int32_t windowHeight,
+ int32_t maxIterations,
+ int32_t nPyramidLevels);
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Optical flow.
+///
+/// \n\b ATTENTION: This function will be removed when the 2.0.0 release of this library
+/// is made. Until 2.0.0, the developer should use this implementation with the expectation of
+/// using \a fcvTrackLKOpticalFlowu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src1
+/// Input image from frame #1.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param src2
+/// Input image from frame #2.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Input image height.
+///
+/// @param src1Pyr
+/// Image Pyradmid of src1
+/// \n\b WARNING: obtained by calling fcvPyramidCreateu8
+///
+/// @param src2Pyr
+/// Image Pyradmid of src2
+/// \n\b WARNING: obtained by calling fcvPyramidCreateu8
+///
+/// @param dx1Pyr
+/// Horizontal Sobel gradient pyramid for src1
+/// \n\b NOTE: To be left NULL. In this case the function will
+/// build the pyramid internally.
+///
+/// @param dy1Pyr
+/// Vertical Sobel grading pyraid for src1
+/// \n\b NOTE: To be left NULL. In this case the function will
+/// build the pyramid internally.
+///
+/// @param featureXY
+/// Pointer to X,Y floating point, sub-pixel coordinates for features to
+/// track. Stored as X,Y tuples. featureXY array storage must
+/// be >= featureLen*2.
+///
+/// @param featureXY_out
+/// Pointer to X,Y floating point, sub-pixel coordinates for tracked features
+/// Stored as X,Y tuples. featureXY array storage must
+/// be >= featureLen*2.
+///
+/// @param featureStatus
+/// Pointer to integer array for status of each feature defined in
+/// featureXY. featureStatus array storage must
+/// be >= featureLen.
+/// \n\b NOTE: Possible status are :
+/// \n TRACKED 1
+/// \n NOT_FOUND -1
+/// \n SMALL_DET -2
+/// \n MAX_ITERATIONS -3
+/// \n OUT_OF_BOUNDS -4
+/// \n LARGE_RESIDUE -5
+/// \n SMALL_EIGVAL -6
+/// \n INVALID -99
+///
+/// @param featureLen
+/// Number of features in featuresXY and featureStatus array.
+///
+/// @param windowWidth
+/// Width of window for optical flow searching. Must be odd number.
+/// \n\b NOTE: suggested value 5, 7 or 9
+///
+/// @param windowHeight
+/// Height of window for optical flow searching. Must be odd number.
+/// \n\b NOTE:: suggested value 5, 7 or 9
+///
+/// @param maxIterations
+/// Maximum number of LK iterations to perform per pyramid level.
+/// \n\b NOTE: suggested value 5 or 7
+///
+/// @param nPyramidLevels
+/// Number of pyramid levels.
+/// \n\b NOTE: suggested value 3 or 4 depending on size of image
+///
+/// @param maxResidue
+/// Maximum feature residue above which feature is declared lost.
+/// \n\b NOTE: obsolete parameters, set to 0
+///
+/// @param minDisplacement
+/// Minimum displacement solved below which iterations are stopped.
+/// \n\b NOTE : Suggest that be set to between 0.1 and 0.2, say 0.15
+/// \n\b NOTE: obsolete parameters, set to 0
+///
+/// @param minEigenvalue
+/// Threshold for feature goodness. If it is set it to 0, the check is disabled.
+/// \n\b NOTE: If good features are passed to the function, then it is suggested
+/// that you set it to 0 to have faster function time
+/// \n\b NOTE: obsolete parameters, set to 0
+///
+/// @param lightingNormalized
+/// if 1 Enable lightning normalization
+/// \n if 0 Disable lightning normalization
+/// \n\b NOTE: obsolete parameters, set to 0
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvTrackLKOpticalFlowf32( const uint8_t* __restrict src1,
+ const uint8_t* __restrict src2,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ const fcvPyramidLevel* src1Pyr,
+ const fcvPyramidLevel* src2Pyr,
+ const fcvPyramidLevel* dx1Pyr,
+ const fcvPyramidLevel* dy1Pyr,
+ const float* featureXY,
+ float* featureXY_out,
+ int32_t* featureStatus,
+ int featureLen,
+ int windowWidth,
+ int windowHeight,
+ int maxIterations,
+ int nPyramidLevels,
+ float maxResidue,
+ float minDisplacement,
+ float minEigenvalue,
+ int lightingNormalized );
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Builds an image pyramid of float32 arising from a single
+/// original image - that are successively downscaled w.r.t. the
+/// pre-set levels.
+/// \n\b NOTE: Memory should be deallocated using fcvPyramidDelete
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvPyramidCreatef32_v2(). In the 2.0.0 release,
+/// fcvPyramidCreatef32_v2 will be renamed to fcvPyramidCreatef32
+/// and the signature of fcvPyramidCreatef32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Base image. Size of buffer is srcWidth*srcHeight*4 bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of base image
+/// \n\b WARNING: must be a multiple of 2^numLevels
+///
+/// @param srcHeight
+/// Height of base image
+/// \n\b WARNING: must be a multiple of 2^numLevels
+///
+/// @param numLevels
+/// Number of levels of the pyramid
+///
+/// @param pyramid
+/// Output pyramid of numLevels+1 images of the same type as src .
+/// pyramid[0] will be the same as src . pyramid[1] is the next
+/// pyramid layer, a smoothed and down-sized src , and so on.
+///
+/// @ingroup image_processing
+//-------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvPyramidCreatef32( const float* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int numLevels,
+ fcvPyramidLevel* pyramid );
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Builds an image pyramid (with stride).
+/// \n\b NOTE: Memory should be deallocated using fcvPyramidDelete_v2
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvPyramidCreatef32() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvPyramidCreatef32,
+/// \a fcvPyramidCreatef32_v2 will be removed, and the current signature
+/// for \a fcvPyramidCreatef32 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvPyramidCreatef32 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// base image
+///
+/// @param srcWidth
+/// width of base image
+/// \n\b NOTE: Needs to be a multiple of 2^numLevels
+///
+/// @param srcHeight
+/// height of base image
+/// \n\b NOTE: Needs to be a multiple of 2^numLevel
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory (base image).
+/// \n\b NOTE: Needs to be a multiple of 2^numLevels
+/// \n\b NOTE: If left at 0, pyramid (non-base) image stride is the same as its srcWidth*sizeof(float32_t)
+///
+/// @param numLevels
+/// Number of levels of the pyramid
+///
+/// @param fcvPyramidLevel_v2
+/// output pyramid (with stride) of numLevels+1 images of the same type as src .
+/// pyramid[0] will be the same as src . pyramid[1] is the next
+/// pyramid layer, a smoothed and down-sized src , and so on.
+///
+/// @ingroup image_processing
+//-------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvPyramidCreatef32_v2( const float32_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t numLevels,
+ fcvPyramidLevel_v2* pyramid );
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Builds an image pyramid of uint8_t arising from a single
+/// original image - that are successively downscaled w.r.t. the
+/// pre-set levels.
+/// \n\b NOTE: Memory should be deallocated using fcvPyramidDelete
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvPyramidCreateu8_v2(). In the 2.0.0 release,
+/// fcvPyramidCreateu8_v2 will be renamed to fcvPyramidCreateu8
+/// and the signature of fcvPyramidCreateu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Base image. Size of buffer is srcWidth*srcHeight bytes.
+///
+/// @param srcWidth
+/// Width of base image
+/// \n\b WARNING: must be a multiple of 2^(numLevels-1)
+///
+/// @param srcHeight
+/// height of base image
+/// \n\b NOTE: must be a multiple of 2^(numLevels-1)
+///
+/// @param numLevels
+/// Number of levels of the pyramid
+///
+/// @param pyramid
+/// Output pyramid of numLevels+1 images of the same type as src .
+/// pyramid[0] will be the same as src . pyramid[1] is the next
+/// pyramid layer, a smoothed and down-sized src , and so on.
+///
+/// @ingroup image_processing
+//-------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvPyramidCreateu8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int numLevels,
+ fcvPyramidLevel* pyramid );
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Builds an image pyramid (with stride).
+/// \n\b NOTE: Memory should be deallocated using fcvPyramidDelete
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvPyramidCreateu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvPyramidCreateu8,
+/// \a fcvPyramidCreateu8_v2 will be removed, and the current signature
+/// for \a fcvPyramidCreateu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvPyramidCreateu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// base image
+///
+/// @param srcWidth
+/// width of base image
+/// \n\b NOTE: Needs to be a multiple of 2^numLevels
+///
+/// @param srcHeight
+/// height of base image
+/// \n\b NOTE: Needs to be a multiple of 2^numLevel
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory (base image).
+/// \n\b NOTE: Needs to be a multiple of 2^numLevels
+/// \n\b NOTE: Pyramid (non-base) image stride is the same as its width
+///
+/// @param numLevels
+/// Number of levels of the pyramid
+///
+/// @param fcvPyramidLevel_v2
+/// output pyramid (with stride) of numLevels+1 images of the same type as src .
+/// pyramid[0] will be the same as src . pyramid[1] is the next
+/// pyramid layer, a smoothed and down-sized src , and so on.
+///
+/// @ingroup image_processing
+//-------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvPyramidCreateu8_v2( const uint8_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t numLevels,
+ fcvPyramidLevel_v2* pyramid );
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Builds a Gaussian image pyramid.
+/// DO NOT USE THIS API unless for testing purposes.
+/// This API can be removed without notice.
+///
+/// @details
+/// This function builds a Gaussian image Pyramid given an input image. Each level
+/// of the pyramid is computed by first applying a gaussian filter on the previous level,
+/// and then scaling the image based on the type of scale factor selected. The memory for
+/// the pyramid must be allocated using fcvPyramidAllocate_v3(), and should be
+/// deallocated using fcvPyramidDelete_v2()
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvPyramidCreateu8_v2() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvPyramidCreateu8,
+/// \a fcvPyramidCreateu8_v3 will be removed, and the current signature
+/// for \a fcvPyramidCreateu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvPyramidCreateu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// base image
+///
+/// @param srcWidth
+/// Width of base image
+///
+/// @param srcHeight
+/// Height of base image
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory (base image).
+/// \n\b NOTE: The stride of pyramid levels other than the base are set to be the same as their width
+///
+/// @param numLevels
+/// Number of levels of the pyramid
+///
+/// @param scale
+/// Defines the type of scaling used for each pyramid level.
+/// FASTCV_PYRAMID_SCALE_HALF downscales each level of the pyramid by a factor of 2.
+/// FASTCV_PYRAMID_SCALE_ORB downscales each level of the pyramid by a factor of 1/(2)^(1/4),
+/// which is approximated as 0.8408964f
+///
+/// @param pyramidGaussian
+/// output pyramid of "numLevels" images of the same type as src .
+/// pyramidGaussian[0] will be the same as src . pyramidGaussian[1] is the next
+/// pyramid layer, a smoothed and scaled src, and so on.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//-------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvPyramidCreateu8_v3(const uint8_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t numLevels,
+ fcvPyramidScale scale,
+ fcvPyramidLevel_v2* __restrict pyramidGaussian);
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Creates a gradient pyramid of int16_t from an image pyramid of uint8_t
+///
+/// @param imgPyr
+/// Input Image Pyramid
+///
+/// @param dxPyr
+/// Horizontal Sobel gradient pyramid
+///
+/// @param dyPyr
+/// Verical Sobel gradient pyramid
+///
+/// @param numLevels
+/// Number of levels in the pyramids
+///
+/// @ingroup image_processing
+//-------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvPyramidSobelGradientCreatei16( const fcvPyramidLevel* imgPyr,
+ fcvPyramidLevel* dxPyr,
+ fcvPyramidLevel* dyPyr,
+ unsigned int numLevels );
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Creates a gradient pyramid of float32 from an image pyramid of uint8_t
+///
+/// @param imgPyr
+/// input Image Pyramid
+///
+/// @param dxPyr
+/// Horizontal Sobel gradient pyramid
+///
+/// @param dyPyr
+/// Verical Sobel gradient pyramid
+///
+/// @param numLevels
+/// Number of levels in the pyramids
+///
+/// @ingroup image_processing
+//-------------------------------------------------------------------------------
+
+FASTCV_API int
+fcvPyramidSobelGradientCreatef32( const fcvPyramidLevel* imgPyr,
+ fcvPyramidLevel* dxPyr,
+ fcvPyramidLevel* dyPyr,
+ unsigned int numLevels );
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Creates a gradient pyramid of integer8 from an image pyramid of uint8_t
+///
+/// @param imgPyr
+/// input Image Pyramid
+///
+/// @param dxPyr
+/// Horizontal Sobel gradient pyramid
+///
+/// @param dyPyr
+/// Verical Sobel gradient pyramid
+///
+/// @param numLevels
+/// Number of levels in the pyramids
+///
+/// @ingroup image_processing
+// -----------------------------------------------------------------------------
+
+FASTCV_API int
+fcvPyramidSobelGradientCreatei8( const fcvPyramidLevel* imgPyr,
+ fcvPyramidLevel* dxPyr,
+ fcvPyramidLevel* dyPyr,
+ unsigned int numLevels );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function computes
+/// central differences on 3x3 neighborhood and then convolves the result with Sobel
+/// kernel
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageGradientSobelPlanars16_v3(). In the 2.0.0 release,
+/// fcvImageGradientSobelPlanars16_v3 will be renamed to fcvImageGradientSobelPlanars16
+/// and the signature of fcvImageGradientSobelPlanars16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (width)*(height) in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values
+/// Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (width)*(height) in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values
+/// Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientSobelPlanars16( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict dx,
+ int16_t* __restrict dy);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function computes
+/// central differences on 3x3 neighborhood and then convolves the result with Sobel
+/// kernel
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageGradientSobelPlanars16_v3(). In the 2.0.0 release,
+/// fcvImageGradientSobelPlanars16_v3 will be renamed to fcvImageGradientSobelPlanars16
+/// and the signature of fcvImageGradientSobelPlanars16_v2 and
+/// fcvImageGradientSobelPlanars16_v3 as it appears now, will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values
+/// Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values
+/// Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dxyStride
+/// Stride (in bytes) of 'dx' and 'dy' gradient arrays.
+/// \n\b NOTE: if 0, dxyStride is set as (srcWidth*sizeof(int16_t)).
+/// \n\b WARNING: should be multiple of 16 (8 * 2-bytes per gradient value), and at least as much as srcWidth if not 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientSobelPlanars16_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict dx,
+ int16_t* __restrict dy,
+ unsigned int dxyStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data without normalization.
+/// This function computes central differences on 3x3 neighborhood and then convolves
+/// the result with Sobel kernel
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvImageGradientSobelPlanars16_v2() with a change in behavior: no normalization
+/// at the end of the calculation.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvImageGradientSobelPlanars16,
+/// \a fcvImageGradientSobelPlanars16_v2 and fcvImageGradientSobelPlanars16_v3
+/// will be removed, and the current signature for \a fcvImageGradientSobelPlanars16
+/// and fcvImageGradientSobelPlanars16_v3 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvImageGradientSobelPlanars16 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient. The number of pixels in a row.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dxyStride
+/// Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth.
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvImageGradientSobelPlanars16_v3( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict dx,
+ int16_t* __restrict dy,
+ unsigned int dxyStride );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function computes
+/// central differences on 3x3 neighborhood and then convolves the result with Sobel
+/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageGradientSobelInterleaveds16_v3(). In the 2.0.0 release,
+/// fcvImageGradientSobelInterleaveds16_v3 will be renamed to fcvImageGradientSobelInterleaveds16
+/// and the signature of fcvImageGradientSobelInterleaveds16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param gradients
+/// Buffer to store horizontal and vertical gradient. Must be
+/// (width-2)*(height-2) *2 in size.
+/// Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientSobelInterleaveds16( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict gradients );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function computes
+/// central differences on 3x3 neighborhood and then convolves the result with Sobel
+/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageGradientSobelInterleaveds16_v3(). In the 2.0.0 release,
+/// fcvImageGradientSobelInterleaveds16_v3 will be renamed to fcvImageGradientSobelInterleaveds16
+/// and the signature of fcvImageGradientSobelInterleaveds16 and
+/// fcvImageGradientSobelInterleaveds16_v2 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param gradients
+/// Buffer to store horizontal and vertical gradient. Must be
+/// gradStride*(height-2) *2 bytes in size.
+/// Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param gradStride
+/// Stride (in bytes) of the interleaved gradients array.
+/// \n\b NOTE: if 0, gradStride is set as (srcWidth-2)*2*sizeof(int16_t).
+/// \n\b WARNING: should be multiple of 8, and at least as much as 4*srcWidth if not 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientSobelInterleaveds16_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict gradients,
+ unsigned int gradStride );
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function computes
+/// central differences on 3x3 neighborhood and then convolves the result with Sobel
+/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+/// \n Compared to the original and v2 functions, this v3 functions does not normalize
+/// \n the gradients (divide by 8). It just returns the actual dx, dy values.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvImageGradientSobelInterleaveds16_v2() with a change in behavior: no
+/// normalization at the end of the calculation.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvImageGradientSobelInterleaveds16,
+/// \a fcvImageGradientSobelInterleaveds16_v2 and fcvImageGradientSobelInterleaveds16_v3
+/// will be removed, and the current signature for \a fcvImageGradientSobelInterleaveds16
+/// and fcvImageGradientSobelInterleaveds16_v3 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvImageGradientSobelInterleaveds16 when transitioning to 2.0.0.
+/// \n\n
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient. The number of pixels in a row.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param gradients
+/// Buffer to store horizontal and vertical gradient. Must be
+/// gradStride*(height-2) *2 bytes in size.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param gradStride
+/// Stride (in bytes) is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in the interleaved gradients array. If left at 0 gradStride is default to 4 * (srcWidth-2).
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @ingroup image_processing
+// -----------------------------------------------------------------------------
+FASTCV_API void
+fcvImageGradientSobelInterleaveds16_v3( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int16_t* __restrict gradients,
+ unsigned int gradStride );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function computes
+/// central differences on 3x3 neighborhood and then convolves the result with Sobel
+/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageGradientSobelInterleavedf32_v2(). In the 2.0.0 release,
+/// fcvImageGradientSobelInterleavedf32_v2 will be renamed to fcvImageGradientSobelInterleavedf32
+/// and the signature of fcvImageGradientSobelInterleavedf32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param gradients
+/// Buffer to store horizontal and vertical gradient. Must be
+/// (width-2)*(height-2) *2 floats in size.
+/// Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientSobelInterleavedf32( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ float* __restrict gradients);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function computes
+/// central differences on 3x3 neighborhood and then convolves the result with Sobel
+/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvImageGradientSobelInterleavedf32() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvImageGradientSobelInterleavedf32,
+/// \a fcvImageGradientSobelInterleavedf32_v2 will be removed, and the current signature
+/// for \a fcvImageGradientSobelInterleavedf32 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvImageGradientSobelInterleavedf32 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param gradients
+/// Buffer to store horizontal and vertical gradient. Must be
+/// gradStride*(height-2) *2 bytes in size.
+/// Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param gradStride
+/// Stride (in bytes) of the interleaved gradients array.
+/// \n\b NOTE: if 0, gradStride is set as (srcWidth-2)*2*sizeof(float).
+/// \n\b WARNING: should be multiple of 8, and at least as much as (srcWidth-2)*2*sizeof(float) if not 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientSobelInterleavedf32_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ float* __restrict gradients,
+ unsigned int gradStride);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function
+/// computes central differences on 3x3 neighborhood and then convolves the
+/// result with Sobel kernel
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvFilterGaussian3x3u8_v2(). In the 2.0.0 release,
+/// fcvImageGradientSobelPlanars8_v2 will be renamed to fcvImageGradientSobelPlanars8
+/// and the signature of fcvImageGradientSobelPlanars8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (width)*(height) in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values. Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (width)*(height) in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientSobelPlanars8( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int8_t* __restrict dx,
+ int8_t* __restrict dy);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function
+/// computes central differences on 3x3 neighborhood and then convolves the
+/// result with Sobel kernel
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvImageGradientSobelPlanars8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvImageGradientSobelPlanars8,
+/// \a fcvImageGradientSobelPlanars8_v2 will be removed, and the current signature
+/// for \a fcvImageGradientSobelPlanars8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvImageGradientSobelPlanars8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values. Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values. Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dxyStride
+/// Stride (in bytes) of 'dx' and 'dy' gradient arrays.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvImageGradientSobelPlanars8_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ int8_t* __restrict dx,
+ int8_t* __restrict dy,
+ unsigned int dxyStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function computes
+/// central differences on 3x3 neighborhood and then convolves the result with Sobel
+/// kernel
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageGradientSobelPlanarf32_v2(). In the 2.0.0 release,
+/// fcvImageGradientSobelPlanarf32_v2 will be renamed to fcvImageGradientSobelPlanarf32
+/// and the signature of fcvImageGradientSobelPlanarf32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (width)*(height) in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values. Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (width)*(height) in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values. Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvImageGradientSobelPlanarf32( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ float* dx,
+ float* dy);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function computes
+/// central differences on 3x3 neighborhood and then convolves the result with Sobel
+/// kernel
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvImageGradientSobelPlanarf32() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvImageGradientSobelPlanarf32,
+/// \a fcvImageGradientSobelPlanarf32_v2 will be removed, and the current signature
+/// for \a fcvImageGradientSobelPlanarf32 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvImageGradientSobelPlanarf32 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values. Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values. Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dxyStride
+/// Stride (in bytes) of 'dx' and 'dy' gradient arrays.
+/// \n\b NOTE: if 0, dxyStride is set as 4*srcWidth.
+/// \n\b WARNING: should be multiple of 32 (8 * 4-bytes per gradient value),and at least as much as srcWidth*sizeof(float) if not 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvImageGradientSobelPlanarf32_v2( const uint8_t* __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ float* dx,
+ float* dy,
+ unsigned int dxyStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function computes
+/// central differences on 3x3 neighborhood and then convolves the result with Sobel
+/// kernel
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageGradientSobelPlanarf32f32_v2(). In the 2.0.0 release,
+/// fcvImageGradientSobelPlanarf32f32_v2 will be renamed to fcvImageGradientSobelPlanarf32f32
+/// and the signature of fcvImageGradientSobelPlanarf32f32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight floats.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels (not bytes) between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (width)*(height) floats in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values. Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (width)*(height) floats in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values. Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvImageGradientSobelPlanarf32f32( const float * __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ float* dx,
+ float* dy);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data. This function computes
+/// central differences on 3x3 neighborhood and then convolves the result with Sobel
+/// kernel
+/// \n
+/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
+/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
+/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvImageGradientSobelPlanarf32f32()() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvImageGradientSobelPlanarf32f32(),
+/// \a fcvImageGradientSobelPlanarf32f32_v2 will be removed, and the current signature
+/// for \a fcvImageGradientSobelPlanarf32f32 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvImageGradientSobelPlanarf32f32 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight floats.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride (in bytes) of image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b WARNING: should be multiple of 32 (8 * 4-bytes), and at least as much as srcWidth*sizeof(float) if not 0.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth*4.
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values. Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
+/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
+/// contains undefined values. Gradient output is scaled by 1/8.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dxyStride
+/// Stride (in bytes) of 'dx' and 'dy' gradient arrays.
+/// \n\b WARNING: should be multiple of 32 (8 * 4-bytes per gradient value).
+/// \n\b WARNING: should be multiple of 32 (8 * 4-bytes), and at least as much as srcWidth*sizeof(float) if not 0.
+/// \n\b NOTE: if 0, dxyStride is set as srcWidth*4.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvImageGradientSobelPlanarf32f32_v2( const float * __restrict src,
+ unsigned int srcWidth,
+ unsigned int srcHeight,
+ unsigned int srcStride,
+ float* dx,
+ float* dy,
+ unsigned int dxyStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Block Optical Flow 16x16 - Tracks all 16x16 blocks in the Region of Interest
+/// (ROI) from Source-1 to Source-2. Generates Motion Vectors for blocks where
+/// motion is detected.
+///
+/// @details
+///
+/// @param[in] src1
+/// Pointer to source image where the original blocks are present.
+/// \n Dimensions should be same as \a src2, and equal to \a srcWidth,
+/// \a srcHeight, \a srcStride.
+/// \n\b WARNING: should be 128-bit aligned. Buffer size is srcStride*srcHeight bytes.
+///
+/// @param[in] src2
+/// Pointer to second source image where motion vectors for blocks in \a img1
+/// are to be located.
+/// \n Dimensions should be same as \a src1, and equal to \a srcWidth,
+/// \a srcHeight, \a srcStride.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param[in] srcWidth
+/// Width of source images pointed by \a src1 and \a src2.
+///
+/// @param[in] srcHeight
+/// Height of source images pointed by \a src1 and \a src2.
+///
+/// @param[in] srcStride
+/// Stride of source images pointed by \a src1 and \a src2.
+///
+/// @param[in] roiLeft
+/// Left co-ordinate (x0) of Region-of-Interest (ROI).
+///
+/// @param[in] roiTop
+/// Top co-orgdinate (y0) of Region-of-Interest (ROI).
+///
+/// @param[in] roiRight
+/// Right co-ordinate (x1) of Region-of-Interest (ROI).
+///
+/// @param[in] roiBottom
+/// Bottom co-ordinate (y1) of Region-of-Interest (ROI).
+///
+/// @param[in] shiftSize
+/// Distance in number of pixels (both horizontally and vertically) between
+/// consecutive blocks for which motion vector is searched.
+/// \n\b NOTE: Larger the value, less number of blocks will be tracked, and
+/// hence the function will run faster.
+///
+/// @param[in] searchWidth
+/// Numbers of pixels horizontally on left and right of the source block (src2) where a
+/// match is searched for. For example, if searchWidth is 8 and searchHeight
+/// is 8, then the search area for any given block will be 32x32 around
+/// the location of that block.
+///
+/// @param[in] searchHeight
+/// Numbers of pixels vertically on top and bottom of the source block (src2) where a
+/// match is searched for. For example, if searchWidth is 8 and searchHeight
+/// is 8, then the search area for any given block will be 32x32 around
+/// the location of that block.
+///
+/// @param[in] searchStep
+/// Distance in number of pixels between consecutive search targets within
+/// the above search window.
+/// \n\b NOTE: Larger the value, more coarse the search will be and thus
+/// will make the fucntion run faster. Smaller the value, more dense the
+/// search will be, making the funciton run slower.
+///
+/// @param[in] usePrevious
+/// Indicates if the function should use the existing motion vectors in
+/// locX and locY as the starting point for motion vector search.
+/// \n\b NOTE: This parameter is redundant at the moment.
+///
+/// @param[out] numMv
+/// Pointer to variable that will store the count of Motion Vectors
+/// generated by the function.
+/// \n\b WARNING: This pointer should be Non-NULL.
+///
+/// @param[out] locX
+/// Pointer to an array which will store the X co-ordinates of the
+/// original Block for which a Motion Vector is generated.
+/// \n\b NOTE: The array will contain \a numMv valid entries.
+/// \n\b NOTE: the maximum number of MVs is related to ROI size and shiftSize, as follows:
+/// (roiRight-roiLeft)/shiftSize * (roiBottom-roiTop)/shiftSize;
+/// \n\b WARNING: This pointer should be Non-NULL, and the array size should
+/// be >= number of 16x16 blocks in ROI.
+///
+/// @param[out] locY
+/// Pointer to an array which will store the Y co-ordinates of the
+/// original Block for which a Motion Vector is generated.
+/// \n\b NOTE: The array will contain \a numMv valid entries.
+/// \n\b NOTE: the maximum number of MVs is related to ROI size and shiftSize, as follows:
+/// (roiRight-roiLeft)/shiftSize * (roiBottom-roiTop)/shiftSize;
+/// \n\b WARNING: This pointer should be Non-NULL, and the array size should
+/// be >= number of 16x16 blocks in ROI.
+///
+/// @param[out] mvX
+/// Pointer to an array which will store the X co-ordinates of the block in \a src2
+/// corresponding block in \a src1. (\a mvX[i]-\a locX[i]) will give the motion
+/// vector for the block in \a src1.
+/// \n\b NOTE: The array will contain \a numMv valid entries.
+/// \n\b NOTE: the maximum number of MVs is related to ROI size and shiftSize, as follows:
+/// (roiRight-roiLeft)/shiftSize * (roiBottom-roiTop)/shiftSize;
+/// \n\b WARNING: This pointer should be Non-NULL, and the array size should
+/// be >= number of 16x16 blocks in ROI.
+///
+/// @param[out] mvY
+/// Pointer to an array which will store the Y co-ordinates of the block in \a src2
+/// corresponding block in \a src1. (\a mvY[i]-\a locY[i]) will give the motion
+/// vector for the block in \a src1.
+/// \n\b NOTE: The array will contain \a numMv valid entries.
+/// \n\b NOTE: the maximum number of MVs is related to ROI size and shiftSize, as follows:
+/// (roiRight-roiLeft)/shiftSize * (roiBottom-roiTop)/shiftSize;
+/// \n\b WARNING: This pointer should be Non-NULL, and the array size should
+/// be >= number of 16x16 blocks in ROI.
+///
+/// @return
+/// 0 - Success, Failure otherwise.
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+FASTCV_API int
+fcvTrackBMOpticalFlow16x16u8( const uint8_t* __restrict src1,
+ const uint8_t* __restrict src2,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t roiLeft,
+ uint32_t roiTop,
+ uint32_t roiRight,
+ uint32_t roiBottom,
+ uint32_t shiftSize,
+ uint32_t searchWidth,
+ uint32_t searchHeight,
+ uint32_t searchStep,
+ uint32_t usePrevious,
+ uint32_t * numMv,
+ uint32_t * locX,
+ uint32_t * locY,
+ uint32_t * mvX,
+ uint32_t * mvY);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Searches a set of patches within the source image for the max NCCs. The search
+/// regions are corresponding to the patches in the search list.
+///
+/// @param patches
+/// Pointer to a set of 8-bit patches, each patch takes patchWidth *patchHeight pixel
+/// values which are linearly laid out in memory.
+/// \n\b WARNING: patchWidth * patchHeight must be <= 256
+///
+/// @param patchWidth
+/// Width in pixels of the patch.
+///
+/// @param patchHeight
+/// Height in pixels of the patch.
+///
+/// @param src
+/// Pointer to 8-bit image for search.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width in pixels of the image.
+///
+/// @param srcHeight
+/// Height in pixels of the image.
+///
+/// @param srcStride
+/// The stride of the imge. Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to srcWidth.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param searchCenterX
+/// The list of Center X coordinate of each search window
+///
+/// @param searchCenterY
+/// The list of Center Y coordinate of each search window
+///
+/// @param searchWidth
+/// Width of search range in pixels
+/// \n\b WARNING: must be odd number.
+///
+/// @param searchHeight
+/// Height of search range in pixels
+/// \n\b WARNING: must be odd number.
+///
+/// @param filterLowVariance
+/// Minimum variance. Used to as threshold to compare against variance of
+/// the block of src or patch.
+///
+/// @param bestX
+/// The list of Center X location on the image of the best NCC matches.
+/// The center X has (patchWidth/2) pixels to the left and
+/// (patchWidth - (patchWidth/2) - 1) to the right.
+///
+/// @param bestY
+/// The list of Center Y location on the image of the best NCC matches.
+/// The center Y has (patchWidth/2) pixels above and
+/// (patchWidth - (patchWidth/2) - 1) below.
+///
+/// @param bestNCC
+/// NCC value of the best match blocks.
+/// It's quantized to integer value in Q7 (between -128 and 128).
+///
+/// @param findSubPixel (0 or 1)
+/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
+///
+/// @param subX
+/// Sub-pixel estimate for optimal NCC relative to bestX.
+/// \n e.g., float x = (float)bestX + subX;
+///
+/// @param subY
+/// Sub-pixel estimate for optimal NCC relative to bestY.
+///
+/// @param numSearches
+/// number of patch searches in the image.
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+FASTCV_API fcvStatus
+fcvNCCPatchesOnRectu8 ( const uint8_t* __restrict patches,
+ uint32_t patchWidth,
+ uint32_t patchHeight,
+ const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ const uint32_t * __restrict searchCenterX,
+ const uint32_t * __restrict searchCenterY,
+ uint32_t searchWidth,
+ uint32_t searchHeight,
+ int32_t filterLowVariance,
+ uint32_t* __restrict bestX,
+ uint32_t* __restrict bestY,
+ uint32_t* __restrict bestNCC,
+ int32_t findSubPixel,
+ float32_t* __restrict subX,
+ float32_t* __restrict subY,
+ uint32_t numSearches );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Performs per-element bitwise-OR operation on two 8-bit single channel images.
+/// Two images should have the same size. dst(I)=src1(I) V src2(I) if mask(I) is not zero.
+///
+/// @param src1
+/// Pointer to the 8-bit source image 1.
+///
+/// @param src2
+/// Pointer to the 8-bit source image 2.
+///
+/// @param srcWidth
+/// Width of source images pointed by src1 and src2.
+///
+/// @param srcHeight
+/// Height of source images pointed by src1 and src2.
+///
+/// @param srcStride
+/// Stride of source images (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param dst
+/// Pointer to the 8-bit destination image.
+///
+/// @param dstStride
+/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param mask
+/// Pointer to the 8-bit single channel mask. It specifies elements of the destination array to be changed.
+/// The mask is optional. If there is no mask, the value is NULL.
+///
+/// @param maskStride
+/// Stride of the mask (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// If there is no mask, the value is 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvBitwiseOru8(const uint8_t* __restrict src1,
+ const uint8_t* __restrict src2,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t * __restrict dst,
+ uint32_t dstStride,
+ uint8_t * __restrict mask,
+ uint32_t maskStride );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Performs per-element bitwise-OR operation on two 32-bit single channel images.
+/// Two images should have the same size. dst(I)=src1(I) V src2(I) if mask(I) is not zero.
+///
+/// @param src1
+/// Pointer to the 32-bit source image 1.
+///
+/// @param src2
+/// Pointer to the 32-bit source image 2.
+///
+/// @param srcWidth
+/// Width of source images pointed by src1 and src2.
+///
+/// @param srcHeight
+/// Height of source images pointed by src1 and src2.
+///
+/// @param srcStride
+/// Stride of source images (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param dst
+/// Pointer to the 8-bit destination image.
+///
+/// @param dstStride
+/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param mask
+/// Pointer to the 8-bit single channel mask. It specifies elements of the destination array to be changed.
+/// The mask is optional. If there is no mask, the value is NULL.
+///
+/// @param maskStride
+/// Stride of the mask (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// If there is no mask, the value is 0.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvBitwiseOrs32(const int32_t* __restrict src1,
+ const int32_t* __restrict src2,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int32_t * __restrict dst,
+ uint32_t dstStride,
+ uint8_t * __restrict mask,
+ uint32_t maskStride);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Converts an image from RGB space to grayscale
+///
+/// @details
+///
+/// @param src
+/// Source 8-bit image, BGR888 format (R is lowest byte for the pixel)
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Source image width.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Source image height.
+///
+/// @param srcStride
+/// Stride of source image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// If set to 0, srcStride=srcWidth as default
+///
+/// @param dst
+/// Destination 8-bit gray-scale image.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// If set to 0, dstStride=srcStride as default
+///
+///
+///
+/// @ingroup color_conversion
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvColorRGB888ToGrayu8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Integral of the image tilted by 45 degrees
+///
+/// @details
+/// Calculates the tilted integral image of an input image
+/// and adds an zero-filled border on top. Left border not zero.
+/// dst[i,j]=sum (src[m,n]), where n according to
+/// descDBTargetId.
+///
+/// @param dbLUT
+/// A pointer to uint32_t [numDBLUT][2],
+/// which stores the starting index of descDB and
+/// the number of descriptors
+/// \n\b WARNING: must be 64-bit aligned.
+///
+/// @param numDBLUT
+/// The size of dbLUT
+///
+/// @param descDB
+/// A pointer to int8_t [numDescDB][36],
+/// which stores descriptors
+/// \n\b WARNING: must be 64-bit aligned.
+///
+/// @param descDBInvLenQ38
+/// A pointer to uint32_t [numDescDB],
+/// which stores the inverse length of descDB.
+/// The value is in Q38 format.
+///
+/// @param descDBTargetId
+/// A pointer to uint16_t [numDescDB],
+/// which stores the target id.
+///
+/// @param descDBOldIdx
+/// A pointer to uint32_t [numDescDB],
+/// which stores the old index of the desc before sorting
+///
+/// @param numDescDB
+/// Number of descriptor in the database.
+///
+/// @ingroup feature_detection
+//---------------------------------------------------------------------------
+
+FASTCV_API int
+fcvLinearSearchPrepare8x36s8( uint32_t * __restrict dbLUT,
+ uint32_t numDBLUT,
+ int8_t * __restrict descDB,
+ uint32_t * __restrict descDBInvLenQ38,
+ uint16_t * __restrict descDBTargetId,
+ uint32_t * __restrict descDBOldIdx,
+ uint32_t numDescDB );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Perform linear search of descriptor in a database
+///
+/// @param dbLUT
+/// A pointer to uint32_t [numDBLUT][2],
+/// which stores the starting index of descDB and
+/// the number of descriptors
+/// \n\b WARNING: must be 64-bit aligned.
+///
+/// @param numDBLUT
+/// The size of dbLUT
+///
+/// @param descDB
+/// A pointer to int8_t [numDescDB][36],
+/// which stores descriptors
+/// \n\b WARNING: must be 64-bit aligned.
+///
+/// @param descDBInvLenQ38
+/// A pointer to uint32_t [numDescDB],
+/// which stores the inverse length of descDB.
+/// The value is in Q38 format.
+///
+/// @param descDBTargetId
+/// A pointer to uint16_t [numDescDB],
+/// which stores the target id.
+///
+/// @param numDescDB
+/// Number of descriptor in the database.
+///
+/// @param srcDesc
+/// A pointer to int8_t [numSrcDesc][36],
+/// which stores descriptors.
+/// \n\b WARNING: must be 64-bit aligned.
+///
+/// @param srcDescInvLenQ38
+/// A pointer to uint32_t [numSrcDec],
+/// which stores the inverse length of srcDesc.
+/// The value is in Q38 format.
+///
+/// @param srcDescIdx
+/// A pointer to the dbLUT data
+///
+/// @param numSrcDesc
+/// Number of source descriptor
+///
+/// @param targetsToIgnore
+/// A list of target IDs to be ignored
+///
+/// @param numTargetsToIgnore
+/// Number of targets to be ignored
+///
+/// @param maxDistanceQ31
+/// Maximum distance for correspondences.
+/// In Q31 format.
+///
+/// @param correspondenceDBIdx
+/// A pointer to uint32_t [maxNumCorrespondences],
+/// which will be used by this function to output indices of featuresDB
+/// as a part of correspondences.
+///
+/// @param correspondenceSrcDescIdx
+/// A pointer to uint32_t [maxNumCorrespondences],
+/// which will be used by this function to output indices of descriptors
+/// as a part of correspondences.
+///
+/// @param correspondenceDistanceQ31
+/// A pointer to uint32_t [maxNumCorrespondences],
+/// which will be used by this function to output the distances
+/// as a part of correspondences.
+/// In Q31 format.
+///
+/// @param maxNumCorrespondences
+/// Maximum number of correspondences allowed
+///
+/// @param numCorrespondences
+/// Number of correspondences returned by this function
+///
+/// @ingroup feature_detection
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvLinearSearch8x36s8(
+ const uint32_t * __restrict dbLUT,
+ uint32_t numDBLUT,
+ const int8_t * __restrict descDB,
+ const uint32_t * __restrict descDBInvLenQ38,
+ const uint16_t * __restrict descDBTargetId,
+ uint32_t numDescDB,
+ const int8_t * __restrict srcDesc,
+ const uint32_t * __restrict srcDescInvLenQ38,
+ const uint32_t * __restrict srcDescIdx,
+ uint32_t numSrcDesc,
+ const uint16_t * __restrict targetsToIgnore,
+ uint32_t numTargetsToIgnore,
+ uint32_t maxDistanceQ31,
+ uint32_t * __restrict correspondenceDBIdx,
+ uint32_t * __restrict correspondenceSrcDescIdx,
+ uint32_t * __restrict correspondenceDistanceQ31,
+ uint32_t maxNumCorrespondences,
+ uint32_t * __restrict numCorrespondences );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds only extreme outer contours in a binary image. There is no nesting
+/// relationship between contours. It sets hierarchy[i][2]=hierarchy[i][3]=-1
+/// for all the contours.
+///
+/// @param src
+/// Grayscale image with one byte per pixel. Non-zero pixels are treated as
+/// 1's. Zero pixels remain 0's, so the image is treated as binary.
+///
+/// @param srcWidth
+/// Image width
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param maxNumContours
+/// Maximum number of contours can be found
+///
+/// @param numContours
+/// Number of actually found contours
+///
+/// @param numContourPoints
+/// Number of points in each found contour
+///
+/// @param contourStartPoints
+/// Pointers to the start point of each found contour
+///
+/// @param pointBuffer
+/// Pointer to point buffer for contour points' coordinates. It should
+/// be allocated before calling this function.
+///
+/// @param pointBufferSize
+/// Size of point buffer in terms of uint32_t
+///
+/// @param hierarchy
+/// Information about the image topology. It has numContours elements.
+/// For each contour i, the elements hierarchy[i][0], hiearchy[i][1],
+/// hiearchy[i][2], and hiearchy[i][3] are set to 0-based indices of the
+/// next and previous contours at the same hierarchical level, the first
+/// child contour and the parent contour, respectively. If for a contour i
+/// there are no next, previous, parent, or nested contours, the corresponding
+/// elements of hierarchy[i] will be negative.
+///
+/// @param contourHandle
+/// Pointer to assistant and intermediate data. It should be allocated by
+/// fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvFindContoursExternalu8( uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t maxNumContours,
+ uint32_t* __restrict numContours,
+ uint32_t* __restrict numContourPoints,
+ uint32_t** __restrict contourStartPoints,
+ uint32_t* __restrict pointBuffer,
+ uint32_t pointBufferSize,
+ int32_t hierarchy[][4],
+ void* contourHandle );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds contours in a binary image without any hierarchical relationships.
+///
+/// @param src
+/// Grayscale image with one byte per pixel. Non-zero pixels are treated as
+/// 1's. Zero pixels remain 0's, so the image is treated as binary.
+///
+/// @param srcWidth
+/// Image width
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param maxNumContours
+/// Maximum number of contours can be found
+///
+/// @param numContours
+/// Number of actually found contours
+///
+/// @param numContourPoints
+/// Number of points in each found contour
+///
+/// @param contourStartPoints
+/// Pointers to the start point of each found contour
+///
+/// @param pointBuffer
+/// Pointer to point buffer for contour points' coordinates. It should
+/// be allocated before calling this function.
+///
+/// @param pointBufferSize
+/// Size of point buffer in terms of uint32_t
+///
+/// @param contourHandle
+/// Pointer to assistant and intermediate data. It should be allocated by
+/// fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvFindContoursListu8( uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t maxNumContours,
+ uint32_t* __restrict numContours,
+ uint32_t* __restrict numContourPoints,
+ uint32_t** __restrict contourStartPoints,
+ uint32_t* __restrict pointBuffer,
+ uint32_t pointBufferSize,
+ void* contourHandle );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds contours in a binary image and organizes them into a two-level
+/// hierarchy. At the top level, there are external boundaries of the
+/// components. At the second level, there are boundaries of the holes.
+/// If there is another contour inside a hole of a connected component,
+/// it is still put at the top level.
+///
+/// @param src
+/// Grayscale image with one byte per pixel. Non-zero pixels are treated as
+/// 1's. Zero pixels remain 0's, so the image is treated as binary.
+///
+/// @param srcWidth
+/// Image width
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param maxNumContours
+/// Maximum number of contours can be found (<= 126)
+///
+/// @param numContours
+/// Number of actually found contours
+///
+/// @param holeFlag
+/// Hole flag for each found contour to indicate whether it is a hole or not
+///
+/// @param numContourPoints
+/// Number of points in each found contour
+///
+/// @param contourStartPoints
+/// Pointers to the start point of each found contour
+///
+/// @param pointBuffer
+/// Pointer to point buffer for contour points' coordinates. It should
+/// be allocated before calling this function.
+///
+/// @param pointBufferSize
+/// Size of point buffer in terms of uint32_t
+///
+/// @param hierarchy
+/// Information about the image topology. It has numContours elements.
+/// For each contour i, the elements hierarchy[i][0], hiearchy[i][1],
+/// hiearchy[i][2], and hiearchy[i][3] are set to 0-based indices of the
+/// next and previous contours at the same hierarchical level, the first
+/// child contour and the parent contour, respectively. If for a contour i
+/// there are no next, previous, parent, or nested contours, the corresponding
+/// elements of hierarchy[i] will be negative.
+///
+/// @param contourHandle
+/// Pointer to assistant and intermediate data. It should be allocated by
+/// fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvFindContoursCcompu8( uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t maxNumContours,
+ uint32_t* __restrict numContours,
+ uint32_t* __restrict holeFlag,
+ uint32_t* __restrict numContourPoints,
+ uint32_t** __restrict contourStartPoints,
+ uint32_t* __restrict pointBuffer,
+ uint32_t pointBufferSize,
+ int32_t hierarchy[][4],
+ void* contourHandle );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds contours in a binary image and reconstructs a full hierarchy of
+/// nested contours
+///
+/// @param src
+/// Grayscale image with one byte per pixel. Non-zero pixels are treated as
+/// 1's. Zero pixels remain 0's, so the image is treated as binary.
+///
+/// @param srcWidth
+/// Image width
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @param numContours
+/// Number of actually found contours
+///
+/// @param maxNumContours
+/// Maximum number of contours can be found (<= 126)
+///
+/// @param holeFlag
+/// Hole flag for each found contour to indicate whether it is a hole or not
+///
+/// @param numContourPoints
+/// Number of points in each found contour
+///
+/// @param contourStartPoints
+/// Pointers to the start point of each found contour
+///
+/// @param pointBuffer
+/// Pointer to point buffer for contour points' coordinates. It should
+/// be allocated before calling this function.
+///
+/// @param pointBufferSize
+/// Size of point buffer in terms of uint32_t
+///
+/// @param hierarchy
+/// Information about the image topology. It has numContours elements.
+/// For each contour i, the elements hierarchy[i][0], hiearchy[i][1],
+/// hiearchy[i][2], and hiearchy[i][3] are set to 0-based indices of the
+/// next and previous contours at the same hierarchical level, the first
+/// child contour and the parent contour, respectively. If for a contour i
+/// there are no next, previous, parent, or nested contours, the corresponding
+/// elements of hierarchy[i] will be negative.
+///
+/// @param contourHandle
+/// Pointer to assistant and intermediate data. It should be allocated by
+/// fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvFindContoursTreeu8( uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t maxNumContours,
+ uint32_t* __restrict numContours,
+ uint32_t* __restrict holeFlag,
+ uint32_t* __restrict numContourPoints,
+ uint32_t** __restrict contourStartPoints,
+ uint32_t* __restrict pointBuffer,
+ uint32_t pointBufferSize,
+ int32_t hierarchy[][4],
+ void* contourHandle );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Allocates assistant and intermediate data for contour
+///
+/// @param srcStride
+/// Stride of image (i.e., how many pixels between column 0 of row 1 and
+/// column 0 of row 2).
+///
+/// @return
+/// Pointer to allocated data
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+FASTCV_API void*
+fcvFindContoursAllocate( uint32_t srcStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Deallocates assistant and intermediate data for contour
+///
+/// @param contourHandle
+/// Pointer to assistant and intermediate data
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvFindContoursDelete( void* contourHandle );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Solve linear equation system
+/// Ax = b
+///
+/// @details
+///
+///
+/// @param A
+/// The matrix contains coefficients of the linear equation system
+///
+/// @param numRows
+/// The number of rows for the matrix A
+///
+/// @param numCols
+/// The number of columns for the matrix A
+///
+/// @param b
+/// The right side value
+///
+/// @param x
+/// The solution vector
+///
+///
+/// @return
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvSolvef32(const float32_t * __restrict A,
+ int32_t numCols,
+ int32_t numRows,
+ const float32_t * __restrict b,
+ float32_t * __restrict x);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Calculates a perspective transform from four pairs of the corresponding
+/// points.
+/// NOTE: in order to guarantee a valid output transform, any three points
+/// in src1 or src2 cannot be collinear.
+///
+/// @param src1
+/// Coordinates of quadrangle vertices in the source image
+///
+/// @param src2
+/// Coordinates of the corresponding quadrangle vertices in the destination
+/// image
+///
+/// @param transformCoefficient
+/// 3x3 matrix of a perspective transform
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvGetPerspectiveTransformf32( const float32_t src1[8],
+ const float32_t src2[8],
+ float32_t transformCoefficient[9] );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Sets every element of a uint8_t single channel array to a given value.
+///
+/// @details
+/// A non-zero element of the mask array indicates the corresponding element
+/// of the destination array to be changed. The mask itself equals to zero means that
+/// all elements of the dst array need to be changed. The mask is assumed to
+/// have the same width and height( in terms of pixels) as the destination array.
+///
+/// @param dst
+/// The destination matrix
+///
+/// @param dstWidth
+/// Destination matrix width
+///
+/// @param dstHeight
+/// Destination matrix height
+///
+/// @param dstStride
+/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param value
+/// the input uint8_t value
+///
+/// @param mask
+/// Operation mask, 8-bit single channel array; specifies elements of the src
+/// array to be changed.
+///
+/// @param maskStride
+/// Stride for the mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @return
+/// No return value
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvSetElementsu8( uint8_t * __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ uint8_t value,
+ const uint8_t * __restrict mask,
+ uint32_t maskStride
+ );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Sets every element of an int32_t single channel array to a given value.
+///
+/// @details
+/// A non-zero element of the mask array indicates the corresponding element
+/// of the destination array to be changed. The mask itself equals to zero means that
+/// all elements of the dst array need to be changed. The mask is assumed to
+/// have the same width and height( in terms of pixels) as the destination array.
+///
+/// @param dst
+/// The destination matrix
+///
+/// @param dstWidth
+/// Destination matrix width
+///
+/// @param dstHeight
+/// Destination matrix height
+///
+/// @param dstStride
+/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param value
+/// the input int32_t value
+///
+/// @param mask
+/// Operation mask, 8-bit single channel array; specifies elements of the src
+/// array to be changed
+///
+/// @param maskStride
+/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @return
+/// No return value
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvSetElementss32( int32_t * __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ int32_t value,
+ const uint8_t * __restrict mask ,
+ uint32_t maskStride
+ );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Sets every element of a float32_t single channel array to a given value.
+///
+/// @details
+/// A non-zero element of the mask array indicates the corresponding element
+/// of the destination array to be changed. The mask itself equals to zero means that
+/// all elements of the dst array need to be changed. The mask is assumed to
+/// have the same width and height( in terms of pixels) as the destination array.
+///
+/// @param dst
+/// The destination matrix
+///
+/// @param dstWidth
+/// Destination matrix width
+///
+/// @param dstHeight
+/// Destination matrix height
+///
+/// @param dstStride
+/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param value
+/// the input float32_t value
+///
+/// @param mask
+/// Operation mask, 8-bit single channel array; specifies elements of the src
+/// array to be changed
+///
+/// @param maskStride
+/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @return
+/// No return value
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvSetElementsf32( float32_t * __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ float32_t value,
+ const uint8_t * __restrict mask,
+ uint32_t maskStride
+ );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Sets every element of a uint8_t 4-channel array to a given 4-element scalar.
+///
+/// @details
+/// A non-zero element of the mask array indicates the corresponding element
+/// of the destination array to be changed. The mask itself equals to zero means that
+/// all elements of the dst array need to be changed. The mask is assumed to
+/// have the same width and height( in terms of pixels) as the destination array.
+///
+/// @param dst
+/// The destination matrix
+///
+/// @param dstWidth
+/// Destination matrix width
+///
+/// @param dstHeight
+/// Destination matrix height
+///
+/// @param dstStride
+/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param value1
+/// First uint8_t value of the Scalar
+///
+/// @param value2
+/// Second uint8_t value of the Scalar
+///
+/// @param value3
+/// Third uint8_t value of the Scalar
+///
+/// @param value4
+/// Fourth uint8_t value of the Scalar
+///
+/// @param mask
+/// Operation mask, 8-bit single channel array; specifies elements of the src
+/// array to be changed
+///
+/// @param maskStride
+/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @return
+/// No return value
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvSetElementsc4u8( uint8_t * __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ uint8_t value1,
+ uint8_t value2,
+ uint8_t value3,
+ uint8_t value4,
+ const uint8_t * __restrict mask,
+ uint32_t maskStride
+ );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Sets every element of an int32_t 4-channel array to a given 4-element scalar.
+///
+/// @details
+/// A non-zero element of the mask array indicates the corresponding element
+/// of the destination array to be changed. The mask itself equals to zero means that
+/// all elements of the dst array need to be changed. The mask is assumed to
+/// have the same width and height( in terms of pixels) as the destination array.
+///
+/// @param dst
+/// The destination matrix
+///
+/// @param dstWidth
+/// Destination matrix width
+///
+/// @param dstHeight
+/// Destination matrix height
+///
+/// @param dstStride
+/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param value1
+/// First int32_t value of the Scalar
+///
+/// @param value2
+/// Second int32_t value of the Scalar
+///
+/// @param value3
+/// Third int32_t value of the Scalar
+///
+/// @param value4
+/// Fourth int32_t value of the Scalar
+///
+/// @param mask
+/// Operation mask, 8-bit single channel array; specifies elements of the src
+/// array to be changed.
+///
+/// @param maskStride
+/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @return
+/// No return value
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvSetElementsc4s32( int32_t * __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ int32_t value1,
+ int32_t value2,
+ int32_t value3,
+ int32_t value4,
+ const uint8_t * __restrict mask,
+ uint32_t maskStride
+ );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Sets every element of a float32_t 4-channel array to a given 4-element scalar.
+///
+/// @details
+/// A non-zero element of the mask array indicates the corresponding element
+/// of the destination array to be changed. The mask itself equals to zero means that
+/// all elements of the dst array need to be changed. The mask is assumed to
+/// have the same width and height( in terms of pixels) as the destination array.
+///
+/// @param dst
+/// The destination matrix
+///
+/// @param dstWidth
+/// Destination matrix width
+///
+/// @param dstHeight
+/// Destination matrix height
+///
+/// @param dstStride
+/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param value1
+/// First float32_t value of the Scalar
+///
+/// @param value2
+/// Second float32_t value of the Scalar
+///
+/// @param value3
+/// Third float32_t value of the Scalar
+///
+/// @param value4
+/// Fourth float32_t value of the Scalar
+///
+/// @param mask
+/// Operation mask, 8-bit single channel array; specifies elements of the src
+/// array to be changed
+///
+/// @param maskStride
+/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @return
+/// No return value
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvSetElementsc4f32( float32_t * __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ float32_t value1,
+ float32_t value2,
+ float32_t value3,
+ float32_t value4,
+ const uint8_t * __restrict mask,
+ uint32_t maskStride
+ );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Sets every element of a uint8_t 3-channel array to a given 3-element scalar.
+///
+/// @details
+/// A non-zero element of the mask array indicates the corresponding element
+/// of the destination array to be changed. The mask itself equals to zero means that
+/// all elements of the dst array need to be changed. The mask is assumed to
+/// have the same width and height( in terms of pixels) as the destination array.
+///
+/// @param dst
+/// The destination matrix
+///
+/// @param dstWidth
+/// Destination matrix width
+///
+/// @param dstHeight
+/// Destination matrix height
+///
+/// @param dstStride
+/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param value1
+/// First uint8_t value of the Scalar
+///
+/// @param value2
+/// Second uint8_t value of the Scalar
+///
+/// @param value3
+/// Third uint8_t value of the Scalar
+///
+/// @param mask
+/// Operation mask, 8-bit single channel array; specifies elements of the src
+/// array to be changed
+///
+/// @param maskStride
+/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @return
+/// No return value
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvSetElementsc3u8( uint8_t * __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ uint8_t value1,
+ uint8_t value2,
+ uint8_t value3,
+ const uint8_t * __restrict mask,
+ uint32_t maskStride
+ );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Sets every element of an int32_t 3-channel array to a given 3-element scalar.
+///
+/// @details
+/// A non-zero element of the mask array indicates the corresponding element
+/// of the destination array to be changed. The mask itself equals to zero means that
+/// all elements of the dst array need to be changed. The mask is assumed to
+/// have the same width and height( in terms of pixels) as the destination array.
+///
+/// @param dst
+/// The destination matrix
+///
+/// @param dstWidth
+/// Destination matrix width
+///
+/// @param dstHeight
+/// Destination matrix height
+///
+/// @param dstStride
+/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param value1
+/// First int32_t value of the Scalar
+///
+/// @param value2
+/// Second int32_t value of the Scalar
+///
+/// @param value3
+/// Third int32_t value of the Scalar
+///
+/// @param mask
+/// Operation mask, 8-bit single channel array; specifies elements of the src
+/// array to be changed.
+///
+/// @param maskStride
+/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @return
+/// No return value
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvSetElementsc3s32( int32_t * __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ int32_t value1,
+ int32_t value2,
+ int32_t value3,
+ const uint8_t * __restrict mask,
+ uint32_t maskStride
+ );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Sets every element of a float32_t 3-channel array to a given 3-element scalar.
+///
+/// @details
+/// A non-zero element of the mask array indicates the corresponding element
+/// of the destination array to be changed. The mask itself equals to zero means that
+/// all elements of the dst array need to be changed. The mask is assumed to
+/// have the same width and height( in terms of pixels) as the destination array.
+///
+/// @param dst
+/// The destination matrix
+///
+/// @param dstWidth
+/// Destination matrix width
+///
+/// @param dstHeight
+/// Destination matrix height
+///
+/// @param dstStride
+/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param value1
+/// First float32_t value of the Scalar
+///
+/// @param value2
+/// Second float32_t value of the Scalar
+///
+/// @param value3
+/// Third float32_t value of the Scalar
+///
+/// @param mask
+/// Operation mask, 8-bit single channel array; specifies elements of the src
+/// array to be changed
+///
+/// @param maskStride
+/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @return
+/// No return value
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvSetElementsc3f32( float32_t * __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ float32_t value1,
+ float32_t value2,
+ float32_t value3,
+ const uint8_t * __restrict mask,
+ uint32_t maskStride
+ );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Defines an enumeration to list threshold types used in fcvAdaptiveThreshold
+//------------------------------------------------------------------------------
+
+typedef enum {
+ FCV_THRESH_BINARY = 0, // value = value > threshold ? max_value : 0
+ FCV_THRESH_BINARY_INV // value = value > threshold ? 0 : max_value
+} fcvThreshType;
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Binarizes a grayscale image based on an adaptive threshold value calculated from 3x3 Gaussian kernel.
+///
+/// @details
+/// For each pixel, the threshold is computed adaptively based on cross-correlation with a
+/// 3x3 Gaussian kernel minus value (parameter). The standard deviation is used for Gaussian kernel.
+/// For FCV_THRESH_BINARY threshold type, the pixel is set as maxValue if it's value is greater than the threshold;
+/// else, it is set as zero. For FCV_THRESH_BINARY_INV threshold type, the pixel is set as zero if it's value is greater than the threshold;
+/// else, it is set as maxValue.
+///
+/// @param src
+/// Pointer to the 8-bit input image.
+///
+/// @param srcWidth
+/// Width of source images pointed by src.
+///
+/// @param srcHeight
+/// Height of source images pointed by src.
+///
+/// @param srcStride
+/// Stride of source image (i.e., number of bytes between column 0
+/// of row 0 and column 0 of row 1).
+///
+/// @param maxValue
+/// The maximum integer value to be used. 0>1+8) *sizeof(uint32_t)
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param integralCrStride
+/// The stride of integralCr. (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2). If left at 0 integralCrStride is default to (srcWidth>>1+8) *sizeof(uint32_t)
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @return
+/// No return value.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvIntegrateImageYCbCr420PseudoPlanaru8(
+ const uint8_t* __restrict srcY,
+ const uint8_t* __restrict srcC,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcYStride,
+ uint32_t srcCStride,
+ uint32_t* __restrict integralY,
+ uint32_t* __restrict integralCb,
+ uint32_t* __restrict integralCr,
+ uint32_t integralYStride,
+ uint32_t integralCbStride,
+ uint32_t integralCrStride);
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// This function finds the foreground.
+///
+/// @details
+/// This function tries to find a forgound in the current image (represented by: fgIntegralY,
+/// fgIntegralCb, fgIntegralCr) based on the current background model (represented by: bgIntegralY,
+/// bgIntegralCb, bgIntegralCr). For example, the tuple (bgIntegralY, bgIntegralCb, bgIntegralCr) may be
+/// from a picture shooting a wall. Then the tuple (fgIntegralY, fgIntegralCb, fgIntegralCr) may be
+/// the wall with a paint on it. Note that all the first six parameters are indicating integral images
+/// that's computed from a YUV420 image, which maybe computed from the function:
+/// fcvIntegrateImageYCbCr420PseudoPlanaru8. Generally the size of fgIntegralY and bgIntegralY are
+/// (srcWidth+1)*(srcHeight+1). And the size of fgIntegralU, fgIntegralV, bgIntegralU and bgIntegralV
+/// are (srcWidth/2+1)*(srcHeight/2+1). The value of the outputWidth and outputHeight are usually indicating
+/// the desired block size. For example, if the user wants a 20x15 blocks on a 800x480 image. Then
+/// outputWidth=800/20 and outputHeight=480/15. After return, if the value in the outputMask image is
+/// 255, then a moving block is indicated, otherwise a non-moving block is indicated.
+///
+/// @param bgIntegralY
+/// The input image/patch that's indicating the Y channel of the integral image of the background image.
+/// Size of buffer is srcYStride*srcHeight bytes
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param bgIntegralCb
+/// The input image/patch that's indicating the Cb channel of the integral image of the background image.
+/// Size of buffer is srcCbStride*srcHeight/2 bytes
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param bgIntegralCr
+/// The input image/patch that's indicating the Cr channel of the integral image of the background image.
+/// Size of buffer is srcCrStride*srcHeight/2 bytes
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param fgIntegralY
+/// The input image/patch that's indicating the Y channel of the integral image of the image
+/// on which we want to find the foreground.
+/// Size of buffer is srcYStride*srcHeight bytes
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param fgIntegralCb
+/// The input image/patch that's indicating the Cb channel of the integral image of the image
+/// on which we want to find the foreground.
+/// Size of buffer is srcCbStride*srcHeight/2 bytes
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param fgIntegralCr
+/// The input image/patch that's indicating the Cr channel of the integral image of the image
+/// on which we want to find the foreground.
+/// Size of buffer is srcCrStride*srcHeight/2 bytes
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width, the number of pixels in a row. See the details.
+/// \n\b NOTE: must be a multiple of 16.
+///
+/// @param srcHeight
+/// The height of the source image. See the details.
+/// \n\b NOTE: must be a multiple of 2.
+///
+/// @param srcYStride
+/// The stride of the input source image's Y channel. (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2). If left at 0 srcStride is default to (srcWidth+8)*sizeof(uint32_t).
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcCbStride
+/// The stride of the input source image's Cb channel. (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2). If left at 0 srcStride is default to (srcWidth>>1+8)*sizeof(uint32_t).
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcCrStride
+/// The stride of the input source image's Cr channel. (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2). If left at 0 srcStride is default to (srcWidth>>1+8)*sizeof(uint32_t).
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param outputMask
+/// The output mask image. Each pixel represent the motion condition for a block in the original image.
+/// Size of buffer is outputMaskStride*outputHeight bytes
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param outputWidth
+/// The width of the output mask image.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param outputHeight
+/// The height of the output mask image.
+///
+/// @param outputMaskStride
+/// The stride of the output mask image. (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2). If left at 0 outputMaskStride is default to outputWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param threshold
+/// The threshold that's used to decide if a block is moving or not. (recommend the value of 20).
+///
+/// @return
+/// No return value.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvFindForegroundIntegrateImageYCbCr420u32(
+ const uint32_t * __restrict bgIntegralY,
+ const uint32_t * __restrict bgIntegralCb,
+ const uint32_t * __restrict bgIntegralCr,
+ const uint32_t * __restrict fgIntegralY,
+ const uint32_t * __restrict fgIntegralCb,
+ const uint32_t * __restrict fgIntegralCr,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcYStride,
+ uint32_t srcCbStride,
+ uint32_t srcCrStride,
+ uint8_t * __restrict outputMask,
+ uint32_t outputWidth,
+ uint32_t outputHeight,
+ uint32_t outputMaskStride,
+ float32_t threshold );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// This function calculates the average value of an image.
+///
+/// @details
+/// This function sums all the pixel value in an image and divide the result by the number of pixels in the image.
+///
+/// @param src
+/// The input image/patch. Must be 32 bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width, the number of pixels in a row
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param avgValue
+/// The output average value.
+///
+/// @return
+/// No return value.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvAverages32(
+ const int32_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ float32_t* __restrict avgValue);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// This function calculates the average value of an image.
+///
+/// @details
+/// This function sums all the pixel value in an image and divide the result by the number of pixels in the image.
+///
+/// @param src
+/// 8-bit image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width, the number of pixels in a row
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param avgValue
+/// The output average value.
+///
+/// @return
+/// No return value.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvAverageu8(
+ const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ float32_t* __restrict avgValue);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Applies the meanshift procedure and obtains the final converged position
+///
+/// @details
+/// This function applies the meanshift procedure to an original image (usually a probability image) and obtains the final converged position.
+/// The converged position search will stop either it has reached the required accuracy or the maximum number of iterations.
+///
+/// @param src
+/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be 8 bit grayscale image.
+/// Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// The width of the input source image.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// The height of the input source image.
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param window
+/// Pointer to the initial search window position which also returns the final converged window position.
+///
+/// @param criteria
+/// The criteria used to finish the MeanShift which consists of two termination criteria:
+/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
+///
+/// @return
+/// The actually number of iterations
+///
+/// @ingroup Motion_and_Object_Tracking
+//------------------------------------------------------------------------------
+FASTCV_API uint32_t
+fcvMeanShiftu8(const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ fcvRectangleInt* window,
+ fcvTermCriteria criteria);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Applies the meanshift procedure and obtains the final converged position
+///
+/// @details
+/// This function applies the meanshift procedure to an original image (usually a probability image) and obtains the final converged position.
+/// The converged position search will stop either it has reached the required accuracy or the maximum number of iterations.
+///
+/// @param src
+/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be int 32bit grayscale image.
+/// Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// The width of the input source image.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// The height of the input source image.
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param window
+/// Pointer to the initial search window position which also returns the final converged window position.
+///
+/// @param criteria
+/// The criteria used to finish the MeanShift which consists of two termination criteria:
+/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
+///
+/// @return
+/// Number of iterations
+///
+/// @ingroup Motion_and_Object_Tracking
+//------------------------------------------------------------------------------
+FASTCV_API uint32_t
+fcvMeanShifts32(const int32_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ fcvRectangleInt* window,
+ fcvTermCriteria criteria);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Applies the meanshift procedure and obtains the final converged position
+///
+/// @details
+/// This function applies the meanshift procedure to an original image (usually a probability image) and obtains the final converged position.
+/// The converged position search will stop either it has reached the required accuracy or the maximum number of iterations.
+///
+/// @param src
+/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be float 32bit grayscale image.
+/// Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// The width of the input source image.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// The height of the input source image.
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param window
+/// Pointer to the initial search window position which also returns the final converged window position.
+///
+/// @param criteria
+/// The criteria used to finish the MeanShift which consists of two termination criteria:
+/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
+///
+/// @return
+/// Number of iterations
+///
+/// @ingroup Motion_and_Object_Tracking
+//------------------------------------------------------------------------------
+FASTCV_API uint32_t
+fcvMeanShiftf32(const float32_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ fcvRectangleInt* window,
+ fcvTermCriteria criteria);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Applies the ConAdaTrack procedure and find the object center, size and orientation
+///
+/// @details
+/// This function applies the ConAdaTrack procedure to an original image (usually a probability image) and obtains the final converged object.
+/// The optimal object search will stop either it has reached the required accuracy or the maximum number of iterations.
+///
+/// @param src
+/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be 8bit grayscale image.
+/// Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// The width of the input source image.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// The height of the input source image.
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param window
+/// Pointer to the initial search window position which also returns the final converged window position.
+///
+/// @param criteria
+/// The criteria used to finish the object search which consists of two termination criteria:
+/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
+///
+/// @param circuBox
+/// The circumscribed box around the object
+///
+/// @return
+/// Number of iterations
+///
+/// @ingroup Motion_and_Object_Tracking
+//------------------------------------------------------------------------------
+FASTCV_API uint32_t
+fcvConAdaTracku8(const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ fcvRectangleInt* window,
+ fcvTermCriteria criteria,
+ fcvBox2D* circuBox);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Applies the ConAdaTrack procedure and find the object center, size and orientation
+///
+/// @details
+/// This function applies the ConAdaTrack procedure to an original image (usually a probability image) and obtains the final converged object.
+/// The optimal object search will stop either it has reached the required accuracy or the maximum number of iterations.
+///
+/// @param src
+/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be int 32bit grayscale image.
+/// Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// The width of the input source image.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// The height of the input source image.
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param window
+/// Pointer to the initial search window position which also returns the final converged window position.
+///
+/// @param criteria
+/// The criteria used to finish the object search which consists of two termination criteria:
+/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
+///
+/// @param circuBox
+/// The circumscribed box around the object
+///
+/// @return
+/// Number of iterations
+///
+/// @ingroup Motion_and_Object_Tracking
+//------------------------------------------------------------------------------
+FASTCV_API uint32_t
+fcvConAdaTracks32(const int32_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ fcvRectangleInt* window,
+ fcvTermCriteria criteria,
+ fcvBox2D* circuBox);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Applies the ConAdaTrack procedure and find the object center, size and orientation
+///
+/// @details
+/// This function applies the ConAdaTrack procedure to an original image (usually a probability image) and obtains the final converged object.
+/// The optimal object search will stop either it has reached the required accuracy or the maximum number of iterations.
+///
+/// @param src
+/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be float 32bit grayscale image.
+/// Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// The width of the input source image.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// The height of the input source image.
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param window
+/// Pointer to the initial search window position which also returns the final converged window position.
+///
+/// @param criteria
+/// The criteria used to finish the object search which consists of two termination criteria:
+/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
+///
+/// @param circuBox
+/// The circumscribed box around the object
+///
+/// @return
+/// Number of iterations
+///
+/// @ingroup Motion_and_Object_Tracking
+//------------------------------------------------------------------------------
+FASTCV_API uint32_t
+fcvConAdaTrackf32(const float32_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ fcvRectangleInt* window,
+ fcvTermCriteria criteria,
+ fcvBox2D* circuBox);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Compute a singular value decomposition of a matrix of a float type
+/// A = U*diag[w]*Vt;
+/// It is used for solving problems like least-squares, under-determined linear systems, matrix
+/// inversion and so forth. The algorithm used here does not compute the full U and V matrices
+/// however it computes a condensed version of U and V described below which is sufficient to solve
+/// most problems which use SVD.
+///
+/// @details
+///
+///
+/// @param A
+/// The input matrix of dimensions m x n
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param m
+/// The number of rows of matrix A
+///
+/// @param n
+/// The number of columns of matrix A
+///
+/// @param w
+/// The pointer to the buffer that holds n singular values. When m>n it
+/// contains n singular values while when m 0 and less than or equal to 8.
+///
+/// @param dst
+/// Output unsigned 8-bit integer image. Size of buffer is dstStride*srcHeight bytes.
+/// The dimensions of the image are dstWidth = srcWidth - 2*radius,
+/// and dstHeight = srcHeight - 2*radius.
+
+///
+/// @param dstStride
+/// Stride of the output image in bytes.
+/// \n\b NOTE: dstWidth = srcWidth - 2*radius, dstHeight = srcHeight - 2*radius.
+/// \n\b WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
+///
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvGLBPu8(const uint8_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t radius,
+ uint32_t neighbors,
+ uint8_t *__restrict dst,
+ uint32_t dstStride);
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Refine corner location
+///
+/// @details
+/// Refine the detected corners location into sub-Pixels which is more precise than integer pixels
+///
+/// @param src
+/// Input uint8_t image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+///
+/// @param srcHeight
+/// Input image height.
+///
+/// @param srcStride
+/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param blockWidth
+/// Width of the location search window.
+///
+/// @param blockHeight
+/// Height of the location search window.
+///
+/// @param maxIterations
+/// Maximum number of iteration to refine
+///
+/// @param stopCriteria
+/// Improvement threshold, iteration stop if the corner position moves less by this value
+///
+/// @param xyInitial
+/// Pointer to the initial input array containing the interleaved x,y position of the corner
+///
+/// @param nCorners
+/// Number of the corners
+///
+/// @param xyOut
+/// Pointer to the output array containing the refined interleaved x,y position of the corner
+///
+/// @ingroup feature_detection
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvCornerRefineSubPixu8( const uint8_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t blockWidth,
+ uint32_t blockHeight,
+ uint32_t maxIterations,
+ float32_t stopCriteria,
+ const uint32_t*__restrict xyInitial,
+ uint32_t nCorners,
+ float32_t * __restrict xyOut);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Extract strong corners from image to track
+///
+/// @details
+/// Extract strong corners from image to track based on the according paper "Good Feature to Track" by J.Shi and C.Tomasi
+///
+/// @param src
+/// Input uint8_t image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+///
+/// @param srcHeight
+/// Input image height.
+///
+/// @param srcStride
+/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param distanceMin
+/// Minimum Euclidean distance between the found corners
+///
+/// @param border
+/// Number for pixels to ignore from top,bottom
+///
+/// @param barrier
+/// Quality threshold
+///
+/// @param xy
+/// Pointer to the output array containing the interleaved x,y position of the detected features
+///
+/// @maxnumcorners
+/// Maximum number of features to detect
+///
+/// @numcorners
+/// Pointer to integer of actual detected features number
+///
+/// @ingroup feature_detection
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvGoodFeatureToTracku8( const uint8_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ float32_t distanceMin,
+ uint32_t border,
+ float32_t barrier,
+ uint32_t * __restrict xy,
+ uint32_t maxnumcorners,
+ uint32_t * __restrict numcorners);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Find multiple maxima along the normal direction of the line
+///
+/// @param src
+/// 8-bit input image
+///
+/// @param srcWidth
+/// Input image width
+///
+/// @param srcHeight
+/// Input image height
+///
+/// @param srcStride
+/// Input image stride
+///
+/// @param pos
+/// 2D position to start searching maximas in the input image
+///
+/// @param normal
+/// Normalized line normal at pos
+///
+/// @param maxDistance
+/// Search distance along the normal direction; [-normal*maxDistance, normal*maxDistance]
+///
+/// @param maxNumMaxima
+/// Maximum maxima to find, e.g., 5
+///
+/// @param minGradient
+/// Minimum 1D gradient of the pixels on the search line (normal direction)
+///
+/// @param maxAngleDiff
+/// Cosine value threshold to filter the pixels that have large angle difference
+///
+/// @param maxima
+/// List of found maxima 1D positions; Actuall 2D position of maxima = (normal * 1D position) + pos
+///
+/// @param numMaxima
+/// Number of found maxima
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFindMultipleMaximau8(const uint8_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ const float32_t* __restrict pos,
+ const float32_t* __restrict normal,
+ uint32_t maxDistance,
+ uint32_t maxNumMaxima,
+ int32_t minGradient,
+ float32_t maxAngleDiff,
+ float32_t* __restrict maxima,
+ uint32_t* __restrict numMaxima);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Extract the straight line segments from the image
+///
+/// @param srcPyr
+/// Pointer to an array of fcvPyramidLevel_v2. Only 2 levels at max will be used
+/// to extract the straight line segments.
+///
+/// @param pyrLevel
+/// Image pyramid level, if it is set to 1, then do not use multi-scale approach.
+/// pyrLevel should be greater than or equal to 1.
+///
+/// @param doBlurImage
+/// Do image-blurring inside the function (if the image is not blurred)
+///
+/// @param maxLineAngle
+/// Cosine threshold to stop following (extending) pixels, e.g., cos(22.5 deg)
+/// maxLineAngle should be between [0.5 - 1.0]
+///
+/// @param minLineLength
+/// Minimum line segment length in pixels
+///
+/// @param minMagnitude
+/// Minimum pixel gradient magnitude, e.g., 10
+///
+/// @param maxLineNum
+/// Maximum line segments from the image
+///
+/// @param indexBuffer
+/// Optionally store the index(:= y * image_width + x) of the pixels consisting of the line segments
+/// into pointsList in fcvLineSegment structure. e.g., One can provide the buffer[maxLineNum*(image width + height)]
+/// Pass NULL if it is not necessary.
+///
+/// @param lineSegments
+/// List of the detected line segments
+///
+/// @param numLineSegments
+/// Number of found line segments
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup feature_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvImageDetectLineSegmentsu8(const fcvPyramidLevel_v2* __restrict srcPyr,
+ uint32_t pyrLevel,
+ uint32_t doBlurImage,
+ float32_t maxLineAngle,
+ uint32_t minLineLength,
+ uint32_t minMagnitude,
+ uint32_t maxLineNum,
+ uint32_t* __restrict indexBuffer,
+ fcvLineSegment* __restrict lineSegments,
+ uint32_t* __restrict numLineSegments);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Sum of squared differences of one L-byte vector against N others.
+///
+/// @details
+/// SSD of one vector (a) against N other L-byte vectors
+/// ( b[0], b[1], ..., b[n-1] )
+/// using their given inverse lengths for normalization.
+/// \n\n SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param invLenA
+/// Inverse of vector A = 1/|A|
+///
+/// @param dim
+/// Number of element of vector A
+///
+/// @param bList
+/// Vectors b[0]...b[n-1].
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param invLenB
+/// Inverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param numB
+/// Number of B vectors.
+///
+/// @param distances
+/// Output of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }
+/// \n\b WARNING: should be 128-bit aligned.
+///
+///
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvSumOfSquaredDiffsu8( const uint8_t* __restrict a,
+ float32_t invLenA,
+ uint32_t dim,
+ const uint8_t* const * __restrict bList,
+ const float32_t* __restrict invLenB,
+ uint32_t numB,
+ float32_t* __restrict distances );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Sum of squared differences of one floating vector of L-elements against N others.
+///
+/// @details
+/// SSD of one vector (a) against N other L-elements vectors
+/// ( b[0], b[1], ..., b[n-1] )
+/// using their given inverse lengths for normalization.
+/// \n\n SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param invLenA
+/// Inverse of vector A = 1/|A|
+///
+/// @param dim
+/// Number of element of vector A
+///
+/// @param bList
+/// Vectors b[0]...b[n-1].
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param invLenB
+/// Inverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param numB
+/// Number of B vectors.
+///
+/// @param distances
+/// Output of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvSumOfSquaredDiffsf32( const float32_t* __restrict a,
+ float32_t invLenA,
+ uint32_t dim,
+ const float32_t* const * __restrict bList,
+ const float32_t* __restrict invLenB,
+ uint32_t numB,
+ float32_t* __restrict distances );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// General function for computing cluster centers and cluster bindings
+/// for a set of points of dimension dim.
+///
+/// @param points
+/// Array of all points. Array size must be greater than
+/// numPoints * pointStride.
+///
+/// @param numPoints
+/// Number of points in points array.
+///
+/// @param dim
+/// dimension, e.g. 36
+///
+/// @param pointStride
+/// Byte distance between adjacent points in array
+///
+/// @param numPointsUsed
+/// Total number of points used for clustering, {0,1,...(numPointsUsed-1)}
+///
+/// @param numClusters
+/// Number of clusters
+///
+/// @param clusterCenters
+/// current cluster centers;
+/// elements are distant by clusterCenterStride
+///
+/// @param clusterCenterStride
+/// byte distance between adjacent cluster centers in array
+///
+/// @param newClusterCenters
+/// array for new cluster centers; should be numClusterCenters long
+///
+/// @param newClusterMemberCounts
+/// Element counts for each cluster; should be numClusterCenters long
+///
+/// @param clusterBindings
+/// Output indices of the clusters to which each vector belongs to, array must
+/// be numPointsUsed long.
+///
+/// @param sumOfClusterDistances
+/// the sum of distances between each cluster center to its belonging points. The
+/// size should be numClusterCenters*sizeof(float_32)
+///
+/// @return
+/// 0 if successfully clustered, otherwise error code
+///
+/// @remark
+/// This is general clusterer. There are no assumptions on points other
+/// than they belong to a vector space
+///
+/// @ingroup clustering_and_search
+//---------------------------------------------------------------------------
+
+FASTCV_API int
+fcvClusterEuclideanu8( const uint8_t* __restrict points,
+ int32_t numPoints,
+ int32_t dim,
+ int32_t pointStride,
+ int32_t numPointsUsed,
+ int32_t numClusters,
+ float32_t* __restrict clusterCenters,
+ int32_t clusterCenterStride,
+ float32_t* __restrict newClusterCenters,
+ uint32_t* __restrict clusterMemberCounts,
+ uint32_t* __restrict clusterBindings,
+ float32_t* sumOfClusterDistances );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix transpose of one uint8_t type matrix.
+///
+/// @param src
+/// Source matrix.The size of src is srcStride*srcHeight.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param srcWidth
+/// Width of the source matrix.
+///
+/// @param srcHeight
+/// Height of the source matrix.
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// Transpose of the source matrix. The size of dst is dstStride*srcWidth.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcHeight.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvTransposeu8( const uint8_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t * __restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix transpose of one uint16_t type matrix.
+///
+/// @param src
+/// Source matrix. The size of src is srcStride*srcHeight.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param srcWidth
+/// Width of the source matrix.
+///
+/// @param srcHeight
+/// Height of the source matrix.
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// Transpose of the source matrix. The size of dst is dstStride*srcWidth.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcHeight*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvTransposeu16( const uint16_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint16_t * __restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix transpose of one float32_t type matrix.
+///
+/// @param src
+/// Source matrix. The size of src is srcStride*srcHeight.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param srcWidth
+/// Width of the source matrix.
+///
+/// @param srcHeight
+/// Height of the source matrix.
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// Transpose of the source matrix. The size of dst is dstStride*srcWidth.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcHeight*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvTransposef32( const float32_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ float32_t * __restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Flip one uint8_t type matrix. If src and dst point to the same address
+/// and srcStride equals to dstStride, it will do in-place flip.
+///
+/// @param src
+/// Source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param srcWidth
+/// Width of the source matrix.
+///
+/// @param srcHeight
+/// Height of the source matrix.
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix. If src equals to dst and srcStride equals to dstStride,
+/// it will do in-place flip.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dir
+/// Flip direction (FASTCV_FLIP_HORIZ, FASTCV_FLIP_VERT or FASTCV_FLIP_BOTH).
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFlipu8( const uint8_t * src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t * dst,
+ uint32_t dstStride,
+ fcvFlipDir dir );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Flip one uint16_t type matrix. If src and dst point to the same address,
+/// and srcStride equals to dstStride, it will do in-place flip.
+///
+/// @param src
+/// Source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param srcWidth
+/// Width of the source matrix.
+///
+/// @param srcHeight
+/// Height of the source matrix.
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix. If src equals to dst and srcStride equals to dstStride,
+/// it will do in-place flip.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dir
+/// Flip direction (FASTCV_FLIP_HORIZ, FASTCV_FLIP_VERT or FASTCV_FLIP_BOTH).
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvFlipu16( const uint16_t * src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint16_t * dst,
+ uint32_t dstStride,
+ fcvFlipDir dir );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Flips an interleaved RGB image
+///
+/// @details
+/// Flips one uint8_t type interleaved RGB image . If src and dst point to the same address
+/// and srcStride equals to dstStride, it will do in-place flip.
+///
+/// @param src
+/// Input unsigned 8-bit integer image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the image.
+///
+/// @param srcHeight
+/// Height of the source image.
+///
+/// @param srcStride
+/// Stride of the Image in bytes.
+/// \n\b NOTE: if 0, srcStride is set as 3 x srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as 3 x srcWidth if not 0.
+///
+/// @param dst
+/// Output unsigned 8-bit integer image. Size of buffer is dstStride*srcHeight bytes.
+/// If src equals to dst and srcStride equals to dstStride,it will do in-place flip.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of the output image in bytes.
+/// \n\b NOTE: if 0, dstStride is set as 3 x srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as 3 x srcWidth if not 0.
+///
+/// @param dir
+/// Flip direction (FASTCV_FLIP_HORIZ, FASTCV_FLIP_VERT or FASTCV_FLIP_BOTH).
+///
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API fcvStatus
+fcvFlipRGB888u8(const uint8_t * src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t * dst,
+ uint32_t dstStride,
+ fcvFlipDir dir);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Rotate one uint8_t type image.
+///
+/// @param src
+/// Source image.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param srcWidth
+/// Width of the source image.
+///
+/// @param srcHeight
+/// Height of the source image.
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result image.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth
+/// (FASTCV_ROTATE_180) or srcHeight (FASTCV_ROTATE_90 or FASTCV_ROTATE_270).
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param degree
+/// Rotate degree (FASTCV_ROTATE_90, FASTCV_ROTATE_180 or FASTCV_ROTATE_270).
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvRotateImageu8( const uint8_t * src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t * dst,
+ uint32_t dstStride,
+ fcvRotateDegree degree );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Rotate one interleaved uint8_t type image (e.g. UV channel in NV21).
+///
+/// @param src
+/// Source image.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param srcWidth
+/// Number of interleaved pairs in one row.
+/// For example, srcWidth = 4 in UVUVUVUV image row.
+///
+/// @param srcHeight
+/// Height of the source image.
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to 2*srcWidth.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result image.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to 2*srcWidth
+/// (FASTCV_ROTATE_180) or 2*srcHeight (FASTCV_ROTATE_90 or FASTCV_ROTATE_270).
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param degree
+/// Rotate degree (FASTCV_ROTATE_90, FASTCV_ROTATE_180 or FASTCV_ROTATE_270).
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvRotateImageInterleavedu8( const uint8_t * src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t * dst,
+ uint32_t dstStride,
+ fcvRotateDegree degree );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Element-wise multiplication of two uint8_t type matrices.
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (uint16_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvElementMultiplyu8u16( const uint8_t * src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t * src2,
+ uint32_t src2Stride,
+ uint16_t * __restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Element-wise multiplication of two float32_t type matrices.
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (float32_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvElementMultiplyf32( const float32_t * src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const float32_t * src2,
+ uint32_t src2Stride,
+ float32_t * __restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix multiplication of two int8_t type matrices.
+///
+/// @param src1
+/// First source matrix. The size of src1 is src1Stride*src1Height.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src1Width
+/// Width of the first source matrix.
+/// \n\b NOTE: src1Width should not be larger than 131072
+///
+/// @param src1Height
+/// Height of the first source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to src1Width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix. The size of src2 is src2Stride*src1Width.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Width
+/// Width of the second source matrix.
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to src2Width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (int32_t type). The size of dst is dstStride*src1Height.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to src2Width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvMatrixMultiplys8s32( const int8_t * __restrict src1,
+ uint32_t src1Width,
+ uint32_t src1Height,
+ uint32_t src1Stride,
+ const int8_t * __restrict src2,
+ uint32_t src2Width,
+ uint32_t src2Stride,
+ int32_t * __restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix multiplication of two float32_t type matrices.
+///
+/// @param src1
+/// First source matrix. The size of src1 is src1Stride*src1Height.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src1Width
+/// Width of the first source matrix.
+///
+/// @param src1Height
+/// Height of the first source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to src1Width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix. The size of src2 is src2Stride*src1Width.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Width
+/// Width of the second source matrix.
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to src2Width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (int32_t type). The size of dst is dstStride*src1Height.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to src2Width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvMatrixMultiplyf32( const float32_t * __restrict src1,
+ uint32_t src1Width,
+ uint32_t src1Height,
+ uint32_t src1Stride,
+ const float32_t * __restrict src2,
+ uint32_t src2Width,
+ uint32_t src2Stride,
+ float32_t * __restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Dot product of two uint8_t type blocks.
+///
+/// @param src1
+/// First source block.
+///
+/// @param blockWidth
+/// Width of the source block.
+///
+/// @param blockHeight
+/// Height of the source block.
+/// \n\b NOTE: blockWidth*blockHeight should not be larger than 65536
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to src1Width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source block.
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to src2Width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// Block dot product (uint32_t).
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API uint32_t
+fcvBlockDotProductu8( const uint8_t * __restrict src1,
+ uint32_t blockWidth,
+ uint32_t blockHeight,
+ uint32_t src1Stride,
+ const uint8_t * __restrict src2,
+ uint32_t src2Stride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Dot product of two float32_t type blocks.
+///
+/// @param src1
+/// First source block.
+///
+/// @param blockWidth
+/// Width of the source block.
+///
+/// @param blockHeight
+/// Height of the source block.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to src1Width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source block.
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to src2Width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// Block dot product (float32_t).
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API float32_t
+fcvBlockDotProductf32( const float32_t * __restrict src1,
+ uint32_t blockWidth,
+ uint32_t blockHeight,
+ uint32_t src1Stride,
+ const float32_t * __restrict src2,
+ uint32_t src2Stride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix addition of two uint8_t type matrices.
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (uint16_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvAddu8u16( const uint8_t * __restrict src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t * __restrict src2,
+ uint32_t src2Stride,
+ uint16_t * __restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix addition of two int16_t type matrices with saturation.
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (int16_t type). The result will be saturated to
+/// int16_t.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvAdds16( const int16_t * __restrict src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const int16_t * __restrict src2,
+ uint32_t src2Stride,
+ int16_t * __restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix addition of two float32_t type matrices.
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (float32_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API void
+fcvAddf32( const float32_t * __restrict src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const float32_t * __restrict src2,
+ uint32_t src2Stride,
+ float32_t * __restrict dst,
+ uint32_t dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Builds an integral image of the incoming 8-bit patch values and their
+/// squares. This function supports bigger size patch with u64 for squared
+/// integral output.
+/// \n\b NOTE: No extra border lines, the integral output buffer size is the same
+/// as input image buffer size.
+///
+/// @details
+/// sum (X,Y) = sum_{x<=X,y<=Y} I(x,y)
+///
+/// @param src
+/// Input image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values).
+///
+/// @param dstIntgrl
+/// Integral image.
+/// \n\b NOTE: Memory must be >= srcWidth*srcHeight*4 bytes
+///
+/// @param dstIntgrlSqrd
+/// Integral image of squared values.
+/// \n\b NOTE: Memory must be >= srcWidth*srcHeight*8 bytes
+///
+/// @param dstIntgrlStride
+/// dstIntgrl Image stride (in bytes).
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth*4.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values).
+///
+/// @param dstIntgrlSqrdStride
+/// dstIntgrlSqrd Image stride (in bytes).
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth*8.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values).
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvIntegrateImageu8u64( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t* __restrict dstIntgrl,
+ uint64_t* __restrict dstIntgrlSqrd,
+ uint32_t dstIntgrlStride,
+ uint32_t dstIntgrlSqrdStride);
+
+
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Normalize the image according to histogram value of the pixel intensity.
+///
+/// @param src
+/// Pointer to grayscale image with one byte per pixel
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param dst
+/// Pointer to output image with one byte per pixel
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+
+FASTCV_API void
+fcvImageHistogramEqualizeu8( const uint8_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t * __restrict dst,
+ uint32_t dstStride);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Calculate histogram at image patches.
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvImageSpatialHistogramu8_v2(). In the 2.0.0 release,
+/// fcvImageSpatialHistogramu8_v2 will be renamed to fcvImageSpatialHistogramu8
+/// and the signature of fcvImageSpatialHistogramu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @param src
+/// Pointer to grayscale image with one byte per pixel
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param numPatterns
+/// Number of patterns to be computed in the histogram
+///
+/// @param grid_x
+/// The number of grids along x dimension
+///
+/// @param grid_y
+/// The number of grids along y dimension
+///
+/// @param histogram
+/// Output histogram
+/// \n\b NOTE: Memory must be at least numPatterns*grid_x*grid_y*sizeof(float32_t)
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API void
+fcvImageSpatialHistogramu8(const uint8_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t numPatterns,
+ uint32_t grid_x,
+ uint32_t grid_y,
+ float32_t*__restrict histogram);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data without normalization.
+/// This function computes the gradient of the input image by convolution with the
+/// 3x3 Sobel kernel. The Sobel kernel is not normalized in this function.
+///
+/// NOTE: it will replace the fcvFilterSobel3x3u8 in fastCV 2.0.0.
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient. The number of pixels in a row.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
+/// If NULL, the horizontal gradient will not be calculated.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
+/// If NULL, the vertical gradient will not be calculated.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dxyStride
+/// Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth.
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param borderType
+/// Define the behavior at the border.
+/// See definition of fcvBorderType.
+///
+/// @param borderValue
+/// Specifies the constant value for the borderType FASTCV_BORDER_CONSTANT.
+/// Ignored otherwise.
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterSobel3x3u8s16( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int16_t* __restrict dx,
+ int16_t* __restrict dy,
+ uint32_t dxyStride,
+ fcvBorderType borderType,
+ uint8_t borderValue);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data without normalization.
+/// This function computes the gradient of the input image by convolution with the
+/// 5x5 Sobel kernel. The Sobel kernel is not normalized in this function.
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient. The number of pixels in a row.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
+/// If NULL, the horizontal gradient will not be calculated.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
+/// If NULL, the vertical gradient will not be calculated.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dxyStride
+/// Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth.
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param borderType
+/// Define the behavior at the border.
+/// See definition of fcvBorderType.
+///
+/// @param borderValue
+/// Specifies the constant value for the borderType FASTCV_BORDER_CONSTANT.
+/// Ignored otherwise.
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterSobel5x5u8s16( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int16_t* __restrict dx,
+ int16_t* __restrict dy,
+ uint32_t dxyStride,
+ fcvBorderType borderType,
+ uint8_t borderValue);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Creates a 2D gradient image from source luminance data without normalization.
+/// This function computes the gradient of the input image by convolution with the
+/// 7x7 Sobel kernel. The Sobel kernel is not normalized in this function.
+///
+/// @param src
+/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of src data to create gradient. The number of pixels in a row.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Height of src data to create gradient.
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param dx
+/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
+/// If NULL, the horizontal gradient will not be calculated.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dy
+/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
+/// If NULL, the vertical gradient will not be calculated.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dxyStride
+/// Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth.
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param borderType
+/// Define the behavior at the border.
+/// See definition of fcvBorderType.
+///
+/// @param borderValue
+/// Specifies the constant value for the borderType FASTCV_BORDER_CONSTANT.
+/// Ignored otherwise.
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterSobel7x7u8s16( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int16_t* __restrict dx,
+ int16_t* __restrict dy,
+ uint32_t dxyStride,
+ fcvBorderType borderType,
+ uint8_t borderValue);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Canny edge detection with more controls to configurate the algorithm.
+///
+/// @details
+/// Canny edge detector applied to a 8 bit grayscale image.
+/// The results are stored as a binarized image (0x0 - not an edge, 0xFF - edge).
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Stride of the input image in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param kernelSize
+/// The Sobel kernel size for calculating gradient. Supported sizes are 3, 5 and 7.
+///
+/// @param lowThresh
+/// For all the intermediate pixels along the edge, the norm of the
+/// gradient at the pixel locations should be greater than 'lowThresh'.
+///
+/// @param highThresh
+/// For an edge starting point, i.e. either the first or last
+/// pixel of the edge, the norm of the gradient at the pixel should be
+/// greater than 'highThresh'.
+///
+/// @param normType
+/// The norm definition to calculate the gradient magnitude. See fcvNormType.
+///
+/// @param dst
+/// Output 8-bit binarized image containing the edge detection results.
+/// Size of buffer is dstStride*srcHeight bytes.
+/// Edges are marked with pixels of 0xFF. The rest pixels have values of 0.
+///
+/// @param dstStride
+/// Stride of the output image in bytes.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param gx
+/// Buffer to store horizontal gradient. Must be (gradStride)*(srcHeight) bytes in size.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param gy
+/// Buffer to store vertical gradient. Must be (gradStride)*(srcHeight) bytes in size.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param gradStride
+/// Stride (in bytes) of 'gx' and 'gy' gradient arrays,
+/// is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in the gradient arrays dx or dy.
+/// If left at 0 gradStride is default to 2 * srcWidth.
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterCannyu8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t kernelSize,
+ int32_t lowThresh,
+ int32_t highThresh,
+ fcvNormType normType,
+ uint8_t* __restrict dst,
+ uint32_t dstStride,
+ int16_t* __restrict gx,
+ int16_t* __restrict gy,
+ uint32_t gradStride);
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Converts the bit depth of a single-channel uint8 image to int16_t type
+///
+/// @param src
+/// Input uint8_t image. The size of buffer is srcStride*srcHeight bytes
+/// \n\b NOTE: should be 128-bit aligned
+///
+/// @param srcWidth
+/// Input image width
+///
+/// @param srcHeight
+/// Input image height
+///
+/// @param srcStride
+/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+/// if srcStride is equal to 0, it will be set to srcWidth
+/// \n\b NOTE: should be a multiple of 8
+///
+/// @param shift
+/// The number of bits to be right-shifted to adjust the output
+/// \n\b NOTE: range from 0 to 8
+///
+/// @param dst
+/// Output image which has the same dimension as the input image in int16_t type
+/// \n\b NOTE: should be 128-bit aligned
+///
+/// @param dstStride
+/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+/// if dstStride is equal to 0, it will be set to srcWidth*2
+/// \n\b NOTE: should be a multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvConvertDepthu8s16(const uint8_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t shift,
+ int16_t *__restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Converts the bit depth of a single-channel int16_t image to uint8_t type
+///
+/// @param src
+/// Input int16_t image. The size of buffer is srcStride*srcHeight bytes
+/// \n\b NOTE: should be 128-bit aligned
+///
+/// @param srcWidth
+/// Input image width
+///
+/// @param srcHeight
+/// Input image height
+///
+/// @param srcStride
+/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+/// if srcStride is equal to 0, it will be set to srcWidth*2
+/// \n\b NOTE: should be a multiple of 8
+///
+/// @param shift
+/// The number of bits to be left-shifted to adjust the output
+/// \n\b NOTE: range from 0 to 15
+///
+/// @param policy
+/// Conversion policy that decides how data overflow should be handled
+///
+/// @param dst
+/// Output image which has the same dimension as the input image in uint8_t type
+/// \n\b NOTE: should be 128-bit aligned
+///
+/// @param dstStride
+/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+/// if dstStride is equal to 0, it will be set to srcWidth
+/// \n\b NOTE: should be a multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvConvertDepths16u8(const int16_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t shift,
+ fcvConvertPolicy policy,
+ uint8_t *__restrict dst,
+ uint32_t dstStride );
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Recursive Bilateral Filtering
+///
+/// @details
+/// The algorithm is described in paper Recursive Bilateral Filtering, ECCV2012 by Prof Yang Qingxiong
+/// Different from traditional bilateral filtering, the bilateral filtering in this algorithm is actually performed in gradient domain.
+/// The results are ususally better than tradition bilateral filters. Filtering is carried out in a recursive way, and it is efficient.
+///
+/// @param src
+/// Input uint8_t image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+///
+/// @param srcHeight
+/// Input image height.
+///
+/// @param srcStride
+/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param dst
+/// Output uint8_t image. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param sigmaColor
+/// Filter sigma in the color space. Typical value 0.03f. Increasing this value means increasing the influence of the neighboring
+///pixels of more different Color to the smoothing result.
+///
+/// @param sigmaSpace
+/// Filter sigma in the coordinate space. Typical value 0.1f. Increasing this value means increasing the influence of farther
+/// pixels to the smoothing result.
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvBilateralFilterRecursiveu8(const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride,
+ float32_t sigmaColor,
+ float32_t sigmaSpace );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Grow the seeds within the image to meaningful regions,
+/// depending on the color or gray scale uniformity of the neighborhood pixels from the seeds.
+///
+/// @param src
+/// Pointer to 16-bit color (3-channel) or grayscale (1-channel) image.
+///
+/// @param srcWidth
+/// Width of src image, measured by pixels.
+///
+/// @param srcHeight
+/// Height of src image, measured by pixels.
+///
+/// @param srcStride
+/// Stride of src image, measured by bytes.
+/// WARNING: should be multiple of 8, and at least as much as srcWidth*numChannel if not 0.
+///
+/// @param numChannel
+/// Number of channels of src image. 1 for gray scale and 3 for color image.
+///
+/// @param threshGrow
+/// Threshold to grow the seed into a region. Higher value: larger uniform region grown.
+/// Range of 3-channel image segmentation: 10~150.
+/// Range of 1-channel image segmentation: 3~25.
+///
+/// @param pointVector
+/// A 2D point vector of seeds (provided by user) within the image. For N seeds, it is saved as [x0,y0,x1,y1,...,xN-1,yN-1].
+///
+/// @param numSeed
+/// Number of seed points, equal to N used in pointVector.
+///
+/// @param mode
+/// Mode of seed grow. 0: distance measured with neighborhood pixel. 1: distance measured with seed pixel only.
+///
+/// @param segLabel
+/// Segmented labels. 1 channel with same size of src. Pixel belonging to the same region is uniformly labeled by a non-zero number. Pixels not grown from any seeds are labeled 0.
+///
+/// @param segLabelStride
+/// Stride of segmented labels, measured by bytes.
+/// WARNING: should be multiple of 8, and at least as much as srcWidth*4 if not 0.
+///
+/// @return
+/// 0 if successful.
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvImageSegmentationSeedRegionGrows16( const int16_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t numChannel,
+ uint32_t threshGrow,
+ const uint32_t* __restrict pointVector,
+ uint32_t numSeed,
+ uint8_t mode,
+ uint32_t* __restrict segLabel,
+ uint32_t segLabelStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Calculate the local subtractive and contrastive normalization of the image.
+/// For each pixel of the image, the mean and optionally standard deviation
+/// is calculated for the patch centered around the pixel. Then the pixel is
+/// normalized by the local mean and optionally standard deviation.
+///
+/// @param src
+/// The input image. Must be 8 bit grayscale image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE:should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width, the number of pixels in a row
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Stride of src image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory.
+/// \n\b NOTE: should be a multiple of 8. If left at 0 srcStride is default to srcWidth.
+///
+/// @param patchWidth
+/// Width in pixels of the patch to calculate local mean and standard deviation.
+///
+/// @param patchHeight
+/// Height in pixels of the patch to calculate local mean and standard deviation.
+///
+/// @param useStdDev (0 or 1)
+/// if 1, the dst will be normalized with standard deviation.
+///
+/// @param dst
+/// The output image.
+/// Size of buffer is dstStride*srcHeight bytes.
+/// \n\b NOTE:should be 128-bit aligned.
+///
+/// @param dstStride
+/// The stride of the output image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: should be a multiple of 8. If left at 0 dstStride is default to srcWidth.
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API fcvStatus
+fcvNormalizeLocalBoxu8( const uint8_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t patchWidth,
+ uint32_t patchHeight,
+ uint32_t useStdDev,
+ int8_t * __restrict dst,
+ uint32_t dstStride);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Calculate the local subtractive and contrastive normalization of the image.
+/// For each pixel of the image, the mean and optionally standard deviation
+/// is calculated for the patch centered around the pixel. Then the pixel is
+/// normalized by the local mean and optionally standard deviation.
+///
+/// @param src
+/// The input image. Must be 32-bit float image. Size of buffer is
+/// srcStride*srcHeight*sizeof(float32_t) bytes.
+/// \n\b NOTE:should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width, the number of pixels in a row
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Stride of src image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory.
+/// \n\b NOTE: should be a multiple of 8. If left at 0 srcStride is default to srcWidth*sizeof(float32_t).
+///
+/// @param patchWidth
+/// Width in pixels of the patch to calculate local mean and standard deviation.
+///
+/// @param patchHeight
+/// Height in pixels of the patch to calculate local mean and standard deviation.
+///
+/// @param useStdDev (0 or 1)
+/// if 1, the dst will be normalized with standard deviation.
+///
+/// @param dst
+/// The output image.
+/// Size of buffer is dstStride*srcHeight*sizeof(float32_t) bytes.
+/// \n\b NOTE:should be 128-bit aligned.
+///
+/// @param dstStride
+/// The stride of the output image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: should be a multiple of 8. If left at 0 dstStride is default to srcWidth*sizeof(float32_t).
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+FASTCV_API fcvStatus
+fcvNormalizeLocalBoxf32( const float32_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t patchWidth,
+ uint32_t patchHeight,
+ uint32_t useStdDev,
+ float32_t * __restrict dst,
+ uint32_t dstStride);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Combine two channels in an interleaved fashion
+///
+/// @details
+/// Interleave data from src1 and src2 to dst.
+/// Data in src1 [d0 d1 d2 d3...]
+/// Data in src2 [t0 t1 t2 t3...]
+/// Results in dst [d0 t0 d1 t1 d2 t2 d3 t3...]
+/// \n\b NOTE: Perform the same functionality as fcvInterleaveu8.
+///
+/// @param src1
+/// One of the input images ( For example, Cb or Cr component)
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source image.
+///
+/// @param height
+/// Height of the source image.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// One of the input images ( For example, Cb or Cr component)
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// The result image (uint8_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvChannelCombine2Planesu8( const uint8_t *__restrict src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t *__restrict src2,
+ uint32_t src2Stride,
+ uint8_t *__restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Combine three channels in an interleaved fashion
+///
+/// @details
+/// Interleave data from src1, src2 and src3 to dst.
+/// Data in src1 [d0 d1 d2 d3...]
+/// Data in src2 [t0 t1 t2 t3...]
+/// Data in src3 [s0 s1 s2 s3...]
+/// Results in dst [d0 t0 s0 d1 t1 s1 d2 t2 s2 d3 t3 s3...]
+///
+/// @param src1
+/// One of the input images ( For example, R or G or B component)
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source image.
+///
+/// @param height
+/// Height of the source image.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// One of the input images ( For example, R or G or B component)
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src3
+/// One of the input images ( For example, R or G or B component)
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src3Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src3Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// The result image (uint8_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*3.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvChannelCombine3Planesu8(const uint8_t *__restrict src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t *__restrict src2,
+ uint32_t src2Stride,
+ const uint8_t *__restrict src3,
+ uint32_t src3Stride,
+ uint8_t *__restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Combine four channels in an interleaved fashion
+///
+/// @details
+/// Interleave data from src1, src2, src3 and src4 to dst.
+/// Data in src1 [d0 d1 d2 d3...]
+/// Data in src2 [t0 t1 t2 t3...]
+/// Data in src3 [s0 s1 s2 s3...]
+/// Data in src3 [r0 r1 r2 r3...]
+/// Results in dst [d0 t0 s0 r0 d1 t1 s1 r1 d2 t2 s2 r2 d3 t3 s3 r3...]
+///
+/// @param src1
+/// One of the input images ( For example, R or G or B or A component)
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source image.
+///
+/// @param height
+/// Height of the source image.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// One of the input images ( For example, R or G or B or A component)
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src3
+/// One of the input images ( For example, R or G or B or A component)
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src3Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src3Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src4
+/// One of the input images ( For example, R or G or B or A component)
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src4Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src4Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// The result image (uint8_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*4.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvChannelCombine4Planesu8(const uint8_t *__restrict src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t *__restrict src2,
+ uint32_t src2Stride,
+ const uint8_t *__restrict src3,
+ uint32_t src3Stride,
+ const uint8_t *__restrict src4,
+ uint32_t src4Stride,
+ uint8_t *__restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Extract channel as a single uint8_t type plane from an interleaved or multi-planar image format
+///
+/// @details
+///
+///
+/// @param src1
+/// The first plane in source image. For example, an intervealved RGB/RGBA plane or the Y plane.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source image.
+///
+/// @param height
+/// Height of the source image.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory.
+/// If left at 0 src1Stride is default to the size required by corresponding image format.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// The second plane in souce image if available; otherwise, left at 0.
+/// For example, the intervealved CbCr plane in FASTCV_NV12/FASTCV_NV21; or the Cb plane in FASTCV_IYUV/FASTCV_YUV4.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory.
+/// If left at 0, src2Stride is default to width for FASTCV_NV12/FASTCV_NV21/FASTCV_YUV4 and width/2 for FASTCV_IYUV.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src3
+/// The third plane in souce image if available; otherwise, left at 0.
+/// For example, the Cr plane in FASTCV_IYUV/FASTCV_YUV4.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src3Stride
+/// Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory.
+/// If left at 0 src3Stride is default to width for FASTCV_YUV4, and width/2 for FASTCV_IYUV.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param srcChannel
+/// The index of the image channel to be extracted. Refer to fcvChannelType for details.
+///
+/// @param srcFormat
+/// The format of the source image. Different image formats require different src
+/// and dst size. Refer to fcvImageFormat for details.
+///
+/// @param dst
+/// The result image (a uint8_t type plane).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory.
+/// If left at 0, dstStride is default to the size required by corresponding image format.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvChannelExtractu8( const uint8_t *__restrict src1,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t src1Stride,
+ const uint8_t *__restrict src2,
+ uint32_t src2Stride,
+ const uint8_t *__restrict src3,
+ uint32_t src3Stride,
+ fcvChannelType srcChannel,
+ fcvImageFormat srcFormat,
+ uint8_t *__restrict dst,
+ uint32_t dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Blurs an image with MxN median filter (M,N have to be odd numbers)
+///
+/// @details
+/// Borders of m pixels in horizontal direction and n in vertical direction
+/// are replaced with the source pixels, where m = (M-1)/2, n = (N-1)/2
+/// The NxN median filter applies on the image area
+/// | a(n,m) , a(n,m+1), ..., a(n,srcWidth-m-1) |\n
+/// | ... , ..., ..., ... |\n
+/// | a(srcHeight-n-1,m), ..., ..., a(srcHeight-n-1,srcWidth-m-1) |\n
+///
+/// @param src
+/// Input 16-bit signed image. Size of buffer is srcStride*srcHeight byte.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth * 2.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*2 if not 0.
+///
+/// @param M
+/// Filter kernel width
+/// \n\b NOTE: kernel width should be an odd number
+///
+/// @param N
+/// Filter kernel height
+/// \n\b NOTE: kernel height should be an odd number
+///
+/// @param dst
+/// Output 16-bit image. Size of buffer is dstStride*srcHeight byte.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth * 2
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*2 if not 0.
+///
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterMedianMxNs16( const int16_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t M,
+ uint32_t N,
+ int16_t* __restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Computes the convolution of an image with an M x N Kernel
+///
+/// @details
+/// The function computes the convolution of an unsigned char input image
+/// with an M x N kernel of type short. The output is of type short
+/// and is of the same size as the input image. The convolution is computed
+/// based on the type of Border handling selected.
+///
+///
+/// @param kernel
+/// Input M x N short kernel matrix. The size of buffer is M*N*sizeof(int16_t) bytes
+/// The kernel can be normalized before passing in by making use of the shift parameter.
+///
+///
+/// @param M
+/// Width of the kernel
+///
+/// @param N
+/// Height of the kernel
+///
+/// @param shift
+/// This parameter can be used to normalize the input kernel by converting the data into
+/// fixed point values. Shift can be considered as Q factor of kernel.
+///
+/// @param src
+/// Input uint8_t image. The size of buffer is srcStride*srcHeight bytes
+/// \n\b NOTE: should be 128-bit aligned
+///
+/// @param srcWidth
+/// Input image width
+///
+/// @param srcHeight
+/// Input image height
+///
+/// @param srcStride
+/// Input image stride, i.e. the gap (in terms of bytes) between the first element
+/// of a row and that of the successive row. If srcStride is equal to 0,
+/// it will be set to srcWidth.
+/// \n\b NOTE: should be a multiple of 8
+///
+/// @param dst
+/// Output image which has the same dimensions as the input matrix.
+/// The output is of type short, and must be allocated as dstStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned
+///
+/// @param dstStride
+/// Output image stride, i.e. the gap (in terms of bytes) between the first element
+/// of a row and that of the successive row. If dstStride is equal to 0,
+/// it will be set to srcWidth * sizeof(int16_t).
+/// \n\b NOTE: should be a multiple of 8
+///
+/// @param borderType
+/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
+/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
+/// border values will be set to 0.
+///
+/// @param borderValue
+/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
+/// set this value as 0. Can take values between 0 to 255.
+///
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterConvolveMxNu8s16( const int16_t* __restrict kernel,
+ uint32_t M,
+ uint32_t N,
+ int8_t shift,
+ const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int16_t* __restrict dst,
+ uint32_t dstStride,
+ fcvBorderType borderType,
+ uint8_t borderValue );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Computes the convolution of a image with an M x N Kernel
+///
+/// @details
+/// The function computes the convolution of an unsigned char input image
+/// with an M x N kernel of type short. The output is of type unsigned char
+/// and is of the same size as the input image. The convolution is computed
+/// based on the type of Border handling selected.
+///
+///
+/// @param kernel
+/// Input M x N short kernel matrix. The size of buffer is M*N*sizeof(int16_t) bytes
+/// The kernel can be normalized before passing in by making use of the shift parameter.
+///
+///
+/// @param M
+/// Width of the kernel
+///
+/// @param N
+/// Height of the kernel
+///
+/// @param shift
+/// This parameter can be used to normalize the input kernel by converting the data into
+/// fixed point values. Shift can be considered as Q factor of kernel.
+///
+/// @param src
+/// Input uint8_t image. The size of buffer is srcStride*srcHeight bytes
+/// \n\b NOTE: should be 128-bit aligned
+///
+/// @param srcWidth
+/// Input image width
+///
+/// @param srcHeight
+/// Input image height
+///
+/// @param srcStride
+/// Input image stride, i.e. the gap (in terms of bytes) between the first element
+/// of a row and that of the successive row. If srcStride is equal to 0,
+/// it will be set to srcWidth.
+/// \n\b NOTE: should be a multiple of 8
+///
+/// @param dst
+/// Output image which has the same dimensions as the input matrix.
+/// The output is of type unsigned char, and must be allocated as dstStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned
+///
+/// @param dstStride
+/// Output image stride, i.e. the gap (in terms of bytes) between the first element
+/// of a row and that of the successive row. If dstStride is equal to 0,
+/// it will be set to srcWidth.
+/// \n\b NOTE: should be a multiple of 8
+///
+/// @param borderType
+/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
+/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
+/// border values will be set to 0.
+///
+/// @param borderValue
+/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
+/// set this value as 0. Can take values between 0 and 255.
+///
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterConvolveMxNu8(const int16_t* __restrict kernel,
+ uint32_t M,
+ uint32_t N,
+ int8_t shift,
+ const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride,
+ fcvBorderType borderType,
+ uint8_t borderValue);
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Smooth a uint8_t image with a 3x3 box filter with border handling scheme specified by user
+///
+/// @details
+/// smooth with 3x3 box kernel and normalize:
+/// \n[ 1 1 1
+/// \n 1 1 1
+/// \n 1 1 1 ]/9
+///
+/// @param src
+/// Input uint8_t image.
+///
+/// @param srcWidth
+/// Input image width.
+///
+/// @param srcHeight
+/// Input image height.
+///
+/// @param srcStride
+/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param dst
+/// Output image which has the same type, and size as the input image.
+///
+/// @param dstStride
+/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+///
+/// @param borderType
+/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
+/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
+/// border values will be set to 0.
+///
+/// @param borderValue
+/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
+/// set this value as 0. Can take values between 0 and 255.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvBoxFilter3x3u8_v2( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride,
+ fcvBorderType borderType,
+ uint8_t borderValue);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Erode a grayscale image by taking the local minima of 3x3 nbhd window
+/// with border handling scheme specified by user
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterErode3x3u8_v2() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterErode3x3u8,
+/// \a fcvFilterErode3x3u8_v2 will be removed, and the current signature
+/// for \a fcvFilterErode3x3u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterErode3x3u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit eroded image. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of output image.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param borderType
+/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
+/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
+/// border values will be set to 255.
+///
+/// @param borderValue
+/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
+/// set this value as 0. Can take values between 0 and 255.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterErode3x3u8_v3( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride,
+ fcvBorderType borderType,
+ uint8_t borderValue);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Erode a grayscale image by taking the local minima of NxN neighborhood window.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param N
+/// Dimension of the neighborhood window.
+/// \n\b WARNING: must be an odd number
+///
+/// @param dst
+/// Output 8-bit eroded image. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of output image.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterErodeNxNu8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t N,
+ uint8_t* __restrict dst,
+ uint32_t dstStride);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window
+/// with border handling scheme specified by user
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterDilate3x3u8_v2() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterDilate3x3u8,
+/// \a fcvFilterDilate3x3u8_v2 will be removed, and the current signature
+/// for \a fcvFilterDilate3x3u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterDilate3x3u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit dilated image. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of output image.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param borderType
+/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
+/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
+/// border values will be set to 0.
+///
+/// @param borderValue
+/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
+/// set this value as 0. Can take values between 0 and 255.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterDilate3x3u8_v3( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride,
+ fcvBorderType borderType,
+ uint8_t borderValue);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Dilate a grayscale image by taking the local maxima of NxN neighborhood window.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param N
+/// Dimension of the neighborhood window.
+/// \n\b WARNING: must be an odd number
+///
+/// @param dst
+/// Output 8-bit dilated image. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of output image.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param tmp
+/// Temporary image scratch space used internally.
+/// \n\b NOTE: Size = width * height
+/// \n\b NOTE: data should be 128-bit aligned
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterDilateNxNu8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t N,
+ uint8_t* __restrict dst,
+ uint32_t dstStride);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Blurs an image with 3x3 Gaussian filter
+/// with border handling scheme specified by user
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterGaussian3x3u8_v2() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterGaussian3x3u8,
+/// \a fcvFilterGaussian3x3u8_v2 will be removed, and the current signature
+/// for \a fcvFilterGaussian3x3u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterGaussian3x3u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Convolution with 3x3 Gaussian kernel:
+/// \n 1 2 1
+/// \n 2 4 2
+/// \n 1 2 1
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride.
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as dstWidth if not 0.
+///
+/// @param borderType
+/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
+/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
+/// border is blurred by 0-padding adjacent values.
+///
+/// @param borderValue
+/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
+/// set this value as 0. Can take values between 0 and 255.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterGaussian3x3u8_v3( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride,
+ fcvBorderType borderType,
+ uint8_t borderValue);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Blurs an image with 3x3 median filter
+/// with border handling scheme specified by user
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvFilterMedian3x3u8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvFilterMedian3x3u8,
+/// \a fcvFilterMedian3x3u8_v2 will be removed, and the current signature
+/// for \a fcvFilterMedian3x3u8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvFilterMedian3x3u8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Border values are extrapolated according to borderType.
+/// The 3x3 mask convolves with the whole image area.
+///
+/// @param srcImg
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight byte.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param srcHeight
+/// Image height.
+///
+/// @param srcStride
+/// Image stride.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param dstImg
+/// Output 8-bit image. Size of buffer is dstStride*srcHeight byte.
+/// \n\b NOTE: data should be 128-bit aligned.
+///
+/// @param dstStride
+/// Output stride.
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param borderType
+/// This parameter specifies how the border is handled. Can be set to FASTCV_BORDER_CONSTANT,
+/// FASTCV_BORDER_REPLICATE or FASTCV_BORDER_UNDEFINED. In the case of FASTCV_BORDER_UNDEFINED,
+/// border values are ignored. The 3x3 mask convolves with the following image area
+/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
+/// | ... , ..., ..., ... |\n
+/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
+///
+/// @param borderValue
+/// Used to define the border value in case FASTCV_BORDER_CONSTANT is chosen. For other modes,
+/// set this value as 0. Can take values between 0 and 255.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFilterMedian3x3u8_v3( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride,
+ fcvBorderType borderType,
+ uint8_t borderValue);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Calculate histogram at image patches.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvImageSpatialHistogramu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvImageSpatialHistogramu8,
+/// \a fcvImageSpatialHistogramu8_v2 will be removed, and the current signature
+/// for \a fcvImageSpatialHistogramu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvImageSpatialHistogramu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src
+/// Pointer to grayscale image with one byte per pixel
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Image width
+///
+/// @param srcHeight
+/// Image height
+///
+/// @param srcStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param numPatterns
+/// Number of patterns to be computed in the histogram
+///
+/// @param grid_x
+/// The number of grids along x dimension
+///
+/// @param grid_y
+/// The number of grids along y dimension
+///
+/// @param histogram
+/// Output histogram
+/// \n\b NOTE: Memory must be at least numPatterns*grid_x*grid_y*sizeof(float32_t)
+///
+/// @param normalize_factor
+/// Scale factor with float32_t type to normalize result. When set to 0, the result is
+/// normalized by (srcWidth/grid_x) * (srcHeight/grid_y)
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_processing
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvImageSpatialHistogramu8_v2( const uint8_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t numPatterns,
+ uint32_t grid_x,
+ uint32_t grid_y,
+ float32_t*__restrict histogram,
+ float32_t normalize_factor);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Image downscaling using bilinear method
+///
+/// @param src
+/// Input image
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width
+///
+/// @param srcHeight
+/// Input image height
+///
+/// @param srcStride
+/// Stride of input image (i.e., number of bytes between column 0
+/// of row 0 and column 0 of row 1).
+/// If left at 0, srcStride is default to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param dst
+/// Output image
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Output image width
+///
+/// @param dstHeight
+/// Output image height
+///
+/// @param dstStride
+/// Stride of image (i.e., number of bytes between column 0
+/// of row 0 and column 0 of row 1).
+/// If left at 0, dstStride is default to dstWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @return
+/// No return value.
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvScaleDownBLu8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Applies a Table Look-up transformation to a single-channel uint8 image
+///
+/// @details
+/// Each pixel in the input image is used to index into a look-up table and the indexed look-up table
+/// value is then put into the output image
+///
+/// @param src
+/// Input uint8_t image. The size of buffer is srcStride*srcHeight bytes
+/// \n\b NOTE: should be 128-bit aligned
+///
+/// @param srcWidth
+/// Input image width
+///
+/// @param srcHeight
+/// Input image height
+///
+/// @param srcStride
+/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+/// if srcStride is equal to 0, it will be set to srcWidth
+/// \n\b NOTE: should be a multiple of 8
+///
+/// @param lut
+/// The Look-up Table given as a 256-element array of type uint8_t
+///
+/// @param dst
+/// Output image which has the same dimension as the input image in uint8_t type
+/// \n\b NOTE: should be 128-bit aligned
+///
+/// @param dstStride
+/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+/// if dstStride is equal to 0, it will be set to srcWidth
+/// \n\b NOTE: should be a multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup image_transform
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvTableLookupu8( const uint8_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ const uint8_t *__restrict lut,
+ uint8_t *__restrict dst,
+ uint32_t dstStride );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Warps a grayscale image using the a perspective projection transformation
+/// matrix (also known as a homography). This type of transformation is an
+/// invertible transformation which maps straight lines to straight lines.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvWarpPerspectiveu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvWarpPerspectiveu8,
+/// \a fcvWarpPerspectiveu8_v3 will be removed, and the current signature
+/// for \a fcvWarpPerspectiveu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvWarpPerspectiveu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Warps an image taking into consideration the perspective scaling.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Input image height.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcStride
+/// Input image stride (in bytes).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Warped output image. Size of buffer is dstStride*dstHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Dst image width.
+/// \n\b NOTE: data should be multiple of 8.
+///
+/// @param dstHeight
+/// Dst image height.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param dstStride
+/// Output image stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
+///
+/// @param projectionMatrix
+/// 3x3 perspective transformation matrix (generally a homography). The
+/// matrix stored in homography is row major ordering: \n
+/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
+/// | a11, a12, a13 |\n
+/// | a21, a22, a23 |\n
+/// | a31, a32, a33 |\n
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// Note:
+/// The projection matrix follows the so-called inverse mapping convention.
+/// It is applied to the dst coordinates to produce the corresponding
+/// src coordinates. In other 3rd party tools, the so-called forward mapping
+/// convention may be used, where the projection matrix refers to the one
+/// applied to the src coordinates to produce the dst coordinates.
+/// When comparing with 3rd party results, please make sure
+/// the same convention of projection matrices are assumed. If not,
+/// please transform the projection matrix into an equivalent form under
+/// the forward mapping convention before feeding it into 3rd party tools.
+///
+/// @interpolation
+/// Specifies the interpolation method to be used.
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvWarpPerspectiveu8_v3( const uint8_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t *__restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ float *__restrict projectionMatrix,
+ fcvInterpolationType interpolation );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Warps a grayscale image using the a perspective projection transformation
+/// matrix (also known as a homography). This type of transformation is an
+/// invertible transformation which maps straight lines to straight lines.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvWarpPerspectiveu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvWarpPerspectiveu8,
+/// \a fcvWarpPerspectiveu8_v4 will be removed, and the current signature
+/// for \a fcvWarpPerspectiveu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvWarpPerspectiveu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Warps an image taking into consideration the perspective scaling.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Input image height.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcStride
+/// Input image stride (in bytes).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Warped output image. Size of buffer is dstStride*dstHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Dst image width.
+/// \n\b NOTE: data should be multiple of 8.
+///
+/// @param dstHeight
+/// Dst image height.
+/// \n\b NOTE: should be multiple of 8
+///
+/// @param dstStride
+/// Output image stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as dstWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
+///
+/// @param projectionMatrix
+/// 3x3 perspective transformation matrix (generally a homography). The
+/// matrix stored in homography is row major ordering: \n
+/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
+/// | a11, a12, a13 |\n
+/// | a21, a22, a23 |\n
+/// | a31, a32, a33 |\n
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// Note:
+/// The projection matrix follows the so-called inverse mapping convention.
+/// It is applied to the dst coordinates to produce the corresponding
+/// src coordinates. In other 3rd party tools, the so-called forward mapping
+/// convention may be used, where the projection matrix refers to the one
+/// applied to the src coordinates to produce the dst coordinates.
+/// When comparing with 3rd party results, please make sure
+/// the same convention of projection matrices are assumed. If not,
+/// please transform the projection matrix into an equivalent form under
+/// the forward mapping convention before feeding it into 3rd party tools.
+///
+/// @interpolation
+/// Specifies the interpolation method to be used.
+///
+/// @param borderType
+/// The border mode for dst pixels not mapped to the src image.
+/// Supported modes are FASTCV_BORDER_UNDEFINED and FASTCV_BORDER_CONSTANT.
+///
+/// @param borderValue
+/// The user-specified constant pixel value,
+/// in case FASTCV_BORDER_CONSTANT is chosen for borderType.
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvWarpPerspectiveu8_v4( const uint8_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t *__restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ float *__restrict projectionMatrix,
+ fcvInterpolationType interpolation,
+ fcvBorderType borderType,
+ uint8_t borderValue
+);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Applies a generic geometrical transformation to a greyscale uint8 image.
+/// The interpolation method is specified through a parameter.
+///
+/// @details
+/// The greyscale of each pixel in the destination image is obtained from a location of the source image
+/// through a per-element mapping as defined in the mapping matrices. The mapping has subpixel precision,
+/// thus interpolations are involved.
+///
+/// @param src
+/// Input uint8_t image. The size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Input image height.
+///
+/// @param srcStride
+/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+/// if srcStride is equal to 0, it will be set to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param dst
+/// Output image which has the same type, and size as the input image. The size of buffer is dstStride*dstHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Output image width.
+///
+/// @param dstHeight
+/// Output image height.
+///
+/// @param dstStride
+/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+/// if dstStride is equal to 0, it will be set to dstWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param mapX
+/// a floating point matrix, each element is the column coordinate of the mapped location in the src image. E.g. if dst(i,j) is
+/// mapped to src(ii,jj), then mapX(i,j) =jj.
+/// the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param mapY
+/// a floating point matrix, each element is the row coordinate of the mapped location in the src image.E.g. if dst(i,j) is
+/// mapped to src(ii,jj), then mapY(i,j) =ii.
+/// the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param mapStride
+/// the stride of the mapX and mapY
+/// if mapStride is equal to 0, it will be set to dstWidth*sizeof(float32_t).
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param interpolation
+/// the interpolation method to derive the dst pixel value.
+/// supported methods are nearest neighbor, bilinear and area.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_transform
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvRemapu8(const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ const float32_t* __restrict mapX,
+ const float32_t* __restrict mapY,
+ uint32_t mapStride,
+ fcvInterpolationType interpolation
+);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Applies a generic geometrical transformation to a greyscale uint8 image.
+/// The interpolation method is specified through a parameter.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvRemapu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvRemapu8,
+/// \a fcvRemapu8_v2 will be removed, and the current signature
+/// for \a fcvRemapu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvRemapu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// The greyscale of each pixel in the destination image is obtained from a location of the source image
+/// through a per-element mapping as defined in the mapping matrices. The mapping has subpixel precision,
+/// thus interpolations are involved.
+///
+/// @param src
+/// Input uint8_t image. The size of buffer is srcStride*srcHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Input image width.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param srcHeight
+/// Input image height.
+///
+/// @param srcStride
+/// Input image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+/// if srcStride is equal to 0, it will be set to srcWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param dst
+/// Output image which has the same type, and size as the input image. The size of buffer is dstStride*dstHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Output image width.
+///
+/// @param dstHeight
+/// Output image height.
+///
+/// @param dstStride
+/// Output image stride, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
+/// if dstStride is equal to 0, it will be set to dstWidth.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param mapX
+/// a floating point matrix, each element is the column coordinate of the mapped location in the src image. E.g. if dst(i,j) is
+/// mapped to src(ii,jj), then mapX(i,j) =jj.
+/// the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param mapY
+/// a floating point matrix, each element is the row coordinate of the mapped location in the src image.E.g. if dst(i,j) is
+/// mapped to src(ii,jj), then mapY(i,j) =ii.
+/// the matrix has the same width, height as the dst image. The size of buffer is mapStride*dstHeight bytes.
+/// \n\b NOTE: should be 128-bit aligned.
+///
+/// @param mapStride
+/// the stride of the mapX and mapY
+/// if mapStride is equal to 0, it will be set to dstWidth*sizeof(float32_t).
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param interpolation
+/// the interpolation method to derive the dst pixel value.
+/// supported methods are nearest neighbor, bilinear and area.
+///
+/// @param borderType
+/// The border mode for dst pixels not mapped to the src image.
+/// Supported modes are FASTCV_BORDER_UNDEFINED and FASTCV_BORDER_CONSTANT.
+///
+/// @param borderValue
+/// The user-specified constant pixel value,
+/// in case FASTCV_BORDER_CONSTANT is chosen for borderType.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_transform
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvRemapu8_v2(const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ const float32_t* __restrict mapX,
+ const float32_t* __restrict mapY,
+ uint32_t mapStride,
+ fcvInterpolationType interpolation,
+ fcvBorderType borderType,
+ uint8_t borderValue
+);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Gradient Magnitude Computation from two int16_t type matrices.
+///
+/// @details
+/// The function takes two gradient matrices in int16_t and computes the
+/// magnitude in int16_t.
+/// \n\b NOTE: Saturation is used when computed magnitude value is larger than max limit of int16_t.
+///
+/// @param src1
+/// The gradient matrix in X direction.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// The gradient matrix in Y direction.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (int16_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup image_transform
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvMagnitudes16( const int16_t *__restrict src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const int16_t *__restrict src2,
+ uint32_t src2Stride,
+ int16_t *__restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Gradient Phase Computation from two int16_t type matrices.
+///
+/// @details
+/// The function takes two gradient matrices in int16_t and computes the
+/// phase for each pixel, storing results in a uint8_t matrix. The phase angle is translated
+/// to [0, 2*PI) and then mapped to range [0, 255).
+///
+/// @param src1
+/// The gradient matrix in X direction.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// The gradient matrix in Y direction.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (uint8_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup image_transform
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvPhases16 ( const int16_t *__restrict src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const int16_t *__restrict src2,
+ uint32_t src2Stride,
+ uint8_t *__restrict dst,
+ uint32_t dstStride );
+
+
+//--------------------------------------------------------------------------------
+/// Computes the 1D or 2D Fast Fourier Transform of a matrix.
+///
+/// @details
+/// Computes the 1D or 2D Fast Fourier Transform of a real valued matrix. For the
+/// 2D case, The width and height of the input and output matrix must be powers of 2.
+/// For the 1D case, the height of the matrices must be 1, while the width must be a power of 2.
+///
+/// @param src
+/// An 8 bit unsigned real valued input matrix. The dimensions of the matrix must be powers
+/// of 2 for the 2D case, and in the 1D case, the height must be 1, while the width must be
+/// a power of 2.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param srcWidth
+/// Width of the source matrix.
+/// \n\b NOTE: Must be a power of 2
+///
+/// @param srcHeight
+/// Height of the source matrix.
+/// \n\b NOTE: Must be a power of 2 for the 2D case, and must be set to 1 for the 1D case
+///
+/// @param srcStride
+/// Stride of the input matrix. Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is set to srcWidth.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// The computed FFT matrix. The FFT coefficients are stored in interleaved fashion, i.e.,
+/// Re1 Im1 Re2 Im2 and so on. Hence the dimensions of the dst are (2 x srcWidth, srcHeight)
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride of the output matrix. Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0, dstStride is set to 2 x srcWidth x sizeof(float32_t).
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup image_transform
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvFFTu8(const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ float32_t* __restrict dst,
+ uint32_t dstStride);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Computes the 1D or 2D Inverse Fast Fourier Transform of a matrix.
+///
+/// @details
+/// Computes the 1D or 2D Inverse Fast Fourier Transform of a complex valued matrix. For the
+/// 2D case, The width and height of the input and output matrix must be powers of 2.
+/// For the 1D case, the height of the matrices must be 1, while the width must be a power of 2.
+///
+/// @param src
+/// An 32 bit floating point complex valued input matrix. The data in the matrix must be stored
+/// in an interleaved fashion, i.e., Re1 Im1 Re2 Im2 and so on. The dimensions of the matrix must
+/// be powers of 2 for the 2D case, and in the 1D case, the height must be 1, while the width must be
+/// a power of 2.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param srcWidth
+/// Width of the source matrix. The width here is the number of floating point units in the matrix. Since
+/// the data is interleaved fashion, i.e., Re1 Im1 Re2 Im2 and so on, the width is the total number of real
+/// and complex units in the matrix. For example, if the Matrix has data values Re1 Im1 Re2 Im2 Re3 Im3 Re4 Im4,
+/// then the width here is 8 units.
+/// \n\b NOTE: Must be a power of 2
+///
+/// @param srcHeight
+/// Height of the source matrix.
+/// \n\b NOTE: Must be a power of 2 for the 2D case, and must be set to 1 for the 1D case
+///
+/// @param srcStride
+/// Stride of the input matrix. Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is set to srcWidth x sizeof(float32_t).
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// The computed IFFT matrix. The matrix is real valued and has no imaginary components.
+/// Hence the dimensions of the dst are (srcWidth / 2 , srcHeight)
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride of the output matrix. Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0, dstStride is set to (srcWidth / 2).
+/// \n\b WARNING: should be multiple of 8
+///
+/// @ingroup image_transform
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvIFFTf32( const float32_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Scale an image Horizontaly and/or Vertically by arbitrary ratio.
+/// The scaling ratios are automatically determined from the specified
+/// source image size and destination image size.
+///
+/// @details
+/// Scale up or down the source image of size srcWidth-by-srcHeight
+/// to the destination image of size dstWidth-by-dstHeight.
+/// NOTE: dstWidth > 0 && dstHeight > 0.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Source Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Source Image height.
+///
+/// @param srcStride
+/// Stride of source image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// If set to 0, srcStride=srcWidth as default
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is dstStride*dstHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Destination Image width.
+///
+/// @param dstHeight
+/// Destination Image height.
+///
+/// @param dstStride
+/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// If set to 0, dstStride=dstWidth as default
+///
+/// @param interpolation
+/// The interpolation method used for scaling. Please see fcvInterpolationType.
+/// FASTCV_INTERPOLATION_TYPE_NEAREST_NEIGHBOR:
+/// Nearest neighbor interpolation.
+/// FASTCV_INTERPOLATION_TYPE_BILINEAR:
+/// Bilinear interpolation.
+/// FASTCV_INTERPOLATION_TYPE_AREA:
+/// Interpolation by area. Output values are determined by weighted averages of
+/// the source pixels covered by the destination pixel. The averaging weight
+/// for each source pixel is proportional to its area overlapping with
+/// the destination pixel. Interpolation by area may produce more precise
+/// images for scale down operations.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other values otherwise.
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvScaleu8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ fcvInterpolationType interpolation);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Scale an image Horizontaly and/or Vertically by arbitrary ratio.
+/// The scaling ratios are automatically determined from the specified
+/// source image size and destination image size.
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvScaleu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvScaleu8,
+/// \a fcvScaleu8_v2 will be removed, and the current signature
+/// for \a fcvScaleu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvWarpPerspectiveu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @details
+/// Scale up or down the source image of size srcWidth-by-srcHeight
+/// to the destination image of size dstWidth-by-dstHeight.
+/// NOTE: dstWidth > 0 && dstHeight > 0.
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Source Image width.
+/// \n\b WARNING: should be multiple of 8.
+///
+/// @param srcHeight
+/// Source Image height.
+///
+/// @param srcStride
+/// Stride of source image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// If set to 0, srcStride=srcWidth as default
+///
+/// @param dst
+/// Output 8-bit image. Size of buffer is dstStride*dstHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstWidth
+/// Destination Image width.
+///
+/// @param dstHeight
+/// Destination Image height.
+///
+/// @param dstStride
+/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// If set to 0, dstStride=dstWidth as default
+///
+/// @param interpolation
+/// The interpolation method used for scaling. Please see fcvInterpolationType.
+/// FASTCV_INTERPOLATION_TYPE_NEAREST_NEIGHBOR:
+/// Nearest neighbor interpolation.
+/// FASTCV_INTERPOLATION_TYPE_BILINEAR:
+/// Bilinear interpolation.
+/// FASTCV_INTERPOLATION_TYPE_AREA:
+/// Interpolation by area. Output values are determined by weighted averages of
+/// the source pixels covered by the destination pixel. The averaging weight
+/// for each source pixel is proportional to its area overlapping with
+/// the destination pixel. Interpolation by area may produce more precise
+/// images for scale down operations.
+///
+/// @param borderType
+/// The border mode for dst pixels not mapped to the src image.
+/// Supported modes are FASTCV_BORDER_UNDEFINED, FASTCV_BORDER_CONSTANT
+/// and FASTCV_BORDER_REPLICATE.
+///
+/// @param borderValue
+/// The user-specified constant pixel value,
+/// in case FASTCV_BORDER_CONSTANT is chosen for borderType.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other values otherwise.
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvScaleu8_v2( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dstStride,
+ fcvInterpolationType interpolation,
+ fcvBorderType borderType,
+ uint8_t borderValue);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Perspective warp two images using the same transformation.
+/// Bi-linear interpolation is used where applicable.
+///
+/// @details
+/// Perspective warp two images (or buffer) using the same transformation in one function
+/// call. This can be used, for example, to warp a grayscale image and an alpha image at
+/// the same time, or warp two color channels (for example u and v de-interleaved for YUV).
+///
+/// @param src1
+/// First input 8-bit image. Size of buffer is src1Stride*srcHeight bytes.
+///
+/// @param src2
+/// Second input 8-bit image. Size of buffer is src2Stride*srcHeight bytes.
+///
+/// @param srcWidth
+/// Input image width.
+///
+/// @param srcHeight
+/// Input image height.
+///
+/// @param src1Stride
+/// Input image 1 stride, i.e. the gap (in terms of bytes) between the first element
+/// of a row and that of the successive row. If srcStride is equal to 0,
+/// it will be set to srcWidth.
+///
+/// @param src2Stride
+/// Input image 2 stride, i.e. the gap (in terms of bytes) between the first element
+/// of a row and that of the successive row. If srcStride is equal to 0,
+/// it will be set to srcWidth.
+///
+/// @param dst1
+/// First warped output image (correspond to src1). Size of buffer is dst1Stride*dstHeight bytes.
+///
+/// @param dst2
+/// Second warped output image (correspond to src2). Size of buffer is dst2Stride*dstHeight bytes.
+///
+/// @param dstWidth
+/// Dst image width.
+///
+/// @param dstHeight
+/// Dst image height.
+///
+/// @param dst1Stride
+/// Output image 1 stride, i.e. the gap (in terms of bytes) between the first element
+/// of a row and that of the successive row. If srcStride is equal to 0,
+/// it will be set to dstWidth.
+///
+/// @param dst2Stride
+/// Output image 2 stride, i.e. the gap (in terms of bytes) between the first element
+/// of a row and that of the successive row. If srcStride is equal to 0,
+/// it will be set to dstWidth.
+///
+/// @param warpmatrix
+/// 3x3 perspective transformation matrix (generally a homography).
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcv2PlaneWarpPerspectiveu8( const uint8_t* __restrict src1,
+ const uint8_t* __restrict src2,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t src1Stride,
+ uint32_t src2Stride,
+ uint8_t* __restrict dst1,
+ uint8_t* __restrict dst2,
+ uint32_t dstWidth,
+ uint32_t dstHeight,
+ uint32_t dst1Stride,
+ uint32_t dst2Stride,
+ float32_t* __restrict warpmatrix );
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Downscale a grayscale image by a factor of two using a 3x3 Gaussian filter kernel
+///
+/// @details
+/// This function first blurs the input image using a 3x3 Gaussian kernel, and then downsamples
+/// the image by selecting every other row and column. The dimensions of the destination image are
+/// computed as follows : dstWidth = (srcWidth + 1)/2 , dstHeight = (srcHeight + 1)/2
+///
+/// @param src
+/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
+///
+/// @param srcWidth
+/// Width of the input image.
+///
+/// @param srcHeight
+/// Height of the input image
+///
+/// @param srcStride
+/// Image stride (in bytes).
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
+///
+/// @param dst
+/// Output 8-bit downscale image of size (srcWidth + 1) / 2 x (srcHeight + 1) / 2.
+/// \n\b NOTE: border values have been taken care of w.r.t. the pixel coordinate.
+///
+/// @param dstStride
+/// Output stride (in bytes).
+/// \n\b NOTE: if 0, dstStride is set as (srcWidth+1)/2.
+/// \n\b WARNING: should be multiple of 8 (8 * 1-byte values), and at least as much as (srcWidth+1)/2 if not 0.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup image_transform
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvScaleDownBy2Gaussian3x3u8(const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride);
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Sum of squared differences of one L-byte vector against N others.
+///
+/// @details
+/// SSD of one vector (a) against N other L-byte vectors
+/// ( b[0], b[1], ..., b[n-1] )
+/// using their given inverse lengths for normalization.
+/// \n\n SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])
+///
+/// @param a
+/// Vector.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param invLenA
+/// Inverse of vector A = 1/|A|
+///
+/// @param dim
+/// Number of element of vector A
+///
+/// @param bList
+/// Vectors b[0]...b[n-1].
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param invLenB
+/// Inverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param numB
+/// Number of B vectors.
+///
+/// @param distances
+/// Output of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvSumOfSquaredDiffss8( const int8_t* __restrict a,
+ float32_t invLenA,
+ uint32_t dim,
+ const int8_t* const * __restrict bList,
+ const float32_t* __restrict invLenB,
+ uint32_t numB,
+ float32_t* __restrict distances );
+
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Adds a scalar value to every element of a Matrix.
+///
+/// @details
+/// Adds a floating point scalar value to each element of the source Matrix
+/// and stores the result of the addition in the corresponding element
+/// of the destination matrix.
+///
+/// @param src
+/// Input floating point matrix. Size of buffer is srcStride*srcHeight bytes.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param scalar
+/// The floating point scalar to be added to the source matrix.
+///
+/// @param dst
+/// Output 32-bit floating point matrix. Size of buffer is dstStride*srcHeight bytes.
+///
+/// @param dstStride
+/// Stride of the output matrix in bytes.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvAddScalarf32(const float32_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ float32_t scalar,
+ float32_t * __restrict dst,
+ uint32_t dstStride);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Adds a scalar value to every element of a Matrix.
+///
+/// @details
+/// Adds a signed 16-bit integer scalar value to each element of the source Matrix
+/// and stores the result of the addition in the corresponding element
+/// of the destination matrix.
+/// \n\b NOTE : If the sum of the scalar and matrix element exceeds the maximum value
+/// of a signed 16-bit integer, the result is clipped to this maximum value, while
+/// if the sum goes below the minimum value of a signed 16-bit integer, it is clipped
+/// to this minimum value.
+///
+/// @param src
+/// Input signed 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param scalar
+/// The signed 16-bit integer scalar to be added to the source matrix.
+///
+/// @param dst
+/// Output 16-bit signed integer matrix. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of the output matrix in bytes.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvAddScalars16(const int16_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int16_t scalar,
+ int16_t * __restrict dst,
+ uint32_t dstStride);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Multiplies a scalar value to every element of a Matrix.
+///
+/// @details
+/// Multiplies a floating point scalar value to each element of the source Matrix
+/// and stores the result of the multiplication in the corresponding element
+/// of the destination matrix.
+///
+/// @param src
+/// Input floating point matrix. Size of buffer is srcStride*srcHeight bytes.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param scalar
+/// The floating point scalar to be multiplied to the source matrix.
+///
+/// @param dst
+/// Output 32-bit floating point matrix. Size of buffer is dstStride*srcHeight bytes.
+///
+/// @param dstStride
+/// Stride of the output matrix in bytes.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvMultiplyScalarf32(const float32_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ float32_t scalar,
+ float32_t * __restrict dst,
+ uint32_t dstStride);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Multiplies a scalar value to every element of a Matrix.
+///
+/// @details
+/// Multiplies a signed 16-bit scalar value to each element of the source Matrix
+/// and stores the result of the multiplication in the corresponding element
+/// of the destination matrix.
+/// \n\b NOTE : If the product of the scalar and matrix element exceeds the maximum value
+/// of a signed 16-bit integer, the result is clipped to this maximum value, while
+/// if the product goes below the minimum value of a signed 16-bit integer, it is clipped
+/// to this minimum value. The API can also handle fractional scalars. Use fixed point conversion
+/// and use the shift parameter to decide the number of bits by which the result is shifted by. This
+/// affects the precision of the result. If you wish to perform pure integer multiplication, set the
+/// shift parameter to 0.
+///
+/// @param src
+/// Input signed 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param scalar
+/// The signed 8-bit integer scalar to be multiplied to the source matrix.
+///
+/// @param shift
+/// The number of bits that the result has to be shifted by. Used to handle fractional scalar multiplication.
+/// If your input scalar is a pure integer, set shift to 0.
+///
+/// @param dst
+/// Output signed 16-bit integer matrix. Size of buffer is dstStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of the output matrix in bytes.
+/// \n\b NOTE: if 0, dstStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvMultiplyScalars16( const int16_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int8_t scalar,
+ int8_t shift,
+ int16_t * __restrict dst,
+ uint32_t dstStride);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds the minimum and maximum values, and their location in a matrix
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMinMaxLocu8_v2(). In the 2.0.0 release,
+/// fcvMinMaxLocu8_v2 will be renamed to fcvMinMaxLocu8
+/// and the signature of fcvMinMaxLocu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Finds the minimum and maximum values in a matrix, and returns them. In addition
+/// to this, it also returns the location (x,y) of the minimum and maximum values thus
+/// found.
+///
+/// @param src
+/// Input unsigned 8-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param minVal
+/// This variable stores the minimum value of the src matrix found by the function
+///
+/// @param maxVal
+/// This variable stores the maximum value of the src matrix found by the function
+///
+/// @param minLocX
+/// The X coordinate of the minimum value's location returned by the function
+///
+/// @param minLocY
+/// The Y coordinate of the minimum value's location returned by the function
+///
+/// @param maxLocX
+/// The X coordinate of the maximum value's location returned by the function
+///
+/// @param maxLocY
+/// The Y coordinate of the maximum value's location returned by the function
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvMinMaxLocu8(const uint8_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t *__restrict minVal,
+ uint8_t *__restrict maxVal,
+ uint32_t *__restrict minLocX,
+ uint32_t *__restrict minLocY,
+ uint32_t *__restrict maxLocX,
+ uint32_t *__restrict maxLocY);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds the minimum and maximum values, and their location in a matrix
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMinMaxLocu16_v2(). In the 2.0.0 release,
+/// fcvMinMaxLocu16_v2 will be renamed to fcvMinMaxLocu16
+/// and the signature of fcvMinMaxLocu16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Finds the minimum and maximum values in a matrix, and returns them. In addition
+/// to this, it also returns the location (x,y) of the minimum and maximum values thus
+/// found.
+///
+/// @param src
+/// Input unsigned 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param minVal
+/// This variable stores the minimum value of the src matrix found by the function
+///
+/// @param maxVal
+/// This variable stores the maximum value of the src matrix found by the function
+///
+/// @param minLocX
+/// The X coordinate of the minimum value's location returned by the function
+///
+/// @param minLocY
+/// The Y coordinate of the minimum value's location returned by the function
+///
+/// @param maxLocX
+/// The X coordinate of the maximum value's location returned by the function
+///
+/// @param maxLocY
+/// The Y coordinate of the maximum value's location returned by the function
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvMinMaxLocu16(const uint16_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint16_t *__restrict minVal,
+ uint16_t *__restrict maxVal,
+ uint32_t *__restrict minLocX,
+ uint32_t *__restrict minLocY,
+ uint32_t *__restrict maxLocX,
+ uint32_t *__restrict maxLocY);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds the minimum and maximum values, and their location in a matrix
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMinMaxLocs16_v2(). In the 2.0.0 release,
+/// fcvMinMaxLocs16_v2 will be renamed to fcvMinMaxLocs16
+/// and the signature of fcvMinMaxLocs16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Finds the minimum and maximum values in a matrix, and returns them. In addition
+/// to this, it also returns the location (x,y) of the minimum and maximum values thus
+/// found.
+///
+/// @param src
+/// Input signed 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param minVal
+/// This variable stores the minimum value of the src matrix found by the function
+///
+/// @param maxVal
+/// This variable stores the maximum value of the src matrix found by the function
+///
+/// @param minLocX
+/// The X coordinate of the minimum value's location returned by the function
+///
+/// @param minLocY
+/// The Y coordinate of the minimum value's location returned by the function
+///
+/// @param maxLocX
+/// The X coordinate of the maximum value's location returned by the function
+///
+/// @param maxLocY
+/// The Y coordinate of the maximum value's location returned by the function
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvMinMaxLocs16(const int16_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int16_t *__restrict minVal,
+ int16_t *__restrict maxVal,
+ uint32_t *__restrict minLocX,
+ uint32_t *__restrict minLocY,
+ uint32_t *__restrict maxLocX,
+ uint32_t *__restrict maxLocY);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds the minimum and maximum values, and their location in a matrix
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMinMaxLocu32_v2(). In the 2.0.0 release,
+/// fcvMinMaxLocu32_v2 will be renamed to fcvMinMaxLocu32
+/// and the signature of fcvMinMaxLocu32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Finds the minimum and maximum values in a matrix, and returns them. In addition
+/// to this, it also returns the location (x,y) of the minimum and maximum values thus
+/// found.
+///
+/// @param src
+/// Input unsigned 32-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param minVal
+/// This variable stores the minimum value of the src matrix found by the function
+///
+/// @param maxVal
+/// This variable stores the maximum value of the src matrix found by the function
+///
+/// @param minLocX
+/// The X coordinate of the minimum value's location returned by the function
+///
+/// @param minLocY
+/// The Y coordinate of the minimum value's location returned by the function
+///
+/// @param maxLocX
+/// The X coordinate of the maximum value's location returned by the function
+///
+/// @param maxLocY
+/// The Y coordinate of the maximum value's location returned by the function
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvMinMaxLocu32(const uint32_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t *__restrict minVal,
+ uint32_t *__restrict maxVal,
+ uint32_t *__restrict minLocX,
+ uint32_t *__restrict minLocY,
+ uint32_t *__restrict maxLocX,
+ uint32_t *__restrict maxLocY);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds the minimum and maximum values, and their location in a matrix
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMinMaxLocs32_v2(). In the 2.0.0 release,
+/// fcvMinMaxLocs32_v2 will be renamed to fcvMinMaxLocs32
+/// and the signature of fcvMinMaxLocs32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Finds the minimum and maximum values in a matrix, and returns them. In addition
+/// to this, it also returns the location (x,y) of the minimum and maximum values thus
+/// found.
+///
+/// @param src
+/// Input signed 32-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param minVal
+/// This variable stores the minimum value of the src matrix found by the function
+///
+/// @param maxVal
+/// This variable stores the maximum value of the src matrix found by the function
+///
+/// @param minLocX
+/// The X coordinate of the minimum value's location returned by the function
+///
+/// @param minLocY
+/// The Y coordinate of the minimum value's location returned by the function
+///
+/// @param maxLocX
+/// The X coordinate of the maximum value's location returned by the function
+///
+/// @param maxLocY
+/// The Y coordinate of the maximum value's location returned by the function
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvMinMaxLocs32(const int32_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int32_t *__restrict minVal,
+ int32_t *__restrict maxVal,
+ uint32_t *__restrict minLocX,
+ uint32_t *__restrict minLocY,
+ uint32_t *__restrict maxLocX,
+ uint32_t *__restrict maxLocY);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds the minimum and maximum values, and their location in a matrix
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMinMaxLocf32_v2(). In the 2.0.0 release,
+/// fcvMinMaxLocf32_v2 will be renamed to fcvMinMaxLocf32
+/// and the signature of fcvMinMaxLocf32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Finds the minimum and maximum values in a matrix, and returns them. In addition
+/// to this, it also returns the location (x,y) of the minimum and maximum values thus
+/// found.
+///
+/// @param src
+/// Input unsigned 32-bit floating point matrix. Size of buffer is srcStride*srcHeight bytes.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth if not 0.
+///
+/// @param minVal
+/// This variable stores the minimum value of the src matrix found by the function
+///
+/// @param maxVal
+/// This variable stores the maximum value of the src matrix found by the function
+///
+/// @param minLocX
+/// The X coordinate of the minimum value's location returned by the function
+///
+/// @param minLocY
+/// The Y coordinate of the minimum value's location returned by the function
+///
+/// @param maxLocX
+/// The X coordinate of the maximum value's location returned by the function
+///
+/// @param maxLocY
+/// The Y coordinate of the maximum value's location returned by the function
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvMinMaxLocf32(const float32_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ float32_t *__restrict minVal,
+ float32_t *__restrict maxVal,
+ uint32_t *__restrict minLocX,
+ uint32_t *__restrict minLocY,
+ uint32_t *__restrict maxLocX,
+ uint32_t *__restrict maxLocY);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds the minimum and maximum values, and their locations in a matrix
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMinMaxLocf32_v2(). In the 2.0.0 release,
+/// fcvMinMaxLocf32_v2 will be renamed to fcvMinMaxLocf32
+/// and the signature of fcvMinMaxLocf32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Finds the minimum and maximum values in a matrix, and returns them. In addition
+/// to this, it also returns the location (x,y) of the minimum and maximum values thus
+/// found. If there are multiple minima/maxima, the function returns them all. If the
+/// the number of minima and maxima are greater than the capacity of the minLoc and
+/// maxLoc arrays, then the function returns as many locations as the capacity of these
+/// arrays.
+///
+/// @param src
+/// Input 32-bit floating point matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(float32_t) if not 0.
+///
+/// @param minVal
+/// This variable stores the minimum value of the src matrix found by the function
+///
+/// @param maxVal
+/// This variable stores the maximum value of the src matrix found by the function
+///
+/// @param minLocX
+/// An array of X coordinates of the minimum value's location returned by the function
+/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
+///
+/// @param minLocY
+/// An array of Y coordinates of the minimum value's location returned by the function
+/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
+///
+/// @param maxLocX
+/// An array of X coordinates of the maximum value's location returned by the function
+/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
+///
+/// @param maxLocY
+/// An array of Y coordinates of the maximum value's location returned by the function
+/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
+///
+/// @param minCount
+/// The number of minima found by the function
+///
+/// @param maxCount
+/// The number of maxima found by the function
+///
+/// @param nMinLocSize
+/// The maximum number of minima requested by the user to be found in the input image src.
+/// The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
+///
+/// @param nMaxLocSize
+/// The maximum number of maxima requested by the user to be found in the input image src.
+/// The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API fcvStatus
+fcvMinMaxLocf32_v2(const float32_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ float32_t *__restrict minVal,
+ float32_t *__restrict maxVal,
+ uint32_t *__restrict minLocX,
+ uint32_t *__restrict minLocY,
+ uint32_t *__restrict maxLocX,
+ uint32_t *__restrict maxLocY,
+ uint32_t *__restrict minCount,
+ uint32_t *__restrict maxCount,
+ uint32_t nMinLocSize,
+ uint32_t nMaxLocSize);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds the minimum and maximum values, and their locations in a matrix
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMinMaxLocu8_v2(). In the 2.0.0 release,
+/// fcvMinMaxLocu8_v2 will be renamed to fcvMinMaxLocu8
+/// and the signature of fcvMinMaxLocu8 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Finds the minimum and maximum values in a matrix, and returns them. In addition
+/// to this, it also returns the location (x,y) of the minimum and maximum values thus
+/// found. If there are multiple minima/maxima, the function returns them all. If the
+/// the number of minima and maxima are greater than the capacity of the minLoc and
+/// maxLoc arrays, then the function returns as many locations as the capacity of these
+/// arrays.
+///
+/// @param src
+/// Input unsigned 8-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(uint8_t) if not 0.
+///
+/// @param minVal
+/// This variable stores the minimum value of the src matrix found by the function
+///
+/// @param maxVal
+/// This variable stores the maximum value of the src matrix found by the function
+///
+/// @param minLocX
+/// An array of X coordinates of the minimum value's location returned by the function
+/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
+///
+/// @param minLocY
+/// An array of Y coordinates of the minimum value's location returned by the function
+/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
+///
+/// @param maxLocX
+/// An array of X coordinates of the maximum value's location returned by the function
+/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
+///
+/// @param maxLocY
+/// An array of Y coordinates of the maximum value's location returned by the function
+/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
+///
+/// @param minCount
+/// The number of minima found by the function
+///
+/// @param maxCount
+/// The number of maxima found by the function
+///
+/// @param nMinLocSize
+/// The maximum number of minima requested by the user to be found in the input image src.
+/// The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
+///
+/// @param nMaxLocSize
+/// The maximum number of maxima requested by the user to be found in the input image src.
+/// The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvMinMaxLocu8_v2(const uint8_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t *__restrict minVal,
+ uint8_t *__restrict maxVal,
+ uint32_t *__restrict minLocX,
+ uint32_t *__restrict minLocY,
+ uint32_t *__restrict maxLocX,
+ uint32_t *__restrict maxLocY,
+ uint32_t *__restrict minCount,
+ uint32_t *__restrict maxCount,
+ uint32_t nMinLocSize,
+ uint32_t nMaxLocSize);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds the minimum and maximum values, and their locations in a matrix
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMinMaxLocu16_v2(). In the 2.0.0 release,
+/// fcvMinMaxLocu16_v2 will be renamed to fcvMinMaxLocu16
+/// and the signature of fcvMinMaxLocu16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Finds the minimum and maximum values in a matrix, and returns them. In addition
+/// to this, it also returns the location (x,y) of the minimum and maximum values thus
+/// found. If there are multiple minima/maxima, the function returns them all. If the
+/// the number of minima and maxima are greater than the capacity of the minLoc and
+/// maxLoc arrays, then the function returns as many locations as the capacity of these
+/// arrays.
+///
+/// @param src
+/// Input unsigned 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(uint16_t) if not 0.
+///
+/// @param minVal
+/// This variable stores the minimum value of the src matrix found by the function
+///
+/// @param maxVal
+/// This variable stores the maximum value of the src matrix found by the function
+///
+/// @param minLocX
+/// An array of X coordinates of the minimum value's location returned by the function
+/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
+///
+/// @param minLocY
+/// An array of Y coordinates of the minimum value's location returned by the function
+/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
+///
+/// @param maxLocX
+/// An array of X coordinates of the maximum value's location returned by the function
+/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
+///
+/// @param maxLocY
+/// An array of Y coordinates of the maximum value's location returned by the function
+/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
+///
+/// @param minCount
+/// The number of minima found by the function
+///
+/// @param maxCount
+/// The number of maxima found by the function
+///
+/// @param nMinLocSize
+/// The maximum number of minima requested by the user to be found in the input image src.
+/// The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
+///
+/// @param nMaxLocSize
+/// The maximum number of maxima requested by the user to be found in the input image src.
+/// The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API fcvStatus
+fcvMinMaxLocu16_v2(const uint16_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint16_t *__restrict minVal,
+ uint16_t *__restrict maxVal,
+ uint32_t *__restrict minLocX,
+ uint32_t *__restrict minLocY,
+ uint32_t *__restrict maxLocX,
+ uint32_t *__restrict maxLocY,
+ uint32_t *__restrict minCount,
+ uint32_t *__restrict maxCount,
+ uint32_t nMinLocSize,
+ uint32_t nMaxLocSize);
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds the minimum and maximum values, and their locations in a matrix
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMinMaxLocs16_v2(). In the 2.0.0 release,
+/// fcvMinMaxLocs16_v2 will be renamed to fcvMinMaxLocs16
+/// and the signature of fcvMinMaxLocs16 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Finds the minimum and maximum values in a matrix, and returns them. In addition
+/// to this, it also returns the location (x,y) of the minimum and maximum values thus
+/// found. If there are multiple minima/maxima, the function returns them all. If the
+/// the number of minima and maxima are greater than the capacity of the minLoc and
+/// maxLoc arrays, then the function returns as many locations as the capacity of these
+/// arrays.
+///
+/// @param src
+/// Input signed 16-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(int16_t) if not 0.
+///
+/// @param minVal
+/// This variable stores the minimum value of the src matrix found by the function
+///
+/// @param maxVal
+/// This variable stores the maximum value of the src matrix found by the function
+///
+/// @param minLocX
+/// An array of X coordinates of the minimum value's location returned by the function
+/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
+///
+/// @param minLocY
+/// An array of Y coordinates of the minimum value's location returned by the function
+/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
+///
+/// @param maxLocX
+/// An array of X coordinates of the maximum value's location returned by the function
+/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
+///
+/// @param maxLocY
+/// An array of Y coordinates of the maximum value's location returned by the function
+/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
+///
+/// @param minCount
+/// The number of minima found by the function
+///
+/// @param maxCount
+/// The number of maxima found by the function
+///
+/// @param nMinLocSize
+/// The maximum number of minima requested by the user to be found in the input image src.
+/// The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
+///
+/// @param nMaxLocSize
+/// The maximum number of maxima requested by the user to be found in the input image src.
+/// The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API fcvStatus
+fcvMinMaxLocs16_v2(const int16_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int16_t *__restrict minVal,
+ int16_t *__restrict maxVal,
+ uint32_t *__restrict minLocX,
+ uint32_t *__restrict minLocY,
+ uint32_t *__restrict maxLocX,
+ uint32_t *__restrict maxLocY,
+ uint32_t *__restrict minCount,
+ uint32_t *__restrict maxCount,
+ uint32_t nMinLocSize,
+ uint32_t nMaxLocSize);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds the minimum and maximum values, and their locations in a matrix
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMinMaxLocu32_v2(). In the 2.0.0 release,
+/// fcvMinMaxLocu32_v2 will be renamed to fcvMinMaxLocu32
+/// and the signature of fcvMinMaxLocu32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Finds the minimum and maximum values in a matrix, and returns them. In addition
+/// to this, it also returns the location (x,y) of the minimum and maximum values thus
+/// found. If there are multiple minima/maxima, the function returns them all. If the
+/// the number of minima and maxima are greater than the capacity of the minLoc and
+/// maxLoc arrays, then the function returns as many locations as the capacity of these
+/// arrays.
+///
+/// @param src
+/// Input unsigned 32-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(uint32_t) if not 0.
+///
+/// @param minVal
+/// This variable stores the minimum value of the src matrix found by the function
+///
+/// @param maxVal
+/// This variable stores the maximum value of the src matrix found by the function
+///
+/// @param minLocX
+/// An array of X coordinates of the minimum value's location returned by the function
+/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
+///
+/// @param minLocY
+/// An array of Y coordinates of the minimum value's location returned by the function
+/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
+///
+/// @param maxLocX
+/// An array of X coordinates of the maximum value's location returned by the function
+/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
+///
+/// @param maxLocY
+/// An array of Y coordinates of the maximum value's location returned by the function
+/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
+///
+/// @param minCount
+/// The number of minima found by the function
+///
+/// @param maxCount
+/// The number of maxima found by the function
+///
+/// @param nMinLocSize
+/// The maximum number of minima requested by the user to be found in the input image src.
+/// The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
+///
+/// @param nMaxLocSize
+/// The maximum number of maxima requested by the user to be found in the input image src.
+/// The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API fcvStatus
+fcvMinMaxLocu32_v2(const uint32_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint32_t *__restrict minVal,
+ uint32_t *__restrict maxVal,
+ uint32_t *__restrict minLocX,
+ uint32_t *__restrict minLocY,
+ uint32_t *__restrict maxLocX,
+ uint32_t *__restrict maxLocY,
+ uint32_t *__restrict minCount,
+ uint32_t *__restrict maxCount,
+ uint32_t nMinLocSize,
+ uint32_t nMaxLocSize);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Finds the minimum and maximum values, and their locations in a matrix
+///
+/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
+/// release of this library (2.0.0). The new interface is specified in the
+/// function: fcvMinMaxLocs32_v2(). In the 2.0.0 release,
+/// fcvMinMaxLocs32_v2 will be renamed to fcvMinMaxLocs32
+/// and the signature of fcvMinMaxLocs32 as it appears now,
+/// will be removed.
+/// \n\n
+///
+/// @details
+/// Finds the minimum and maximum values in a matrix, and returns them. In addition
+/// to this, it also returns the location (x,y) of the minimum and maximum values thus
+/// found. If there are multiple minima/maxima, the function returns them all. If the
+/// the number of minima and maxima are greater than the capacity of the minLoc and
+/// maxLoc arrays, then the function returns as many locations as the capacity of these
+/// arrays.
+///
+/// @param src
+/// Input signed 32-bit integer matrix. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Matrix.
+///
+/// @param srcHeight
+/// Height of the Matrix.
+///
+/// @param srcStride
+/// Stride of the Matrix in bytes.
+/// \n\b NOTE: if 0, srcStride is set as srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as srcWidth*sizeof(int32_t) if not 0.
+///
+/// @param minVal
+/// This variable stores the minimum value of the src matrix found by the function
+///
+/// @param maxVal
+/// This variable stores the maximum value of the src matrix found by the function
+///
+/// @param minLocX
+/// An array of X coordinates of the minimum value's location returned by the function
+/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
+///
+/// @param minLocY
+/// An array of Y coordinates of the minimum value's location returned by the function
+/// Must have @param nMinLocSize elements, i.e., allocated as nMinLocSize*sizeof(uint32_t)
+///
+/// @param maxLocX
+/// An array of X coordinates of the maximum value's location returned by the function
+/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
+///
+/// @param maxLocY
+/// An array of Y coordinates of the maximum value's location returned by the function
+/// Must have @param nMaxLocSize elements, i.e., allocated as nMaxLocSize*sizeof(uint32_t)
+///
+/// @param minCount
+/// The number of minima found by the function
+///
+/// @param maxCount
+/// The number of maxima found by the function
+///
+/// @param nMinLocSize
+/// The maximum number of minima requested by the user to be found in the input image src.
+/// The minLocX and minLocY arrays MUST be allocated to have atleast nMinLocSize elements.
+///
+/// @param nMaxLocSize
+/// The maximum number of maxima requested by the user to be found in the input image src.
+/// The maxLocX and maxLocY arrays MUST be allocated to have atleast nMaxLocSize elements.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+FASTCV_API fcvStatus
+fcvMinMaxLocs32_v2(const int32_t *__restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ int32_t *__restrict minVal,
+ int32_t *__restrict maxVal,
+ uint32_t *__restrict minLocX,
+ uint32_t *__restrict minLocY,
+ uint32_t *__restrict maxLocX,
+ uint32_t *__restrict maxLocY,
+ uint32_t *__restrict minCount,
+ uint32_t *__restrict maxCount,
+ uint32_t nMinLocSize,
+ uint32_t nMaxLocSize);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Transposes an interleaved RGB image
+///
+/// @details
+/// Computes the transpose of an interleaved RGB image src, and stores the result in
+/// dst
+///
+/// @param src
+/// Input unsigned 8-bit integer image. Size of buffer is srcStride*srcHeight bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Width of the Image.
+///
+/// @param srcHeight
+/// Height of the Image.
+///
+/// @param srcStride
+/// Stride of the Image in bytes.
+/// \n\b NOTE: if 0, srcStride is set as 3 x srcWidth.
+/// \n\b WARNING: should be multiple of 8, and at least as much as 3 x srcWidth if not 0.
+///
+/// @param dst
+/// Output unsigned 8-bit integer image. Size of buffer is dstStride*srcWidth bytes.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of the output image in bytes.
+/// \n\b NOTE: if 0, srcStride is set as 3 x srcHeight.
+/// \n\b WARNING: should be multiple of 8, and at least as much as 3 x srcHeight if not 0.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvTransposeRGB888u8(const uint8_t * __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t * __restrict dst,
+ uint32_t dstStride);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Computes the cross-product of N pairs of 3x1 vectors
+///
+/// @details
+/// Computes the cross-product of N pairs of 3x1 vectors. For each pair of 3x1 vectors,
+/// ai and bi, the output vector ci is given by ci = ai x bi
+///
+/// @param a
+/// Input buffer containing "N" 3x1 Vectors. Must be of length N * 3. The layout of the array is
+/// as follows x0 y0 z0 x1 y1 z1 .......
+///
+/// @param b
+/// Input buffer containing "N" 3x1 Vectors. Must be of length N * 3. The layout of the array is
+/// as follows x0 y0 z0 x1 y1 z1 .......
+///
+/// @param c
+/// Output buffer containing the resultant "N" 3x1 Vectors. Each 3 x 1 Vector in c is computed from the corresponding
+/// 3 x 1 pairs in a & b. Must be of length N * 3.
+///
+/// @param N
+/// Number of vector pairs. For example if N = 10, then a, b and c will have to be 10 x 3 in length
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvCrossProduct3x1f32(const float32_t * __restrict a,
+ const float32_t * __restrict b,
+ float32_t * __restrict c,
+ uint32_t N);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Solves a Linear System of Equations using LU-Decomposition
+///
+/// @details
+/// Solves a Linear System of Equations using LU Decomposition. Given
+/// a system defined by A x = b, the function decomposes A into a lower
+/// triangular matrix L and an upper triangular matrix U. It then computes x
+/// by first solving L y = B by forward substitution for y, and then solving
+/// the system of linear equations U x = y by backward substitution for x.
+/// \n\b NOTE : Pivoting is used here to ensure that any non singular matrix
+/// can be solved. This is because not all Matrices have a LU decomposition.
+/// Pivoting helps to overcome this issue.
+///
+/// @param A
+/// Input coefficient matrix of the linear system of dimension N x N
+/// \n\b WARNING: must be square.
+///
+/// @param b
+/// Component vector of the linear system of dimension N x 1
+///
+/// @param N
+/// Dimension of the input Matrix A and component vector b
+///
+/// @param pivot
+/// An N x 1 pivot array which is populated as follows : For each k = 0, 1,...., N-1
+/// The ith element of pivot contains the row interchanged with row i when k = i.
+/// Pivoting is used both for numerical stability and also ensuring that an LU factorization
+/// exists for the input matrix A.
+///
+/// @param x
+/// The solution of the linear system, an N x 1 Vector.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvSolveLUf32(float32_t* __restrict A,
+ float32_t* __restrict b,
+ uint32_t N,
+ uint8_t* __restrict pivot,
+ float32_t* __restrict x);
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Bitwise AND operation for each element of two uint8_t matrices
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (uint8_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvBitwiseAndu8(const uint8_t * src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t *__restrict src2,
+ uint32_t src2Stride,
+ uint8_t * dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Bitwise Exclusive Or operation for each element of two uint8_t matrices
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (uint8_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvBitwiseXoru8( const uint8_t * src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t *__restrict src2,
+ uint32_t src2Stride,
+ uint8_t * dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Bitwise Not operation for each element of two uint8_t matrices
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (uint8_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvBitwiseNotu8(const uint8_t * src,
+ uint32_t width,
+ uint32_t height,
+ uint32_t srcStride,
+ uint8_t * dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix addition of two uint8_t type matrices to one uint8_t matrix
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param policy
+/// Conversion policy that decides how data overflow should be handled
+///
+/// @param dst
+/// the result matrix (uint8_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvAddu8(const uint8_t * src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t * __restrict src2,
+ uint32_t src2Stride,
+ fcvConvertPolicy policy,
+ uint8_t * dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix addition of two int16_t type matrices which allows in-place operation
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param policy
+/// Conversion policy that decides how data overflow should be handled
+///
+/// @param dst
+/// the result matrix (int16_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvAdds16_v2( const int16_t * src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const int16_t * __restrict src2,
+ uint32_t src2Stride,
+ fcvConvertPolicy policy,
+ int16_t * dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix addition of one uint16_t type matrix and one uint8_t matrix
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param policy
+/// Conversion policy that decides how data overflow should be handled
+///
+/// @param dst
+/// the result matrix (uint16_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvAddu16u8u16 (const uint16_t * src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t * __restrict src2,
+ uint32_t src2Stride,
+ fcvConvertPolicy policy,
+ uint16_t * dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix substration of two uint8_t type matrices
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param policy
+/// Conversion policy that decides how data overflow should be handled
+///
+/// @param dst
+/// the result matrix (uint8_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvSubtractu8 ( const uint8_t * src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t * __restrict src2,
+ uint32_t src2Stride,
+ fcvConvertPolicy policy,
+ uint8_t * dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix substration of two uint16_t type matrices
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param policy
+/// Conversion policy that decides how data overflow should be handled
+///
+/// @param dst
+/// the result matrix (int16_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvSubtracts16 (const int16_t * src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const int16_t * __restrict src2,
+ uint32_t src2Stride,
+ fcvConvertPolicy policy,
+ int16_t * dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Matrix substration of two uint8_t type matrices
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param dst
+/// the result matrix (int16_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvSubtractu8s16 ( const uint8_t * __restrict src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t * __restrict src2,
+ uint32_t src2Stride,
+ int16_t * __restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Element-wise multiplication of two int16_t type matrices
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param scaleFactor
+/// The number of bits to be shifted to scale the result. When scaleFactor > 0, results
+/// are right-shifted; when scaleFactor < 0, results are left-shifted by absolute value
+/// of scaleFactor
+///
+/// @param policy
+/// Conversion policy that decides how data overflow should be handled
+///
+/// @param dst
+/// the result matrix (int16_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvElementMultiplys16( const int16_t * src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const int16_t * src2,
+ uint32_t src2Stride,
+ int8_t scaleFactor,
+ fcvConvertPolicy policy,
+ int16_t *__restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Element-wise multiplication of two uint8_t type matrices
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param scaleFactor
+/// The number of bits to be shifted to scale the result. When scaleFactor > 0, results
+/// are right-shifted; when scaleFactor < 0, results are left-shifted by absolute value
+/// of scaleFactor
+///
+/// @param policy
+/// Conversion policy that decides how data overflow should be handled
+///
+/// @param dst
+/// the result matrix (int16_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvElementMultiplyu8s16( const uint8_t * src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t * src2,
+ uint32_t src2Stride,
+ int8_t scaleFactor,
+ fcvConvertPolicy policy,
+ int16_t *__restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Element-wise multiplication of two uint8_t type matrices
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param scaleFactor
+/// The number of bits to be shifted to scale the result. When scaleFactor > 0, results
+/// are right-shifted; when scaleFactor < 0, results are left-shifted by absolute value
+/// of scaleFactor
+///
+/// @param policy
+/// Conversion policy that decides how data overflow should be handled
+///
+/// @param dst
+/// the result matrix (uint8_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvElementMultiplyu8( const uint8_t * src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint8_t * src2,
+ uint32_t src2Stride,
+ int8_t scaleFactor,
+ fcvConvertPolicy policy,
+ uint8_t *__restrict dst,
+ uint32_t dstStride );
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Calculate the weighted sum of two uint8_t type matrices
+///
+/// @details
+/// Specifically, when 0 <= alpha <= 1 and beta = 1-alpha, the function accumulates a weighted value from
+/// an input image to an output image
+/// \n\b NOTE: alpha and beta should be within the range of (-128.0, 127.996) and have up to three digits decimal precision
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param alpha
+/// The weight value applied to src1 matrix, provided by float32_t type
+///
+/// @param beta
+/// The weight value applied to src2 matrix, provided by float32_t type
+///
+/// @param dst
+/// the result matrix (uint8_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success,
+/// other values upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvAddWeightedu8(const uint8_t * src1,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t src1Stride,
+ const uint8_t *__restrict src2,
+ uint32_t src2Stride,
+ float32_t alpha,
+ float32_t beta,
+ uint8_t * dst,
+ uint32_t dstStride);
+
+
+//---------------------------------------------------------------------------
+/// @brief
+/// Add a squared value of one type uint8 matrix to the other type uint16 type matrix
+///
+/// @param src1
+/// First source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param width
+/// Width of the source matrix.
+///
+/// @param height
+/// Height of the source matrix.
+///
+/// @param src1Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src1Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param src2
+/// Second source matrix.
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param src2Stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 src2Stride is default to width.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param scaleFactor
+/// The number of bits to be shifted to scale the result. When scaleFactor > 0, results
+/// are right-shifted; when scaleFactor < 0, results are left-shifted by absolute value
+/// of scaleFactor
+///
+/// @param dst
+/// the result matrix (uint16_t type).
+/// \n\b NOTE: array should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 dstStride is default to width*2.
+/// \n\b WARNING: should be multiple of 8
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup math_vector
+//---------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvAddSquaredu8u16(const uint8_t *__restrict src1,
+ uint32_t width,
+ uint32_t height,
+ uint32_t src1Stride,
+ const uint16_t * src2,
+ uint32_t src2Stride,
+ int8_t scaleFactor,
+ uint16_t * dst,
+ uint32_t dstStride);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Swap Chroma component order.
+///
+/// @details
+/// This function swaps the interleaved Chroma component order from CbCr to
+/// CrCb or from CrCb to CbCr.
+///
+/// @param src
+/// Pointer to the input image
+/// \n\b NOTE: should be 128-bit aligned
+///
+/// @param srcWidth
+/// Input image width in the number of CbCr or CrCb pairs.
+///
+/// @param srcHeight
+/// The Chroma component height.
+///
+/// @param srcStride
+/// Stride of input image in bytes (i.e., number of bytes between column 0 of row 0
+/// and column 0 of row 1). If left at 0, srcStride is default to srcWidth * 2.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @param dst
+/// Pointer to the output image
+/// \n\b WARNING: size must match input image.
+/// \n\b NOTE: should be 128-bit aligned
+///
+/// @param dstStride
+/// Stride of output image in bytes (i.e., number of bytes between column 0 of
+/// row 0 and column 0 of row 1). If left at 0, dstStride is default to
+/// srcWidth * 2.
+/// \n\b NOTE: should be a multiple of 8.
+///
+/// @ingroup color_conversion
+//------------------------------------------------------------------------------
+
+FASTCV_API void
+fcvColorCbCrSwapu8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride );
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Converts an image from RGB space to HSV space.
+///
+/// @details
+///
+/// @param src
+/// Source 24-bit image, RGB888 format (R is MSB byte for the pixel)
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param srcWidth
+/// Source image width.
+///
+/// @param srcHeight
+/// Source image height.
+///
+/// @param srcStride
+/// Stride of source image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// If set to 0, srcStride=srcWidth*3 as default
+///
+/// @param dst
+/// Destination 24-bit image. HSV888 format (H is MSB byte for the pixel)
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param dstStride
+/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// If set to 0, dstStride=srcWidth*3 as default
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup color_conversion
+//------------------------------------------------------------------------------
+FASTCV_API fcvStatus
+fcvColorRGB888ToHSV888u8( const uint8_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ uint8_t* __restrict dst,
+ uint32_t dstStride);
+
+
+//------------------------------------------------------------------------------/
+/// @brief
+/// SVM prediction for two classes
+///
+/// @details
+/// The function returns the confidence scores for test vectors using the equation:
+/// confidence(i) = sum_j( svCoef[j] * Kernel(vec_i, sv_j) - rho;
+/// The SVM model(svCoef, sv, rho) can be obtained using the training function of libSVM or openCV.
+///
+/// @param kernelType
+/// kernelType options: 'FASTCV_SVM_LINEAR','FASTCV_SVM_POLY','FASTCV_SVM_RBF','FASTCV_SVM_SIGMOID'.
+/// FASTCV_SVM_LINEAR: Kernel(xi, xj) = xi'*xj
+/// FASTCV_SVM_POLY: Kernel(xi, xi) = (gamma * xi' * xj + coef0)^degree, (gamma>0 , degree is positive integer).
+/// FASTCV_SVM_RBF: Kernel(xi,xj) = exp(-gamma*||xi-xj||^2), (gamma>0).
+/// FASTCV_SVM_SIGMOID: Kernel(xi, xj) = tanh(gamma * xi' * xj + coef0)
+///
+/// @param degree
+/// Parameter degree of a kernel function (FASTCV_SVM_POLY).
+/// \n\b NOTE: Degree should be positive integer.
+///
+/// @param gamma
+/// Parameter of a kernel function (FASTCV_SVM_POLY / FASTCV_SVM_RBF / FASTCV_SVM_SIGMOID).
+/// \n\b NOTE: gamma > 0 for FASTCV_SVM_Ploy and FASTCV_SVM_RBF
+///
+/// @param coef0
+/// Parameter coef0 of a kernel function (FASTCV_SVM_LINEAR / FASTCV_SVM_POLY / FASTCV_SVM_SIGMOID).
+///
+/// @param sv
+/// Support vectors.
+///
+/// @param svLen
+/// Feature length, (support vector length = feature length).
+///
+/// @param svNum
+/// Number of support vectors.
+///
+/// @param svStride
+/// support vector stride.
+/// Stride of support vector 2D matrix (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, svStride is set as svLen*sizeof(float32_t).
+/// \n\b WARNING: should be multiple of 8, and at least as much as svLen if not 0.
+///
+/// @param svCoef
+/// Coefficent of support vectors, length equals to the Number of SV.
+///
+/// @param rho
+/// SVM bias.
+///
+/// @param vec
+/// Test vectors, it has same width as sv.
+///
+/// @param vecNum
+/// Number of test vectors.
+///
+/// @param vecStride
+/// Stride of test vectors.
+/// Stride of test vector 2D matrix (i.e., how many bytes between column 0 of row 1 and
+/// column 0 of row 2).
+/// \n\b NOTE: if 0, vecStride is set as svLen*sizeof(float32_t).
+/// \n\b WARNING: should be multiple of 8, and at least as much as svLen if not 0.
+///
+/// @param confidence
+/// Output, store confidence value of each test vector. The length is vecNum.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup machine_learning
+//------------------------------------------------------------------------------/
+
+FASTCV_API fcvStatus
+fcvSVMPredict2Classf32( fcvSVMKernelType kernelType,
+ uint32_t degree,
+ float32_t gamma,
+ float32_t coef0,
+ const float32_t* __restrict sv,
+ uint32_t svLen,
+ uint32_t svNum,
+ uint32_t svStride,
+ const float32_t* __restrict svCoef,
+ float32_t rho,
+ const float32_t* __restrict vec,
+ uint32_t vecNum,
+ uint32_t vecStride,
+ float32_t* __restrict confidence );
+
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Optical flow (with stride so ROI can be supported)
+///
+/// \n\b ATTENTION: This function is a duplication of
+/// fcvTrackLKOpticalFlowu8() with the addition of extra parameters.
+/// This function has been added to allow for backward compatibility
+/// with the original function. When the 2.0.0 release of this library
+/// is made, this function will be renamed to: \a fcvTrackLKOpticalFlowu8,
+/// \a fcvTrackLKOpticalFlowu8_v3 will be removed, and the current signature
+/// for \a fcvTrackLKOpticalFlowu8 will be removed. Until 2.0.0, the
+/// developer should use this implementation with the expectation of
+/// renaming it to \a fcvTrackLKOpticalFlowu8 when transitioning to 2.0.0.
+/// \n\n
+///
+/// @param src1
+/// Input image from frame #1.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param src2
+/// Input image from frame #2.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param width
+/// Input image width.
+///
+/// @param height
+/// Input image height.
+///
+/// @param stride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to width.
+/// NOTE: should be a multiple of 8.
+///
+/// @param src1Pyr
+/// Image Pyramid of src1 (with stride)
+/// \n\b WARNING: obtained by calling fcvPyramidCreateu8_v3
+///
+/// @param src2Pyr
+/// Image Pyradmid of src2 (with stride)
+/// \n\b WARNING: obtained by calling fcvPyramidCreateu8_v3
+///
+/// @param featureXY
+/// Pointer to X,Y floating point, sub-pixel coordinates for features to
+/// track. Stored as X,Y tuples. featureXY array storage must
+/// be >= featureLen*2.
+///
+/// @param featureXY_out
+/// Pointer to X,Y floating point, sub-pixel coordinates for tracked features
+/// Stored as X,Y tuples. featureXY array storage must
+/// be >= featureLen*2.
+///
+/// @param featureXY_estimate
+/// Pointer to X,Y floating point, sub-pixel coordinates for estimated features
+/// on the new frame stored as X,Y tuples. featureXY array storage must
+/// has the same length as featureXY
+///
+/// @param featureStatus
+/// Pointer to integer array for status of each feature defined in
+/// featureXY. featureStatus array storage must
+/// be >= featureLen.
+///
+/// @param featureLen
+/// Number of features in featuresXY and featureStatus array.
+///
+/// @param windowWidth
+/// Width of window for optical flow searching. Must be odd number.
+/// \n\b NOTE: suggested value 5, 7 or 9
+///
+/// @param windowHeight
+/// Height of window for optical flow searching. Must be odd number.
+/// \n\b NOTE:: suggested value 5, 7 or 9
+///
+/// @param nPyramidLevels
+/// Number of pyramid levels.
+/// \n\b NOTE: suggested value 3 or 4 depending on size of image
+///
+/// @param termCriteria
+/// The enum parameter to specify termination criteria. See fcvTerminationCriteria for details
+///
+/// @param maxIterations
+/// Maximum number of LK iterations to perform per pyramid level if
+/// FASTCV_TERM_CRITERIA_ITERATIONS is set as the termCriteria
+/// \n\b NOTE: will be saturated to range [1, 100]; suggested value 5 or 7
+///
+/// @param maxEpsilon
+/// Epsilon value in float32_t for error measure to determine the iteration
+/// \n\b NOTE: the value should be within [0, 10]; suggested value 0.03*0.03
+///
+/// @param use_initial_estimate
+/// The flag indicatiing if to use initial estimations stored in featureXY_estimate
+/// to start the search.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup object_detection
+// -----------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvTrackLKOpticalFlowu8_v3 ( const uint8_t *__restrict src1,
+ const uint8_t *__restrict src2,
+ uint32_t width,
+ uint32_t height,
+ uint32_t stride,
+ const fcvPyramidLevel_v2 * __restrict src1Pyr,
+ const fcvPyramidLevel_v2 * __restrict src2Pyr,
+ const float32_t * __restrict featureXY,
+ const float32_t * __restrict featureXY_estimate,
+ float32_t * __restrict featureXY_out,
+ int32_t * __restrict featureStatus,
+ int32_t featureLen,
+ int32_t windowWidth,
+ int32_t windowHeight,
+ int32_t nPyramidLevels,
+ fcvTerminationCriteria termCriteria,
+ int32_t maxIterations,
+ float32_t maxEpsilon,
+ int32_t use_initial_estimate);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Undistort a disparity image and optionally convert the undistorted disparity image into a
+/// depth image.
+///
+/// @param src
+/// Pointer to the disparity input image
+///
+/// @param srcWidth
+/// Width of the disparity input image in pixel. The number of pixels in a row.
+///
+/// @param srcHeight
+/// Height of the disparity input image in pixel.
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*sizeof(float32_t)
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param mask
+/// Pointer to the returned foreground mask image.
+/// It's a 1-channel image, same width and height as src.
+/// If an entry set to 1, there will be a valid undistorted dispartity or depth value.
+/// If an entry set to 0, there will be no valid undistorted dispartity or depth value.
+///
+/// @param maskStride
+/// Stride of the foreground mask image. It's the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 MaskStride is default to srcWidth.
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param pixelDistortion
+/// Pointer to the pixel distortion value for each pixel in the image. It has the same dimensions
+/// as the input image src.
+///
+/// @param pixelDistortionStride
+/// Stride of pixel distortion value for each pixel in the image.
+/// It's the number of bytes between column 0 of row 1 and column 0 of row 2 in data memory.
+/// If left at 0 pixelDistortionStride is default to srcWidth*sizeof(float32_t).
+/// \n\b WARNING: should be multiple of 8
+///
+/// @param convertDepth
+/// This parameter is a flag to enable or disable the conversion of disparity to depth.
+/// If set to 1, then the undistorted disparity values will be converted to depth
+/// and returned in the dst buffer.
+/// If set to 0, then the undistorted disparity will be returned in the dst buffer.
+///
+/// @param imageDistortion
+/// ImageDistortion contains two elements. The First part contains the spatial distortion pattern,
+/// and the second part contains the decay of the distortion effect.
+///
+/// @param depthParam
+/// Parameters used to transform disparity to depth values.
+/// The equation is
+/// undistortedDepthValue = 1 / (undistortedDisparityValue * depthParam[0] + depthParam[1])
+///
+/// @param dst
+/// Output matrix which has the same width, length and channel number as src.
+/// The buffer contains undistorted disparity values if convertDepth is set to 0 and
+/// contains the undistorted depth values if convertDepth is set to 1
+///
+/// @param dstStride
+/// Stride for output image, i.e. the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*sizeof(float32_t)
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvUndistortDisparityConvertDepthf32(const float32_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ const uint8_t* __restrict mask,
+ uint32_t maskStride,
+ const float32_t* __restrict pixelDistortion,
+ uint32_t pixelDistortionStride,
+ uint32_t convertDepth,
+ const float32_t* __restrict imageDistortion,
+ const float32_t* __restrict depthParam,
+ float32_t* __restrict dst,
+ uint32_t dstStride);
+
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Registers an input Depth Image with an input Color Image
+///
+/// @param src
+/// Pointer to the input depth image
+///
+/// @param srcWidth
+/// The width of the input depth image.
+///
+/// @param srcHeight
+/// The height of the input depth image
+///
+/// @param srcStride
+/// Stride of image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*sizeof(float32_t).
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param Kdinv
+/// Kdinv is an array of 9 elements representing the inverse of the 3x3 depth camera matrix
+/// arranged row wise.
+///
+/// @param Kc
+/// Kc is an array of 9 elements which represents the 3x3 color camera intrinsic parameters
+/// arranged row wise
+///
+/// @param Rd2c
+/// Rd2c is an array of 9 element which represents the 3D Rotation (3x3) matrix from the Depth
+/// Camera to the Color Camera arranged row wise
+///
+/// @param Td2c
+/// Td2c is an array of 3 element which represents the transform parameter from the Depth
+/// Camera to the Color Camera.
+///
+/// @param dst
+/// Output matrix which has the same width, length and channel number as src
+///
+/// @param dstStride
+/// Stride for output image, i.e. the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*sizeof(float32_t)
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvRegisterDepthImagef32(const float32_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ const float32_t* __restrict Kdinv,
+ const float32_t* __restrict Kc,
+ const float32_t* __restrict Rd2c,
+ const float32_t* __restrict Td2c,
+ float32_t* __restrict dst,
+ uint32_t dstStride);
+
+//------------------------------------------------------------------------------
+/// @brief
+/// Convert depth image into 3D point Cloud
+///
+/// @param src
+/// Pointer to the depth image
+///
+/// @param srcWidth
+/// Width of the depth image in pixel. The number of pixels in a row.
+///
+/// @param srcHeight
+/// Height of the depth image in pixel
+///
+/// @param srcStride
+/// Stride of depth image is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*sizeof(float32_t).
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @param Kdinv
+/// Kdinv is an array of 9 elements representing the inverse of the 3x3 depth camera matrix
+/// arranged row wise.
+//
+/// @param dst
+/// Pointer to the 3D point cloud in an interleaved fashion x0,y0,z0,x1,y1,z1.
+/// It has a width of 3*srcWidth and has the same height as the src buffer.
+///
+/// @param dstStride
+/// Stride for output image, i.e. the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 srcStride is default to 3*srcWidth*sizeof(float32_t)
+/// \n\b NOTE: should be multiple of 8.
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup 3D_reconstruction
+//------------------------------------------------------------------------------
+FASTCV_API fcvStatus
+fcvConvertDepthImageToPointCloudf32(const float32_t* __restrict src,
+ uint32_t srcWidth,
+ uint32_t srcHeight,
+ uint32_t srcStride,
+ const float32_t* __restrict Kdinv,
+ float32_t* __restrict dst,
+ uint32_t dstStride);
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Extract Histogram of Oriented Gradients (HOG) descriptor given an image's gradient strength
+/// and orientation
+///
+/// @param strength
+/// The gradient strength at each pixel.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param width
+/// Input window width.
+///
+/// @param height
+/// Input window height.
+///
+/// @param strengthStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 strengthStride is default to width*2.
+/// NOTE: should be a multiple of 8.
+///
+/// @param orientation
+/// Gradient orientation at each pixel. When normMethod is FASTCV_HOG_NORM_REGULAR or
+/// FASTCV_HOG_NORM_RENORMALIZATION, orientation should be within range of [0, 179]; while
+/// FASTCV_HOG_NORM_FHOG is used, orientation should be within [0, 359] to meet its contrast-
+/// sensitive requirements.
+/// \n\b WARNING: should be 128-bit aligned.
+///
+/// @param orientationStride
+/// Stride is the number of bytes between column 0 of row 1 and
+/// column 0 of row 2 in data memory. If left at 0 orientationStride is default to width*2.
+/// NOTE: should be a multiple of 8.
+///
+/// @param cellSize
+/// The size of one cell in pixels. The typical cell size is 4.
+///
+/// @param blockSize
+/// Block size in pixels. It must be a multiple of cellSize.
+/// \n\b WARNING: When normMethod is FASTCV_HOG_NORM_FHOG, blockSize is by default equal to cellSize
+///
+/// @param blockStep
+/// Block step in pixels when sliding the block over the image. If the blockStep
+/// is a multiple of cellSize, faster approach would be taken when normMethod
+/// is FASTCV_HOG_NORM_REGULAR or FASTCV_HOG_NORM_RENORMALIZATION.
+/// \n\b WARNING: When normMethod is FASTCV_HOG_NORM_FHOG, blockStep is by default equal to cellSize
+///
+/// @param binSize
+/// Number of bins in the gradient histogram. Typical binSize is 9.
+///
+/// @param normMethod
+/// The enum parameter to specify the normalization method for HOG descriptor construction. See
+/// fcvHOGNormMethod for details.
+///
+/// @param hogVector
+/// The output descriptor vector in uint16_t. The length of the vector is obtained by fcvGetHOGVectorLengthu32
+///
+/// @return
+/// FASTCV_SUCCESS upon success.
+/// Other status codes upon failure.
+///
+/// @ingroup object_detection
+// -----------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvExtractHOGu16(const uint16_t* __restrict strength,
+ uint32_t width,
+ uint32_t height,
+ uint32_t strengthStride,
+ const uint16_t* __restrict orientation,
+ uint32_t orientationStride,
+ uint32_t cellSize,
+ uint32_t blockSize,
+ uint32_t blockStep,
+ uint32_t binSize,
+ fcvHOGNormMethod normMethod,
+ uint16_t* __restrict hogVector,
+ uint32_t flen,
+ void* handle);
+
+// -----------------------------------------------------------------------------
+/// @brief
+/// Calculate the length of the output vector for HOG extraction
+///
+/// @param width
+/// Input window width.
+///
+/// @param height
+/// Input window height.
+///
+/// @param cellSize
+/// The size of one cell in pixels. The typical cell size is 4.
+///
+/// @param blockSize
+/// Block size in pixels. It must be a multiple of cellSize.
+/// \n\b WARNING: When normMethod is FASTCV_HOG_NORM_FHOG, blockStep is by default equal to cellSize
+///
+/// @param blockStep
+/// Block step in pixels when sliding the block over the image. If the blockStep
+/// is a multiple of cellSize, faster approach would be taken when normMethod
+/// is FASTCV_HOG_NORM_REGULAR or FASTCV_HOG_NORM_RENORMALIZATION.
+/// \n\b WARNING: When normMethod is FASTCV_HOG_NORM_FHOG, blockStep is by default equal to cellSize
+///
+/// @param binSize
+/// Number of bins in the gradient histogram. Typical binSize is 9.
+///
+/// @param normMethod
+/// The enum parameter to specify the normalization method for HOG descriptor construction. See
+/// fcvHOGNormMethod for details.
+///
+/// @param
+/// The length of HOG vector in uint32_t
+///
+/// @param hogHandle
+/// Output. the hogHandle to be used in subsequent calls.
+///
+/// @ingroup object_detection
+// -----------------------------------------------------------------------------
+
+FASTCV_API fcvStatus
+fcvHOGInit(uint32_t width,
+ uint32_t height,
+ uint32_t cellSize,
+ uint32_t blockSize,
+ uint32_t blockStep,
+ uint32_t binSize,
+ fcvHOGNormMethod normMethod,
+ uint32_t *vecLength,
+ void **hogHandle
+ );
+//------------------------------------------------------------------------------
+/// @brief Function to release HOG resources.
+/// @param hogHandle
+/// Handle to be used to free up HOG resources.
+/// @ingroup object_detection
+//------------------------------------------------------------------------------
+
+FASTCV_API void fcvHOGDeInit(void* hogHandle);
+
+
+
+#ifdef __cplusplus
+}//extern "C"
+#endif
+
+#endif
diff --git a/phonelibs/fastcv/x64/include/fastcv.h b/phonelibs/fastcv/x64/include/fastcv.h
deleted file mode 100755
index 0bffaba27..000000000
--- a/phonelibs/fastcv/x64/include/fastcv.h
+++ /dev/null
@@ -1,23220 +0,0 @@
-#ifndef FASTCV_H
-#define FASTCV_H
-
-/**=============================================================================
-
-@file
- fastcv.h
-
-@brief
- Public API
-
-
-Copyright (c) 2011-2013 Qualcomm Technologies Incorporated.
-All Rights Reserved Qualcomm Technologies Proprietary
-
-Export of this technology or software is regulated by the U.S.
-Government. Diversion contrary to U.S. law prohibited.
-
-All ideas, data and information contained in or disclosed by
-this document are confidential and proprietary information of
-Qualcomm Technologies Incorporated and all rights therein are expressly reserved.
-By accepting this material the recipient agrees that this material
-and the information contained therein are held in confidence and in
-trust and will not be used, copied, reproduced in whole or in part,
-nor its contents revealed in any manner to others without the express
-written permission of Qualcomm Technologies Incorporated.
-
-=============================================================================**/
-
-/**=============================================================================
-@mainpage FastCV Public API Documentation
-
-@version 1.2.2
-
-@section Overview Overview
-
-FastCV provides two main features to computer vision application developers:
- - First, it provides a library of frequently used computer vision (CV)
- functions, optimized to run efficiently on mobile devices.
- - Second, it provides a clean processor-agnostic hardware acceleration API,
- under which chipset vendors can hardware accelerate FastCV functions on
- their hardware.
-
-This initial release (FastCV 1.0) only supports Android mobile developers;
-however, we intend to support iOS and Windows devices as soon as possible.
-FastCV 1.0 is available for download for free from developer.qualcomm.com.
-
-FastCV 1.0 is released as a unified binary, a single binary containing two
-implementations of the library.
- - The first implementation runs on ARM processor, and is referred to as
- the "FastCV for ARM."
- - The second implementation runs only on Qualcomm Snapdragon
- chipsets, and is called "FastCV for Snapdragon."
-
-Releases are generally motivated for the following reasons:
- - Changes to previously released APIs
- - Addition of new functions
- - Performance improvements and/or bug fixes - also known as implementation
- modifications
-
- Each motivation has a varying degree of impact on the user of the library.
- The general release numbering scheme captures this variety of motivations.
-
- Given release ID: A.B.C
-
- An increase in "A" indicates that a previously released API has changed,
- so a developer may encounter compilation issues which require modification
- of their code in order to adhear to the modified API. Qualcomm will make
- every effort to minimize these changes. Additionally, new functions and
- implementation modifications may be present.
-
- An increase in "B" indicates that new functions have been added to the
- library, so additional functionality is available, however existing APIs
- have not changed. Additionally, implementation modifications may be
- present.
-
- An increase in "C" indicates that implementation modifications only have
- been made.
-
-@defgroup math_vector Math / Vector Operations
-@details Commonly used vector & math functions
-
-@defgroup image_processing Image processing
-@details Image filtering, convolution and scaling operations
-
-@defgroup image_transform Image transformation
-@details Warp perspective, affine transformations
-
-@defgroup feature_detection Feature detection
-@details Fast corner detection, harris corner detection, canny edge detection, etc.
-
-@defgroup object_detection Object detection
-@details Object detection functions such as NCC template match, etc.
-
-@defgroup 3D_reconstruction 3D reconstruction
-@details Homography, pose evaluation functions
-
-@defgroup color_conversion Color conversion
-@details Commonly used formats supported: e.g., YUV, RGB, YCrCb, etc.
-
-@defgroup clustering_and_search Clustering and search
-@details K clusters best fitting of a set of input points
-
-@defgroup Motion_and_Object_Tracking Motion and object tracking
-@details Supports and tracking functions
-
-@defgroup Structural_Analysis_and_Drawing Shape and drawing
-@details Contour and polygon drawing functions
-
-@defgroup mem_management Memory Management
-@details Functions to allocate and deallocate memory for use with fastCV.
-
-@defgroup misc Miscellaneous
-@details Support functions
-
-**/
-
-//==============================================================================
-// Defines
-//==============================================================================
-
-#define FASTCV_VERSION 122
-
-#ifdef __GNUC__
- /// Macro to align memory at 4-bytes (32-bits) for GNU-based compilers.
- #define FASTCV_ALIGN32( VAR ) (VAR) __attribute__ ((aligned(4)))
- /// Macro to align memory at 8-bytes (64-bits) for GNU-based compilers.
- #define FASTCV_ALIGN64( VAR ) (VAR) __attribute__ ((aligned(8)))
- /// Macro to align memory at 16-bytes (128-bits) for GNU-based compilers.
- #define FASTCV_ALIGN128( VAR ) (VAR) __attribute__ ((aligned(16)))
- #ifdef BUILDING_SO
- /// MACRO enables function to be visible in shared-library case.
- #define FASTCV_API __attribute__ ((visibility ("default")))
- #else
- /// MACRO empty for non-shared-library case.
- #define FASTCV_API
- #endif
-#else
- /// Macro to align memory at 4-bytes (32-bits) for MSVC compiler.
- #define FASTCV_ALIGN32( VAR ) __declspec(align(4)) (VAR)
- /// Macro to align memory at 8-bytes (64-bits) for MSVC compiler.
- #define FASTCV_ALIGN64( VAR ) __declspec(align(8)) (VAR)
- /// Macro to align memory at 16-bytes (128-bits) for MSVC compiler.
- #define FASTCV_ALIGN128( VAR ) __declspec(align(16)) (VAR)
- #ifdef BUILDING_DLL
- /// MACRO enables function to be visible in shared-library case.
- #define FASTCV_API __declspec(dllexport)
- #else
- /// MACRO empty for non-shared-library case.
- #define FASTCV_API
- #endif
-#endif
-
-//==============================================================================
-// Included modules
-//==============================================================================
-
-#include
-
-#ifndef FASTCV_STDINT
-#define FASTCV_STDINT
- #ifdef _MSC_VER
-
- #if _MSC_VER <= 1500
- // stdint.h support for VS2008 and older
- #include "stdint_.h"
- #else
- #include
- #endif
-
- typedef float float32_t;
- typedef double float64_t;
-
- #else
-
- #ifdef __ARM_NEON__
- #include
- #else
- #include
- typedef float float32_t;
- typedef double float64_t;
- #endif
-
- #endif
-#endif
-
-//==============================================================================
-// Declarations
-//==============================================================================
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines operational mode of interface to allow the end developer to
-/// dictate how the target optimized implementation should behave.
-//------------------------------------------------------------------------------
-typedef enum
-{
- /// Target-optimized implementation uses lowest power consuming
- /// implementation.
- FASTCV_OP_LOW_POWER = 0,
-
- /// Target-optimized implementation uses higheset performance implementation.
- FASTCV_OP_PERFORMANCE = 1,
-
- /// Target-optimized implementation offloads as much of the CPU as possible.
- FASTCV_OP_CPU_OFFLOAD = 2,
-
- /// Values >= 0x80000000 are reserved
- FASTCV_OP_RESERVED = 0x80000000
-
-} fcvOperationMode;
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a structure to contain points correspondence data.
-//------------------------------------------------------------------------------
-typedef struct
-{
- /// Tuples of 3 values: xFrom,yFrom,zFrom. Float array which this points to
- /// must be greater than or equal to 3 * numCorrespondences.
- const float32_t* from;
- /*~ FIELD fcvCorrespondences.from
- VARRAY LENGTH ( fcvCorrespondences.numCorrespondences * \
- (fcvCorrespondences.fromStride ? fcvCorrespondences.fromStride : 3) ) */
-
- /// Tuples of 2 values: xTo,yTo. Float array which this points to
- /// must be greater than or equal to 2 * numCorrespondences.
- const float32_t* to;
- /*~ FIELD fcvCorrespondences.to
- VARRAY LENGTH ( fcvCorrespondences.numCorrespondences * \
- (fcvCorrespondences.toStride ? fcvCorrespondences.toStride : 2) ) */
-
- /// Distance in bytes between two coordinates in the from array.
- /// If this parameter is set to 2 or 3, a dense array is assume (stride will
- /// be sizeof(float) times 2 or 3). The minimum value of fromStride
- /// should be 2.
- uint32_t fromStride;
-
- /// Distance in bytes between two coordinates in the to array.
- /// If this parameter is set to 2, a dense array is assume (stride will
- /// be 2 * sizeof(float)). The minimum value of toStride
- /// should be 2.
- uint32_t toStride;
-
- /// Number of points in points correspondences.
- uint32_t numCorrespondences;
-
- /// Array of inlier indices for corrs array. Processing will only occur on
- /// the indices supplied in this array. Array which this points to must be
- /// at least numIndices long.
- const uint16_t* indices;
- /*~ FIELD fcvCorrespondences.indices VARRAY LENGTH (fcvCorrespondences.numIndices) */
-
- /// Length of indices array.
- uint32_t numIndices;
-} fcvCorrespondences;
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Structure representing an image pyramid level
-//------------------------------------------------------------------------------
-
-typedef struct
-{
- const void* ptr;
- unsigned int width;
- unsigned int height;
-} fcvPyramidLevel ;
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Structure describing node of a tree;
-/// Assumption is that nodes of all trees are stored in in a single array
-/// and all indices refer to this array
-/// @remark
-/// if indices of both children are negative the node is a leaf
-// ----------------------------------------------------------------------------
-typedef struct fcvKDTreeNodef32
-{
- /// the split value at the node
- float32_t divVal;
-
- /// dimension at which the split is made;
- /// if this is a leaf (both children equal to -1) then this is
- /// the index of the dataset vector
- int32_t divFeat;
-
- /// index of the child node with dataset items to the left
- /// of the split value
- int32_t childLeft;
-
- /// index of the child node with dataset items to the right
- /// of the split value
- int32_t childRight;
-
-} fcvKDTreeNodef32;
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// structure describing a branch (subtree)
-/// @remark
-/// branches are stored on the priority queue (heap) for backtracking
-// -----------------------------------------------------------------------------
-typedef struct fcvKDTreeBranchf32
-{
- /// square of minimal distance from query for all nodes below
- float32_t minDistSq;
-
- /// index of the top node of the branch
- int32_t topNode;
-
-} fcvKDTreeBranchf32;
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Structure with KDTrees data
-// -----------------------------------------------------------------------------
-typedef struct fcvKDTreeDatas8f32
-{
- // info about the dataset for which KDTrees are constructed
- /// the dataset of vectors
- const int8_t *dataset;
-
- /// array with inverse lengths of dataset vectors
- const float32_t* invLen;
-
- /// number of vectors in the dataset
- int32_t numVectors;
-
- // info about trees
- /// indice of root nodes of trees
- int32_t* trees;
-
- /// array of nodes of all trees
- fcvKDTreeNodef32* nodes;
-
- /// number of all nodes
- int32_t numNodes;
-
- /// capacity of node array
- int32_t maxNumNodes;
-
- // info used during lookups
- /// priority queue
- fcvKDTreeBranchf32* heap;
-
- /// number of branches on the priority queue
- int32_t numBranches;
-
- /// capactiy of the priority queue
- int32_t maxNumBranches;
-
- /// array of indices to vectors in the dataset;
- /// during searches used to mark checkID;
- /// should have numVectors capacity
- int32_t* vind;
-
- /// unique ID for each lookup
- int32_t checkID;
-
- /// number of nearest neighbors to find
- int32_t numNNs;
-
-} fcvKDTreeDatas8f32;
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// fixed point kdtrees
-/// Structure describing node of tree;
-/// Assumption is that nodes of all trees are stored in in a single array
-/// and all indices refer to this array
-/// @remark
-/// if indices of both children are negative the node is a leaf
-// ----------------------------------------------------------------------------
-typedef struct fcvKDTreeNodes32
-{
- /// the split value at the node
- int32_t divVal;
-
- /// dimension at which the split is made;
- /// if this is a leaf (both children equal to -1) then this is
- /// the index of the dataset vector
- int32_t divFeat;
-
- /// index of the child node with dataset items to the left
- /// of the split value
- int32_t childLeft;
-
- /// index of the child node with dataset items to the right
- /// of the split value
- int32_t childRight;
-
-} fcvKDTreeNodes32;
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// fixed point kdtrees
-/// structure describing a branch (subtree)
-/// @remark
-/// branches are stored on the priority queue (heap) for backtracking
-// -----------------------------------------------------------------------------
-typedef struct fcvKDTreeBranchs32
-{
- /// square of minimal distance from query for all nodes below
- int32_t minDistSq;
-
- /// index of the top node of the branch
- int32_t topNode;
-
-} fcvKDTreeBranchs32;
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// fixed point kdtrees
-/// Structure with KDTrees data
-// -----------------------------------------------------------------------------
-typedef struct fcvKDTreeDatas8s32
-{
- // info about the dataset for which KDTrees are constructed
- /// the dataset of vectors
- const int8_t *dataset;
-
- /// array with inverse lengths of dataset vectors
- const int32_t* invLen;
-
- /// number of vectors in the dataset
- int32_t numVectors;
-
- // info about trees
- /// indices of root nodes of all trees
- int32_t* trees;
-
- /// number of trees used
- int32_t numTrees;
-
- /// array of nodes of all trees
- fcvKDTreeNodes32* nodes;
-
- /// number of all nodes
- int32_t numNodes;
-
- /// capacity of node array
- int32_t maxNumNodes;
-
- // info used during lookups
- /// priority queue
- fcvKDTreeBranchs32* heap;
-
- /// number of branches on the priority queue
- int32_t numBranches;
-
- /// capactiy of the priority queue
- int32_t maxNumBranches;
-
- /// array of indices to vectors in the dataset;
- /// during searches used to mark checkID;
- /// should have numVectors capacity
- int32_t* vind;
-
- /// unique ID for each lookup
- int32_t checkID;
-
- /// number of nearest neighbors to find
- int32_t numNNs;
-
-} fcvKDTreeDatas8s32;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a struct of rectangle
-//------------------------------------------------------------------------------
-typedef struct
-{
- ///x-coordinate of the top-left corner
- int32_t x;
- ///y-coordinate of the top-left corner
- int32_t y;
- ///width of the rectangle
- uint32_t width;
- ///height of the rectangle
- uint32_t height;
-} fcvRectangleInt;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a struct of termination criteria
-//------------------------------------------------------------------------------
-typedef struct
-{
- /// Maxmimum number of iteration
- int32_t max_iter;
- ///
- float32_t epsilon;
-}fcvTermCriteria;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a struct of 2D box used for tracking
-//------------------------------------------------------------------------------
-typedef struct
-{
- // Center of the box
- ///x-coordinate of the 2D point
- int32_t x;
- ///y-coordinate of the 2D point
- int32_t y;
- // The box size
- int32_t columns;
- int32_t rows;
- // The orientation of the principal axis
- int32_t orientation;
-}fcvBox2D;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a struct of code word
-//------------------------------------------------------------------------------
-typedef struct fcvBGCodeWord
-{
- /// Pointer to next codebook element
- struct fcvBGCodeWord* next;
-
- /// Last update time
- int32_t tLastUpdate;
-
- /// Longest period of inactivity
- int32_t stale;
- /// Min value of pixel for each channel
- uint8_t min0, min1, min2;
-
- /// Max value of pixel for each channel
- uint8_t max0, max1, max2;
-
- /// Min value of learning boundary for each channel
- uint8_t learnLow0, learnLow1, learnLow2;
-
- /// Max value of learning boundary for each channel
- uint8_t learnHigh0, learnHigh1, learnHigh2;
-} fcvBGCodeWord;
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines a struct for circle
-//------------------------------------------------------------------------------
-typedef struct fcvCircle
-{
- int32_t x;
- int32_t y;
- int32_t radius;
-} fcvCircle;
-
-//==============================================================================
-// UTILITY FUNCTIONS
-//==============================================================================
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Retrieves version of FastCV library.
-///
-/// @param version
-/// Pointer to location to put string.
-///
-/// @param versionLength
-/// Length of storage for version string.
-///
-/// @ingroup misc
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvGetVersion( char* version,
- unsigned int versionLength );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Selects HW units for all routines at run-time. Can be called anytime to
-/// update choice.
-///
-/// @param mode
-/// See enum for details.
-///
-/// @return
-/// 0 if successful.
-/// 999 if minmum HW requirement not met.
-/// other #'s if unsuccessful.
-///
-/// @ingroup misc
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvSetOperationMode( fcvOperationMode mode );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Clean up FastCV resources. Must be called before the program exits.
-///
-/// @ingroup misc
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCleanUp( void );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Allocates memory for Pyramid
-///
-/// @param pyr
-/// Pointer to an array of qcvaPyramidLevel
-///
-/// @param baseWidth
-/// Width of the base level: the value assigned to pyr[0].width
-///
-/// @param baseHeight
-/// Height of the base level: the value assigned to pyr[0].height
-///
-/// @param bytesPerPixel
-/// Number of bytes per pixel:
-/// \n e.g for uint8_t pyramid, bytesPerPixel = 1
-/// \n for int32_t pyramid, bytesPerPixel = 4
-///
-/// @param numLevels
-/// number of levels in the pyramid
-///
-/// @param allocateBase
-/// \n if set to 1, memory will be allocated for the base level
-/// \n if set to 0, memory for the base level is allocated by the callee
-/// \n\b WARNING: How this parameter is set will impact how the memory is freed.
-/// Please refer to fcvPyramidDelete for details.
-///
-/// @ingroup mem_management
-//----------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidAllocate( fcvPyramidLevel* pyr,
- unsigned int baseWidth,
- unsigned int baseHeight,
- unsigned int bytesPerPixel,
- unsigned int numLevels,
- int allocateBase );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Deallocates an array of fcvPyramidLevel. Can be used for any
-/// type(f32/s8/u8).
-///
-/// @param pyr
-/// pyramid to deallocate
-///
-/// @param numLevels
-/// Number of levels in the pyramid
-///
-/// @param startLevel
-/// Start level of the pyramid
-/// \n\b WARNING: if pyr was allocated with allocateBase=0 which means baselevel memory
-/// was allocated outside of fcvPyramidAllocate, then startLevel
-/// for fcvPyramidDelete has to be set to 1 (or higher).
-///
-/// @ingroup mem_management
-//----------------------------------------------------------------------------
-
-FASTCV_API void
-fcvPyramidDelete( fcvPyramidLevel* pyr,
- unsigned int numLevels,
- unsigned int startLevel );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Allocates aligned memory.
-///
-/// @param nBytes
-/// Number of bytes.
-///
-/// @param byteAlignment
-/// Alignment specified in bytes (e.g., 16 = 128-bit alignment).
-/// \n\b WARNING: must be < 255 bytes
-///
-/// @return
-/// SUCCESS: pointer to aligned memory
-/// FAILURE: 0
-///
-/// @ingroup mem_management
-//------------------------------------------------------------------------------
-
-FASTCV_API void*
-fcvMemAlloc( unsigned int nBytes,
- unsigned int byteAlignment );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Frees memory allocated by fcvMemAlloc().
-///
-/// @param ptr
-/// Pointer to memory.
-///
-/// @ingroup mem_management
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvMemFree( void* ptr );
-
-#ifdef __cplusplus
-}//extern "C"
-#endif
-//End - Utility functions
-
-
-//==============================================================================
-// FUNCTIONS
-//==============================================================================
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 3x3 median filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterMedian3x3u8_v2(). In the 2.0.0 release,
-/// fcvFilterMedian3x3u8_v2 will be renamed to fcvFilterMedian3x3u8
-/// and the signature of fcvFilterMedian3x3u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Border values are ignored. The 3x3 mask convolves with the image area
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param srcImg
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dstImg
-/// Output 8-bit image. Size of buffer is srcWidth*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterMedian3x3u8( const uint8_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dstImg );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 3x3 median filter
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterMedian3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterMedian3x3u8,
-/// \a fcvFilterMedian3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterMedian3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterMedian3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Border values are ignored. The 3x3 mask convolves with the image area
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param srcImg
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dstImg
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterMedian3x3u8_v2( const uint8_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dstImg,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 3x3 Gaussian filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterGaussian3x3u8_v2(). In the 2.0.0 release,
-/// fcvFilterGaussian3x3u8_v2 will be renamed to fcvFilterGaussian3x3u8
-/// and the signature of fcvFilterGaussian3x3u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Gaussian kernel:
-/// \n 1 2 1
-/// \n 2 4 2
-/// \n 1 2 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight byte.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit image. Destination buffer size is srcWidth*srcHeight.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param blurBorder
-/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
-/// borders up to half-kernel width are ignored (e.g. 1 pixel in the 3x3
-/// case).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian3x3u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- int blurBorder );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 3x3 Gaussian filter
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterGaussian3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterGaussian3x3u8,
-/// \a fcvFilterGaussian3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterGaussian3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterGaussian3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Convolution with 3x3 Gaussian kernel:
-/// \n 1 2 1
-/// \n 2 4 2
-/// \n 1 2 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as dstWidth if not 0.
-///
-/// @param blurBorder
-/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
-/// borders up to half-kernel width are ignored (e.g. 1 pixel in the 3x3
-/// case).
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int blurBorder );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 5x5 Gaussian filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterGaussian5x5u8_v2(). In the 2.0.0 release,
-/// fcvFilterGaussian5x5u8_v2 will be renamed to fcvFilterGaussian5x5u8
-/// and the signature of fcvFilterGaussian5x5u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Convolution with 5x5 Gaussian kernel:
-/// \n 1 4 6 4 1
-/// \n 4 16 24 16 4
-/// \n 6 24 36 24 6
-/// \n 4 16 24 16 4
-/// \n 1 4 6 4 1
-///
-/// @param src
-/// Input int data (can be sq. of gradient, etc). Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param blurBorder
-/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
-/// borders up to half-kernel width are ignored (e.g. 2 pixel in the 5x5
-/// case).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian5x5u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- int blurBorder );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 5x5 Gaussian filter
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterGaussian5x5u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterGaussian5x5u8,
-/// \a fcvFilterGaussian5x5u8_v2 will be removed, and the current signature
-/// for \a fcvFilterGaussian5x5u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterGaussian5x5u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Convolution with 5x5 Gaussian kernel:
-/// \n 1 4 6 4 1
-/// \n 4 16 24 16 4
-/// \n 6 24 36 24 6
-/// \n 4 16 24 16 4
-/// \n 1 4 6 4 1
-///
-/// @param src
-/// Input int data (can be sq. of gradient, etc). Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as dstWidth if not 0.
-///
-/// @param blurBorder
-/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
-/// borders up to half-kernel width are ignored (e.g. 2 pixel in the 5x5
-/// case).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian5x5u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int blurBorder );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 11x11 Gaussian filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterGaussian11x11u8_v2(). In the 2.0.0 release,
-/// fcvFilterGaussian11x11u8_v2 will be renamed to fcvFilterGaussian11x11u8
-/// and the signature of fcvFilterGaussian11x11u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Convolution with 11x11 Gaussian kernel:
-/// \n 1 10 45 120 210 252 210 120 45 10 1
-/// \n 10 100 450 1200 2100 2520 2100 1200 450 100 10
-/// \n 45 450 2025 5400 9450 11340 9450 5400 2025 450 45
-/// \n 120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
-/// \n 210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
-/// \n 252 2520 11340 30240 52920 63504 52920 30240 11340 2520 252
-/// \n 210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
-/// \n 120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
-/// \n 45 450 2025 5400 9450 11340 9450 5400 2025 450 45
-/// \n 10 100 450 1200 2100 2520 2100 1200 450 100 10
-/// \n 1 10 45 120 210 252 210 120 45 10 , 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param blurBorder
-/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
-/// borders up to half-kernel width are ignored (e.g. 5 pixel in the 11x11
-/// case).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian11x11u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- int blurBorder );
-
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Blurs an image with 11x11 Gaussian filter
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterGaussian11x11u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterGaussian11x11u8,
-/// \a fcvFilterGaussian11x11u8_v2 will be removed, and the current signature
-/// for \a fcvFilterGaussian11x11u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterGaussian11x11u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Convolution with 11x11 Gaussian kernel:
-/// \n 1 10 45 120 210 252 210 120 45 10 1
-/// \n 10 100 450 1200 2100 2520 2100 1200 450 100 10
-/// \n 45 450 2025 5400 9450 11340 9450 5400 2025 450 45
-/// \n 120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
-/// \n 210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
-/// \n 252 2520 11340 30240 52920 63504 52920 30240 11340 2520 252
-/// \n 210 2100 9450 25200 44100 52920 44100 25200 9450 2100 210
-/// \n 120 1200 5400 14400 25200 30240 25200 14400 5400 1200 120
-/// \n 45 450 2025 5400 9450 11340 9450 5400 2025 450 45
-/// \n 10 100 450 1200 2100 2520 2100 1200 450 100 10
-/// \n 1 10 45 120 210 252 210 120 45 10 , 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param blurBorder
-/// If set to 1, border is blurred by 0-padding adjacent values. If set to 0,
-/// borders up to half-kernel width are ignored (e.g. 5 pixel in the 11x11
-/// case).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian11x11u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int blurBorder );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YUV (YCrCb) 4:2:0 PesudoPlanar (Interleaved) to RGB 8888.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvColorYCrCb420PseudoPlanarToRGB8888u8. In the 2.0.0 release,
-/// the signature of fcvColorYUV420toRGB8888u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// 8-bit image of input YUV 4:2:0 values.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// The input are one Y plane followed by one interleaved and 2D (both
-/// horizontally and vertically) sub-sampled CrCb plane:
-/// Y plane : Y00 Y01 Y02 Y03 ...
-/// Y10 Y11 Y12 Y13 ...
-/// Interleaved and 2D sub-sampled plane: Cr0 Cb0 Cr1 Cb1 ...
-///
-/// @param dst
-/// 32-bit image of output RGB 8888 values. R is at LSB.
-/// \n\b WARNING: size must match input yuv420.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYUV420toRGB8888u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint32_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YUV (YCrCb) 4:2:0 PesudoPlanar (Interleaved CrCb) to RGB 888.
-///
-/// \n\b ATTENTION: The name of this function will be changed when the 2.0.0 release
-/// of this library is made.
-/// Until 2.0.0, the developer should use this implementation with the expectation of
-/// moving to a different name when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// 8-bit image of input YUV picture.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// The input are one Y plane followed by one interleaved and 2D (both
-/// horizontally and vertically) sub-sampled CrCb plane:
-/// Y plane : Y00 Y01 Y02 Y03 ...
-/// Y10 Y11 Y12 Y13 ...
-/// Interleaved and 2D sub-sampled plane: Cr0 Cb0 Cr1 Cb1 ...
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcYStride
-/// Stride (in bytes) of input image Y component (i.e., number of bytes between
-/// column 0 of row 1 and column 0 of row 2).
-/// \n\b WARNING: Must be multiple of 8 (8 * 1-byte values).
-///
-/// @param srcCStride
-/// Stride (in bytes) of input image Chroma component (i.e., number of bytes between
-/// column 0 of row 1 and column 0 of row 2)
-/// \n\b WARNING: Must be multiple of 4 (4 * 1-byte values).
-///
-/// @param dst
-/// 32-bit image of output RGB 8888 values. R in LSB.
-/// \n\b WARNING: size must match input yuv420.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output RGB image (i.e., number of bytes between column 0 of
-/// row 1 and column 0 of row 2)
-/// \n\b WARNING: Must be multiple of 32 (8 * 4-byte values).
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYCrCb420PseudoPlanarToRGB8888u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcYStride,
- unsigned int srcCStride,
- uint32_t* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YUV (YCbCr) 4:2:0 PesudoPlanar (Interleaved CbCr) to RGB 565.
-///
-/// \n\b ATTENTION: The name of this function will be changed when the 2.0.0 release
-/// of this library is made.
-/// Until 2.0.0, the developer should use this implementation with the expectation of
-/// moving to a different name when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// 8-bit image of input YUV 4:2:0 values.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// The input are one Y plane followed by one interleaved and 2D (both
-/// horizontally and vertically) sub-sampled CbCr plane:
-/// Y plane : Y00 Y01 Y02 Y03 ...
-/// Y10 Y11 Y12 Y13 ...
-/// Interleaved and 2D sub-sampled plane: Cb0 Cr0 Cb1 Cr1 ...
-///
-/// @param dst
-/// 16-bit image of output RGB 565 values. R in LSBs.
-/// 2 pixels are packed into one 32-bit output
-/// \n\b WARNING: size must match input yuv420.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: Must be multiple of 4
-///
-/// @param srcHeight
-/// Image height.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYUV420toRGB565u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint32_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YCbCr H1V1 to RGB 888.
-///
-/// @details
-/// Color conversion from YCbCr H1V1 (YCbCr 4:4:4 planar) to RGB 888.
-/// \n R = Y + 1.40200*(Cr-128)
-/// \n G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)
-/// \n B = Y + 1.77200*(CB-128)
-///
-/// @param src
-/// 8-bit image of input values. Stored as YCbCr H1V1 planar format in 8x8 blocks for Y,Cb,Cr.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: Must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// 8-bit image of output RGB 888 values. R in LSB.
-/// \n\b WARNING: size must match input crcb.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYCrCbH1V1toRGB888u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YCbCr H2V2 to RGB 888.
-///
-/// @details
-/// Color conversion from YCbCr H2V2 (YCbCr 4:2:0 planar) to RGB 888.
-/// \n R = Y + 1.40200*(Cr-128)
-/// \n G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)
-/// \n B = Y + 1.77200*(CB-128)
-///
-/// @param ysrc
-/// 8-bit input values. Stored as YCbCr H2V2 planar format in 16x16 blocks for Y, 8x8 blocks for Cb, Cr.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: Must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// 8-bit image of output RGB 888 values. R in LSB.
-/// \n\b WARNING: size must match input crcb.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYCrCbH2V2toRGB888u8( const uint8_t* __restrict ysrc,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YCbCr H2V1 to RGB 888.
-///
-/// @details
-/// Color conversion from YCbCr H2V1 (YCbCr 4:2:2) to RGB 888.
-/// \n R = Y + 1.40200*(Cr-128)
-/// \n G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)
-/// \n B = Y + 1.77200*(CB-128)
-///
-/// @param src
-/// 8-bit input values. Stored as YCbCr H2V1 planar format in 16x8 blocks for Y, 8x8 blocks for Cb, Cr.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: Must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// 8-bit image of output RGB 888 values. R in LSB.
-/// \n\b WARNING: size must match input crcb.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYCrCbH2V1toRGB888u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from YCbCr H1V2 to RGB 888.
-///
-/// @details
-/// Color conversion from YCbCr H1V2 (YCbCr 4:2:2) to RGB 888.
-/// \n R = Y + 1.40200*(Cr-128)
-/// \n G = Y - 0.34414*(Cb-128) - 0.71414*(Cr-128)
-/// \n B = Y + 1.77200*(CB-128)
-///
-/// @param ysrc
-/// 8-bit input values. Stored as YCbCr H1V2 planar format in 8x16 blocks for Y, 8x8 blocks for Cb, Cr.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: Must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// 8-bit image of output RGB 888 values. R in LSB.
-/// \n\b WARNING: size must match input crcb.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorYCrCbH1V2toRGB888u8( const uint8_t* __restrict ysrc,
-
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from RGB 888 to YCrCb.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvColorRGB888toYCrCbu8_v2(). In the 2.0.0 release,
-/// fcvColorRGB888toYCrCbu8_v2 will be renamed to fcvColorRGB888toYCrCbu8
-/// and the signature of fcvColorRGB888toYCrCbu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Color conversion from RGB 888 to YCrCb 4:4:4 interleaved.
-///
-/// @param src
-/// 8-bit input values.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: Must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// 8-bit output values. Stored as Y, Cr, Cb interleaved format.
-/// \n\b WARNING: size must match input crcb.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorRGB888toYCrCbu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Color conversion from RGB 888 to YCrCb 4:4:4 (Full interleaved, similar to
-/// 3-channel RGB).
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvColorRGB888toYCrCbu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvColorRGB888toYCrCbu8,
-/// \a fcvColorRGB888toYCrCbu8_v2 will be removed, and the current signature
-/// for \a fcvColorRGB888toYCrCbu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvColorRGB888toYCrCbu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Color conversion from RGB 888 to YCrCb 4:4:4 interleaved.
-///
-/// @param src
-/// 8-bit input values.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: Must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b WARNING: Must be at least 3*srcWidth.
-///
-/// @param dst
-/// 8-bit output values. Stored as Y, Cr, Cb interleaved format.
-/// \n\b WARNING: size must match input crcb.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b WARNING: Must be at least 3*srcWidth.
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvColorRGB888toYCrCbu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Create a 36-dimension gradient based descriptor on 17x17 patch.
-///
-/// @details
-///
-/// @param patch
-/// Input luminance data for 17x17 patch to describe.
-///
-/// @param descriptorChar
-/// Output descriptor vector. 36 x 8-bit vector. Normalized and quantized to range [-127, 127]
-///
-/// @param descriptorNormSq
-/// Output squared norm (L2 norm) of the descriptor vector.
-///
-///
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvDescriptor17x17u8To36s8( const uint8_t* __restrict patch,
- int8_t* __restrict descriptorChar,
- int32_t* __restrict descriptorNormSq );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 8-bit vectors.
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @param abSize
-/// Number of elements in A and B.
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API int32_t
-fcvDotProducts8( const int8_t* __restrict a,
- const int8_t* __restrict b,
- unsigned int abSize );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 8-bit vectors.
-///
-/// @param a
-/// Vector A.
-///
-/// @param b
-/// Vector B.
-///
-/// @param abSize
-/// Number of elements in A and B.
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvDotProductu8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- unsigned int abSize );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 36-byte vectors.
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API int32_t
-fcvDotProduct36x1s8( const int8_t* __restrict a,
- const int8_t* __restrict b );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of one 36-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b,c,d,e):\n
-/// , , ,
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @param c
-/// Vector.
-///
-/// @param d
-/// Vector.
-///
-/// @param e
-/// Vector.
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct36x4s8( const int8_t* __restrict a,
- const int8_t* __restrict b,
- const int8_t* __restrict c,
- const int8_t* __restrict d,
- const int8_t* __restrict e,
- int32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalized dot product of one 36-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):\n
-/// , , ,
-/// using their given inverse lengths for normalization.
-///
-/// @param a
-/// Vector.
-///
-/// @param invLengthA
-/// Inverse of vector A.
-///
-/// @param b0
-/// Vector.
-///
-/// @param b1
-/// Vector.
-///
-/// @param b2
-/// Vector.
-///
-/// @param b3
-/// Vector.
-///
-/// @param invLengthsB
-/// Pointer to an array of the inverse values of each B vector.
-/// The pointer must point to 4 floating point values.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProductNorm36x4s8( const int8_t* __restrict a,
- float invLengthA,
- const int8_t* __restrict b0,
- const int8_t* __restrict b1,
- const int8_t* __restrict b2,
- const int8_t* __restrict b3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 36-byte vectors.
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvDotProduct36x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of one 36-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b,c,d,e):\n
-/// , , ,
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @param c
-/// Vector.
-///
-/// @param d
-/// Vector.
-///
-/// @param e
-/// Vector.
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct36x4u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- const uint8_t* __restrict e,
- uint32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalized dot product of one 36-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):\n
-/// , , ,
-/// using their given inverse lengths for normalization.
-///
-/// @param a
-/// Vector.
-///
-/// @param invLengthA
-/// Inverse of vector A.
-///
-/// @param b0
-/// Vector.
-///
-/// @param b1
-/// Vector.
-///
-/// @param b2
-/// Vector.
-///
-/// @param b3
-/// Vector.
-///
-/// @param invLengthsB
-/// Pointer to an array of the inverse values of each B vector.
-/// The pointer must point to 4 floating point values.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProductNorm36x4u8( const uint8_t* __restrict a,
- float invLengthA,
- const uint8_t* __restrict b0,
- const uint8_t* __restrict b1,
- const uint8_t* __restrict b2,
- const uint8_t* __restrict b3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 64-byte vectors.
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API int32_t
-fcvDotProduct64x1s8( const int8_t* __restrict a,
- const int8_t* __restrict b );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of one 64-byte vector against 4 others.
-///
-/// @details
-/// Dot product of vector (a) against 4 others (b,c,d,e):\n
-/// , , ,
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param c
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param d
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param e
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct64x4s8( const int8_t* __restrict a,
- const int8_t* __restrict b,
- const int8_t* __restrict c,
- const int8_t* __restrict d,
- const int8_t* __restrict e,
- int32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalized dot product of one 64-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):\n
-/// , , ,
-/// using their given inverse lengths for normalization.
-///
-/// @param a
-/// Vector.
-///
-/// @param invLengthA
-/// Inverse of vector A.
-///
-/// @param b0
-/// Vector.
-///
-/// @param b1
-/// Vector.
-///
-/// @param b2
-/// Vector.
-///
-/// @param b3
-/// Vector.
-///
-/// @param invLengthsB
-/// Pointer to an array of the inverse values of each B vector.
-/// The pointer must point to 4 floating point values.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProductNorm64x4s8( const int8_t* __restrict a,
- float invLengthA,
- const int8_t* __restrict b0,
- const int8_t* __restrict b1,
- const int8_t* __restrict b2,
- const int8_t* __restrict b3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 64-byte vectors.
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvDotProduct64x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of one 64-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b,c,d,e):\n
-/// , , ,
-///
-/// @param a
-/// Vector.
-///
-/// @param b
-/// Vector.
-///
-/// @param c
-/// Vector.
-///
-/// @param d
-/// Vector.
-///
-/// @param e
-/// Vector.
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct64x4u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- const uint8_t* __restrict e,
- uint32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalized dot product of one 64-byte vector against 4 others.
-///
-/// @details
-/// Dot product of 36-byte vector (a) against 4 others (b0,b1,b2,b3):\n
-/// , , ,
-/// using their given inverse lengths for normalization.
-///
-/// @param a
-/// Vector.
-///
-/// @param invLengthA
-/// Inverse of vector A.
-///
-/// @param b0
-/// Vector.
-///
-/// @param b1
-/// Vector.
-///
-/// @param b2
-/// Vector.
-///
-/// @param b3
-/// Vector.
-///
-/// @param invLengthsB
-/// Pointer to an array of the inverse values of each B vector.
-/// The pointer must point to 4 floating point values.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProductNorm64x4u8( const uint8_t* __restrict a,
- float invLengthA,
- const uint8_t* __restrict b0,
- const uint8_t* __restrict b1,
- const uint8_t* __restrict b2,
- const uint8_t* __restrict b3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 128-byte vectors.
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API int32_t
-fcvDotProduct128x1s8( const int8_t* __restrict a,
- const int8_t* __restrict b );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Dot product of one 128-byte vector against 4 others.
-///
-/// @details
-/// Dot product of vector (a) against 4 others (b,c,d,e):\n
-/// , , ,
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param c
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param d
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param e
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct128x4s8( const int8_t* __restrict a,
- const int8_t* __restrict b,
- const int8_t* __restrict c,
- const int8_t* __restrict d,
- const int8_t* __restrict e,
- int32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalized dot product of one 128-byte vector against 4 others.
-///
-/// @details
-/// Dot product of vector (a) against 4 others (b0,b1,b2,b3):\n
-/// , , ,
-/// using their given inverse lengths for normalization.
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLengthA
-/// Inverse of vector A.
-///
-/// @param b0
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b1
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b2
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b3
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLengthsB
-/// Pointer to an array of the inverse values of each B vector.
-/// The pointer must point to 4 floating point values.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProductNorm128x4s8( const int8_t* __restrict a,
- float invLengthA,
- const int8_t* __restrict b0,
- const int8_t* __restrict b1,
- const int8_t* __restrict b2,
- const int8_t* __restrict b3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of two 128-byte vectors.
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @return
-/// Dot product .
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvDotProduct128x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of one 128-byte vector against 4 others.
-///
-/// @details
-/// Dot product of vector (a) against 4 others (b,c,d,e):\n
-/// , , ,
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param c
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param d
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param e
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct128x4u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- const uint8_t* __restrict e,
- uint32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Normalized dot product of one 128-byte vector against 4 others.
-///
-/// @details
-/// Dot product of vector (a) against 4 others (b0,b1,b2,b3):\n
-/// , , ,
-/// using their given inverse lengths for normalization.
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLengthA
-/// Inverse of vector A.
-///
-/// @param b0
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b1
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b2
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b3
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLengthsB
-/// Pointer to an array of the inverse values of each B vector.
-/// The pointer must point to 4 floating point values.
-///
-/// @param dotProducts
-/// Output of the 4 results { , , , }.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProductNorm128x4u8( const uint8_t* __restrict a,
- float invLengthA,
- const uint8_t* __restrict b0,
- const uint8_t* __restrict b1,
- const uint8_t* __restrict b2,
- const uint8_t* __restrict b3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of 1 patch (8x8 byte square) with several (n) 8x8 squares
-/// along a line of pixels in an image.
-///
-/// @param patchPixels
-/// Pointer to 8-bit patch pixel values linearly laid out in memory.
-///
-/// @param imagePixels
-/// Pointer to 8-bit image pixel values linearly laid out in memory.
-///
-/// @param imgW
-/// Width in pixels of the source image.
-///
-/// @param imgH
-/// Height in pixels of the source image.
-///
-/// @param nX
-/// X location on image of starting search pixel.
-///
-/// @param nY
-/// Y location on image of starting search pixel.
-///
-/// @param nNum
-/// Number of pixels (in X direction) on image to sweep.
-///
-/// @param dotProducts
-/// Output dot product values of nNum pixels.
-/// \n\b WARNING: array size must be a multiple of 4 (e.g., 4, 8, 12, ...)
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct8x8u8( const uint8_t* __restrict patchPixels,
- const uint8_t* __restrict imagePixels,
- unsigned short imgW,
- unsigned short imgH,
- int nX,
- int nY,
- unsigned int nNum,
- int32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dot product of 1 patch (8x8 byte square) with 8x8 squares in 11x12
-/// rectangle around the center search pixel (iX,iY).
-///
-/// @param patchPixels
-/// Pointer to 8-bit patch pixel values linearly laid out in memory.
-///
-/// @param imagePixels
-/// Pointer to 8-bit image pixel values linearly laid out in memory.
-///
-/// @param imgW
-/// Width in pixels of the image.
-///
-/// @param imgH
-/// Height in pixels of the image.
-///
-/// @param iX
-/// X location on image of the center of the search window.
-///
-/// @param iY
-/// Y location on image of the center of the search window.
-///
-/// @param dotProducts
-/// Output 11x12 dot product values.
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @ingroup math_vector
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvDotProduct11x12u8( const uint8_t* __restrict patchPixels,
- const uint8_t* __restrict imagePixels,
- unsigned short imgW,
- unsigned short imgH,
- int iX,
- int iY,
- int32_t* __restrict dotProducts );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 3x3 Sobel edge filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterSobel3x3u8_v2(). In the 2.0.0 release,
-/// fcvFilterSobel3x3u8_v2 will be renamed to fcvFilterSobel3x3u8
-/// and the signature of fcvFilterSobel3x3u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// This function calculates an image derivative by convolving the image with an appropriate 3x3 kernel.
-/// Border values are ignored. The 3x3 mask convolves with the image area
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: data must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: dst is saturated to 255
-/// \n\b WARNING: data must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterSobel3x3u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 3x3 Sobel edge filter
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterSobel3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterSobel3x3u8,
-/// \a fcvFilterSobel3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterSobel3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterSobel3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// This function calculates an image derivative by convolving the image with an appropriate 3x3 kernel.
-/// Border values are ignored. The 3x3 mask convolves with the image area
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: data must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: dst is saturated to 255
-/// \n\b WARNING: data must be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as dstWidth if not 0.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterSobel3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Canny edge filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCanny3x3u8_v2(). In the 2.0.0 release,
-/// fcvFilterCanny3x3u8_v2 will be renamed to fcvFilterCanny3x3u8
-/// and the signature of fcvFilterCanny3x3u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Canny edge detector applied to a 8 bit grayscale image. The min threshold
-/// is set to 0 and the max threshold is set to 15. The aperture size used
-/// is set to 3. This function will output the edge, since its working with a
-/// 3x3 window, it leaves one row/col of pixels at the corners
-/// map stored as a binarized image (0x0 - not an edge, 0xFF - edge).
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: data must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit image containing the edge detection results.
-/// Size of buffer is srcWidth*srcHeight bytes.
-///
-/// @param lowThresh
-/// For all the intermediate pixels along the edge, the magnitude of the
-/// gradient at the pixel locations should be greater than 'low'
-/// (sqrt(gx^2 + gy^2) > low, where gx and gy are X and Y gradient)
-///
-/// @param highThresh
-/// For an edge starting point, i.e. either the first or last
-/// pixel of the edge, the magnitude of the gradient at the pixel should be
-/// greater than 'high' (sqrt(gx^2 + gy^2) > high, where gx and gy are X and
-/// Y gradient).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCanny3x3u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- int lowThresh,
- int highThresh );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Canny edge filter
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterCanny3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCanny3x3u8,
-/// \a fcvFilterCanny3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterCanny3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCanny3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Canny edge detector applied to a 8 bit grayscale image. The Canny edge
-/// detector uses min/max threshold to classify an edge. The min threshold
-/// is set to 0 and the max threshold is set to 15. The aperture size used
-/// in the Canny edge detector will be same as the filter footprint in the
-/// Sobel edge detector and is set to 3. This function will output the edge
-/// map stored as a binarized image (0x0 - not an edge, 0xFF - edge), since
-/// it works with 3x3 windows, it leaves 1 row/col of pixels at the corners.
-/// | a(1,1) , a12, ..., a(1,srcWidth-2) |\n
-/// | ... , ..., ..., ... |\n
-/// | a(srcHeight-2,1), ..., ..., a1(srcHeight-2,srcWidth-2) |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: data must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image containing the edge detection results.
-/// Size of buffer is dstStride*srcHeight bytes.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as dstWidth if not 0.
-///
-/// @param lowThresh
-/// For all the intermediate pixels along the edge, the magnitude of the
-/// gradient at the pixel locations should be greater than 'low'
-/// (sqrt(gx^2 + gy^2) > low, where gx and gy are X and Y gradient)
-///
-/// @param highThresh
-/// For an edge starting point, i.e. either the first or last
-/// pixel of the edge, the magnitude of the gradient at the pixel should be
-/// greater than 'high' (sqrt(gx^2 + gy^2) > high, where gx and gy are X and
-/// Y gradient).
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCanny3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int lowThresh,
- int highThresh );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs image difference by subracting src2 from src1. dst=src1-src2.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageDiffu8_v2(). In the 2.0.0 release,
-/// fcvImageDiffu8_v2 will be renamed to fcvImageDiffu8
-/// and the signature of fcvImageDiffu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// dst[i,j] = (uint8_t) max( min((short)(src1[i,j]-src2[i,j]), 255), 0 );
-///
-/// @param src1
-/// First source image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param src2
-/// Second source image, must be same size as src1.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Destination. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: Must be same size as src1 and src2.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageDiffu8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs image difference by subracting src2 from src1. dst=src1-src2.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvImageDiffu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageDiffu8,
-/// \a fcvImageDiffu8_v2 will be removed, and the current signature
-/// for \a fcvImageDiffu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageDiffu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// dst[i,j] = (uint8_t) max( min((short)(src1[i,j]-src2[i,j]), 255), 0 );
-///
-/// @param src1
-/// First source image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param src2
-/// Second source image, must be same size as src1.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Destination. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: Must be same size as src1 and src2.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as dstWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as dstWidth if not 0.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageDiffu8_v2( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-
-//--------------------------------------------------------------------------
-/// @brief
-/// Compute image difference src1-src2
-///
-/// @param src1
-/// Input image1 of int16 type. Size of buffer is srcStride*srcHeight*2 bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param src2
-/// Input image2, must have same size as src1
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-/// \n\b WARNING: must be multiple of 8
-///
-/// @param srcHeight
-/// Input image height
-///
-/// @param srcStride
-/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output image, saturated for int16 type. Size of buffer is dstStride*srcHeight*2 bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @ingroup image_processing
-////------------------------------------------------------------------------
-FASTCV_API void
-fcvImageDiffs16( const int16_t* __restrict src1,
- const int16_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dst,
- unsigned int dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs image difference by subracting src2 from src1. dst=src1-src2.
-///
-/// @details
-///
-/// @param src1
-/// First source image. Size of buffer is srcStride*srcHeight*4 bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param src2
-/// Second source image, must be same size as src1.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Destination. Size of buffer is dstStride*srcHeight*4 bytes.
-/// \n\b NOTE: Must be same size as src1 and src2.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageDifff32( const float* __restrict src1,
- const float* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs image difference by promoting both src1 and src 2 to
-/// floating point values and then subracting src2 from src1. dst=src1-src2.
-///
-/// @details
-///
-/// @param src1
-/// First source image
-///
-/// @param src2
-/// Second source image, must be same size as src1.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param dst
-/// Destination image in float type
-/// \n\b NOTE: Must be same size as src1 and src2.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageDiffu8f32( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs image difference by subracting src2 from src1.
-/// dst = ( src1 >> 1) - ( src2 >> 1).
-///
-/// @details
-///
-/// @param src1
-/// First source image
-///
-/// @param src2
-/// Second source image, must be same size as src1.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of input image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param dst
-/// Destination image in int8 type
-/// \n\b NOTE: Must be same size as src1 and src2.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageDiffu8s8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int8_t* __restrict dst,
- unsigned int dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientInterleaveds16_v2(). In the 2.0.0 release,
-/// fcvImageGradientInterleaveds16_v2 will be renamed to fcvImageGradientInterleaveds16
-/// and the signature of fcvImageGradientInterleaveds16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param gradients
-/// Buffer to store gradient. Must be 2*(width-1)*(height-1) in size.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientInterleaveds16( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients
- );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvImageGradientInterleaveds16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientInterleaveds16,
-/// \a fcvImageGradientInterleaveds16_v2 will be removed, and the current signature
-/// for \a fcvImageGradientInterleaveds16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientInterleaveds16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param gradients
-/// Buffer to store gradient. Must be 2*(width-1)*(height-1) in size.
-///
-/// @param gradStride
-/// Stride in bytes of the interleaved gradients array.
-/// \n\b NOTE: if 0, srcStride is set as 4*(srcWidth-2).
-/// \n\b WARNING: must be multiple of 16 ( 8 * 2-byte values ), and at least as much as 4*(srcWidth-2) if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientInterleaveds16_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients,
- unsigned int gradStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Function to initialize MSER. To invoke MSER functionality, 3 functions have to be called:
-/// fcvMserInit, fcvMseru8, fcvMserRelease.
-///
-/// Heris the typical usage:
-///
-/// void *mserHandle;
-/// if (fcvMserInit (width,........,&mserHandle))
-/// {
-/// fcvmseru8 (mserHandle,...);
-/// fcvRelease(mserHandle);
-/// }
-///
-///
-/// @param width Width of the image for which MSER has to be done.
-/// @param height Height of the image for which MSER has to be done.
-/// @param delta Delta to be used in MSER algorithm (the difference in grayscale
-/// values within which the region is stable ).
-/// Typical value range [0.8 8], typical value 2
-/// @param minArea Minimum area (number of pixels) of a mser contour.
-/// Typical value range [10 50], typical value 30
-/// @param maxArea Maximum area (number of pixels) of a mser contour.
-/// Typical value 14400 or 0.25*width*height
-/// @param maxVariation Maximum variation in grayscale between 2 levels allowed.
-/// Typical value range [0.1 1.0], typical value 0.15
-/// @param minDiversity Minimum diversity in grayscale between 2 levels allowed.
-/// Typical value range [0.1 1.0], typical value 0.2
-/// @param mserHandle Return value: the mserHandle to be used in subsequent calls.
-///
-/// @return int 1 if mserInit is successful, if 0, mserHandle is invalid.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API int
-fcvMserInit(const unsigned int width,
- const unsigned int height,
- unsigned int delta,
- unsigned int minArea ,
- unsigned int maxArea ,
- float maxVariation ,
- float minDiversity , void ** mserHandle );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Function to release MSER resources.
-///
-///
-///
-/// @param mserHandle Handle to be used to free up MSER resources.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvMserRelease(void *mserHandle);
-
-///---------------------------------------------------------------------------
-/// @brief
-/// Function to invoke MSER.
-///
-/// \n\b ATTENTION: The signature of this function will be changed to reduce complexity
-/// and memory usage when the 2.0.0 release of this library is made.
-/// Until 2.0.0, the developer should use this implementation with the expectation of
-/// moving to a different signature when transitioning to 2.0.0.
-/// \n\n
-///
-///
-/// @param mserHandle The MSER Handle returned by init.
-/// @param srcPtr Pointer to an image array (unsigned char ) for which MSER has to be done.
-/// @param srcWidth Width of the source image.
-/// @param srcHeight Height of the source image.
-/// @param srcStride Stride of the source image.
-/// @param maxContours Maximum contours that will be returned. Must be set to 2x the maximum contours.
-/// @param numContours Output, Number of MSER contours in the region.
-/// @param numPointsInContour Output, Number of points in each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller.
-/// @param pointsArraySize Size of the output points Array.
-/// Typical size: (# of pixels in source image) * 30
-/// @param pointsArray Output. This is the points in all the contours. This is a linear array, whose memory
-/// has to be allocated by the caller.
-/// Typical allocation size: pointArraySize
-/// pointsArray[0...numPointsInContour[0]-1] defines the first MSER region,
-/// pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region
-/// and so on.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvMseru8( void *mserHandle,
- const uint8_t* __restrict srcPtr,unsigned int srcWidth,
- unsigned int srcHeight, unsigned int srcStride,
- unsigned int maxContours,
- unsigned int * __restrict numContours, unsigned int * __restrict numPointsInContour ,
- unsigned int pointsArraySize,
- unsigned int* __restrict pointsArray
- );
-
-///---------------------------------------------------------------------------
-/// @brief
-/// Function to invoke MSER, with additional outputs for each contour.
-///
-/// \n\b ATTENTION: The signature of this function will be changed to reduce complexity
-/// and memory usage when the 2.0.0 release of this library is made.
-/// Until 2.0.0, the developer should use this implementation with the expectation of
-/// moving to a different signature when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param mserHandle The MSER Handle returned by init.
-/// @param srcPtr Pointer to an image array (unsigned char ) for which MSER has to be done.
-/// @param srcWidth Width of the source image.
-/// @param srcHeight Height of the source image.
-/// @param srcStride Stride of the source image.
-/// @param maxContours Maximum contours that will be returned. Need to be set to 2x the maximum contours.
-/// Application dependent. OCR usually requires 100-1000 contours
-/// Segmentation usually requires 50-100
-/// @param numContours Output, Number of MSER contours in the region.
-/// @param numPointsInContour Output, Number of points in each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller.
-/// @param pointsArraySize Size of the output points Array.
-/// Typical size: (# of pixels in source image)*30
-/// @param pointsArray Output. This is the points in all the contours. This is a linear array, whose memory
-/// has to be allocated by the caller.
-/// Typical allocation size: pointArraySize
-/// pointsArray[0...numPointsInContour[0]-1] defines the first MSER region;
-/// pointsArray[numPointsInContour[0] .. numPointsInContour[1]-1] defines 2nd MSER region
-/// and so on.
-/// @param contourVariation Output, Variation for each contour from previous grey level.
-/// This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours.
-/// @param contourPolarity Output, Polarity for each contour. This value is 1 if this is a MSER+ region,
-/// -1 if this is a MSER- region. . This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours.
-/// @param contourNodeId Output, Node id for each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours
-/// @param contourNodeCounter Output, Node counter for each contour. This will have values filled up
-/// for the first (*numContours) values. This memory has to be allocated by
-/// the caller with size of maxContours.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvMserExtu8( void *mserHandle,
- const uint8_t* __restrict srcPtr,unsigned int srcWidth,
- unsigned int srcHeight, unsigned int srcStride,
- unsigned int maxContours,
- unsigned int * __restrict numContours, unsigned int * __restrict numPointsInContour ,
- unsigned int* __restrict pointsArray, unsigned int pointsArraySize,
- unsigned int * __restrict contourVariation,
- int * __restrict contourPolarity,
- unsigned int * __restrict contourNodeId,
- unsigned int * __restrict contourNodeCounter
- );
-
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientInterleavedf32_v2(). In the 2.0.0 release,
-/// fcvImageGradientInterleavedf32_v2 will be renamed to fcvImageGradientInterleavedf32
-/// and the signature of fcvImageGradientInterleavedf32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param gradients
-/// Buffer to store gradient. Must be 2*(width-1)*(height-1) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientInterleavedf32( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvImageGradientInterleavedf32() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientInterleavedf32,
-/// \a fcvImageGradientInterleavedf32_v2 will be removed, and the current signature
-/// for \a fcvImageGradientInterleavedf32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientInterleavedf32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param gradients
-/// Buffer to store gradient. Must be 2*(width-1)*(height-1) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param gradStride
-/// Stride (in bytes) of the interleaved gradients array.
-/// \n\b NOTE: if 0, srcStride is set as (srcWidth-2)*2*sizeof(float).
-/// \n\b WARNING: must be multiple of 32 ( 8 * 4-byte values ), and at least as much as 8 * srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientInterleavedf32_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients,
- unsigned int gradStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientPlanars16_v2(). In the 2.0.0 release,
-/// fcvImageGradientPlanars16_v2 will be renamed to fcvImageGradientPlanars16
-/// and the signature of fcvImageGradientPlanars16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (srcWidth)*(srcHeight) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (srcWidth)*(srcHeight) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientPlanars16( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvImageGradientPlanars16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientPlanars16,
-/// \a fcvImageGradientPlanars16_v2 will be removed, and the current signature
-/// for \a fcvImageGradientPlanars16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientPlanars16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (srcWidth)*(srcHeight) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (srcWidth)*(srcHeight) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' arrays.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 16 (8 * 2-bytes per gradient value), and at least as much as srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientPlanars16_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- unsigned int dxyStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientPlanarf32_v2(). In the 2.0.0 release,
-/// fcvImageGradientPlanarf32_v2 will be renamed to fcvImageGradientPlanarf32
-/// and the signature of fcvImageGradientPlanarf32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientPlanarf32( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dx,
- float* __restrict dy );
-
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Creates 2D gradient from source illuminance data.
-/// This function considers only the left/right neighbors
-/// for x-gradients and top/bottom neighbors for y-gradients.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvImageGradientPlanarf32() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientPlanarf32,
-/// \a fcvImageGradientPlanarf32_v2 will be removed, and the current signature
-/// for \a fcvImageGradientPlanarf32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientPlanarf32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (srcWidth)*(srcHeight) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (srcWidth)*(srcHeight) in size.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride of Gradient values ('dx' and 'dy' arrays) measured in bytes.
-/// \n\b NOTE: if 0, srcStride is set as 4*srcWidth.
-/// \n\b WARNING: must be multiple of 32 (8 * 4-bytes per gradient value), and at least as much as 4*srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientPlanarf32_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dx,
- float* __restrict dy,
- unsigned int dxyStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners from the image. This function tests the whole image
-/// for corners (apart from the border). FAST-9 looks for continuous segments on the
-/// pixel ring of 9 pixels or more.
-///
-/// @param src
-/// Pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-/// \n\b WARNING: must be a multiple of 8.
-/// \n\b WARNING: must be <= 2048.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If 0 is passed, srcStride is set to width.
-/// \n\b WARNING: must be a multiple of 8.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n e.g. struct { int x, y; } xy;
-/// \n\b WARNING: must be 128-bit aligned.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @return
-/// 0 if successful.
-///
-///
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast9u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners from the image. This function takes a bit mask so
-/// that only image areas masked with '0' are tested for corners (if these
-/// areas are also not part of the border). FAST-9 looks for continuous segments on the
-/// pixel ring of 9 pixels or more.
-///
-/// @param src
-/// pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// image width
-/// \n\b WARNING: must be <= 2048.
-/// \n\b WARNING: must be a multiple of 8.
-///
-/// @param srcHeight
-/// image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: must be a multiple of 8. If left at 0 srcStride is default to srcWidth.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n\b WARNING: must be 128-bit aligned.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of corners
-/// is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param mask
-/// Per-pixel mask for each pixel represented in input image.
-/// If a bit set to 0, pixel will be a candidate for corner detection.
-/// If a bit set to 1, pixel will be ignored.
-///
-/// @param maskWidth
-/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param maskHeight
-/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @return
-/// 0 if successful.
-///
-///
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast9InMasku8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- unsigned int maskWidth,
- unsigned int maskHeight );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners from the image. This function tests the whole image
-/// for corners (apart from the border). FAST-10 looks for continuous segments on the
-/// pixel ring of 10 pixels or more.
-///
-/// @param src
-/// Pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-/// \n\b WARNING: must be a multiple of 8.
-/// \n\b WARNING: must be <= 2048.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If 0 is passed, srcStride is set to width.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n e.g. struct { int x, y; } xy;
-/// \n\b WARNING: must be 128-bit aligned.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exists when the maximum number of
-/// corners is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @return
-/// 0 if successful.
-///
-///
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast10u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners from the image. This function takes a bit mask so
-/// that only image areas masked with '0' are tested for corners (if these
-/// areas are also not part of the border). FAST-10 looks for continuous segments on the
-/// pixel ring of 10 pixels or more.
-///
-/// @param src
-/// pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// image width
-/// \n\b WARNING: must be <= 2048.
-/// \n\b WARNING: must be a multiple of 8.
-///
-/// @param srcHeight
-/// image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n\b WARNING: must be 128-bit aligned.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exists when the maximum number of corners
-/// is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param mask
-/// Per-pixel mask for each pixel represented in input image.
-/// If a bit set to 0, pixel will be a candidate for corner detection.
-/// If a bit set to 1, pixel will be ignored.
-///
-/// @param maskWidth
-/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param maskHeight
-/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @return
-/// 0 if successful.
-///
-///
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast10InMasku8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- uint32_t maskWidth,
- uint32_t maskHeight );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts Harris corners from the image. This function tests the whole
-/// image for corners (apart from the border).
-///
-/// @param src
-/// Pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-/// \n\b WARNING: must be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n\b WARNING: must be 128-bit aligned.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param threshold
-/// Minimum "Harris Score" or "Harris Corner Response" of a pixel for it to be
-/// regarded as a corner.
-///
-/// @return
-/// 0 if successful.
-///
-///
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerHarrisu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners,
- int threshold );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Local Harris Max applies the Harris Corner algorithm on an 11x11 patch
-/// within an image to determine if a corner is present.
-///
-/// @param src
-/// Pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width
-/// \n\b WARNING: must be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If srcStride == 0, then will use srcWidth.
-///
-/// @param posX
-/// Center X coordinate of the search window
-///
-/// @param posY
-/// Center Y coordinate of the search window
-///
-/// @param maxX
-/// pointer to the X coordinate identified as a corner
-///
-/// @param maxY
-/// pointer to the Y coordinate identified as a corner
-///
-/// @param maxScore
-/// pointer to the Harris score associated with the corner
-///
-/// @return
-/// 0 if no corner is found (maxX, maxY, and maxScore are invalid)
-/// or if posX and/or posY position the patch outside of the range of
-/// the source image.
-/// 1 if a corner is found (maxX, maxY, and maxScore are valid)
-///
-///
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API unsigned int
-fcvLocalHarrisMaxu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- unsigned int posX,
- unsigned int posY,
- unsigned int *maxX,
- unsigned int *maxY,
- int *maxScore);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Extracts Harris corners from the image. This function takes a bit mask so
-/// that only image areas masked with '0' are tested for corners (if these
-/// areas are also not part of the border).
-///
-/// @param src
-/// pointer to grayscale image with one byte per pixel
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// image width
-/// \n\b WARNING: must be a multiple of 8.
-///
-/// @param srcHeight
-/// image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// pointer to the output array containing the interleaved x,y position of the
-/// detected corners
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of corners
-/// is exceeded
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param threshold
-/// Minimum "Harris Score" or "Harris Corner Respose" of a pixel for it to be
-/// regarded as a corner.
-///
-/// @param mask
-/// Per-pixel mask for each pixel represented in input image.
-/// If a bit set to 0, pixel will be a candidate for corner detection.
-/// If a bit set to 1, pixel will be ignored.
-///
-/// @param maskWidth
-/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param maskHeight
-/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @return
-/// 0 if successful.
-///
-///
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerHarrisInMasku8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners,
- int threshold,
- const uint8_t* __restrict mask,
- unsigned int maskWidth,
- unsigned int maskHeight );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Computes affine trans. for a given set of corresponding features points
-/// using a linear least square colver based on Cholkesky decomposition.
-///
-/// @param corrs
-/// Correspondence data struct containing coords of points in two frames
-///
-/// @param affine
-/// 3 x 3 affine matrix (computed best fit affine transformation)
-///
-/// @ingroup 3D_reconstruction
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvGeomAffineFitf32( const fcvCorrespondences* __restrict corrs,
- float* __restrict affine );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Evaluates specified affine transformation against provided points
-/// correspondences. Checks which correspondence members have a projection
-/// error that is smaller than the given one (maxSquErr).
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param affine
-/// Affine matrix representing relationship between ptTo and ptFrom
-/// correspondences stored as 3x3 floating point matrix formatted as
-/// @todo r0h0, r0h1
-/// Pointer storage must be at least a 9-element floating point array.
-///
-/// @param maxsqerr
-/// Maximum error value squared.
-///
-/// @param inliers
-/// Output array for those indices that passed the test - the array MUST
-/// be able to store numIndices items.
-///
-/// @param numinliers
-/// Output number of corrs that passed the test.
-///
-/// @return
-///
-///
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvGeomAffineEvaluatef32( const fcvCorrespondences* __restrict corrs,
- float* __restrict affine,
- float maxsqerr,
- uint16_t* __restrict inliers,
- int32_t* numinliers );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs cholesky homography fitting on specified points correspondences.
-///
-/// @details
-/// Output precision is within 3e-3
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param homography
-/// 3x3 floating point matrix formatted as @todo r0h0, r0h1
-/// Pointer storage must be at least a 9-element floating point array.
-///
-///
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvGeomHomographyFitf32( const fcvCorrespondences* __restrict corrs,
- float* __restrict homography );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Evaluates specified homography against provided points correspondences.
-/// Check which correspondence members have a projection error that is
-/// smaller than the given one (maxSquErr).
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param homography
-/// Homography representing relationship between ptTo and ptFrom
-/// correspondences stored as 3x3 floating point matrix formatted as
-/// @todo r0h0, r0h1
-/// Pointer storage must be at least a 9-element floating point array.
-///
-/// @param maxsqerr
-/// Maximum error value squared.
-///
-/// @param inliers
-/// Output array for those indices that passed the test - the array MUST
-/// be able to store numIndices items.
-///
-/// @param numinliers
-/// Output number of corrs that passed the test.
-///
-/// @return
-/// 0 that error is less than maximum error, -1 greater or equal to maximum
-/// error.
-///
-///
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvGeomHomographyEvaluatef32( const fcvCorrespondences* __restrict corrs,
- float* __restrict homography,
- float maxsqerr,
- uint16_t* __restrict inliers,
- int32_t* numinliers );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs cholesky pose fitting on specified points correspondences.
-/// Takes a pose and uses the correspondences to refine it using iterative
-/// Gauss-Newton optimization.
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param minIterations
-/// Minimum number of iterations to refine.
-///
-/// @param maxIterations
-/// Maximum number of iterations to refine.
-///
-/// @param stopCriteria
-/// Improvement threshold, iterations stop if improvement is less than this
-/// value.
-///
-/// @param initpose
-/// Pose representing initial pose
-/// correspondences stored as a
-/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
-/// matrix and t is the translation vector. The matrix stored in pose is row
-/// major ordering: \n
-/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
-/// matrix is: \n
-/// | a11, a12, a13 , a14|\n
-/// | a21, a22, a23, a24 |\n
-/// | a31, a32, a33, a34 |\n
-/// Pointer storage must be at least a 12-element floating point array.
-///
-/// @param refinedpose
-/// Pose representing refined pose
-/// correspondences stored as a
-/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
-/// matrix and t is the translation vector. The matrix stored in pose is row
-/// major ordering: \n
-/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
-/// matrix is: \n
-/// | a11, a12, a13 , a14|\n
-/// | a21, a22, a23, a24 |\n
-/// | a31, a32, a33, a34 |\n
-/// Pointer storage must be at least a 12-element floating point array.
-///
-/// @return
-/// Final reprojection error.
-///
-///
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API float
-fcvGeomPoseRefineGNf32( const fcvCorrespondences* __restrict corrs,
- short minIterations,
- short maxIterations,
- float stopCriteria,
- float* initpose,
- float* refinedpose );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Update and compute the differential pose based on the specified points correspondences
-/// This function and fcvGeomPoseOptimizeGNf32
-/// can be used iteratively to perform poseRefine GN.
-///
-/// @param projected
-/// 2D position after projection
-///
-/// @param reprojErr
-/// 2D reprojection error in camera coordinates (not in pixels!)
-///
-/// @param invz
-/// Inverse depth (z)
-///
-/// @param reprojVariance
-/// Reprojection variance in camera coordinates
-///
-/// @param numpts
-/// Number of points
-///
-/// @param pose
-/// Pose representing differential pose
-/// correspondences stored as a
-/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
-/// matrix and t is the translation vector. The matrix stored in pose is row
-/// major ordering: \n
-/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
-/// matrix is: \n
-/// | a11, a12, a13 , a14|\n
-/// | a21, a22, a23, a24 |\n
-/// | a31, a32, a33, a34 |\n
-/// Pointer storage must be at least a 12-element floating point array.
-///
-/// @return
-/// 0 if successfully clustered, otherwise error code
-///
-///
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvGeomPoseUpdatef32(
- const float* __restrict projected,
- const float* __restrict reprojErr,
- const float* __restrict invz,
- const float* __restrict reprojVariance,
- unsigned int numpts,
- float* __restrict pose );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Update the pose based on the specified points correspondences
-/// using Gauss-Newton optimization. This function and fcvGeomPoseEvaluateErrorf32
-/// can be used iteratively to perform poseRefine GN.
-///
-/// @param projected
-/// 2D position after projection
-///
-/// @param reprojErr
-/// 2D reprojection error in camera coordinates (not in pixels!)
-///
-/// @param invz
-/// Inverse depth (z)
-///
-/// @param reprojVariance
-/// Reprojection variance in camera coordinates
-///
-/// @param numpts
-/// Number of points
-///
-/// @param pose
-/// Pose representing updated pose
-/// correspondences stored as a
-/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
-/// matrix and t is the translation vector. The matrix stored in pose is row
-/// major ordering: \n
-/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
-/// matrix is: \n
-/// | a11, a12, a13 , a14|\n
-/// | a21, a22, a23, a24 |\n
-/// | a31, a32, a33, a34 |\n
-/// Pointer storage must be at least a 12-element floating point array.
-///
-/// @return
-/// 0 if successfully clustered, otherwise error code
-///
-///
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvGeomPoseOptimizeGNf32( const float* __restrict projected,
- const float* __restrict reprojErr,
- const float* __restrict invz,
- const float* __restrict reprojVariance,
- unsigned int numpts,
- float* __restrict pose );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Calculate the reprojection error based on the input pose.
-/// This function and fcvGeomPoseOptimizef32 can be used iteratively
-/// to perform poseRefine (GN or LM)..
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param pose
-/// Pose representing updated pose
-/// correspondences stored as a
-/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
-/// matrix and t is the translation vector. The matrix stored in pose is row
-/// major ordering: \n
-/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
-/// matrix is: \n
-/// | a11, a12, a13 , a14|\n
-/// | a21, a22, a23, a24 |\n
-/// | a31, a32, a33, a34 |\n
-/// Pointer storage must be at least a 12-element floating point array.
-///
-/// @param projected
-/// 2D position after projection
-///
-/// @param reprojErr
-/// 2D reprojection error in camera coordinates (not in pixels!)
-///
-/// @param invz
-/// Inverse depth (z)
-///
-/// @param reprojVariance
-/// Reprojection variance in camera coordinates
-///
-/// @return
-/// Reprojection error.
-///
-///
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API float
-fcvGeomPoseEvaluateErrorf32( const fcvCorrespondences* __restrict corrs,
- const float* __restrict pose,
- float* __restrict projected,
- float* __restrict reprojErr,
- float* __restrict invz,
- float* __restrict reprojVariance );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Checks which members have a projection error that is smaller than the
-/// given one.
-///
-/// @param corrs
-/// Pointer to correspondences structure.
-///
-/// @param pose
-/// Pose representing relationship between ptTo and ptFrom
-/// correspondences stored as a
-/// 3x4 transformation matrix in the form [R|t], where R is a 3x3 rotation
-/// matrix and t is the translation vector. The matrix stored in pose is row
-/// major ordering: \n
-/// a11, a12, a13, a14, a21, a22, a23, a24, a31, a32, a33, a34 where the
-/// matrix is: \n
-/// | a11, a12, a13 , a14|\n
-/// | a21, a22, a23, a24 |\n
-/// | a31, a32, a33, a34 |\n
-/// Pointer storage must be at least a 12-element floating point array.
-///
-/// @param maxSquErr
-/// Maximum error value squared.
-///
-/// @param inliers
-/// Output array for those indices that passed the test - the array MUST
-/// be able to store numIndices items.
-///
-/// @param numInliers
-/// Output number of corrs that passed the test.
-///
-/// @return
-/// 0 that error is less than maximum error, -1 greater or equal to maximum
-/// error.
-///
-///
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvGeomPoseEvaluatef32( const fcvCorrespondences* __restrict corrs,
- const float* pose,
- float maxSquErr,
- uint16_t* __restrict inliers,
- uint32_t* numInliers );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Estimates a 6DOF pose
-/// \n\b NOTE: Given the coordinates of three 3D points (in world reference frame),
-/// and their corresponding perspective projections in an image,
-/// this algorithm determines the position and orientation of the camera in
-/// the world reference frame. The function provides up to four solutions
-/// that can be disambiguated using a fourth point.
-/// When used in conjunction with RANSAC, this function can perform efficient outlier rejection.
-/// Two degenerate cases should be avoided when using this function:
-/// - Indeterminate configuration:
-/// When the three points are collinear in space, there will be a family of poses mapping the
-/// three points to the same image points.
-/// - Unstable configuration:
-/// The camera center is located on a circular cylinder passing through the three points and
-/// the camera optical axis is perpendicular to the plane derived by the three points.
-/// With this configuration, a small change in the position of the three points will
-/// result in a large change of the estimated pose..
-///
-/// @param corrs
-/// 2D-3D correspondence points
-///
-/// @param pose
-/// computed pose (numPoses * 12 data)
-///
-/// @param numPoses (max = 4)
-///
-/// @ingroup 3D_reconstruction
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvGeom3PointPoseEstimatef32( const fcvCorrespondences* __restrict corrs,
- float* pose,
- int32_t* numPoses );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 3x3 correlation with non-separable kernel.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCorr3x3s8_v2(). In the 2.0.0 release,
-/// fcvFilterCorr3x3s8_v2 will be renamed to fcvFilterCorr3x3s8
-/// and the signature of fcvFilterCorr3x3s8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param kernel
-/// 2-D 3x3 kernel.
-/// \n\b NOTE: Normalized to Q4.4
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be an even number
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE: must be an even number
-///
-/// @param dst
-/// Output convolution. Border values are ignored in this function.
-/// Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorr3x3s8( const int8_t* __restrict kernel,
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 3x3 correlation with non-separable kernel.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterCorr3x3s8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCorr3x3s8,
-/// \a fcvFilterCorr3x3s8_v2 will be removed, and the current signature
-/// for \a fcvFilterCorr3x3s8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCorr3x3s8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param kernel
-/// 2-D 3x3 kernel.
-/// \n\b NOTE: Normalized to Q4.4
-///
-/// @param src
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be an even number
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE: must be an even number
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output convolution. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride. Border values are ignored in this function.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorr3x3s8_v2( const int8_t* __restrict kernel,
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 9x9 correlation with separable kernel.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCorrSep9x9s16_v2(). In the 2.0.0 release,
-/// fcvFilterCorrSep9x9s16_v2 will be renamed to fcvFilterCorrSep9x9s16
-/// and the signature of fcvFilterCorrSep9x9s16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel in Q15.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param tmp
-/// Temporary image buffer used internally.
-/// Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: Must be same size as src
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dst
-/// Output correlation. Border values are ignored in this function.
-/// Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: Must be same size as src
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorrSep9x9s16( const int16_t* __restrict kernel,
- const int16_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int16_t* __restrict tmp,
- int16_t* __restrict dst );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// 9x9 FIR filter (convolution) with seperable kernel.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterCorrSep9x9s16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCorrSep9x9s16,
-/// \a fcvFilterCorrSep9x9s16_v2 will be removed, and the current signature
-/// for \a fcvFilterCorrSep9x9s16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCorrSep9x9s16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-///
-/// @param srcImg
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image tile width.
-///
-/// @param srcHeight
-/// Image tile height.
-///
-/// @param srcStride
-/// source Image width
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstImg
-/// Output correlation. Border values are ignored in this function.
-/// Size of buffer is dstStride*srcHeight bytes.
-/// \n\b NOTE: Size = width * heigth
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstStride
-/// dst Image width
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-FASTCV_API void
-fcvFilterCorrSep9x9s16_v2( const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 11x11 correlation with separable kernel.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCorrSep11x11s16_v2(). In the 2.0.0 release,
-/// fcvFilterCorrSep11x11s16_v2 will be renamed to fcvFilterCorrSep11x11s16
-/// and the signature of fcvFilterCorrSep11x11s16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: array must be >=12 elements with kernel[11]=0
-/// \n\b WARNING: must be 128-bit aligned.
-/// \n\b NOTE: Normalized to Q1.15
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dst
-/// Output correlation. Border values are ignored in this function.
-/// Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorrSep11x11s16( const int16_t* __restrict kernel,
- const int16_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dst );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// 11x11 FIR filter (convolution) with seperable kernel.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterCorrSep11x11s16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCorrSep11x11s16,
-/// \a fcvFilterCorrSep11x11s16_v2 will be removed, and the current signature
-/// for \a fcvFilterCorrSep11x11s16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCorrSep11x11s16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcImg
-/// Input image. Size of buffer is srStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image tile width.
-/// \n\b WARNING: must be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image tile height.
-///
-/// @param srcStride
-/// source Image width
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstImg
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Size = dstStride * srcHeigth
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstStride
-/// dst Image width
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-FASTCV_API void
-fcvFilterCorrSep11x11s16_v2( const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 13x13 correlation with separable kernel.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCorrSep13x13s16_v2(). In the 2.0.0 release,
-/// fcvFilterCorrSep13x13s16_v2 will be renamed to fcvFilterCorrSep13x13s16
-/// and the signature of fcvFilterCorrSep13x13s16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: Normalized to Q1.15
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dst
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorrSep13x13s16( const int16_t* __restrict kernel,
- const int16_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dst );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// 13x13 FIR filter (convolution) with seperable kernel.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterCorrSep13x13s16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCorrSep13x13s16,
-/// \a fcvFilterCorrSep13x13s16_v2 will be removed, and the current signature
-/// for \a fcvFilterCorrSep13x13s16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCorrSep13x13s16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcImg
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image tile width.
-/// \n\b WARNING: must be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image tile height.
-///
-/// @param srcStride
-/// source Image width
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstImg
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Size = dstStride * srcHeigth
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstStride
-/// dst Image width
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-FASTCV_API void
-fcvFilterCorrSep13x13s16_v2( const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 15x15 correlation with separable kernel.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCorrSep15x15s16_v2(). In the 2.0.0 release,
-/// fcvFilterCorrSep15x15s16_v2 will be renamed to fcvFilterCorrSep15x15s16
-/// and the signature of fcvFilterCorrSep15x15s16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: array must be 16 elements with kernel[15]=0
-/// \n\b NOTE: Normalized to Q1.15
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Must be same size as src
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dst
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Must be same size as src
-/// \n\b NOTE: data should be 128-bit aligned
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorrSep15x15s16( const int16_t* __restrict kernel,
- const int16_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dst );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// 15x15 FIR filter (convolution) with seperable kernel.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterCorrSep15x15s16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCorrSep15x15s16,
-/// \a fcvFilterCorrSep15x15s16_v2 will be removed, and the current signature
-/// for \a fcvFilterCorrSep15x15s16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCorrSep15x15s16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: array must be 16 elements with kernel[15]=0
-/// \n\b NOTE: Normalized to Q1.15
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcImg
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image tile width.
-/// \n\b WARNING: must be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image tile height.
-///
-/// @param srcStride
-/// source Image width
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstImg
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Size = dstStride * srcHeigth
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstStride
-/// dst Image width
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-FASTCV_API void
-fcvFilterCorrSep15x15s16_v2( const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// 17x17 correlation with separable kernel.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterCorrSep17x17s16_v2(). In the 2.0.0 release,
-/// fcvFilterCorrSep17x17s16_v2 will be renamed to fcvFilterCorrSep17x17s16
-/// and the signature of fcvFilterCorrSep17x17s16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: Normalized to Q1.15
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-/// \n\b WARNING: must be > 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dst
-/// Output correlation.. Border values are ignored in this function.
-/// \n\b NOTE: Must be same size as src
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterCorrSep17x17s16( const int16_t* __restrict kernel,
- const int16_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dst );
-
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// 17x17 FIR filter (convolution) with seperable kernel.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterCorrSep17x17s16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterCorrSep17x17s16,
-/// \a fcvFilterCorrSep17x17s16_v2 will be removed, and the current signature
-/// for \a fcvFilterCorrSep17x17s16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterCorrSep17x17s16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param kernel
-/// 1-D kernel.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcImg
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param srcWidth
-/// Image tile width.
-///
-/// @param srcHeight
-/// Image tile height.
-///
-/// @param srcStride
-/// source Image width
-///
-/// @param tmpImg
-/// Temporary image scratch space used internally.
-/// \n\b NOTE: Size = width * ( height + knlSize - 1 )
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstImg
-/// Output correlation. Border values are ignored in this function.
-/// \n\b NOTE: Size = dstStride * srcHeigth
-/// \n\b NOTE: data should be 128-bit aligned
-///
-/// @param dstStride
-/// dst Image width
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-FASTCV_API void
-fcvFilterCorrSep17x17s16_v2( const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg,
- unsigned int dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Calculates the mean and variance of intensities of a rectangle in a
-/// grayscale image.
-///
-/// @details
-///
-/// @param src
-/// pointer to 8-bit grayscale image
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of source image
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param xBegin
-/// x coordinate of of top left of rectangle
-///
-/// @param yBegin
-/// y coordinate of of top left of rectangle
-///
-/// @param recWidth
-/// width of rectangular region
-///
-/// @param recHeight
-/// height of rectangular region
-///
-/// @param mean
-/// output of mean of region
-///
-/// @param variance
-/// output of variance of region
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageIntensityStats( const uint8_t* __restrict src,
- unsigned int srcWidth,
- int xBegin,
- int yBegin,
- unsigned int recWidth,
- unsigned int recHeight,
- float* mean,
- float* variance );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a histogram of intensities for a rectangular region of a grayscale
-/// image. Bins each pixel into a histogram of size 256, depending on the
-/// intensity of the pixel (in the range 0 to 255).
-///
-/// @details
-///
-/// @param src
-/// pointer to 8-bit grayscale image
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of source image
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param xBegin
-/// x coordinate of of top left of rectangle
-///
-/// @param yBegin
-/// y coordinate of of top left of rectangle
-///
-/// @param recWidth
-/// Width of rectangular region
-///
-/// @param recHeight
-/// Height of rectangular region
-///
-/// @param histogram
-/// Array of size 256 for storing the histogram
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageIntensityHistogram( const uint8_t* __restrict src,
- unsigned int srcWidth,
- int xBegin,
- int yBegin,
- unsigned int recWidth,
- unsigned int recHeight,
- int32_t* histogram );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 8-bit image and adds an
-/// unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvIntegratePatchu8_v2(). In the 2.0.0 release,
-/// fcvIntegratePatchu8_v2 will be renamed to fcvIntegratePatchu8
-/// and the signature of fcvIntegratePatchu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (patchW+1)(patchH+1)
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (patchW+1)(patchH+1)
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegratePatchu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int patchX,
- int patchY,
- unsigned int patchW,
- unsigned int patchH,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 8-bit patch values and their
-/// squares and adds an unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvIntegratePatchu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvIntegratePatchu8,
-/// \a fcvIntegratePatchu8_v2 will be removed, and the current signature
-/// for \a fcvIntegratePatchu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvIntegratePatchu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (patchW+1)(patchH+1)
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (patchW+1)(patchH+1)
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegratePatchu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int patchX,
- int patchY,
- unsigned int patchW,
- unsigned int patchH,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 12x12 8-bit patch values and
-/// their squares. It also adds an unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvIntegratePatch12x12u8_v2(). In the 2.0.0 release,
-/// fcvIntegratePatch12x12u8_v2 will be renamed to fcvIntegratePatch12x12u8
-/// and the signature of fcvIntegratePatch12x12u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (12+1)(12+1)
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (12+1)(12+1)
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegratePatch12x12u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 12x12 8-bit patch values and
-/// their squares. It also adds an unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvIntegratePatch12x12u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvIntegratePatch12x12u8,
-/// \a fcvIntegratePatch12x12u8_v2 will be removed, and the current signature
-/// for \a fcvIntegratePatch12x12u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvIntegratePatch12x12u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (12+1)(12+1)
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (12+1)(12+1)
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegratePatch12x12u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 18x18 8-bit patch values and
-/// their squares. It also adds an unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvIntegratePatch18x18u8_v2(). In the 2.0.0 release,
-/// fcvIntegratePatch18x18u8_v2 will be renamed to fcvIntegratePatch18x18u8
-/// and the signature of fcvIntegratePatch18x18u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (18+1)(18+1)
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (18+1)(18+1)
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegratePatch18x18u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Builds an integral image of the incoming 18x18 8-bit patch values and
-/// their squares. It also adds an unfilled border on top and to the left.
-/// \n NOTE: border usually zero filled elsewhere.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvIntegratePatch18x18u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvIntegratePatch18x18u8,
-/// \a fcvIntegratePatch18x18u8_v2 will be removed, and the current signature
-/// for \a fcvIntegratePatch18x18u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvIntegratePatch18x18u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// sum (X,Y) = sum_{x (18+1)(18+1)
-///
-/// @param intgrlSqrdImgOut
-/// Integral image of squared values.
-/// \n\b NOTE: Memory must be > (18+1)(18+1)
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegratePatch18x18u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Integrates one line of an image or any portion of an image that is
-/// contiguous in memory.
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Number of pixels.
-/// \n NOTE: bit width enforces numPxls < 2^16
-///
-/// @param intgrl
-/// Sum of values from specified pixels.
-///
-/// @param intgrlSqrd
-/// Sum of squared values from specified pixels.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegrateImageLineu8( const uint8_t* __restrict src,
- uint16_t srcWidth,
- uint32_t* intgrl,
- uint32_t* intgrlSqrd );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Integrates 64 contiguous pixels of an image.
-///
-/// @param src
-/// Input image.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param intgrl
-/// Sum of values from specified pixels.
-///
-/// @param intgrlSqrd
-/// Sum of squared values from specified pixels.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvIntegrateImageLine64u8( const uint8_t* __restrict src,
- uint16_t* intgrl,
- uint32_t* intgrlSqrd );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// compute approximate mean and variance for the range of NFT4 float
-/// descriptors where descriptor elements along dimension are treated
-/// as random vars
-///
-/// @param src
-/// contiguous block of descriptors of dimension 36
-///
-/// @param first
-/// index of the first descriptor in range array vind for computing mean and var
-///
-/// @param last
-/// index of the last descriptor in range array vind for computing mean and range
-///
-/// @param vind
-/// array of randomized indexes of descriptors
-///
-/// @param means
-/// buffer for approximate means, must be 36 long
-///
-/// @param vars
-/// buffer for approximate variances, must be 36 long
-///
-/// @param temp
-/// bufffer, must be 46 long
-///
-/// @return
-/// 0 - success
-/// EFAULT - invalid address
-/// EINVAL - invalid argument
-///
-/// @remark
-/// If descriptor range is > 100 then only
-/// 100 samples are drawn from the range to compute
-/// approximate means and variances.
-///
-/// Variances computed here do not have to be true variances because their
-/// values do not matter in kdtrees. The only thing that matters is that
-/// the ordering relation of variances is preserved
-///
-///
-///
-/// @ingroup object_detection
-// -----------------------------------------------------------------------------
-
-FASTCV_API int
-fcvDescriptorSampledMeanAndVar36f32( const float* __restrict src,
- int first,
- int last,
- int32_t* vind,
- float* __restrict means,
- float* __restrict vars,
- float* __restrict temp );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Searches a 8x8 patch within radius around a center pixel for the max NCC.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvNCCPatchOnCircle8x8u8_v2(). In the 2.0.0 release,
-/// fcvNCCPatchOnCircle8x8u8_v2 will be renamed to fcvNCCPatchOnCircle8x8u8
-/// and the signature of fcvNCCPatchOnCircle8x8u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param patch
-/// Pointer to 8-bit patch pixel values linearly laid out in memory.
-///
-/// @param src
-/// Pointer to 8-bit image pixel values linearly laid out in memory.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width in pixels of the image.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height in pixels of the image.
-///
-/// @param search_center_x
-/// X location of search center in pixels of the image.
-///
-/// @param search_center_y
-/// Y location of search center in pixels of the image.
-///
-/// @param search_radius
-/// Radius of search in pixels. Must be <=5.
-///
-/// @param best_x
-/// Center X location on the image of the best NCC match. The center X has
-/// 4 pixels to the left and 3 to the right.
-///
-/// @param best_y
-/// Center Y location on the image of the best NCC match. The center Y has
-/// 4 pixels above and 3 pixels below.
-///
-/// @param bestNCC
-/// Largest value of the normalized cross-correlation found in the NCC search.
-/// It's quantized to integer value in Q7 (between -128 and 128).
-///
-/// @param findSubPixel (0 or 1)
-/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
-///
-/// @param subX
-/// Sub-pixel estimate for optimal NCC relative to best_x.
-/// \n e.g., float x = (float)best_x + subX;
-///
-/// @param subY
-/// Sub-pixel estimate for optimal NCC relative to best_y.
-///
-/// @return
-/// 0 = OK \n
-/// 1 = "search_radius" too large\n
-/// 2 = invalid "search_center_x,y"\n
-/// 3 = not found\n
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvNCCPatchOnCircle8x8u8( const uint8_t* __restrict patch,
- const uint8_t* __restrict src,
- unsigned short srcWidth,
- unsigned short srcHeight,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_radius,
- uint16_t* best_x,
- uint16_t* best_y,
- uint32_t* bestNCC,
- int findSubPixel,
- float* subX,
- float* subY );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Searches a 8x8 patch within radius around a center pixel for the max NCC.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvNCCPatchOnCircle8x8u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvNCCPatchOnCircle8x8u8,
-/// \a fcvNCCPatchOnCircle8x8u8_v2 will be removed, and the current signature
-/// for \a fcvNCCPatchOnCircle8x8u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvNCCPatchOnCircle8x8u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param patch
-/// Pointer to 8-bit patch pixel values linearly laid out in memory.
-///
-/// @param src
-/// Pointer to 8-bit image pixel values linearly laid out in memory.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width in pixels of the image.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height in pixels of the image.
-///
-/// @param search_center_x
-/// X location of search center in pixels of the image.
-///
-/// @param search_center_y
-/// Y location of search center in pixels of the image.
-///
-/// @param search_radius
-/// Radius of search in pixels. Must be <=5.
-///
-/// @param filterLowVariance
-/// Minimum variance. Used to as threshold to compare against variance of
-/// 8x8 block of src or patch.
-///
-/// @param best_x
-/// Center X location on the image of the best NCC match. The center X has
-/// 4 pixels to the left and 3 to the right.
-///
-/// @param best_y
-/// Center Y location on the image of the best NCC match. The center Y has
-/// 4 pixels above and 3 pixels below.
-///
-/// @param bestNCC
-/// Largest value of the normalized cross-correlation found in the NCC search.
-/// It's quantized to integer value in Q7 (between -128 and 128).
-///
-/// @param findSubPixel (0 or 1)
-/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
-///
-/// @param subX
-/// Sub-pixel estimate for optimal NCC relative to best_x.
-/// \n e.g., float x = (float)best_x + subX;
-///
-/// @param subY
-/// Sub-pixel estimate for optimal NCC relative to best_y.
-///
-/// @return
-/// 0 = OK \n
-/// 1 = "search_radius" too large\n
-/// 2 = invalid "search_center_x,y"\n
-/// 3 = not found\n
-/// 4 = Patch has too low variance\n
-/// 5 = Image region has too low variance\n
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvNCCPatchOnCircle8x8u8_v2( const uint8_t* __restrict patch,
- const uint8_t* __restrict src,
- unsigned short srcWidth,
- unsigned short srcHeight,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_radius,
- int filterLowVariance,
- uint16_t* best_x,
- uint16_t* best_y,
- uint32_t* bestNCC,
- int findSubPixel,
- float* subX,
- float* subY );
-
-
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Searches a 8x8 patch within square region around a center pixel
-/// for the max NCC.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvNCCPatchOnSquare8x8u8_v2(). In the 2.0.0 release,
-/// fcvNCCPatchOnSquare8x8u8_v2 will be renamed to fcvNCCPatchOnSquare8x8u8
-/// and the signature of fcvNCCPatchOnSquare8x8u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param patch
-/// Pointer to 8-bit patch pixel values linearly laid out in memory.
-///
-/// @param src
-/// Pointer to 8-bit image pixel values linearly laid out in memory.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width in pixels of the image.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height in pixels of the image.
-///
-/// @param search_center_x
-/// Center X coordinate of the search window
-///
-/// @param search_center_y
-/// Center Y coordinate of the search window
-///
-/// @param search_w
-/// Width of search square in pixels
-/// \n\b WARNING: must be 11 or less.
-///
-/// @param best_x
-/// Center X location on the image of the best NCC match. The center X has
-/// 4 pixels to the left and 3 to the right.
-///
-/// @param best_y
-/// Center Y location on the image of the best NCC match. The center Y has
-/// 4 pixels above and 3 pixels below.
-///
-/// @param bestNCC
-/// NCC value of the best match block.
-/// It's quantized to integer value in Q7 (between -128 and 128).
-///
-/// @param doSubPixel (0 or 1)
-/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
-///
-/// @param subX
-/// Sub-pixel estimate for optimal NCC relative to best_x.
-/// \n e.g., float x = (float)best_x + subX;
-///
-/// @param subY
-/// Sub-pixel estimate for optimal NCC relative to best_y.
-///
-/// @return
-/// 0 = OK \n
-/// 1 = "search_radius" too large\n
-/// 2 = invalid "search_center_x,y"\n
-/// 3 = not found\n
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvNCCPatchOnSquare8x8u8( const uint8_t* __restrict patch,
- const uint8_t* __restrict src,
- unsigned short srcWidth,
- unsigned short srcHeight,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_w,
- uint16_t* best_x,
- uint16_t* best_y,
- uint32_t* bestNCC,
- int doSubPixel,
- float* subX,
- float* subY );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Searches a 8x8 patch within square region around a center pixel
-/// for the max NCC.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvNCCPatchOnSquare8x8u8 with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvNCCPatchOnSquare8x8u8,
-/// \a fcvNCCPatchOnSquare8x8u8_v2 will be removed, and the current signature
-/// for \a fcvNCCPatchOnSquare8x8u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvNCCPatchOnSquare8x8u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param patch
-/// Pointer to 8-bit patch pixel values linearly laid out in memory.
-///
-/// @param src
-/// Pointer to 8-bit image pixel values linearly laid out in memory.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width in pixels of the image.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height in pixels of the image.
-///
-/// @param search_center_x
-/// Center X coordinate of the search window
-///
-/// @param search_center_y
-/// Center Y coordinate of the search window
-///
-/// @param search_w
-/// Width of search square in pixels
-/// \n\b WARNING: must be 11 or less.
-///
-/// @param filterLowVariance
-/// Minimum variance. Used to as threshold to compare against variance of
-/// 8x8 block of src or patch.
-///
-/// @param best_x
-/// Center X location on the image of the best NCC match. The center X has
-/// 4 pixels to the left and 3 to the right.
-///
-/// @param best_y
-/// Center Y location on the image of the best NCC match. The center Y has
-/// 4 pixels above and 3 pixels below.
-///
-/// @param bestNCC
-/// NCC value of the best match block.
-/// It's quantized to integer value in Q7 (between -128 and 128).
-///
-/// @param doSubPixel (0 or 1)
-/// Use parabolic interpolation of NCC values to find sub-pixel estimates.
-///
-/// @param subX
-/// Sub-pixel estimate for optimal NCC relative to best_x.
-/// \n e.g., float x = (float)best_x + subX;
-///
-/// @param subY
-/// Sub-pixel estimate for optimal NCC relative to best_y.
-///
-/// @return
-/// 0 = OK \n
-/// 1 = "search_radius" too large\n
-/// 2 = invalid "search_center_x,y"\n
-/// 3 = not found\n
-/// 4 = Patch has too low variance\n
-/// 5 = Image region has too low variance\n
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvNCCPatchOnSquare8x8u8_v2( const uint8_t* __restrict patch,
- const uint8_t* __restrict src,
- unsigned short srcWidth,
- unsigned short srcHeight,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_w,
- int filterLowVariance,
- uint16_t* best_x,
- uint16_t* best_y,
- uint32_t* bestNCC,
- int doSubPixel,
- float* subX,
- float* subY );
-
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sum of absolute differences of an image against an 8x8 template.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvSumOfAbsoluteDiffs8x8u8_v2(). In the 2.0.0 release,
-/// fcvSumOfAbsoluteDiffs8x8u8_v2 will be renamed to fcvSumOfAbsoluteDiffs8x8u8
-/// and the signature of fcvSumOfAbsoluteDiffs8x8u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// 8x8 sum of ||A-B||. The template patch is swept over the entire image and
-/// the results are put in dst.
-///
-/// @param patch
-/// 8x8 template
-///
-/// @param src
-/// Reference Image.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the src image.
-///
-/// @param srcHeight
-/// Height of the src image.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param dst
-/// The dst buffer shall be width X height bytes in length.
-/// Output of SAD(A,B). dst[4][4] correspondes to the 0,0 pixel of the template
-/// aligned with the 0,0 pixel of src. The dst border values not covered by
-/// entire 8x8 patch window will remain unmodified by the function. The caller
-/// should either initialize these to 0 or ignore.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSumOfAbsoluteDiffs8x8u8( const uint8_t* __restrict patch,
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint16_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sum of absolute differences of an image against an 8x8 template.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvSumOfAbsoluteDiffs8x8u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvSumOfAbsoluteDiffs8x8u8,
-/// \a fcvSumOfAbsoluteDiffs8x8u8_v2 will be removed, and the current signature
-/// for \a fcvSumOfAbsoluteDiffs8x8u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvSumOfAbsoluteDiffs8x8u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// 8x8 sum of ||A-B||. The template patch is swept over the entire image and
-/// the results are put in dst.
-///
-/// @param patch
-/// 8x8 template
-///
-/// @param patchStride
-/// Stride of the 8x8 template buffer
-///
-/// @param dstStride
-/// Stride of the patch (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-///
-/// @param src
-/// Reference Image.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of the src image.
-///
-/// @param srcHeight
-/// Height of the src image.
-///
-/// @param srcStride
-/// Stride of image (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-///
-/// @param dst
-/// The dst buffer shall be at least ( width x height ) values in length.
-/// Output of SAD(A,B). dst[4][4]correspondes to the 0,0 pixel of the template
-/// aligned with the 0,0 pixel of src. The dst border values not covered by
-/// entire 8x8 patch window will remain unmodified by the function. The caller
-/// should either initialize these to 0 or ignore.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of destination (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-///
-///
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSumOfAbsoluteDiffs8x8u8_v2( const uint8_t* __restrict patch,
- unsigned int patchStride,
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint16_t* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Down-scale the image to half width and height by averaging 2x2 pixels
-/// into one.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvScaleDownBy2u8_v2(). In the 2.0.0 release,
-/// fcvScaleDownBy2u8_v2 will be renamed to fcvScaleDownBy2u8
-/// and the signature of fcvScaleDownBy2u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// A box filter downsampling the next pixel, the pixel below, and the next
-/// pixel to the pixel below into one pixel.\n
-/// | px00 px01 px02 px03 |\n
-/// | px10 px11 px12 px13 |\n
-/// to:\n
-/// | (px00+px01+px10+px11)/4 (px02+px03+px12+px13)/4 |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE:must be a multiple of 2
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is srcWidth*srcHeight/4 bytes.
-/// \n\b NOTE: data must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvScaleDownBy2u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Down-scale the image to half width and height by averaging 2x2 pixels
-/// into one.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvScaleDownBy2u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvScaleDownBy2u8,
-/// \a fcvScaleDownBy2u8_v2 will be removed, and the current signature
-/// for \a fcvScaleDownBy2u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvScaleDownBy2u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// A box filter downsampling the next pixel, the pixel below, and the next
-/// pixel to the pixel below into one pixel.\n
-/// | px00 px01 px02 px03 |\n
-/// | px10 px11 px12 px13 |\n
-/// to:\n
-/// | (px00+px01+px10+px11)/4 (px02+px03+px12+px13)/4 |\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE:must be a multiple of 2
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight/2 bytes.
-/// \n\b NOTE: data must be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth/2.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth/2 if not 0.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvScaleDownBy2u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Downscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvScaleDownBy2Gaussian5x5u8_v2(). In the 2.0.0 release,
-/// fcvScaleDownBy2Gaussian5x5u8_v2 will be renamed to fcvScaleDownBy2Gaussian5x5u8
-/// and the signature of fcvScaleDownBy2Gaussian5x5u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Downsamples the image using a 5x5 Gaussian filter kernel.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE:must be a multiple of 2
-///
-/// @param dst
-/// Output 8-bit downscale image of size (width / 2) x (height / 2).
-/// \n\b NOTE: border values have been taken cared w.r.t. the pixel coordinate.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleDownBy2Gaussian5x5u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Downscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvScaleDownBy2Gaussian5x5u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvScaleDownBy2Gaussian5x5u8,
-/// \a fcvScaleDownBy2Gaussian5x5u8_v2 will be removed, and the current signature
-/// for \a fcvScaleDownBy2Gaussian5x5u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvScaleDownBy2Gaussian5x5u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Downsamples the image using a 5x5 Gaussian filter kernel.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit downscale image of size (width / 2) x (height / 2).
-/// \n\b NOTE: border values have been taken cared w.r.t. the pixel coordinate.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth/2.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth/2 if not 0.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleDownBy2Gaussian5x5u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Downscale the image to quarter width and height by averaging 4x4 pixels
-/// into one..
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvScaleDownBy4u8_v2(). In the 2.0.0 release,
-/// fcvScaleDownBy4u8_v2 will be renamed to fcvScaleDownBy4u8
-/// and the signature of fcvScaleDownBy4u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// A 4x4 downsampling box filter across adjacent pixels is applied.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE:must be a multiple of 4
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is srcWidth*srcHeight/16 bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvScaleDownBy4u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Downscale the image to quarter width and height by averaging 4x4 pixels
-/// into one..
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvScaleDownBy4u8_v2() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvScaleDownBy4u8_v2,
-/// \a fcvScaleDownBy4u8_v2 will be removed, and the current signature
-/// for \a fcvScaleDownBy4u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvScaleDownBy4u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// A 4x4 downsampling box filter across adjacent pixels is applied.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE:must be a multiple of 4
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*srcHeight/4 bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth/4.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth/4 if not 0.
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvScaleDownBy4u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Downscale the image to 2/3 width and height by averaging 3x3 pixels
-/// into one..
-///
-/// @details
-/// A 3x3 downsampling box filter across adjacent pixels is applied.
-///
-/// @param src
-/// Input 8-bit image.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b NOTE: In case of non multiple of 3, it will crop to the closest multiple of 3
-///
-/// @param srcHeight
-/// Image height.
-/// \n\b NOTE: In case of non multiple of 3, it will crop to the closest multiple of 3
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If 0 is passed, srcStride is set to srcWidth.
-///
-/// @param dst
-/// Output 8-bit image.
-/// \n\b WARNING: must be 128-bit aligned.
-/// Memory must be pre-allocated at least srcWidth * srcHeight * 2 / 3
-/// dstWidth = srcWidth/3*2
-/// dstHeight = srcHeight/3*2
-///
-/// @param dstStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If 0 is passed, dstStride is set to dstWidth which is srcWidth *2/3.
-///
-/// @return 0 if successful
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvScaleDown3To2u8( const uint8_t* __restrict src,
- unsigned srcWidth,
- unsigned srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Downsample Horizontaly and/or Vertically by an *integer* scale.
-///
-/// @details
-/// Uses Nearest Neighbor method
-///
-/// @param src
-/// Input 8-bit image.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Source Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Source Image height.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If 0 is passed, srcStride is set to srcWidth.
-///
-/// @param dst
-/// Output 8-bit image.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstWidth
-/// Destination Image width.
-///
-/// @param dstHeight
-/// Destination Image height.
-///
-/// @param dstStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2). If 0 is passed, dstStride is set to dstWidth which is srcWidth *2/3.
-///
-/// @return 0 if successful
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvScaleDownNNu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Downsample Horizontaly and/or Vertically by an *integer* scale.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvScaleDownu8_v2(). In the 2.0.0 release,
-/// fcvScaleDownu8_v2 will be renamed to fcvScaleDownu8
-/// and the signature of fcvScaleDownu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Uses an box averaging filter of size MxN where M is the scale factor
-/// in horizontal dimension and N is the scale factor in the vertical
-/// dimension.
-/// \n \b NOTE: input dimensions should be multiple of output dimensions.
-/// \n NOTE: On different processors, some output pixel values may be off by 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Source Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Source Image height.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstWidth*dstHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstWidth
-/// Destination Image width.
-///
-/// @param dstHeight
-/// Destination Image height.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleDownu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Downsample Horizontaly and/or Vertically by an *integer* scale.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvScaleDownu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvScaleDownu8,
-/// \a fcvScaleDownu8_v2 will be removed, and the current signature
-/// for \a fcvScaleDownu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvScaleDownu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Uses an box averaging filter of size MxN where M is the scale factor
-/// in horizontal dimension and N is the scale factor in the vertical
-/// dimension
-/// \n \b NOTE: input dimensions should be multiple of output dimensions.
-/// \n NOTE: On different processors, some output pixel values may be off by 1
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Source Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Source Image height.
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit image. Size of buffer is dstStride*dstHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstWidth
-/// Destination Image width.
-///
-/// @param dstHeight
-/// Destination Image height.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleDownu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Upscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvScaleUpBy2Gaussian5x5u8_v2(). In the 2.0.0 release,
-/// fcvScaleUpBy2Gaussian5x5u8_v2 will be renamed to fcvScaleUpBy2Gaussian5x5u8
-/// and the signature of fcvScaleUpBy2Gaussian5x5u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Upsamples the image using a 5x5 Gaussian filter kernel.
-/// /n/b NOTE: border values have been taken care with Gaussion coefficients.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit upsampled image of size (2*width) x (2*height).
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleUpBy2Gaussian5x5u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Upscale a grayscale image by a factor of two using a 5x5 Gaussian filter kernel
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvScaleUpBy2Gaussian5x5u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvScaleUpBy2Gaussian5x5u8,
-/// \a fcvScaleUpBy2Gaussian5x5u8_v2 will be removed, and the current signature
-/// for \a fcvScaleUpBy2Gaussian5x5u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvScaleUpBy2Gaussian5x5u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Upsamples the image using a 5x5 Gaussian filter kernel.
-/// /n/b NOTE: border values have been taken care with Gaussion coefficients.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcStride
-/// Image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit upsampled image of size (2*dstStride) x (2*srcHeight).
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth*2.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth*2 if not 0.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvScaleUpBy2Gaussian5x5u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Translate to float and normalize 36 8-bit elements
-///
-/// @param src
-/// Pointer to the first input vector
-///
-/// @param invLen
-/// Pointer to inverse length of the first input vector
-/// located right after each 36 element vector
-///
-/// @param numVecs
-/// Number of vectors to translate
-///
-/// @param reqNorm
-/// Required norm
-///
-/// @param srcStride
-/// Step in bytes to data of the next vector
-/// Each vector has 36 8-bit elements and 1 float invLen
-///
-/// @param dst
-/// Pointer to contiguous block for output vectors
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param stopBuild
-/// Allows other threads to break this function in the middle of processing.
-/// When set to 1, the function will exit on the next iteration.
-///
-/// @return
-/// 0 - success
-/// EFAULT - invalid address
-/// EINVAL - invalid argument
-///
-/// @ingroup math_vector
-// -----------------------------------------------------------------------------
-
-FASTCV_API int
-fcvVecNormalize36s8f32( const int8_t* __restrict src,
- unsigned int srcStride,
- const float* __restrict invLen,
- unsigned int numVecs,
- float reqNorm,
- float* __restrict dst,
- int32_t* stopBuild );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Sum of squared differences of one 36-byte vector against 4 others.
-///
-/// @details
-/// SSD of one vector (a) against 4 others (b0,b1,b2,b3) using their given
-/// inverse lengths for normalization.
-/// \n\n SSD(a,b0), SSD(a,b1), SSD(a,b2), SSD(a,b3)
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLenA
-/// Inverse of vector A = 1/|A|
-///
-/// @param b0
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b1
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b2
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param b3
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLenB
-/// Inverse of vectors b0...b3 = 1/|b0|,... 1/|b3|
-/// \n\b WARNING: array must be 128-bit aligned
-///
-/// @param distances
-/// Output of the 4 results { SSD(a,b0), SSD(a,b1), SSD(a,b2), SSD(a,b3) }.
-/// \n ACCURACY: 1.0e-6
-/// \n\b WARNING: array must be 128-bit aligned
-///
-///
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSumOfSquaredDiffs36x4s8( const int8_t* __restrict a,
- float invLenA,
- const int8_t* __restrict b0,
- const int8_t* __restrict b1,
- const int8_t* __restrict b2,
- const int8_t* __restrict b3,
- const float* __restrict invLenB,
- float* __restrict distances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Sum of squared differences of one 36-byte vector against N others.
-///
-/// @details
-/// SSD of one vector (a) against N other 36-byte vectors
-/// ( b[0], b[1], ..., b[n-1] )
-/// using their given inverse lengths for normalization.
-/// \n\n SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1])
-///
-/// @param a
-/// Vector.
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param invLenA
-/// Inverse of vector A = 1/|A|
-///
-/// @param b
-/// Vectors b[0]...b[n-1].
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param invLenB
-/// Inverse of vectors b[0]...b[n-1] = 1/|b[0]|,... 1/|b[n-1]|
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param numB
-/// Number of B vectors.
-///
-/// @param distances
-/// Output of the N results { SSD(a,b[0]), SSD(a,b[1]), ..., SSD(a,b[n-1]) }.
-/// \n ACCURACY: 1.0e-6
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSumOfSquaredDiffs36xNs8( const int8_t* __restrict a,
- float invLenA,
- const int8_t* const * __restrict b,
- const float* __restrict invLenB,
- unsigned int numB,
- float* __restrict distances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Sorting of 8 float numbers
-///
-/// @details
-/// Perform sorting of 8 scores in ascending order (output of SumOfSquaredDiffs)
-///
-/// @param inScores
-/// Input 8 element float array
-/// \n\b NOTE: array should be 128-bit aligned
-///
-/// @param outScores
-/// Output is 8 element sorted float array
-/// \n\b WARNING: array must be 128-bit aligned
-///
-///
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSort8Scoresf32( float* __restrict inScores, float* __restrict outScores );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Binarizes a grayscale image based on a threshold value.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterThresholdu8_v2(). In the 2.0.0 release,
-/// fcvFilterThresholdu8_v2 will be renamed to fcvFilterThresholdu8
-/// and the signature of fcvFilterThresholdu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Sets the pixel to max(255) if it's value is greater than the threshold;
-/// else, set the pixel to min(0).
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit binarized image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param threshold
-/// Threshold value for binarization.
-/// \n\b WARNING: must be larger than 0.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterThresholdu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- unsigned int threshold );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Binarizes a grayscale image based on a threshold value.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterThresholdu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterThresholdu8,
-/// \a fcvFilterThresholdu8_v2 will be removed, and the current signature
-/// for \a fcvFilterThresholdu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterThresholdu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Sets the pixel to max(255) if it's value is greater than the threshold;
-/// else, set the pixel to min(0).
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit binarized image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param threshold
-/// Threshold value for binarization.
-/// \n\b WARNING: must be larger than 0.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterThresholdu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- unsigned int threshold );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterDilate3x3u8_v2(). In the 2.0.0 release,
-/// fcvFilterDilate3x3u8_v2 will be renamed to fcvFilterDilate3x3u8
-/// and the signature of fcvFilterDilate3x3u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit dilated image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterDilate3x3u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Dilate a grayscale image by taking the local maxima of 3x3 neighborhood window.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterDilate3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterDilate3x3u8,
-/// \a fcvFilterDilate3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterDilate3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterDilate3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit dilated image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterDilate3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Erode a grayscale image by taking the local minima of 3x3 neighborhood window.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterErode3x3u8_v2(). In the 2.0.0 release,
-/// fcvFilterErode3x3u8_v2 will be renamed to fcvFilterErode3x3u8
-/// and the signature of fcvFilterErode3x3u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output 8-bit eroded image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterErode3x3u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Erode a grayscale image by taking the local minima of 3x3 nbhd window.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterErode3x3u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterErode3x3u8,
-/// \a fcvFilterErode3x3u8_v2 will be removed, and the current signature
-/// for \a fcvFilterErode3x3u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterErode3x3u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output 8-bit eroded image. Size of buffer is dstStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of output image.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-///
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterErode3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Warps the patch centered at nPos in the input image using the affine
-/// transform in nAffine
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvTransformAffine8x8u8_v2(). In the 2.0.0 release,
-/// fcvTransformAffine8x8u8_v2 will be renamed to fcvTransformAffine8x8u8
-/// and the signature of fcvTransformAffine8x8u8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param nPos[ 2 ]
-/// Position in the image in 32 bit fixed point (Q16)
-/// \n\b NOTE: if any 1 coordinates of the warped square are inside the image, return 1 and
-/// \n leave function. Otherwise, return 0.
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param nAffine[ 2 ][ 2 ]
-/// Transformation matrix in 32 bit fixed point (Q16). The matrix stored
-/// in nAffine is using row major ordering: \n
-/// a11, a12, a21, a22 where the matrix is: \n
-/// | a11, a12 |\n
-/// | a21, a22 |\n
-///
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param nPatch
-/// Transformed patch.
-///
-///
-/// @returns 0 if the transformation is valid
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvTransformAffine8x8u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- const int32_t* __restrict nPos,
- const int32_t* __restrict nAffine,
- uint8_t* __restrict nPatch );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Warps the patch centered at nPos in the input image using the affine
-/// transform in nAffine
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvTransformAffine8x8u8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvTransformAffine8x8u8,
-/// \a fcvTransformAffine8x8u8_v2 will be removed, and the current signature
-/// for \a fcvTransformAffine8x8u8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvTransformAffine8x8u8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of image (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be at least as much as srcWidth if not 0.
-///
-/// @param nPos[ 2 ]
-/// Position in the image in 32 bit fixed point (Q16)
-/// \n\b NOTE: if any 1 coordinates of the warped square are inside the image, return 1 and
-/// \n leave function. Otherwise, return 0.
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param nAffine[ 2 ][ 2 ]
-/// Transformation matrix in 32 bit fixed point (Q16). The matrix stored
-/// in nAffine is using row major ordering: \n
-/// a11, a12, a21, a22 where the matrix is: \n
-/// | a11, a12 |\n
-/// | a21, a22 |\n
-///
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param patch
-/// Transformed patch.
-///
-/// @param patchStride
-/// Stride of patch (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-/// \n\b NOTE: if 0, srcStride is set as 8.
-/// \n\b WARNING: must be at least as much as 8 if not 0.
-///
-///
-/// @returns 0 if the transformation is valid
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvTransformAffine8x8u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- const int32_t* __restrict nPos,
- const int32_t* __restrict nAffine,
- uint8_t* __restrict patch,
- unsigned int patchStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Warps a grayscale image using the a perspective projection transformation
-/// matrix (also known as a homography). This type of transformation is an
-/// invertible transformation which maps straight lines to straight lines.
-/// Bi-linear interpolation is used where applicable.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvWarpPerspectiveu8_v2(). In the 2.0.0 release,
-/// fcvWarpPerspectiveu8_v2 will be renamed to fcvWarpPerspectiveu8
-/// and the signature of fcvWarpPerspectiveu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Warps an image taking into consideration the perspective scaling.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Input image height.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param dst
-/// Warped output image. Size of buffer is dstWidth*dstHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstWidth
-/// Dst image width.
-/// \n\b NOTE: data must be multiple of 8.
-///
-/// @param dstHeight
-/// Dst image height.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param projectionMatrix
-/// 3x3 perspective transformation matrix (generally a homography). The
-/// matrix stored in homography is row major ordering: \n
-/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
-/// | a11, a12, a13 |\n
-/// | a21, a22, a23 |\n
-/// | a31, a32, a33 |\n
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvWarpPerspectiveu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- float* __restrict projectionMatrix );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Warps a grayscale image using the a perspective projection transformation
-/// matrix (also known as a homography). This type of transformation is an
-/// invertible transformation which maps straight lines to straight lines.
-/// Bi-linear interpolation is used where applicable.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvWarpPerspectiveu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvWarpPerspectiveu8,
-/// \a fcvWarpPerspectiveu8_v2 will be removed, and the current signature
-/// for \a fcvWarpPerspectiveu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvWarpPerspectiveu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Warps an image taking into consideration the perspective scaling.
-///
-/// @param src
-/// Input 8-bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Input image height.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcStride
-/// Input image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Warped output image. Size of buffer is dstStride*dstHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstWidth
-/// Dst image width.
-/// \n\b NOTE: data must be multiple of 8.
-///
-/// @param dstHeight
-/// Dst image height.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param dstStride
-/// Output image stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as dstWidth.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth if not 0.
-///
-/// @param projectionMatrix
-/// 3x3 perspective transformation matrix (generally a homography). The
-/// matrix stored in homography is row major ordering: \n
-/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
-/// | a11, a12, a13 |\n
-/// | a21, a22, a23 |\n
-/// | a31, a32, a33 |\n
-/// \n\b WARNING: must be 128-bit aligned.
-///
-///
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvWarpPerspectiveu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride,
- float* __restrict projectionMatrix );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Warps a 3 color channel image based on a 3x3 perspective projection matrix using
-/// bilinear interpolation.
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcv3ChannelWarpPerspectiveu8_v2(). In the 2.0.0 release,
-/// fcv3ChannelWarpPerspectiveu8_v2 will be renamed to fcv3ChannelWarpPerspectiveu8
-/// and the signature of fcv3ChannelWarpPerspectiveu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight*3 bytes.
-/// \n\b NOTE: data must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param srcHeight
-/// Input image height.
-/// \n\b NOTE: must be multiple of 8
-///
-/// @param dst
-/// Warped output image. Size of buffer is dstWidth*dstHeight*3 bytes.
-/// \n\b NOTE: data must be 128-bit aligned.
-///
-/// @param dstWidth
-/// Output image width.
-/// \n\b NOTE: must be multiple of 8.
-///
-/// @param dstHeight
-/// Output image height.
-/// \n\b NOTE: must be multiple of 8.
-///
-/// @param projectionMatrix
-/// 3x3 perspective transformation matrix (generally a homography). The
-/// matrix stored in homography is row major ordering: \n
-/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
-/// | a11, a12, a13 |\n
-/// | a21, a22, a23 |\n
-/// | a31, a32, a33 |\n
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcv3ChannelWarpPerspectiveu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- float* __restrict projectionMatrix );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Warps a 3 color channel image based on a 3x3 perspective projection
-/// matrix using bilinear interpolation.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcv3ChannelWarpPerspectiveu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcv3ChannelWarpPerspectiveu8,
-/// \a fcv3ChannelWarpPerspectiveu8_v2 will be removed, and the current signature
-/// for \a fcv3ChannelWarpPerspectiveu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcv3ChannelWarpPerspectiveu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b WARNING: data must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b WARNING: must be multiple of 8
-///
-/// @param srcHeight
-/// Input image height.
-/// \n\b WARNING: must be multiple of 8
-///
-/// @param srcStride
-/// Input image stride (in bytes).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth*3.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as srcWidth*3 if not 0.
-///
-/// @param dst
-/// Warped output image. Size of buffer is dstStride*dstHeight bytes.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstWidth
-/// Output image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param dstHeight
-/// Output image height.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param dstStride
-/// Output image stride (in bytes).
-/// \n\b NOTE: if 0, dstStride is set as dstWidth*3.
-/// \n\b WARNING: must be multiple of 8 (8 * 1-byte values), and at least as much as dstWidth*3 if not 0.
-///
-/// @param projectionMatrix
-/// 3x3 perspective transformation matrix (generally a homography). The
-/// matrix stored in homography is row major ordering: \n
-/// a11, a12, a13, a21, a22, a23, a31, a32, a33 where the matrix is: \n
-/// | a11, a12, a13 |\n
-/// | a21, a22, a23 |\n
-/// | a31, a32, a33 |\n
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcv3ChannelWarpPerspectiveu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride,
- float* __restrict projectionMatrix );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// General function for computing cluster centers and cluster bindings
-/// for a set of points of dimension dim.
-///
-/// @param points
-/// Array of all points. Array size must be greater than
-/// numPoints * dim.
-///
-/// @param numPoints
-/// Number of points in points array.
-/// \n\b WARNING: must be > numPoints * dim.
-///
-/// @param dim
-/// dimension, e.g. 36
-///
-/// @param pointStride
-/// Byte distance between adjacent points in array
-///
-/// @param indices
-/// Array of point indices in points array. Processing will only
-/// occur on points whose indices are in this array. Each index in array
-/// must be smaller numPoints.
-///
-/// @param numIndices
-/// Length of indices array. numIndieces must be <= numPoints.
-///
-/// @param numClusters
-/// Number of cluster centers
-///
-/// @param clusterCenters
-/// current cluster centers;
-/// elements are distant by clusterCenterStride
-///
-/// @param clusterCenterStride
-/// byte distance between adjacent cluster centers in array
-///
-/// @param newClusterCenters
-/// array for new cluster centers; should be numClusterCenters long
-///
-/// @param clusterMemberCounts
-/// Element counts for each cluster; should be numClusterCenters long
-///
-/// @param clusterBindings
-/// Output indices of the clusters to which each vector belongs to, array must
-/// be numIndices long.
-///
-/// @param sumOfClusterDistances
-/// Array for sum of distances of cluster elements to cluster centers;
-/// Must be numClusters long
-///
-/// @return
-/// 0 if successfully clustered, otherwise error code
-///
-/// @remark
-/// This is general clusterer. There are no assumptions on points other
-/// than they belong to a vector space
-///
-///
-///
-/// @ingroup clustering_and_search
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvClusterEuclideanf32( const float* __restrict points,
- int numPoints, // actually not used but helpful
- int dim,
- int pointStride,
- const size_t* __restrict indices,
- int numIndices,
- int numClusters,
- float* __restrict clusterCenters,
- int clusterCenterStride,
- float* __restrict newClusterCenters,
- size_t* __restrict clusterMemberCounts,
- size_t* __restrict clusterBindings,
- float* sumOfClusterDistances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Function for computing cluster centers and cluster bindings
-/// for a set of normalized points of dimension dim. Cluster centers
-/// are also normalized (see remark below)
-///
-/// @param points
-/// Array of all points. Array size must be greater than
-/// numPoints * dim.
-///
-/// @param numPoints
-/// Number of points in points array.
-///
-/// @param dim
-/// dimension, e.g. 36
-///
-/// @param pointStride
-/// Byte distance between adjacent points in array
-///
-/// @param indices
-/// Array of point indices in points array. Processing will only
-/// occur on points whose indices are in this array. Each index in array
-/// must be smaller numPoints.
-///
-/// @param numIndices
-/// Length of indices array. numIndieces must be <= numPoints.
-///
-/// @param numClusters
-/// Number of cluster centers
-///
-/// @param clusterCenters
-/// current cluster centers;
-/// elements are distant by clusterCenterStride
-///
-/// @param clusterCenterStride
-/// byte distance between adjacent cluster centers in array
-///
-/// @param newClusterCenters
-/// array for new cluster centers; should be numClusterCenters long
-///
-/// @param clusterMemberCounts
-/// Element counts for each cluster; should be numClusterCenters long
-///
-/// @param clusterBindings
-/// Output indices of the clusters to which each vector belongs to, a
-/// rray must be numIndices long.
-///
-/// @param sumOfClusterDistances
-/// Array for sum of distances of cluster elements to cluster centers;
-/// Must be numClusters long
-///
-/// @return
-/// 0 if successfully clustered, otherwise error code
-///
-/// @remark
-/// this function assumes that points are normalized (e.g. NFT4
-/// descriptors). Cluster centers are also normalized. Normalized points
-/// are on a surface of unit sphere which is not a vector space but
-/// curved manifold of dimension (dim-1) embeded in Euclidean vector space
-/// of dimension dim
-///
-/// @ingroup clustering_and_search
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvClusterEuclideanNormedf32( const float* __restrict points,
- int numPoints,
- int dim,
- int pointStride,
- const size_t* __restrict indices,
- int numIndices,
- int numClusters,
- float* __restrict clusterCenters,
- int clusterCenterStride,
- float* __restrict newClusterCenters,
- size_t* __restrict clusterMemberCounts,
- size_t* __restrict clusterBindings,
- float* sumOfClusterDistances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Function for computing cluster centers and cluster bindings
-/// for a set of normalized points of dimension 36. Cluster centers
-/// are also normalized (see remark below)
-///
-/// @param points
-/// Array of all points. Array size must be greater than
-/// numPoints * 36.
-///
-/// @param numPoints
-/// Number of points in points array.
-///
-/// @param pointStride
-/// Byte distance between adjacent points in array
-///
-/// @param indices
-/// Array of point indices in points array. Processing will only
-/// occur on points whose indices are in this array. Each index in array
-/// must be smaller numPoints.
-///
-/// @param numIndices
-/// Length of indices array. numIndieces must be <= numPoints.
-///
-/// @param numClusters
-/// Number of cluster centers
-///
-/// @param clusterCenters
-/// current cluster centers;
-/// elements are distant by clusterCenterStride
-///
-/// @param clusterCenterStride
-/// byte distance between adjacent cluster centers in array
-///
-/// @param newClusterCenters
-/// array for new cluster centers; should be numClusterCenters long
-///
-/// @param clusterMemberCounts
-/// Element counts for each cluster; should be numClusterCenters long
-///
-/// @param clusterBindings
-/// Output indices of the clusters to which each vector belongs to, a
-/// rray must be numIndices long.
-///
-/// @param sumOfClusterDistances
-/// Array for sum of distances of cluster elements to cluster centers;
-/// Must be numClusters long
-///
-/// @return
-/// 0 if successfully clustered, otherwise error code
-///
-/// @remark
-/// this function assumes that points are normalized (e.g. NFT4
-/// descriptors). Cluster centers are also normalized. Normalized points
-/// are on a surphace of unit sphere which is not a vector space but
-/// curved manifold of dimension (dim-1) embeded in Euclidean vector space
-/// of dimension dim
-///
-/// @ingroup clustering_and_search
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvClusterEuclideanNormed36f32( const float* __restrict points,
- int numPoints,
- int pointStride,
- const size_t* __restrict indices,
- int numIndices,
- int numClusters,
- float* __restrict clusterCenters,
- int clusterCenterStride,
- float* __restrict newClusterCenters,
- size_t* __restrict clusterMemberCounts,
- size_t* __restrict clusterBindings,
- float* sumOfClusterDistances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Blur with 5x5 Gaussian filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterGaussian5x5s16_v2(). In the 2.0.0 release,
-/// fcvFilterGaussian5x5s16_v2 will be renamed to fcvFilterGaussian5x5s16
-/// and the signature of fcvFilterGaussian5x5s16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Convolution with 5x5 Gaussian kernel:
-/// \n 1 4 6 4 1
-/// \n 4 16 24 16 4
-/// \n 6 24 36 24 6
-/// \n 4 16 24 16 4
-/// \n 1 4 6 4 1
-///
-/// @param src
-/// Input int data (can be sq. of gradient, etc).
-/// \n\b NOTE: Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output int data. Size of buffer is srcWidth*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param blurBorder
-/// If set to 0, border is ignored.
-/// If set to 1, border is blurred by 0-padding adjacent values.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian5x5s16( const int16_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int16_t* __restrict dst,
- int blurBorder );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Blur with 5x5 Gaussian filter
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterGaussian5x5s16() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterGaussian5x5s16,
-/// \a fcvFilterGaussian5x5s16_v2 will be removed, and the current signature
-/// for \a fcvFilterGaussian5x5s16 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterGaussian5x5s16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Convolution with 5x5 Gaussian kernel:
-/// \n 1 4 6 4 1
-/// \n 4 16 24 16 4
-/// \n 6 24 36 24 6
-/// \n 4 16 24 16 4
-/// \n 1 4 6 4 1
-///
-/// @param src
-/// Input int data (can be sq. of gradient, etc).
-/// Size of buffer is srcStride*srcHeight*2 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output int data. Size of buffer is dstStride*srcHeight*2 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, edstStrid is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param blurBorder
-/// If set to 0, border is ignored.
-/// If set to 1, border is blurred by 0-padding adjacent values.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian5x5s16_v2( const int16_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dst,
- unsigned int dstStride,
- int blurBorder );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Blur with 5x5 Gaussian filter
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterGaussian5x5s32_v2(). In the 2.0.0 release,
-/// fcvFilterGaussian5x5s32_v2 will be renamed to fcvFilterGaussian5x5s32
-/// and the signature of fcvFilterGaussian5x5s32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @details
-/// Convolution with 5x5 Gaussian kernel:
-/// \n 1 4 6 4 1
-/// \n 4 16 24 16 4
-/// \n 6 24 36 24 6
-/// \n 4 16 24 16 4
-/// \n 1 4 6 4 1
-///
-/// @param src
-/// Input int data (can be sq. of gradient, etc).
-/// Size of buffer is srcWidth*srcHeight*4 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param dst
-/// Output int data. Size of buffer is srcWidth*srcHeight*4 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param blurBorder
-/// If set to 0, border is ignored.
-/// If set to 1, border is blurred by 0-padding adjacent values.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian5x5s32( const int32_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int32_t* __restrict dst,
- int blurBorder );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Blur with 5x5 Gaussian filter
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvFilterGaussian5x5s32() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvFilterGaussian5x5s32,
-/// \a fcvFilterGaussian5x5s32_v2 will be removed, and the current signature
-/// for \a fcvFilterGaussian5x5s32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvFilterGaussian5x5s32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// Convolution with 5x5 Gaussian kernel:
-/// \n 1 4 6 4 1
-/// \n 4 16 24 16 4
-/// \n 6 24 36 24 6
-/// \n 4 16 24 16 4
-/// \n 1 4 6 4 1
-///
-/// @param src
-/// Input int data (can be sq. of gradient, etc).
-/// Size of buffer is srcStride*srcHeight*4 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Image stride.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dst
-/// Output int data. Size of buffer is dstStride*srcHeight*4 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dstStride
-/// Output stride.
-/// \n\b NOTE: if 0, dstStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param blurBorder
-/// If set to 0, border is ignored.
-/// If set to 1, border is blurred by 0-padding adjacent values.
-///
-/// @ingroup image_processing
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvFilterGaussian5x5s32_v2( const int32_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int32_t* __restrict dst,
- unsigned int dstStride,
- int blurBorder );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Warps the patch centered at nPos in the input image using the affine
-/// transform in nAffine
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvTransformAffineu8_v2(). In the 2.0.0 release,
-/// fcvTransformAffineu8_v2 will be renamed to fcvTransformAffineu8
-/// and the signature of fcvTransformAffineu8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image. Size of buffer is srcWidth*srcHeight bytes.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param position[ 2 ]
-/// Position in the image
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param affine[ 2 ][ 2 ]
-/// Transformation matrix. The matrix stored
-/// in affine is using row major ordering: \n
-/// a11, a12, a21, a22 where the matrix is: \n
-/// | a11, a12 |\n
-/// | a21, a22 |\n
-///
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param patch
-/// Transformed patch.
-///
-/// @param patchWidth
-/// Patch width.
-///
-/// @param patchHeight
-/// Patch height.
-///
-/// @returns 0 if the transformation is valid
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvTransformAffineu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- const float* __restrict position,
- const float* __restrict affine,
- uint8_t* __restrict patch,
- unsigned int patchWidth,
- unsigned int patchHeight );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Warps the patch centered at nPos in the input image using the affine
-/// transform in nAffine
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvTransformAffineu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvTransformAffineu8,
-/// \a fcvTransformAffineu8_v2 will be removed, and the current signature
-/// for \a fcvTransformAffineu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvTransformAffineu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image. Size of buffer is srcStride*srcHeight bytes.
-///
-/// @param srcWidth
-/// Image width.
-///
-/// @param srcHeight
-/// Image height.
-///
-/// @param srcStride
-/// Stride of image (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be at least as much as srcWidth if not 0.
-///
-/// @param position[ 2 ]
-/// Position in the image
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param affine[ 2 ][ 2 ]
-/// Transformation matrix. The matrix stored
-/// in affine is using row major ordering: \n
-/// a11, a12, a21, a22 where the matrix is: \n
-/// | a11, a12 |\n
-/// | a21, a22 |\n
-///
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param patch
-/// Transformed patch.
-///
-/// @param patchWidth
-/// Patch width.
-///
-/// @param patchHeight
-/// Patch height.
-///
-/// @param patchStride
-/// Stride of patch (in bytes) - i.e., how many bytes between column 0 of row N
-/// and column 0 of row N+1.
-/// \n\b NOTE: if 0, patchStride is set as patchWidth.
-/// \n\b WARNING: must be at least as much as patchWidth if not 0.
-///
-/// @returns 0 if the transformation is valid
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvTransformAffineu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- const float* __restrict position,
- const float* __restrict affine,
- uint8_t* __restrict patch,
- unsigned int patchWidth,
- unsigned int patchHeight,
- unsigned int patchStride );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts a 17x17 rotation corrected patch from a 25x25 image.
-///
-/// @param src
-/// 25x25 input image in continuous memory.
-///
-/// @param dst
-/// 17x17 output patch.
-///
-/// @param orientation
-/// Rotation angle of patch relative to src.
-/// \n 10-bit fixed-point angle around unit circle.
-/// \n NOTE: 0 = 0 degrees and 1024 = 360 degrees.
-///
-/// @ingroup image_transform
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCopyRotated17x17u8( const uint8_t* __restrict src,
- uint8_t* __restrict dst,
- int orientation );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Counts "1" bits in supplied vector.
-///
-/// @param src
-/// Pointer to vector to count bits that are 1.
-///
-/// @param srcLength
-/// Length of the vector to count bits. Assumed that the remainder of bits modulo 8
-/// will be set to 0 a priori.
-///
-/// @returns total number of "1" bits in supplied vector
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvBitCountu8( const uint8_t* __restrict src,
- unsigned int srcLength );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Counts "1" bits in supplied 32-byte vector.
-///
-/// @param src
-/// Pointer to 32-byte vector(s) to count bits that are 1.
-///
-/// @returns total number of "1" bits in supplied vector
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvBitCount32x1u8( const uint8_t* __restrict src );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Counts bits in supplied 4, 32-byte vectors.
-///
-/// @param a
-/// Pointer to 32-byte vector to count bits.
-///
-/// @param b
-/// Pointer to 32-byte vector to count bits.
-///
-/// @param c
-/// Pointer to 32-byte vector to count bits.
-///
-/// @param d
-/// Pointer to 32-byte vector to count bits.
-///
-/// @param bitCount
-/// Array to store the four resultant bit counts.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvBitCount32x4u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- uint32_t* __restrict bitCount );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Counts bits in supplied 64-byte vector.
-///
-/// @param src
-/// Pointer to 64-byte vector(s) to count bits.
-///
-/// @return
-/// Bit count.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvBitCount64x1u8( const uint8_t* __restrict src );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Counts bits in supplied 4, 64-byte vectors.
-///
-/// @param a
-/// Pointer to 64-byte vector to count bits.
-///
-/// @param b
-/// Pointer to 64-byte vector to count bits.
-///
-/// @param c
-/// Pointer to 64-byte vector to count bits.
-///
-/// @param d
-/// Pointer to 64-byte vector to count bits.
-///
-/// @param bitCount
-/// Array to store the four resultant bit counts.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvBitCount64x4u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- uint32_t* __restrict bitCount );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Counts bits in supplied vector of unsigned intergers.
-///
-/// @param src
-/// Pointer to vector(s) to count bits.
-///
-/// @param srcLength
-/// Number of elements in vector
-///
-/// @return
-/// Bit count.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvBitCountu32( const uint32_t* __restrict src,
- unsigned int srcLength );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between the two supplied arbitrary length
-/// vectors.
-///
-/// @param a
-/// Pointer to vector to compute distance.
-///
-/// @param b
-/// Pointer to vector to compute distance.
-///
-/// @param abLength
-/// Length in bits of each of the vectors. Assumed that the remainder of
-/// bits modulo 8 will be set to 0 a priori.
-///
-/// @return
-/// Hamming distance between the two vectors.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvHammingDistanceu8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- unsigned int abLength );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between the two supplied 32-byte vectors.
-///
-/// @param a
-/// Pointer to 32-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param b
-/// Pointer to 32-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @return
-/// Hamming distance between the two vectors.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvHammingDistance32x1u8a4( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between the two supplied 64-byte vectors.
-///
-/// @param a
-/// Pointer to 64-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param b
-/// Pointer to 64-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @return
-/// Hamming distance between the two vectors.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvHammingDistance64x1u8a4( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between the two supplied 32-byte vectors.
-///
-/// @param a
-/// Pointer to 32-byte vector to compute distance.
-///
-/// @param b
-/// Pointer to 32-byte vector to compute distance.
-///
-/// @return
-/// Hamming distance between the two vectors.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvHammingDistance32x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between the two supplied 64-byte vectors.
-///
-/// @param a
-/// Pointer to 64-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param b
-/// Pointer to 64-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @return
-/// Hamming distance between the two vectors.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API uint32_t
-fcvHammingDistance64x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between A and each of B,C,D,E 32-byte vectors.
-///
-/// @param a
-/// Pointer to 32-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param b
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param c
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param d
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param e
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param hammingDistances
-/// Array to store each Hamming distance between the vectors.
-/// \n\b WARNING: must be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvHammingDistance32x4u8a4( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- const uint8_t* __restrict e,
- uint32_t* __restrict hammingDistances );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between A and each of B,C,D,E 64-byte
-/// vectors.
-///
-/// @param a
-/// Pointer to 32-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param b
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param c
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param d
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param e
-/// Pointer to 32-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param hammingDistances
-/// Array to store each Hamming distance between the vectors.
-/// \n\b WARNING: must be 128-bit aligned
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvHammingDistance64x4u8a4( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- const uint8_t* __restrict e,
- uint32_t* __restrict hammingDistances );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Computes the Hamming distance between A and each of B,C,D,E 64-byte vectors.
-///
-/// @param a
-/// Pointer to 64-byte vector to compute distance.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param b
-/// Pointer to 64-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param c
-/// Pointer to 64-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param d
-/// Pointer to 64-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param e
-/// Pointer to 64-byte vector to compute distance from A.
-/// \n\b WARNING: must be 32-bit aligned
-///
-/// @param hammingDistances
-/// Array to store each Hamming distance between the vectors.
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvHammingDistance64x4u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- const uint8_t* __restrict c,
- const uint8_t* __restrict d,
- const uint8_t* __restrict e,
- uint32_t* __restrict hammingDistances );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners and scores from the image
-///
-/// @param src
-/// 8-bit image
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width
-/// \n\b NOTE: must be a multiple of 8.
-/// \n\b WARNING: must be <= 2048.
-///
-/// @param srcHeight
-/// image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// pointer to the output array cointaining the interleaved x,y position of the
-/// detected corners.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param scores
-/// Pointer to the output array containing the scores of the detected corners.
-/// The score is computed as the sum of the absolute difference between the pixels in the
-/// contiguous arc and the centre pixel. A higher score value indicates a stronger corner feature.
-/// For example, a corner of score 108 is stronger than a corner of score 50.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded.
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast9Scoreu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners and scores from the image
-///
-/// @param src
-/// Grayscale image with one byte per pixel
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// image width
-/// \n\b NOTE: must be a multiple of 8.
-/// \n\b WARNING: must be <= 2048.
-///
-/// @param srcHeight
-/// image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// Pointer to the output array cointaining the interleaved x,y position of the
-/// detected corners.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param scores
-/// Pointer to the output array containing the scores of the detected corners.
-/// The score is computed as the sum of the absolute difference between the pixels in the
-/// contiguous arc and the centre pixel. A higher score value indicates a stronger corner feature.
-/// For example, a corner of score 108 is stronger than a corner of score 50.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded.
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param mask
-/// Per-pixel mask for each pixel represented in input image.
-/// If a bit set to 0, pixel will be a candidate for corner detection.
-/// If a bit set to 1, pixel will be ignored.
-///
-/// @param maskWidth
-/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param maskHeight
-/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast9InMaskScoreu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- unsigned int maskWidth,
- unsigned int maskHeight );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners and scores from the image
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvCornerFast9Scoreu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvCornerFast9Scoreu8,
-/// \a fcvCornerFast9Scoreu8_v2 will be removed, and the current signature
-/// for \a fcvCornerFast9Scoreu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvCornerFast9Scoreu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// non-maximum suppression can be enabled to reduce the number of false corners.
-///
-/// @param src
-/// 8-bit image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// Pointer to the output array cointaining the interleaved x,y position of the
-/// detected corners.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param scores
-/// Pointer to the output array containing the scores of the detected corners.
-/// The score is computed as the sum of the absolute difference between the pixels in the
-/// contiguous arc and the centre pixel. A higher score value indicates a stronger corner feature.
-/// For example, a corner of score 108 is stronger than a corner of score 50.
-/// \n\b NOTE: must be 128-bit aligned.
-/// \n\b NOTE: size of buffer is @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded. This number should account for the number of key points before non-maximum suppression.
-///
-/// @param nCorners
-/// Pointer to an integer storing the number of corners detected
-///
-/// @param nmsEnabled
-/// Enable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
-///
-/// @param tempBuf
-/// Pointer to scratch buffer if nms is enabled, otherwise it can be NULL.
-/// Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
-/// \n\b NOTE: must be 128-bit aligned.
-///
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast9Scoreu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners,
- uint32_t nmsEnabled,
- void* __restrict tempBuf);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners and scores from the image based on the mask. The mask specifies pixels
-/// to be ignored by the detector.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvCornerFast9InMaskScoreu8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvCornerFast9InMaskScoreu8,
-/// \a fcvCornerFast9InMaskScoreu8_v2 will be removed, and the current signature
-/// for \a fcvCornerFast9InMaskScoreu8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvCornerFast9InMaskScoreu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @details
-/// non-maximum suppression can be enabled to reduce the number of false corners.
-///
-/// @param src
-/// 8-bit grayscale image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// Pointer to the output array cointaining the interleaved x,y position of the
-/// detected corners.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param scores
-/// Pointer to the output array containing the scores of the detected corners.
-/// The score is computed as the sum of the absolute difference between the pixels in the
-/// contiguous arc and the centre pixel. A higher score value indicates a stronger corner feature.
-/// For example, a corner of score 108 is stronger than a corner of score 50.
-/// \n\b NOTE: must be 128-bit aligned.
-/// \n\b NOTE: size of buffer is @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded. This number should account for the number of key points before non-maximum suppression.
-///
-/// @param nCorners
-/// Pointer to an integer storing the number of corners detected
-///
-/// @param mask
-/// Mask used to omit regions of the image. For allowed mask sizes refer to
-/// @param maskWidth and @param maskHeight . The mask is so defined to work with multiple
-/// scales if necessary. For any pixel set to '1' in the mask, the corresponding pixel in the image
-/// will be ignored.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param maskWidth
-/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param maskHeight
-/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param nmsEnabled
-/// Enable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
-///
-/// @param tempBuf
-/// Pointer to scratch buffer if nms is enabled, otherwise it can be NULL.
-/// Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
-/// \n\b NOTE: must be 128-bit aligned.
-///
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast9InMaskScoreu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- unsigned int maskWidth,
- unsigned int maskHeight,
- uint32_t nmsEnabled,
- void* __restrict tempBuf);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners and scores from the image
-///
-/// @details
-/// non-maximum suppression can be enabled to reduce the number of false corners.
-///
-/// @param src
-/// 8-bit image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// Pointer to the output array cointaining the interleaved x,y position of the
-/// detected corners.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param scores
-/// Pointer to the output array containing the scores of the detected corners.
-/// The score is computed as the sum of the absolute difference between the pixels in the
-/// contiguous arc and the centre pixel. A higher score value indicates a stronger corner feature.
-/// For example, a corner of score 108 is stronger than a corner of score 50.
-/// \n\b NOTE: must be 128-bit aligned.
-/// \n\b NOTE: size of buffer is @param nCornersMax
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded. This number should account for the number of key points before non-maximum suppression.
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param nmsEnabled
-/// Enable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
-///
-/// @param tempBuf
-/// Pointer to scratch buffer if nms is enabled, otherwise it can be NULL.
-/// Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @return
-/// void.
-///
-/// @ingroup feature_detection
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast10Scoreu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- uint32_t nmsEnabled,
- void* __restrict tempBuf);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Extracts FAST corners and scores from the image based on the mask. The mask specifies pixels
-/// to be ignored by the detector.
-///
-/// @param src
-/// 8-bit grayscale image where keypoints are detected
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// image width
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param barrier
-/// FAST threshold. The threshold is used to compare difference between intensity value of
-/// the central pixel and pixels on a circle surrounding this pixel.
-///
-/// @param border
-/// Number for pixels to ignore from top,bottom,right,left of the image
-///
-/// @param xy
-/// Pointer to the output array cointaining the interleaved x,y position of the
-/// detected corners.
-/// \n\b NOTE: Remember to allocate double the size of @param nCornersMax
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param scores
-/// Pointer to the output array containing the scores of the detected corners.
-/// The score is computed as the sum of the absolute difference between the pixels in the
-/// contiguous arc and the centre pixel. A higher score value indicates a stronger corner feature.
-/// For example, a corner of score 108 is stronger than a corner of score 50.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param nCornersMax
-/// Maximum number of corners. The function exits when the maximum number of
-/// corners is exceeded. This number should account for the number of key points before non-maximum suppression.
-///
-/// @param nCorners
-/// pointer to an integer storing the number of corners detected
-///
-/// @param mask
-/// Mask used to omit regions of the image. For allowed mask sizes refer to
-/// @param maskWidth and @param maskHeight . The mask is so defined to work with multiple
-/// scales if necessary. For any pixel set to '1' in the mask, the corresponding pixel in the image
-/// will be ignored.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param maskWidth
-/// Width of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param maskHeight
-/// Height of the mask. Both width and height of the mask must be 'k' times image width and height,
-/// where k = 1/2, 1/4 , 1/8 , 1, 2, 4 and 8.
-///
-/// @param nmsEnabled
-/// Enable non-maximum suppresion to prune weak key points (0=disabled, 1=enabled)
-///
-/// @param tempBuf
-/// Pointer to scratch buffer if nms is enabled, otherwise it can be NULL.
-/// Size of buffer: (3*nCornersMax+srcHeight+1)*4 bytes
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @return
-/// void.
-///
-/// @ingroup feature_detection
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvCornerFast10InMaskScoreu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- uint32_t maskWidth,
- uint32_t maskHeight,
- uint32_t nmsEnabled,
- void* __restrict tempBuf);
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Optical flow. Bitwidth optimized implementation
-///
-/// \n\b ATTENTION: The signature of this function will be changed to remove
-/// unused parameters when the 2.0.0 release of this library is made.
-/// Until 2.0.0, the developer should use this implementation with the expectation of
-/// moving to a different signature when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src1
-/// Input image from frame #1.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param src2
-/// Input image from frame #2.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Input image height.
-///
-/// @param src1Pyr
-/// Image Pyradmid of src1
-/// \n\b WARNING: obtained by calling fcvPyramidCreateu8
-///
-/// @param src2Pyr
-/// Image Pyradmid of src2
-/// \n\b WARNING: obtained by calling fcvPyramidCreateu8
-///
-/// @param dx1Pyr
-/// Horizontal Sobel gradient pyramid for src1
-/// \n\b NOTE: To be left NULL. In this case the function will
-/// build the pyramid internally.
-///
-/// @param dy1Pyr
-/// Vertical Sobel grading pyraid for src1
-/// \n\b NOTE: To be left NULL. In this case the function will
-/// build the pyramid internally.
-///
-/// @param featureXY
-/// Pointer to X,Y floating point, sub-pixel coordinates for features to
-/// track. Stored as X,Y tuples. featureXY array storage must
-/// be >= featureLen*2.
-///
-/// @param featureXY_out
-/// Pointer to X,Y floating point, sub-pixel coordinates for tracked features
-/// Stored as X,Y tuples. featureXY array storage must
-/// be >= featureLen*2.
-///
-/// @param featureStatus
-/// Pointer to integer array for status of each feature defined in
-/// featureXY. featureStatus array storage must
-/// be >= featureLen.
-///
-/// @param featureLen
-/// Number of features in featuresXY and featureStatus array.
-///
-/// @param windowWidth
-/// Width of window for optical flow searching.
-/// \n\b NOTE: suggested value 5, 7 or 9
-///
-/// @param windowHeight
-/// Height of window for optical flow searching.
-/// \n\b NOTE:: suggested value 5, 7 or 9
-///
-/// @param maxIterations
-/// Maximum number of LK iterations to perform per pyramid level.
-/// \n\b NOTE: suggested value 5 or 7
-///
-/// @param nPyramidLevels
-/// Number of pyramid levels.
-/// \n\b NOTE: suggested value 3 or 4 depending on size of image
-///
-/// @param maxResidue
-/// Maximum feature residue above which feature is declared lost.
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @param minDisplacement
-/// Minimum displacement solved below which iterations are stopped.
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @param minEigenvalue
-/// Threshold for feature goodness. If it is set it to 0, the check is disabled.
-/// \n\b NOTE: If good features are passed to the function, then it is suggested
-/// that you set it to 0 to have faster function time
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @param lightingNormalized
-/// if 1 Enable lightning normalization
-/// \n if 0 Disable lightning normalization
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @ingroup object_detection
-// -----------------------------------------------------------------------------
-
-FASTCV_API void
-fcvTrackLKOpticalFlowu8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- int srcWidth,
- int srcHeight,
- const fcvPyramidLevel* src1Pyr,
- const fcvPyramidLevel* src2Pyr,
- const fcvPyramidLevel* dx1Pyr,
- const fcvPyramidLevel* dy1Pyr,
- const float* featureXY,
- float* featureXY_out,
- int32_t* featureStatus,
- int featureLen,
- int windowWidth,
- int windowHeight,
- int maxIterations,
- int nPyramidLevels,
- float maxResidue,
- float minDisplacement,
- float minEigenvalue,
- int lightingNormalized );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Optical flow.
-///
-/// \n\b ATTENTION: This function will be removed when the 2.0.0 release of this library
-/// is made. Until 2.0.0, the developer should use this implementation with the expectation of
-/// using \a fcvTrackLKOpticalFlowu8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src1
-/// Input image from frame #1.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param src2
-/// Input image from frame #2.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Input image width.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Input image height.
-///
-/// @param src1Pyr
-/// Image Pyradmid of src1
-/// \n\b WARNING: obtained by calling fcvPyramidCreateu8
-///
-/// @param src2Pyr
-/// Image Pyradmid of src2
-/// \n\b WARNING: obtained by calling fcvPyramidCreateu8
-///
-/// @param dx1Pyr
-/// Horizontal Sobel gradient pyramid for src1
-/// \n\b NOTE: To be left NULL. In this case the function will
-/// build the pyramid internally.
-///
-/// @param dy1Pyr
-/// Vertical Sobel grading pyraid for src1
-/// \n\b NOTE: To be left NULL. In this case the function will
-/// build the pyramid internally.
-///
-/// @param featureXY
-/// Pointer to X,Y floating point, sub-pixel coordinates for features to
-/// track. Stored as X,Y tuples. featureXY array storage must
-/// be >= featureLen*2.
-///
-/// @param featureXY_out
-/// Pointer to X,Y floating point, sub-pixel coordinates for tracked features
-/// Stored as X,Y tuples. featureXY array storage must
-/// be >= featureLen*2.
-///
-/// @param featureStatus
-/// Pointer to integer array for status of each feature defined in
-/// featureXY. featureStatus array storage must
-/// be >= featureLen.
-/// \n\b NOTE: Possible status are :
-/// \n TRACKED 1
-/// \n NOT_FOUND -1
-/// \n SMALL_DET -2
-/// \n MAX_ITERATIONS -3
-/// \n OUT_OF_BOUNDS -4
-/// \n LARGE_RESIDUE -5
-/// \n SMALL_EIGVAL -6
-/// \n INVALID -99
-///
-/// @param featureLen
-/// Number of features in featuresXY and featureStatus array.
-///
-/// @param windowWidth
-/// Width of window for optical flow searching.
-/// \n\b NOTE: suggested value 5, 7 or 9
-///
-/// @param windowHeight
-/// Height of window for optical flow searching.
-/// \n\b NOTE:: suggested value 5, 7 or 9
-///
-/// @param maxIterations
-/// Maximum number of LK iterations to perform per pyramid level.
-/// \n\b NOTE: suggested value 5 or 7
-///
-/// @param nPyramidLevels
-/// Number of pyramid levels.
-/// \n\b NOTE: suggested value 3 or 4 depending on size of image
-///
-/// @param maxResidue
-/// Maximum feature residue above which feature is declared lost.
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @param minDisplacement
-/// Minimum displacement solved below which iterations are stopped.
-/// \n\b NOTE : Suggest that be set to between 0.1 and 0.2, say 0.15
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @param minEigenvalue
-/// Threshold for feature goodness. If it is set it to 0, the check is disabled.
-/// \n\b NOTE: If good features are passed to the function, then it is suggested
-/// that you set it to 0 to have faster function time
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @param lightingNormalized
-/// if 1 Enable lightning normalization
-/// \n if 0 Disable lightning normalization
-/// \n\b NOTE: obsolete parameters, set to 0
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvTrackLKOpticalFlowf32( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- const fcvPyramidLevel* src1Pyr,
- const fcvPyramidLevel* src2Pyr,
- const fcvPyramidLevel* dx1Pyr,
- const fcvPyramidLevel* dy1Pyr,
- const float* featureXY,
- float* featureXY_out,
- int32_t* featureStatus,
- int featureLen,
- int windowWidth,
- int windowHeight,
- int maxIterations,
- int nPyramidLevels,
- float maxResidue,
- float minDisplacement,
- float minEigenvalue,
- int lightingNormalized );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Builds an image pyramid of float32 arising from a single
-/// original image - that are successively downscaled w.r.t. the
-/// pre-set levels.
-/// \n\b NOTE: Memory should be deallocated using fcvPyramidDelete
-///
-/// @param src
-/// Base image. Size of buffer is srcWidth*srcHeight*4 bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of base image
-/// \n\b WARNING: must be a multiple of 2^numLevels
-///
-/// @param srcHeight
-/// Height of base image
-/// \n\b WARNING: must be a multiple of 2^numLevels
-///
-/// @param numLevels
-/// Number of levels of the pyramid
-///
-/// @param pyramid
-/// Output pyramid of numLevels+1 images of the same type as src .
-/// pyramid[0] will be the same as src . pyramid[1] is the next
-/// pyramid layer, a smoothed and down-sized src , and so on.
-///
-/// @ingroup image_processing
-//-------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidCreatef32( const float* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int numLevels,
- fcvPyramidLevel* pyramid );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Builds an image pyramid of uint8_t arising from a single
-/// original image - that are successively downscaled w.r.t. the
-/// pre-set levels.
-/// \n\b NOTE: Memory should be deallocated using fcvPyramidDelete
-///
-/// @param src
-/// Base image. Size of buffer is srcWidth*srcHeight bytes.
-///
-/// @param srcWidth
-/// Width of base image
-/// \n\b WARNING: must be a multiple of 2^(numLevels-1)
-///
-/// @param srcHeight
-/// height of base image
-/// \n\b NOTE: must be a multiple of 2^(numLevels-1)
-///
-/// @param numLevels
-/// Number of levels of the pyramid
-///
-/// @param pyramid
-/// Output pyramid of numLevels+1 images of the same type as src .
-/// pyramid[0] will be the same as src . pyramid[1] is the next
-/// pyramid layer, a smoothed and down-sized src , and so on.
-///
-/// @ingroup image_processing
-//-------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidCreateu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int numLevels,
- fcvPyramidLevel* pyramid );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Creates a gradient pyramid of int16_t from an image pyramid of uint8_t
-///
-/// @param imgPyr
-/// Input Image Pyramid
-///
-/// @param dxPyr
-/// Horizontal Sobel gradient pyramid
-///
-/// @param dyPyr
-/// Verical Sobel gradient pyramid
-///
-/// @param numLevels
-/// Number of levels in the pyramids
-///
-/// @ingroup image_processing
-//-------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidSobelGradientCreatei16( const fcvPyramidLevel* imgPyr,
- fcvPyramidLevel* dxPyr,
- fcvPyramidLevel* dyPyr,
- unsigned int numLevels );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Creates a gradient pyramid of float32 from an image pyramid of uint8_t
-///
-/// @param imgPyr
-/// input Image Pyramid
-///
-/// @param dxPyr
-/// Horizontal Sobel gradient pyramid
-///
-/// @param dyPyr
-/// Verical Sobel gradient pyramid
-///
-/// @param numLevels
-/// Number of levels in the pyramids
-///
-/// @ingroup image_processing
-//-------------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidSobelGradientCreatef32( const fcvPyramidLevel* imgPyr,
- fcvPyramidLevel* dxPyr,
- fcvPyramidLevel* dyPyr,
- unsigned int numLevels );
-
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Creates a gradient pyramid of integer8 from an image pyramid of uint8_t
-///
-/// @param imgPyr
-/// input Image Pyramid
-///
-/// @param dxPyr
-/// Horizontal Sobel gradient pyramid
-///
-/// @param dyPyr
-/// Verical Sobel gradient pyramid
-///
-/// @param numLevels
-/// Number of levels in the pyramids
-///
-/// @ingroup image_processing
-// -----------------------------------------------------------------------------
-
-FASTCV_API int
-fcvPyramidSobelGradientCreatei8( const fcvPyramidLevel* imgPyr,
- fcvPyramidLevel* dxPyr,
- fcvPyramidLevel* dyPyr,
- unsigned int numLevels );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelPlanars16_v3(). In the 2.0.0 release,
-/// fcvImageGradientSobelPlanars16_v3 will be renamed to fcvImageGradientSobelPlanars16
-/// and the signature of fcvImageGradientSobelPlanars16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelPlanars16( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelPlanars16_v3(). In the 2.0.0 release,
-/// fcvImageGradientSobelPlanars16_v3 will be renamed to fcvImageGradientSobelPlanars16
-/// and the signature of fcvImageGradientSobelPlanars16_v2 and
-/// fcvImageGradientSobelPlanars16_v3 as it appears now, will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays.
-/// \n\b NOTE: if 0, dxyStride is set as (srcWidth*sizeof(int16_t)).
-/// \n\b WARNING: must be multiple of 16 (8 * 2-bytes per gradient value), and at least as much as srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelPlanars16_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- unsigned int dxyStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data without normalization.
-/// This function computes central differences on 3x3 neighborhood and then convolves
-/// the result with Sobel kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvImageGradientSobelPlanars16_v2() with a change in behavior: no normalization
-/// at the end of the calculation.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientSobelPlanars16,
-/// \a fcvImageGradientSobelPlanars16_v2 and fcvImageGradientSobelPlanars16_v3
-/// will be removed, and the current signature for \a fcvImageGradientSobelPlanars16
-/// and fcvImageGradientSobelPlanars16_v3 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientSobelPlanars16 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient. The number of pixels in a row.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: must be multiple of 8.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays, is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in the gradient arrays dx or dy. If left at 0 gradStride is default to 2 * srcWidth.
-/// \n\b NOTE: must be multiple of 8.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageGradientSobelPlanars16_v3( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- unsigned int dxyStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelInterleaveds16_v3(). In the 2.0.0 release,
-/// fcvImageGradientSobelInterleaveds16_v3 will be renamed to fcvImageGradientSobelInterleaveds16
-/// and the signature of fcvImageGradientSobelInterleaveds16 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8
-///
-/// @param gradients
-/// Buffer to store horizontal and vertical gradient. Must be
-/// (width-2)*(height-2) *2 in size.
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelInterleaveds16( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelInterleaveds16_v3(). In the 2.0.0 release,
-/// fcvImageGradientSobelInterleaveds16_v3 will be renamed to fcvImageGradientSobelInterleaveds16
-/// and the signature of fcvImageGradientSobelInterleaveds16 and
-/// fcvImageGradientSobelInterleaveds16_v2 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param gradients
-/// Buffer to store horizontal and vertical gradient. Must be
-/// gradStride*(height-2) *2 bytes in size.
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param gradStride
-/// Stride (in bytes) of the interleaved gradients array.
-/// \n\b NOTE: if 0, gradStride is set as (srcWidth-2)*2*sizeof(int16_t).
-/// \n\b WARNING: must be multiple of 8, and at least as much as 4*srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelInterleaveds16_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients,
- unsigned int gradStride );
-
-// -----------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-/// \n Compared to the original and v2 functions, this v3 functions does not normalize
-/// \n the gradients (divide by 8). It just returns the actual dx, dy values.
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvImageGradientSobelInterleaveds16_v2() with a change in behavior: no
-/// normalization at the end of the calculation.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientSobelInterleaveds16,
-/// \a fcvImageGradientSobelInterleaveds16_v2 and fcvImageGradientSobelInterleaveds16_v3
-/// will be removed, and the current signature for \a fcvImageGradientSobelInterleaveds16
-/// and fcvImageGradientSobelInterleaveds16_v3 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientSobelInterleaveds16 when transitioning to 2.0.0.
-/// \n\n
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient. The number of pixels in a row.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param gradients
-/// Buffer to store horizontal and vertical gradient. Must be
-/// gradStride*(height-2) *2 bytes in size.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param gradStride
-/// Stride (in bytes) is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in the interleaved gradients array. If left at 0 gradStride is default to 4 * (srcWidth-2).
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @ingroup image_processing
-// -----------------------------------------------------------------------------
-FASTCV_API void
-fcvImageGradientSobelInterleaveds16_v3( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients,
- unsigned int gradStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelInterleavedf32_v2(). In the 2.0.0 release,
-/// fcvImageGradientSobelInterleavedf32_v2 will be renamed to fcvImageGradientSobelInterleavedf32
-/// and the signature of fcvImageGradientSobelInterleavedf32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8
-///
-/// @param gradients
-/// Buffer to store horizontal and vertical gradient. Must be
-/// (width-2)*(height-2) *2 floats in size.
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelInterleavedf32( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel. The output is in interleaved format (i.e.) [dx][dy][dx][dy]....
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvImageGradientSobelInterleavedf32() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientSobelInterleavedf32,
-/// \a fcvImageGradientSobelInterleavedf32_v2 will be removed, and the current signature
-/// for \a fcvImageGradientSobelInterleavedf32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientSobelInterleavedf32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param gradients
-/// Buffer to store horizontal and vertical gradient. Must be
-/// gradStride*(height-2) *2 bytes in size.
-/// Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param gradStride
-/// Stride (in bytes) of the interleaved gradients array.
-/// \n\b NOTE: if 0, gradStride is set as (srcWidth-2)*2*sizeof(float).
-/// \n\b WARNING: must be multiple of 8, and at least as much as (srcWidth-2)*2*sizeof(float) if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelInterleavedf32_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients,
- unsigned int gradStride);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function
-/// computes central differences on 3x3 neighborhood and then convolves the
-/// result with Sobel kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvFilterGaussian3x3u8_v2(). In the 2.0.0 release,
-/// fcvImageGradientSobelPlanars8_v2 will be renamed to fcvImageGradientSobelPlanars8
-/// and the signature of fcvImageGradientSobelPlanars8 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelPlanars8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int8_t* __restrict dx,
- int8_t* __restrict dy);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function
-/// computes central differences on 3x3 neighborhood and then convolves the
-/// result with Sobel kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvImageGradientSobelPlanars8() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientSobelPlanars8,
-/// \a fcvImageGradientSobelPlanars8_v2 will be removed, and the current signature
-/// for \a fcvImageGradientSobelPlanars8 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientSobelPlanars8 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvImageGradientSobelPlanars8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int8_t* __restrict dx,
- int8_t* __restrict dy,
- unsigned int dxyStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelPlanarf32_v2(). In the 2.0.0 release,
-/// fcvImageGradientSobelPlanarf32_v2 will be renamed to fcvImageGradientSobelPlanarf32
-/// and the signature of fcvImageGradientSobelPlanarf32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (width)*(height) in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageGradientSobelPlanarf32( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvImageGradientSobelPlanarf32() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientSobelPlanarf32,
-/// \a fcvImageGradientSobelPlanarf32_v2 will be removed, and the current signature
-/// for \a fcvImageGradientSobelPlanarf32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientSobelPlanarf32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-/// \n\b WARNING: must be multiple of 8, and at least as much as srcWidth if not 0.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays.
-/// \n\b NOTE: if 0, dxyStride is set as 4*srcWidth.
-/// \n\b WARNING: must be multiple of 32 (8 * 4-bytes per gradient value),and at least as much as srcWidth*sizeof(float) if not 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageGradientSobelPlanarf32_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy,
- unsigned int dxyStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function's signature will become \b OBSOLETE in a future
-/// release of this library (2.0.0). The new interface is specified in the
-/// function: fcvImageGradientSobelPlanarf32f32_v2(). In the 2.0.0 release,
-/// fcvImageGradientSobelPlanarf32f32_v2 will be renamed to fcvImageGradientSobelPlanarf32f32
-/// and the signature of fcvImageGradientSobelPlanarf32f32 as it appears now,
-/// will be removed.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight floats.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels (not bytes) between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b NOTE: if 0, srcStride is set as srcWidth.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (width)*(height) floats in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (width)*(height) floats in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageGradientSobelPlanarf32f32( const float * __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Creates a 2D gradient image from source luminance data. This function computes
-/// central differences on 3x3 neighborhood and then convolves the result with Sobel
-/// kernel
-/// \n
-/// \n [ -1 0 +1 ] [ -1 -2 -1 ]
-/// \n dx = [ -2 0 +2 ] * src dy = [ 0 0 0 ] * src
-/// \n [ -1 0 +1 ] [ +1 +2 +1 ]
-///
-/// \n\b ATTENTION: This function is a duplication of of
-/// fcvImageGradientSobelPlanarf32f32()() with the addition of extra parameters.
-/// This function has been added to allow for backward compatibility
-/// with the original function. When the 2.0.0 release of this library
-/// is made, this function will be renamed to: \a fcvImageGradientSobelPlanarf32f32(),
-/// \a fcvImageGradientSobelPlanarf32f32_v2 will be removed, and the current signature
-/// for \a fcvImageGradientSobelPlanarf32f32 will be removed. Until 2.0.0, the
-/// developer should use this implementation with the expectation of
-/// renaming it to \a fcvImageGradientSobelPlanarf32f32 when transitioning to 2.0.0.
-/// \n\n
-///
-/// @param src
-/// Input image/patch. Size of buffer is srcStride*srcHeight floats.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param srcWidth
-/// Width of src data to create gradient.
-/// \n\b WARNING: must be multiple of 8.
-///
-/// @param srcHeight
-/// Height of src data to create gradient.
-///
-/// @param srcStride
-/// Stride (in bytes) of image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// \n\b WARNING: must be multiple of 32 (8 * 4-bytes), and at least as much as srcWidth*sizeof(float) if not 0.
-/// \n\b NOTE: if 0, srcStride is set as srcWidth*4.
-///
-/// @param dx
-/// Buffer to store horizontal gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dy
-/// Buffer to store vertical gradient. Must be (dxyStride)*(height) bytes in size.
-/// \n\b NOTE: a border of 1 pixel in size on top, bottom, left, and right
-/// contains undefined values. Gradient output is scaled by 1/8.
-/// \n\b NOTE: data should be 128-bit aligned.
-///
-/// @param dxyStride
-/// Stride (in bytes) of 'dx' and 'dy' gradient arrays.
-/// \n\b WARNING: must be multiple of 32 (8 * 4-bytes per gradient value).
-/// \n\b WARNING: must be multiple of 32 (8 * 4-bytes), and at least as much as srcWidth*sizeof(float) if not 0.
-/// \n\b NOTE: if 0, dxyStride is set as srcWidth*4.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvImageGradientSobelPlanarf32f32_v2( const float * __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy,
- unsigned int dxyStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Block Optical Flow 16x16 - Tracks all 16x16 blocks in the Region of Interest
-/// (ROI) from Source-1 to Source-2. Generates Motion Vectors for blocks where
-/// motion is detected.
-///
-/// @details
-///
-/// @param[in] src1
-/// Pointer to source image where the original blocks are present.
-/// \n Dimensions should be same as \a src2, and equal to \a srcWidth,
-/// \a srcHeight, \a srcStride.
-/// \n\b WARNING: must be 128-bit aligned. Buffer size is srcStride*srcHeight bytes.
-///
-/// @param[in] src2
-/// Pointer to second source image where motion vectors for blocks in \a img1
-/// are to be located.
-/// \n Dimensions should be same as \a src1, and equal to \a srcWidth,
-/// \a srcHeight, \a srcStride.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param[in] srcWidth
-/// Width of source images pointed by \a src1 and \a src2.
-///
-/// @param[in] srcHeight
-/// Height of source images pointed by \a src1 and \a src2.
-///
-/// @param[in] srcStride
-/// Stride of source images pointed by \a src1 and \a src2.
-///
-/// @param[in] roiLeft
-/// Left co-ordinate (x0) of Region-of-Interest (ROI).
-///
-/// @param[in] roiTop
-/// Top co-orgdinate (y0) of Region-of-Interest (ROI).
-///
-/// @param[in] roiRight
-/// Right co-ordinate (x1) of Region-of-Interest (ROI).
-///
-/// @param[in] roiBottom
-/// Bottom co-ordinate (y1) of Region-of-Interest (ROI).
-///
-/// @param[in] shiftSize
-/// Distance in number of pixels (both horizontally and vertically) between
-/// consecutive blocks for which motion vector is searched.
-/// \n\b NOTE: Larger the value, less number of blocks will be tracked, and
-/// hence the function will run faster.
-///
-/// @param[in] searchWidth
-/// Numbers of pixels horizontally on left and right of the source block (src2) where a
-/// match is searched for. For example, if searchWidth is 8 and searchHeight
-/// is 8, then the search area for any given block will be 32x32 around
-/// the location of that block.
-///
-/// @param[in] searchHeight
-/// Numbers of pixels vertically on top and bottom of the source block (src2) where a
-/// match is searched for. For example, if searchWidth is 8 and searchHeight
-/// is 8, then the search area for any given block will be 32x32 around
-/// the location of that block.
-///
-/// @param[in] searchStep
-/// Distance in number of pixels between consecutive search targets within
-/// the above search window.
-/// \n\b NOTE: Larger the value, more coarse the search will be and thus
-/// will make the fucntion run faster. Smaller the value, more dense the
-/// search will be, making the funciton run slower.
-///
-/// @param[in] usePrevious
-/// Indicates if the function should use the existing motion vectors in
-/// locX and locY as the starting point for motion vector search.
-/// \n\b NOTE: This parameter is redundant at the moment.
-///
-/// @param[out] numMv
-/// Pointer to variable that will store the count of Motion Vectors
-/// generated by the function.
-/// \n\b WARNING: This pointer should be Non-NULL.
-///
-/// @param[out] locX
-/// Pointer to an array which will store the X co-ordinates of the
-/// original Block for which a Motion Vector is generated.
-/// \n\b NOTE: The array will contain \a numMv valid entries.
-/// \n\b WARNING: This pointer should be Non-NULL, and the array size should
-/// be >= number of 16x16 blocks in ROI.
-///
-/// @param[out] locY
-/// Pointer to an array which will store the Y co-ordinates of the
-/// original Block for which a Motion Vector is generated.
-/// \n\b NOTE: The array will contain \a numMv valid entries.
-/// \n\b WARNING: This pointer should be Non-NULL, and the array size should
-/// be >= number of 16x16 blocks in ROI.
-///
-/// @param[out] mvX
-/// Pointer to an array which will store the X co-ordinates of the block in \a src2
-/// corresponding block in \a src1. (\a mvX[i]-\a locX[i]) will give the motion
-/// vector for the block in \a src1.
-/// \n\b NOTE: The array will contain \a numMv valid entries.
-/// \n\b WARNING: This pointer should be Non-NULL, and the array size should
-/// be >= number of 16x16 blocks in ROI.
-///
-/// @param[out] mvY
-/// Pointer to an array which will store the Y co-ordinates of the block in \a src2
-/// corresponding block in \a src1. (\a mvY[i]-\a locY[i]) will give the motion
-/// vector for the block in \a src1.
-/// \n\b NOTE: The array will contain \a numMv valid entries.
-/// \n\b WARNING: This pointer should be Non-NULL, and the array size should
-/// be >= number of 16x16 blocks in ROI.
-///
-/// @return
-/// 0 - Success, Failure otherwise.
-///
-/// @ingroup object_detection
-//------------------------------------------------------------------------------
-FASTCV_API int
-fcvTrackBMOpticalFlow16x16u8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t roiLeft,
- uint32_t roiTop,
- uint32_t roiRight,
- uint32_t roiBottom,
- uint32_t shiftSize,
- uint32_t searchWidth,
- uint32_t searchHeight,
- uint32_t searchStep,
- uint32_t usePrevious,
- uint32_t * numMv,
- uint32_t * locX,
- uint32_t * locY,
- uint32_t * mvX,
- uint32_t * mvY);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs per-element bitwise-OR operation on two 8-bit single channel images.
-/// Two images should have the same size. dst(I)=src1(I) V src2(I) if mask(I) is not zero.
-///
-/// @param src1
-/// Pointer to the 8-bit source image 1.
-///
-/// @param src2
-/// Pointer to the 8-bit source image 2.
-///
-/// @param srcWidth
-/// Width of source images pointed by src1 and src2.
-///
-/// @param srcHeight
-/// Height of source images pointed by src1 and src2.
-///
-/// @param srcStride
-/// Stride of source images (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param dst
-/// Pointer to the 8-bit destination image.
-///
-/// @param dstStride
-/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param mask
-/// Pointer to the 8-bit single channel mask. It specifies elements of the destination array to be changed.
-/// The mask is optional. If there is no mask, the value is NULL.
-///
-/// @param maskStride
-/// Stride of the mask (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If there is no mask, the value is 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvBitwiseOru8(const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride,
- uint8_t * __restrict mask,
- uint32_t maskStride );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Performs per-element bitwise-OR operation on two 32-bit single channel images.
-/// Two images should have the same size. dst(I)=src1(I) V src2(I) if mask(I) is not zero.
-///
-/// @param src1
-/// Pointer to the 32-bit source image 1.
-///
-/// @param src2
-/// Pointer to the 32-bit source image 2.
-///
-/// @param srcWidth
-/// Width of source images pointed by src1 and src2.
-///
-/// @param srcHeight
-/// Height of source images pointed by src1 and src2.
-///
-/// @param srcStride
-/// Stride of source images (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param dst
-/// Pointer to the 8-bit destination image.
-///
-/// @param dstStride
-/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param mask
-/// Pointer to the 8-bit single channel mask. It specifies elements of the destination array to be changed.
-/// The mask is optional. If there is no mask, the value is NULL.
-///
-/// @param maskStride
-/// Stride of the mask (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If there is no mask, the value is 0.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvBitwiseOrs32(const int32_t* __restrict src1,
- const int32_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t * __restrict dst,
- uint32_t dstStride,
- uint8_t * __restrict mask,
- uint32_t maskStride);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Converts an image from RGB space to grayscale
-///
-/// @details
-///
-/// @param src
-/// Source 8-bit image, BGR888 format (R is lowest byte for the pixel)
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Source image width.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// Source image height.
-///
-/// @param srcStride
-/// Stride of source image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If set to 0, srcStride=srcWidth as default
-///
-/// @param dst
-/// Destination 8-bit gray-scale image.
-/// \n\b WARNING: must be 128-bit aligned.
-///
-/// @param dstStride
-/// Stride of destination image (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2).
-/// If set to 0, dstStride=srcStride as default
-///
-///
-///
-/// @ingroup color_conversion
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvColorRGB888ToGrayu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Integral of the image tilted by 45 degrees
-///
-/// @details
-/// Calculates the tilted integral image of an input image
-/// and adds an zero-filled border on top. Left border not zero.
-/// dst[i,j]=sum (src[m,n]), where n according to
-/// descDBTargetId.
-///
-/// @param dbLUT
-/// A pointer to uint32_t [numDBLUT][2],
-/// which stores the starting index of descDB and
-/// the number of descriptors
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param numDBLUT
-/// The size of dbLUT
-///
-/// @param descDB
-/// A pointer to int8_t [numDescDB][36],
-/// which stores descriptors
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param descDBInvLenQ38
-/// A pointer to uint32_t [numDescDB],
-/// which stores the inverse length of descDB.
-/// The value is in Q38 format.
-///
-/// @param descDBTargetId
-/// A pointer to uint16_t [numDescDB],
-/// which stores the target id.
-///
-/// @param descDBOldIdx
-/// A pointer to uint32_t [numDescDB],
-/// which stores the old index of the desc before sorting
-///
-/// @param numDescDB
-/// Number of descriptor in the database.
-///
-/// @ingroup feature_detection
-//---------------------------------------------------------------------------
-
-FASTCV_API int
-fcvLinearSearchPrepare8x36s8( uint32_t * __restrict dbLUT,
- uint32_t numDBLUT,
- int8_t * __restrict descDB,
- uint32_t * __restrict descDBInvLenQ38,
- uint16_t * __restrict descDBTargetId,
- uint32_t * __restrict descDBOldIdx,
- uint32_t numDescDB );
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Perform linear search of descriptor in a database
-///
-/// @param dbLUT
-/// A pointer to uint32_t [numDBLUT][2],
-/// which stores the starting index of descDB and
-/// the number of descriptors
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param numDBLUT
-/// The size of dbLUT
-///
-/// @param descDB
-/// A pointer to int8_t [numDescDB][36],
-/// which stores descriptors
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param descDBInvLenQ38
-/// A pointer to uint32_t [numDescDB],
-/// which stores the inverse length of descDB.
-/// The value is in Q38 format.
-///
-/// @param descDBTargetId
-/// A pointer to uint16_t [numDescDB],
-/// which stores the target id.
-///
-/// @param numDescDB
-/// Number of descriptor in the database.
-///
-/// @param srcDesc
-/// A pointer to int8_t [numSrcDesc][36],
-/// which stores descriptors.
-/// \n\b WARNING: must be 64-bit aligned.
-///
-/// @param srcDescInvLenQ38
-/// A pointer to uint32_t [numSrcDec],
-/// which stores the inverse length of srcDesc.
-/// The value is in Q38 format.
-///
-/// @param srcDescIdx
-/// A pointer to the dbLUT data
-///
-/// @param numSrcDesc
-/// Number of source descriptor
-///
-/// @param targetsToIgnore
-/// A list of target IDs to be ignored
-///
-/// @param numTargetsToIgnore
-/// Number of targets to be ignored
-///
-/// @param maxDistanceQ31
-/// Maximum distance for correspondences.
-/// In Q31 format.
-///
-/// @param correspondenceDBIdx
-/// A pointer to uint32_t [maxNumCorrespondences],
-/// which will be used by this function to output indices of featuresDB
-/// as a part of correspondences.
-///
-/// @param correspondenceSrcDescIdx
-/// A pointer to uint32_t [maxNumCorrespondences],
-/// which will be used by this function to output indices of descriptors
-/// as a part of correspondences.
-///
-/// @param correspondenceDistanceQ31
-/// A pointer to uint32_t [maxNumCorrespondences],
-/// which will be used by this function to output the distances
-/// as a part of correspondences.
-/// In Q31 format.
-///
-/// @param maxNumCorrespondences
-/// Maximum number of correspondences allowed
-///
-/// @param numCorrespondences
-/// Number of correspondences returned by this function
-///
-/// @ingroup feature_detection
-//---------------------------------------------------------------------------
-
-FASTCV_API void
-fcvLinearSearch8x36s8(
- const uint32_t * __restrict dbLUT,
- uint32_t numDBLUT,
- const int8_t * __restrict descDB,
- const uint32_t * __restrict descDBInvLenQ38,
- const uint16_t * __restrict descDBTargetId,
- uint32_t numDescDB,
- const int8_t * __restrict srcDesc,
- const uint32_t * __restrict srcDescInvLenQ38,
- const uint32_t * __restrict srcDescIdx,
- uint32_t numSrcDesc,
- const uint16_t * __restrict targetsToIgnore,
- uint32_t numTargetsToIgnore,
- uint32_t maxDistanceQ31,
- uint32_t * __restrict correspondenceDBIdx,
- uint32_t * __restrict correspondenceSrcDescIdx,
- uint32_t * __restrict correspondenceDistanceQ31,
- uint32_t maxNumCorrespondences,
- uint32_t * __restrict numCorrespondences );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds only extreme outer contours in a binary image. There is no nesting
-/// relationship between contours. It sets hierarchy[i][2]=hierarchy[i][3]=-1
-/// for all the contours.
-///
-/// @param src
-/// Grayscale image with one byte per pixel. Non-zero pixels are treated as
-/// 1's. Zero pixels remain 0's, so the image is treated as binary.
-///
-/// @param srcWidth
-/// Image width
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param maxNumContours
-/// Maximum number of contours can be found
-///
-/// @param numContours
-/// Number of actually found contours
-///
-/// @param numContourPoints
-/// Number of points in each found contour
-///
-/// @param contourStartPoints
-/// Pointers to the start point of each found contour
-///
-/// @param pointBuffer
-/// Pointer to point buffer for contour points' coordinates. It should
-/// be allocated before calling this function.
-///
-/// @param pointBufferSize
-/// Size of point buffer in terms of uint32_t
-///
-/// @param hierarchy
-/// Information about the image topology. It has numContours elements.
-/// For each contour i, the elements hierarchy[i][0], hiearchy[i][1],
-/// hiearchy[i][2], and hiearchy[i][3] are set to 0-based indices of the
-/// next and previous contours at the same hierarchical level, the first
-/// child contour and the parent contour, respectively. If for a contour i
-/// there are no next, previous, parent, or nested contours, the corresponding
-/// elements of hierarchy[i] will be negative.
-///
-/// @param contourHandle
-/// Pointer to assistant and intermediate data. It should be allocated by
-/// fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFindContoursExternalu8( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- int32_t hierarchy[][4],
- void* contourHandle );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds contours in a binary image without any hierarchical relationships.
-///
-/// @param src
-/// Grayscale image with one byte per pixel. Non-zero pixels are treated as
-/// 1's. Zero pixels remain 0's, so the image is treated as binary.
-///
-/// @param srcWidth
-/// Image width
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param maxNumContours
-/// Maximum number of contours can be found
-///
-/// @param numContours
-/// Number of actually found contours
-///
-/// @param numContourPoints
-/// Number of points in each found contour
-///
-/// @param contourStartPoints
-/// Pointers to the start point of each found contour
-///
-/// @param pointBuffer
-/// Pointer to point buffer for contour points' coordinates. It should
-/// be allocated before calling this function.
-///
-/// @param pointBufferSize
-/// Size of point buffer in terms of uint32_t
-///
-/// @param contourHandle
-/// Pointer to assistant and intermediate data. It should be allocated by
-/// fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFindContoursListu8( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- void* contourHandle );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds contours in a binary image and organizes them into a two-level
-/// hierarchy. At the top level, there are external boundaries of the
-/// components. At the second level, there are boundaries of the holes.
-/// If there is another contour inside a hole of a connected component,
-/// it is still put at the top level.
-///
-/// @param src
-/// Grayscale image with one byte per pixel. Non-zero pixels are treated as
-/// 1's. Zero pixels remain 0's, so the image is treated as binary.
-///
-/// @param srcWidth
-/// Image width
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param maxNumContours
-/// Maximum number of contours can be found (<= 126)
-///
-/// @param numContours
-/// Number of actually found contours
-///
-/// @param holeFlag
-/// Hole flag for each found contour to indicate whether it is a hole or not
-///
-/// @param numContourPoints
-/// Number of points in each found contour
-///
-/// @param contourStartPoints
-/// Pointers to the start point of each found contour
-///
-/// @param pointBuffer
-/// Pointer to point buffer for contour points' coordinates. It should
-/// be allocated before calling this function.
-///
-/// @param pointBufferSize
-/// Size of point buffer in terms of uint32_t
-///
-/// @param hierarchy
-/// Information about the image topology. It has numContours elements.
-/// For each contour i, the elements hierarchy[i][0], hiearchy[i][1],
-/// hiearchy[i][2], and hiearchy[i][3] are set to 0-based indices of the
-/// next and previous contours at the same hierarchical level, the first
-/// child contour and the parent contour, respectively. If for a contour i
-/// there are no next, previous, parent, or nested contours, the corresponding
-/// elements of hierarchy[i] will be negative.
-///
-/// @param contourHandle
-/// Pointer to assistant and intermediate data. It should be allocated by
-/// fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFindContoursCcompu8( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict holeFlag,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- int32_t hierarchy[][4],
- void* contourHandle );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Finds contours in a binary image and reconstructs a full hierarchy of
-/// nested contours
-///
-/// @param src
-/// Grayscale image with one byte per pixel. Non-zero pixels are treated as
-/// 1's. Zero pixels remain 0's, so the image is treated as binary.
-///
-/// @param srcWidth
-/// Image width
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @param numContours
-/// Number of actually found contours
-///
-/// @param maxNumContours
-/// Maximum number of contours can be found (<= 126)
-///
-/// @param holeFlag
-/// Hole flag for each found contour to indicate whether it is a hole or not
-///
-/// @param numContourPoints
-/// Number of points in each found contour
-///
-/// @param contourStartPoints
-/// Pointers to the start point of each found contour
-///
-/// @param pointBuffer
-/// Pointer to point buffer for contour points' coordinates. It should
-/// be allocated before calling this function.
-///
-/// @param pointBufferSize
-/// Size of point buffer in terms of uint32_t
-///
-/// @param hierarchy
-/// Information about the image topology. It has numContours elements.
-/// For each contour i, the elements hierarchy[i][0], hiearchy[i][1],
-/// hiearchy[i][2], and hiearchy[i][3] are set to 0-based indices of the
-/// next and previous contours at the same hierarchical level, the first
-/// child contour and the parent contour, respectively. If for a contour i
-/// there are no next, previous, parent, or nested contours, the corresponding
-/// elements of hierarchy[i] will be negative.
-///
-/// @param contourHandle
-/// Pointer to assistant and intermediate data. It should be allocated by
-/// fcvFindContoursAllocate() and deallocated by fcvFindContoursDelete().
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFindContoursTreeu8( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict holeFlag,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- int32_t hierarchy[][4],
- void* contourHandle );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Allocates assistant and intermediate data for contour
-///
-/// @param srcStride
-/// Stride of image (i.e., how many pixels between column 0 of row 1 and
-/// column 0 of row 2).
-///
-/// @return
-/// Pointer to allocated data
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API void*
-fcvFindContoursAllocate( uint32_t srcStride );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Deallocates assistant and intermediate data for contour
-///
-/// @param contourHandle
-/// Pointer to assistant and intermediate data
-///
-/// @ingroup feature_detection
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFindContoursDelete( void* contourHandle );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Solve linear equation system
-/// Ax = b
-///
-/// @details
-///
-///
-/// @param A
-/// The matrix contains coefficients of the linear equation system
-///
-/// @param numRows
-/// The number of rows for the matrix A
-///
-/// @param numCols
-/// The number of columns for the matrix A
-///
-/// @param b
-/// The right side value
-///
-/// @param x
-/// The solution vector
-///
-///
-/// @return
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSolvef32(const float32_t * __restrict A,
- int32_t numCols,
- int32_t numRows,
- const float32_t * __restrict b,
- float32_t * __restrict x);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Calculates a perspective transform from four pairs of the corresponding
-/// points.
-/// NOTE: in order to guarantee a valid output transform, any three points
-/// in src1 or src2 cannot be collinear.
-///
-/// @param src1
-/// Coordinates of quadrangle vertices in the source image
-///
-/// @param src2
-/// Coordinates of the corresponding quadrangle vertices in the destination
-/// image
-///
-/// @param transformCoefficient
-/// 3x3 matrix of a perspective transform
-///
-/// @ingroup image_transform
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvGetPerspectiveTransformf32( const float32_t src1[8],
- const float32_t src2[8],
- float32_t transformCoefficient[9] );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of a uint8_t single channel array to a given value.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value
-/// the input uint8_t value
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed.
-///
-/// @param maskStride
-/// Stride for the mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-
-FASTCV_API void
-fcvSetElementsu8( uint8_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- uint8_t value,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of an int32_t single channel array to a given value.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value
-/// the input int32_t value
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementss32( int32_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- int32_t value,
- const uint8_t * __restrict mask ,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of a float32_t single channel array to a given value.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value
-/// the input float32_t value
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsf32( float32_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- float32_t value,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of a uint8_t 4-channel array to a given 4-element scalar.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value1
-/// First uint8_t value of the Scalar
-///
-/// @param value2
-/// Second uint8_t value of the Scalar
-///
-/// @param value3
-/// Third uint8_t value of the Scalar
-///
-/// @param value4
-/// Fourth uint8_t value of the Scalar
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsc4u8( uint8_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- uint8_t value1,
- uint8_t value2,
- uint8_t value3,
- uint8_t value4,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of an int32_t 4-channel array to a given 4-element scalar.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value1
-/// First int32_t value of the Scalar
-///
-/// @param value2
-/// Second int32_t value of the Scalar
-///
-/// @param value3
-/// Third int32_t value of the Scalar
-///
-/// @param value4
-/// Fourth int32_t value of the Scalar
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed.
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsc4s32( int32_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- int32_t value1,
- int32_t value2,
- int32_t value3,
- int32_t value4,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of a float32_t 4-channel array to a given 4-element scalar.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value1
-/// First float32_t value of the Scalar
-///
-/// @param value2
-/// Second float32_t value of the Scalar
-///
-/// @param value3
-/// Third float32_t value of the Scalar
-///
-/// @param value4
-/// Fourth float32_t value of the Scalar
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsc4f32( float32_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- float32_t value1,
- float32_t value2,
- float32_t value3,
- float32_t value4,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of a uint8_t 3-channel array to a given 3-element scalar.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value1
-/// First uint8_t value of the Scalar
-///
-/// @param value2
-/// Second uint8_t value of the Scalar
-///
-/// @param value3
-/// Third uint8_t value of the Scalar
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsc3u8( uint8_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- uint8_t value1,
- uint8_t value2,
- uint8_t value3,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of an int32_t 3-channel array to a given 3-element scalar.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value1
-/// First int32_t value of the Scalar
-///
-/// @param value2
-/// Second int32_t value of the Scalar
-///
-/// @param value3
-/// Third int32_t value of the Scalar
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed.
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsc3s32( int32_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- int32_t value1,
- int32_t value2,
- int32_t value3,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Sets every element of a float32_t 3-channel array to a given 3-element scalar.
-///
-/// @details
-/// A non-zero element of the mask array indicates the corresponding element
-/// of the destination array to be changed. The mask itself equals to zero means that
-/// all elements of the dst array need to be changed. The mask is assumed to
-/// have the same width and height( in terms of pixels) as the destination array.
-///
-/// @param dst
-/// The destination matrix
-///
-/// @param dstWidth
-/// Destination matrix width
-///
-/// @param dstHeight
-/// Destination matrix height
-///
-/// @param dstStride
-/// Stride for the destination matrix, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @param value1
-/// First float32_t value of the Scalar
-///
-/// @param value2
-/// Second float32_t value of the Scalar
-///
-/// @param value3
-/// Third float32_t value of the Scalar
-///
-/// @param mask
-/// Operation mask, 8-bit single channel array; specifies elements of the src
-/// array to be changed
-///
-/// @param maskStride
-/// Stride for input mask, i.e. the gap (in terms of bytes) between the first element of a row and that of the successive row
-///
-/// @return
-/// No return value
-///
-/// @ingroup math_vector
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvSetElementsc3f32( float32_t * __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- float32_t value1,
- float32_t value2,
- float32_t value3,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Defines an enumeration to list threshold types used in fcvAdaptiveThreshold
-//------------------------------------------------------------------------------
-
-typedef enum {
- FCV_THRESH_BINARY = 0, // value = value > threshold ? max_value : 0
- FCV_THRESH_BINARY_INV // value = value > threshold ? 0 : max_value
-} fcvThreshType;
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// Binarizes a grayscale image based on an adaptive threshold value calculated from 3x3 Gaussian kernel.
-///
-/// @details
-/// For each pixel, the threshold is computed adaptively based on cross-correlation with a
-/// 3x3 Gaussian kernel minus value (parameter). The standard deviation is used for Gaussian kernel.
-/// For FCV_THRESH_BINARY threshold type, the pixel is set as maxValue if it's value is greater than the threshold;
-/// else, it is set as zero. For FCV_THRESH_BINARY_INV threshold type, the pixel is set as zero if it's value is greater than the threshold;
-/// else, it is set as maxValue.
-///
-/// @param src
-/// Pointer to the 8-bit input image.
-///
-/// @param srcWidth
-/// Width of source images pointed by src.
-///
-/// @param srcHeight
-/// Height of source images pointed by src.
-///
-/// @param srcStride
-/// Stride of source image (i.e., number of bytes between column 0
-/// of row 0 and column 0 of row 1).
-///
-/// @param maxValue
-/// The maximum integer value to be used. 0>1+8) *sizeof(uint32_t)
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param integralCrStride
-/// The stride of integralCr. (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2). If left at 0 integralCrStride is default to (srcWidth>>1+8) *sizeof(uint32_t)
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @return
-/// No return value.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvIntegrateImageYCbCr420PseudoPlanaru8(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint32_t* __restrict integralY,
- uint32_t* __restrict integralCb,
- uint32_t* __restrict integralCr,
- uint32_t integralYStride,
- uint32_t integralCbStride,
- uint32_t integralCrStride);
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// This function finds the foreground.
-///
-/// @details
-/// This function tries to find a forgound in the current image (represented by: fgIntegralY,
-/// fgIntegralCb, fgIntegralCr) based on the current background model (represented by: bgIntegralY,
-/// bgIntegralCb, bgIntegralCr). For example, the tuple (bgIntegralY, bgIntegralCb, bgIntegralCr) may be
-/// from a picture shooting a wall. Then the tuple (fgIntegralY, fgIntegralCb, fgIntegralCr) may be
-/// the wall with a paint on it. Note that all the first six parameters are indicating integral images
-/// that's computed from a YUV420 image, which maybe computed from the function:
-/// fcvIntegrateImageYCbCr420PseudoPlanaru8. Generally the size of fgIntegralY and bgIntegralY are
-/// (srcWidth+1)*(srcHeight+1). And the size of fgIntegralU, fgIntegralV, bgIntegralU and bgIntegralV
-/// are (srcWidth/2+1)*(srcHeight/2+1). The value of the outputWidth and outputHeight are usually indicating
-/// the desired block size. For example, if the user wants a 20x15 blocks on a 800x480 image. Then
-/// outputWidth=800/20 and outputHeight=480/15. After return, if the value in the outputMask image is
-/// 255, then a moving block is indicated, otherwise a non-moving block is indicated.
-///
-/// @param bgIntegralY
-/// The input image/patch that's indicating the Y channel of the integral image of the background image.
-/// Size of buffer is srcYStride*srcHeight bytes
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param bgIntegralCb
-/// The input image/patch that's indicating the Cb channel of the integral image of the background image.
-/// Size of buffer is srcCbStride*srcHeight/2 bytes
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param bgIntegralCr
-/// The input image/patch that's indicating the Cr channel of the integral image of the background image.
-/// Size of buffer is srcCrStride*srcHeight/2 bytes
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param fgIntegralY
-/// The input image/patch that's indicating the Y channel of the integral image of the image
-/// on which we want to find the foreground.
-/// Size of buffer is srcYStride*srcHeight bytes
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param fgIntegralCb
-/// The input image/patch that's indicating the Cb channel of the integral image of the image
-/// on which we want to find the foreground.
-/// Size of buffer is srcCbStride*srcHeight/2 bytes
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param fgIntegralCr
-/// The input image/patch that's indicating the Cr channel of the integral image of the image
-/// on which we want to find the foreground.
-/// Size of buffer is srcCrStride*srcHeight/2 bytes
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row. See the details.
-/// \n\b NOTE: must be a multiple of 16.
-///
-/// @param srcHeight
-/// The height of the source image. See the details.
-/// \n\b NOTE: must be a multiple of 2.
-///
-/// @param srcYStride
-/// The stride of the input source image's Y channel. (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2). If left at 0 srcStride is default to (srcWidth+8)*sizeof(uint32_t).
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param srcCbStride
-/// The stride of the input source image's Cb channel. (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2). If left at 0 srcStride is default to (srcWidth>>1+8)*sizeof(uint32_t).
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param srcCrStride
-/// The stride of the input source image's Cr channel. (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2). If left at 0 srcStride is default to (srcWidth>>1+8)*sizeof(uint32_t).
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param outputMask
-/// The output mask image. Each pixel represent the motion condition for a block in the original image.
-/// Size of buffer is outputMaskStride*outputHeight bytes
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param outputWidth
-/// The width of the output mask image.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param outputHeight
-/// The height of the output mask image.
-///
-/// @param outputMaskStride
-/// The stride of the output mask image. (i.e., how many bytes between column 0 of row 1 and
-/// column 0 of row 2). If left at 0 outputMaskStride is default to outputWidth.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param threshold
-/// The threshold that's used to decide if a block is moving or not. (recommend the value of 20).
-///
-/// @return
-/// No return value.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvFindForegroundIntegrateImageYCbCr420u32(
- const uint32_t * __restrict bgIntegralY,
- const uint32_t * __restrict bgIntegralCb,
- const uint32_t * __restrict bgIntegralCr,
- const uint32_t * __restrict fgIntegralY,
- const uint32_t * __restrict fgIntegralCb,
- const uint32_t * __restrict fgIntegralCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t * __restrict outputMask,
- uint32_t outputWidth,
- uint32_t outputHeight,
- uint32_t outputMaskStride,
- float32_t threshold );
-
-
-//---------------------------------------------------------------------------
-/// @brief
-/// This function calculates the average value of an image.
-///
-/// @details
-/// This function sums all the pixel value in an image and divide the result by the number of pixels in the image.
-///
-/// @param src
-/// The input image/patch. Must be 32 bit image. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param avgValue
-/// The output average value.
-///
-/// @return
-/// No return value.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvAverages32(
- const int32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t* __restrict avgValue);
-
-//---------------------------------------------------------------------------
-/// @brief
-/// This function calculates the average value of an image.
-///
-/// @details
-/// This function sums all the pixel value in an image and divide the result by the number of pixels in the image.
-///
-/// @param src
-/// 8-bit image where keypoints are detected. Size of buffer is srcStride*srcHeight bytes.
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// Image width, the number of pixels in a row
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// Image height
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// \n\b NOTE: must be a multiple of 8.
-///
-/// @param avgValue
-/// The output average value.
-///
-/// @return
-/// No return value.
-///
-/// @ingroup image_processing
-//------------------------------------------------------------------------------
-FASTCV_API void
-fcvAverageu8(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t* __restrict avgValue);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Applies the meanshift procedure and obtains the final converged position
-///
-/// @details
-/// This function applies the meanshift procedure to an original image (usually a probability image) and obtains the final converged position.
-/// The converged position search will stop either it has reached the required accuracy or the maximum number of iterations.
-///
-/// @param src
-/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be 8 bit grayscale image.
-/// Size of buffer is srcStride*srcHeight bytes.
-/// NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// The width of the input source image.
-/// NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// The height of the input source image.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// NOTE: must be a multiple of 8.
-///
-/// @param window
-/// Pointer to the initial search window position which also returns the final converged window position.
-///
-/// @param criteria
-/// The criteria used to finish the MeanShift which consists of two termination criteria:
-/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
-///
-/// @return
-/// The actually number of iterations
-///
-/// @ingroup Motion_and_Object_Tracking
-//------------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvMeanShiftu8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Applies the meanshift procedure and obtains the final converged position
-///
-/// @details
-/// This function applies the meanshift procedure to an original image (usually a probability image) and obtains the final converged position.
-/// The converged position search will stop either it has reached the required accuracy or the maximum number of iterations.
-///
-/// @param src
-/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be int 32bit grayscale image.
-/// Size of buffer is srcStride*srcHeight bytes.
-/// NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// The width of the input source image.
-/// NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// The height of the input source image.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
-/// NOTE: must be a multiple of 8.
-///
-/// @param window
-/// Pointer to the initial search window position which also returns the final converged window position.
-///
-/// @param criteria
-/// The criteria used to finish the MeanShift which consists of two termination criteria:
-/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
-///
-/// @return
-/// Number of iterations
-///
-/// @ingroup Motion_and_Object_Tracking
-//------------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvMeanShifts32(const int32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Applies the meanshift procedure and obtains the final converged position
-///
-/// @details
-/// This function applies the meanshift procedure to an original image (usually a probability image) and obtains the final converged position.
-/// The converged position search will stop either it has reached the required accuracy or the maximum number of iterations.
-///
-/// @param src
-/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be float 32bit grayscale image.
-/// Size of buffer is srcStride*srcHeight bytes.
-/// NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// The width of the input source image.
-/// NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// The height of the input source image.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
-/// NOTE: must be a multiple of 8.
-///
-/// @param window
-/// Pointer to the initial search window position which also returns the final converged window position.
-///
-/// @param criteria
-/// The criteria used to finish the MeanShift which consists of two termination criteria:
-/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
-///
-/// @return
-/// Number of iterations
-///
-/// @ingroup Motion_and_Object_Tracking
-//------------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvMeanShiftf32(const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Applies the ConAdaTrack procedure and find the object center, size and orientation
-///
-/// @details
-/// This function applies the ConAdaTrack procedure to an original image (usually a probability image) and obtains the final converged object.
-/// The optimal object search will stop either it has reached the required accuracy or the maximum number of iterations.
-///
-/// @param src
-/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be 8bit grayscale image.
-/// Size of buffer is srcStride*srcHeight bytes.
-/// NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// The width of the input source image.
-/// NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// The height of the input source image.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth.
-/// NOTE: must be a multiple of 8.
-///
-/// @param window
-/// Pointer to the initial search window position which also returns the final converged window position.
-///
-/// @param criteria
-/// The criteria used to finish the object search which consists of two termination criteria:
-/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
-///
-/// @param circuBox
-/// The circumscribed box around the object
-///
-/// @return
-/// Number of iterations
-///
-/// @ingroup Motion_and_Object_Tracking
-//------------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvConAdaTracku8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria,
- fcvBox2D* circuBox);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Applies the ConAdaTrack procedure and find the object center, size and orientation
-///
-/// @details
-/// This function applies the ConAdaTrack procedure to an original image (usually a probability image) and obtains the final converged object.
-/// The optimal object search will stop either it has reached the required accuracy or the maximum number of iterations.
-///
-/// @param src
-/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be int 32bit grayscale image.
-/// Size of buffer is srcStride*srcHeight bytes.
-/// NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// The width of the input source image.
-/// NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// The height of the input source image.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
-/// NOTE: must be a multiple of 8.
-///
-/// @param window
-/// Pointer to the initial search window position which also returns the final converged window position.
-///
-/// @param criteria
-/// The criteria used to finish the object search which consists of two termination criteria:
-/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
-///
-/// @param circuBox
-/// The circumscribed box around the object
-///
-/// @return
-/// Number of iterations
-///
-/// @ingroup Motion_and_Object_Tracking
-//------------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvConAdaTracks32(const int32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria,
- fcvBox2D* circuBox);
-
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Applies the ConAdaTrack procedure and find the object center, size and orientation
-///
-/// @details
-/// This function applies the ConAdaTrack procedure to an original image (usually a probability image) and obtains the final converged object.
-/// The optimal object search will stop either it has reached the required accuracy or the maximum number of iterations.
-///
-/// @param src
-/// Pointer to the original image which is usually a probability image computed based on object histogram. Must be float 32bit grayscale image.
-/// Size of buffer is srcStride*srcHeight bytes.
-/// NOTE: must be 128-bit aligned.
-///
-/// @param srcWidth
-/// The width of the input source image.
-/// NOTE: must be a multiple of 8.
-///
-/// @param srcHeight
-/// The height of the input source image.
-///
-/// @param srcStride
-/// Stride of image is the number of bytes between column 0 of row 1 and
-/// column 0 of row 2 in data memory. If left at 0 srcStride is default to srcWidth*4.
-/// NOTE: must be a multiple of 8.
-///
-/// @param window
-/// Pointer to the initial search window position which also returns the final converged window position.
-///
-/// @param criteria
-/// The criteria used to finish the object search which consists of two termination criteria:
-/// 1) epsilon: required accuracy; 2) max_iter: maximum number of iterations
-///
-/// @param circuBox
-/// The circumscribed box around the object
-///
-/// @return
-/// Number of iterations
-///
-/// @ingroup Motion_and_Object_Tracking
-//------------------------------------------------------------------------------
-FASTCV_API uint32_t
-fcvConAdaTrackf32(const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria,
- fcvBox2D* circuBox);
-
-//------------------------------------------------------------------------------
-/// @brief
-/// Compute a singular value decomposition of a matrix of a float type
-/// A = U*diag[w]*Vt;
-/// It is used for solving problems like least-squares, under-determined linear systems, matrix
-/// inversion and so forth. The algorithm used here does not compute the full U and V matrices
-/// however it computes a condensed version of U and V described below which is sufficient to solve
-/// most problems which use SVD.
-///
-/// @details
-///
-///
-/// @param A
-/// The input matrix of dimensions m x n
-/// \n\b NOTE: must be 128-bit aligned.
-///
-/// @param m
-/// The number of rows of matrix A
-///
-/// @param n
-/// The number of columns of matrix A
-///
-/// @param w
-/// The pointer to the buffer that holds n singular values. When m>n it
-/// contains n singular values while when m
-#include
-
-//==============================================================================
-// Defines
-//==============================================================================
-
-#define FASTCV_INL_VERSION 122
-
-#ifdef ANDROID
- #include
- #define FASTCV_ERROR( FMT, ... ) \
- __android_log_print( ANDROID_LOG_ERROR, "", FMT, __VA_ARGS__ );
-#else
- #define FASTCV_ERROR( FMT, ... ) \
- fprintf( stderr, FMT, __VA_ARGS__ );
-#endif
-
-#ifndef fcvAssertHook
- #define fcvAssertHook( FASTCV_ASSERT_HOOK_IN, \
- FASTCV_ASSERT_HOOK_FILE, \
- FASTCV_ASSERT_HOOK_LINE ) \
- FASTCV_ERROR( "%s@%d: %s\n", \
- FASTCV_ASSERT_HOOK_FILE, \
- FASTCV_ASSERT_HOOK_LINE, \
- #FASTCV_ASSERT_HOOK_IN )
-#endif
-
-#ifndef NDEBUG
- #define fcvAssert( FASTCV_ASSERT_IN ) \
- if( !(FASTCV_ASSERT_IN) ) \
- fcvAssertHook( FASTCV_ASSERT_IN, __FILE__, __LINE__ );
-#else
- #define fcvAssert( FASTCV_ASSERT_IN ) ((void)0)
-#endif
-
-
-//==============================================================================
-// Declarations
-//==============================================================================
-
-#ifdef _MSC_VER
- #pragma warning(disable:4311)
-#endif
-
-#if FASTCV_VERSION != FASTCV_INL_VERSION
- #error "Version mismatch: fastcv.h and fastcv.inl is not from the same version."
-#endif
-
-extern void
-(**ppfcvFilterMedian3x3u8_v2)
-(
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvFilterGaussian3x3u8_v2)
-(
- const uint8_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dstImg,
- unsigned int dstStride,
- int border
-);
-
-extern void
-(**ppfcvFilterGaussian5x5u8_v2)
-(
- const uint8_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dstImg,
- unsigned int dstStride,
- int blurBorder
-);
-
-extern void
-(**ppfcvFilterGaussian11x11u8_v2)
-(
- const uint8_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dstImg,
- unsigned int dstStride,
- int blurBorder
-);
-
-extern void
-(**ppfcvColorYCrCb420PseudoPlanarToRGB8888u8)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcYStride,
- unsigned int srcCStride,
- uint32_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvColorYUV420toRGB565u8)
-(
- const uint8_t* __restrict yuv420,
- unsigned int width,
- unsigned int height,
- uint32_t* __restrict rgb565
-);
-
-extern void
-(**ppfcvColorYCrCbH1V1toRGB888u8)
-(
- const uint8_t* __restrict crcb,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict rgb888
-);
-
-extern void
-(**ppfcvColorYCrCbH2V2toRGB888u8)
-(
- const uint8_t* __restrict y_src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict rgb888
-);
-
-extern void
-(**ppfcvColorYCrCbH2V1toRGB888u8)
-(
- const uint8_t* __restrict ysrc,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst
-);
-
-extern void
-(**ppfcvColorYCrCbH1V2toRGB888u8)
-(
- const uint8_t* __restrict ysrc,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst
-);
-
-extern void
-(**ppfcvColorRGB888toYCrCbu8_v2)
-(
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern int
-(**ppfcvDescriptor17x17u8To36s8)
-(
- const uint8_t* __restrict patch,
- int8_t* __restrict descriptorChar,
- int32_t* __restrict descriptorNormSq
-);
-
-extern int
-(**ppfcvDescriptorSampledMeanAndVar36f32)
-(
- const float* __restrict src,
- int first,
- int last,
- int32_t* vind,
- float* __restrict means,
- float* __restrict vars,
- float* __restrict temp
-);
-
-extern int32_t
-(**ppfcvDotProducts8)
-(
- const int8_t* __restrict a,
- const int8_t* __restrict b,
- unsigned int abSize
-);
-
-extern int32_t
-(**ppfcvDotProductu8)
-(
- const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- unsigned int abSize
-);
-
-extern int32_t
-(**ppfcvDotProduct36x1s8)( const int8_t* __restrict a,
- const int8_t* __restrict b );
-
-extern void
-(**ppfcvDotProduct36x4s8)( const int8_t* __restrict A,
- const int8_t* __restrict B,
- const int8_t* __restrict C,
- const int8_t* __restrict D,
- const int8_t* __restrict E,
- int32_t dotProducts[4] );
-
-extern void
-(**ppfcvDotProductNorm36x4s8)( const int8_t* __restrict A,
- float invLengthA,
- const int8_t* __restrict vB0,
- const int8_t* __restrict vB1,
- const int8_t* __restrict vB2,
- const int8_t* __restrict vB3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-extern int32_t
-(**ppfcvDotProduct36x1u8)( const uint8_t* __restrict a,
- const uint8_t* __restrict b );
-
-extern void
-(**ppfcvDotProduct36x4u8)
-(
- const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- const uint8_t* __restrict E,
- uint32_t dotProducts[4]
-);
-
-extern void
-(**ppfcvDotProductNorm36x4u8)( const uint8_t* __restrict A,
- float invLengthA,
- const uint8_t* __restrict vB0,
- const uint8_t* __restrict vB1,
- const uint8_t* __restrict vB2,
- const uint8_t* __restrict vB3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-extern int32_t
-(**ppfcvDotProduct64x1s8)( const int8_t* __restrict a,
- const int8_t* __restrict b );
-
-extern void
-(**ppfcvDotProduct64x4s8)
-(
- const int8_t* __restrict A,
- const int8_t* __restrict B,
- const int8_t* __restrict C,
- const int8_t* __restrict D,
- const int8_t* __restrict E,
- int32_t dotProducts[4]
-);
-
-extern void
-(**ppfcvDotProductNorm64x4s8)( const int8_t* __restrict A,
- float invLengthA,
- const int8_t* __restrict vB0,
- const int8_t* __restrict vB1,
- const int8_t* __restrict vB2,
- const int8_t* __restrict vB3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-extern uint32_t
-(**ppfcvDotProduct64x1u8)
-(
- const uint8_t* __restrict a,
- const uint8_t* __restrict b
-);
-
-extern void
-(**ppfcvDotProduct64x4u8)
-(
- const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- const uint8_t* __restrict E,
- uint32_t dotProducts[4]
-);
-
-extern void
-(**ppfcvDotProductNorm64x4u8)( const uint8_t* __restrict A,
- float invLengthA,
- const uint8_t* __restrict vB0,
- const uint8_t* __restrict vB1,
- const uint8_t* __restrict vB2,
- const uint8_t* __restrict vB3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-extern int32_t
-(**ppfcvDotProduct128x1s8)( const int8_t* __restrict a,
- const int8_t* __restrict b );
-
-extern void
-(**ppfcvDotProduct128x4s8)( const int8_t* __restrict A,
- const int8_t* __restrict B,
- const int8_t* __restrict C,
- const int8_t* __restrict D,
- const int8_t* __restrict E,
- int32_t dotProducts[4] );
-
-extern void
-(**ppfcvDotProductNorm128x4s8)
-(
- const int8_t* __restrict A,
- float invLengthA,
- const int8_t* __restrict vB0,
- const int8_t* __restrict vB1,
- const int8_t* __restrict vB2,
- const int8_t* __restrict vB3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts
-);
-
-extern uint32_t
-(**ppfcvDotProduct128x1u8)
-(
- const uint8_t* __restrict a,
- const uint8_t* __restrict b
-);
-
-extern void
-(**ppfcvDotProduct128x4u8)
-(
- const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- const uint8_t* __restrict E,
- uint32_t dotProducts[4]
-);
-
-extern void
-(**ppfcvDotProductNorm128x4u8)(const uint8_t* __restrict A,
- float invLengthA,
- const uint8_t* __restrict vB0,
- const uint8_t* __restrict vB1,
- const uint8_t* __restrict vB2,
- const uint8_t* __restrict vB3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts );
-
-
-extern void
-(**ppfcvDotProduct8x8u8)( const uint8_t* ptch, const uint8_t* img,
- unsigned short imgW, unsigned short imgH, int nX,
- int nY, unsigned int nNum, int32_t* nProducts );
-
-extern void
-(**ppfcvDotProduct11x12u8)( const uint8_t* __restrict ptch,
- const uint8_t* __restrict img,
- unsigned short imgW, unsigned short imgH, int iX,
- int iY, int32_t* __restrict dotProducts );
-
-extern void
-(**ppfcvFilterSobel3x3u8_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvFilterCanny3x3u8_v2)
-( const uint8_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dstImg,
- unsigned int dstStride,
- int low,
- int high
-);
-
-extern void
-(**ppfcvImageDiffu8_v2)
-( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvImageDiffs16_v2)
-( const int16_t* __restrict src1,
- const int16_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvImageDifff32_v2)
-( const float* __restrict src1,
- const float* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dst,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvImageDiffu8f32_v3)
-( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dst,
- unsigned int dstStrde
-);
-
-
-extern void
-(**ppfcvImageDiffu8s8_v2)
-( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int8_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvImageGradientInterleaveds16_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients,
- unsigned int gradStride
-);
-
-extern void
-(**ppfcvImageGradientInterleavedf32_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients,
- unsigned int gradStride
-);
-
-extern void
-(**ppfcvImageGradientPlanars16_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- unsigned int dxyStride
-);
-
-extern void
-(**ppfcvImageGradientPlanarf32_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dx,
- float* __restrict dy,
- unsigned int dxyStride
-);
-
-extern void
-(**ppfcvImageGradientSobelInterleaveds16_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients,
- unsigned int gradStride
-);
-
-extern void
- (**ppfcvImageGradientSobelInterleaveds16_v3)
- ( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients,
- unsigned int gradStride
- );
-
-extern void
-(**ppfcvImageGradientSobelInterleavedf32_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients,
- unsigned int gradStride
-);
-
-extern void
-(**ppfcvImageGradientSobelPlanars16_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- unsigned int dxyStride
-);
-
-extern void
- (**ppfcvImageGradientSobelPlanars16_v3)
- ( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- unsigned int dxyStride
-);
-
-extern void
-(**ppfcvImageGradientSobelPlanarf32_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy,
- unsigned int dxyStride
-);
-
-extern void
-(**ppfcvImageGradientSobelPlanarf32f32_v2)
-( const float * __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy,
- unsigned int dxyStride
-);
-
-extern int
-(**ppfcvClusterEuclideanf32)( const float* __restrict points,
- int numPoints, // actually not used but helpful
- int dim,
- int pointStride,
- const size_t* __restrict indices,
- int numIndices,
- int numClusters,
- float* __restrict clusterCenters,
- int clusterCenterStride,
- float* __restrict newClusterCenters,
- size_t* __restrict clusterMemberCounts,
- size_t* __restrict clusterBindings,
- float* sumOfClusterDistances );
-
-
-extern int
-(**ppfcvClusterEuclideanNormedf32)( const float* __restrict points,
- int numPoints,
- int dim,
- int pointStride,
- const size_t* __restrict indices,
- int numIndices,
- int numClusters,
- float* __restrict clusterCenters,
- int clusterCenterStride,
- float* __restrict newClusterCenters,
- size_t* __restrict clusterMemberCounts,
- size_t* __restrict clusterBindings,
- float* sumOfClusterDistances ) ;
-
-
-extern int
-(**ppfcvClusterEuclideanNormed36f32)( const float* __restrict points,
- int numPoints,
- int pointStride,
- const size_t* __restrict indices,
- int numIndices,
- int numClusters,
- float* __restrict clusterCenters,
- int clusterCenterStride,
- float* __restrict newClusterCenters,
- size_t* __restrict clusterMemberCounts,
- size_t* __restrict clusterBindings,
- float* sumOfClusterDistances );
-
-extern void
-(**ppfcvImageGradientSobelPlanars8_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int8_t* __restrict dx,
- int8_t* __restrict dy,
- unsigned int dxyStride
-);
-
-extern void
-(**ppfcvCornerFast9u8_v2)
-(
- const uint8_t*im,
- unsigned int xsize,
- unsigned int ysize,
- unsigned int stride,
- int barrier,
- unsigned int border,
- uint32_t* xy,
- unsigned int maxnumcorners,
- uint32_t* numcorners
-);
-
-extern void
-(**ppfcvCornerFast9InMasku8_v2)
-(
- const uint8_t* __restrict im,
- unsigned int xsize,
- unsigned int ysize,
- unsigned int stride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners,
- const uint8_t* __restrict bitMask,
- unsigned int maskWidth,
- unsigned int maskHeight
-);
-
-extern void
-(**ppfcvCornerFast10u8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners);
-
-extern void
-(**ppfcvCornerFast10InMasku8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- uint32_t maskWidth,
- uint32_t maskHeight );
-
-extern void
-(**ppfcvCornerHarrisu8)
-(
- const uint8_t* __restrict srcImg,
- unsigned int width,
- unsigned int height,
- unsigned int stride,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners,
- int threshold
-);
-
-extern unsigned int
-(**ppfcvLocalHarrisMaxu8)
-(
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- unsigned int posX,
- unsigned int posY,
- unsigned int *maxX,
- unsigned int *maxY,
- int *maxScore
-);
-
-extern void
-(**ppfcvCornerHarrisInMasku8)
-(
- const uint8_t* __restrict srcImg,
- unsigned int width,
- unsigned int height,
- unsigned int stride,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners,
- int threshold,
- const uint8_t* __restrict bitMask,
- int maskWidth,
- int maskHeight
-);
-
-extern void
-(**ppfcvGeomAffineFitf32)( const fcvCorrespondences* __restrict corrs,
- float* __restrict affine );
-
-extern int
-(**ppfcvGeomAffineEvaluatef32)( const fcvCorrespondences* __restrict corrs,
- float* __restrict affine,
- float maxsqerr,
- uint16_t* __restrict inliers,
- int32_t* numinliers );
-
-extern void
-(**ppfcvGeomHomographyFitf32)( const fcvCorrespondences* __restrict corrs,
- float* __restrict homography );
-
-extern int
-(**ppfcvGeomHomographyEvaluatef32)( const fcvCorrespondences* __restrict corrs,
- float* __restrict homography,
- float maxsqerr,
- uint16_t* __restrict inliers,
- int32_t* numinliers );
-
-extern float
-(**ppfcvGeomPoseRefineGNf32) ( const fcvCorrespondences* __restrict corrs,
- short minIterations,
- short maxIterations,
- float stopCriteria,
- float* initpose,
- float* refinedpose );
-
-extern int
-(**ppfcvGeomPoseUpdatef32) (
- const float* __restrict projected,
- const float* __restrict reprojErr,
- const float* __restrict invz,
- const float* __restrict reprojVariance,
- unsigned int numpts,
- float* __restrict pose );
-
-extern int
-(**ppfcvGeomPoseOptimizeGNf32) (
- const float* __restrict projected,
- const float* __restrict reprojErr,
- const float* __restrict invz,
- const float* __restrict reprojVariance,
- unsigned int numpts,
- float* __restrict pose );
-
-extern float
-(**ppfcvGeomPoseEvaluateErrorf32) (
- const fcvCorrespondences* __restrict corrs,
- const float* __restrict pose,
- float* __restrict projected,
- float* __restrict reprojErr,
- float* __restrict invz,
- float* __restrict reprojVariance );
-
-extern int
-(**ppfcvGeomPoseEvaluatef32) ( const fcvCorrespondences* __restrict corrs,
- const float* pose,
- float maxSquErr,
- uint16_t* __restrict inliers,
- uint32_t* numInliers );
-
-extern void
-(**ppfcvGeom3PointPoseEstimatef32) ( const fcvCorrespondences* __restrict corrs,
- float* pose,
- int32_t* numPoses );
-
-extern void
-(**ppfcvFilterCorr3x3s8_v2)
-(
-const int8_t* __restrict mask,
-const uint8_t* __restrict srcImg,
-unsigned int srcWidth,
-unsigned int srcHeight,
-unsigned int srcStride,
-uint8_t* __restrict dstImg,
-unsigned int dstStride
-);
-
-extern void
-(**ppfcvFilterCorrSep9x9s16_v3)
-(
- const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvFilterCorrSep13x13s16)
-(
- const int16_t* __restrict knl,
- const int16_t* __restrict srcimg, unsigned int w, unsigned int h,
- int16_t* __restrict tmpimg,
- int16_t* __restrict dstimg
-);
-
-
-extern void
-(**ppfcvFilterCorrSep11x11s16_v3)
-(
- const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvFilterCorrSep13x13s16_v3)
-(
- const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvFilterCorrSep15x15s16_v3)
-(
- const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvFilterCorrSep17x17s16_v3)
-(
- const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg,
- unsigned int dstStride
-);
-
-extern int
-( **ppfcvScaleDownBy2u8_v2)
-( const uint8_t* __restrict imgSrc,
- unsigned int width,
- unsigned int height,
- unsigned int srcStride,
- uint8_t* __restrict imgDst,
- unsigned int dstStride
-);
-
-extern int
-( **ppfcvScaleDownBy4u8_v2)
-( const uint8_t* __restrict imgSrc,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict imgDst,
- unsigned int dstStride
-);
-
-extern int
-( **ppfcvScaleDown3To2u8)
-(
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvScaleDownu8_v2)
-( const uint8_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dstImg,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride
-);
-
-extern int
-(**ppfcvScaleDownNNu8)
-(
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvScaleUpBy2Gaussian5x5u8_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvScaleDownBy2Gaussian5x5u8)
-( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst
-);
-
-extern void
-(**ppfcvScaleDownBy2Gaussian5x5u8_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvImageIntensityStats) ( const uint8_t* __restrict src,
- unsigned int srcWidth,
- int xBegin,
- int yBegin,
- unsigned int recWidth,
- unsigned int recHeight,
- float* mean,
- float* variance );
-
-extern void
-(**ppfcvImageIntensityHistogram)( const uint8_t* __restrict src,
- unsigned int srcWidth,
- int xBegin,
- int yBegin,
- unsigned int recWidth,
- unsigned int recHeight,
- int32_t* histogram );
-
-extern void
-(**ppfcvIntegrateImageu8_v2)
-( const uint8_t* __restrict imageIn,
- unsigned int imageWidth,
- unsigned int imageHeight,
- unsigned int imageStride,
- uint32_t* __restrict integralImageOut,
- unsigned int integralImageStride
-);
-
-extern void
-(**ppfcvIntegratePatchu8_v2)
-( const uint8_t* __restrict imageIn,
- unsigned int imageWidth,
- unsigned int imageHeight,
- unsigned int imageStride,
- int patchX,
- int patchY,
- unsigned int patchW,
- unsigned int patchH,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut
-);
-
-extern void
-(**ppfcvIntegratePatch12x12u8_v2)
-( const uint8_t* __restrict imageIn,
- unsigned int imageWidth,
- unsigned int imageHeight,
- unsigned int imageStride,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut
-);
-
-extern void
-(**ppfcvIntegratePatch18x18u8_v2)
-( const uint8_t* __restrict imageIn,
- unsigned int imageWidth,
- unsigned int imageHeight,
- unsigned int imageStride,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut
-);
-
-extern void
-(**ppfcvIntegrateImageLineu8)
-(
- const uint8_t* __restrict imageIn,
- unsigned short numPxls,
- uint32_t* intgrl,
- uint32_t* intgrlSqrd
-);
-
-extern void
-(**ppfcvIntegrateImageLine64u8)
-(
- const uint8_t* __restrict imageIn,
- uint16_t* intgrl,
- uint32_t* intgrlSqrd
-);
-
-extern int
-(**ppfcvNCCPatchOnCircle8x8u8_v2)
-( const uint8_t* __restrict patch_pixels,
- const uint8_t* __restrict image_pixels,
- unsigned short image_w,
- unsigned short image_h,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_radius,
- int filterLowVariance,
- uint16_t* best_x,
- uint16_t* best_y,
- uint32_t* bestNCC,
- int doSubPixel,
- float* subX,
- float* subY );
-
-
-extern int
-(**ppfcvNCCPatchOnSquare8x8u8_v2)
-( const uint8_t* __restrict patch_pixels,
- const uint8_t* __restrict image_pixels,
- unsigned short image_w,
- unsigned short image_h,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_w,
- int filterLowVariance,
- uint16_t* best_x,
- uint16_t* best_y,
- uint32_t* bestNCC,
- int doSubPixel,
- float* subX,
- float* subY );
-
-extern void
-(**ppfcvSumOfAbsoluteDiffs8x8u8_v2)
-( const uint8_t* __restrict patch,
- unsigned int patchStride,
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint16_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern int
-(**ppfcvVecNormalize36s8f32)( const int8_t* __restrict src,
- unsigned int srcStride,
- const float* __restrict invLen,
- unsigned int numVecs,
- float reqNorm,
- float* __restrict dst,
- int32_t* stopBuild );
-
-extern void
-(**ppfcvSumOfSquaredDiffs36x4s8)( const int8_t* __restrict A,
- float invLenA,
- const int8_t* __restrict B,
- const int8_t* __restrict C,
- const int8_t* __restrict D,
- const int8_t* __restrict E,
- const float invLenB[4],
- float distances[4] );
-
-extern void
-(**ppfcvSumOfSquaredDiffs36xNs8)( const int8_t* __restrict A,
- float invLenA,
- const int8_t* const * __restrict B,
- const float* __restrict invLenB,
- unsigned int numB,
- float* __restrict distances );
-
-extern void
-(**ppfcvSort8Scoresf32)( float* __restrict inScores,
- float* __restrict outScores );
-
-extern void
-(**ppfcvFilterThresholdu8_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- unsigned int threshold
-);
-
-extern void
-(**ppfcvFilterDilate3x3u8_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern void
-(**ppfcvFilterErode3x3u8_v2)
-( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride
-);
-
-extern int
-(**ppfcvTransformAffine8x8u8_v2)
-(
- const uint8_t* __restrict nImage,
- unsigned int imageWidth,
- unsigned int imageHeight,
- unsigned int imageStride,
- const int32_t* __restrict nPos,
- const int32_t* __restrict nAffine,
- uint8_t* __restrict patch,
- unsigned int patchStride
-);
-
-extern void
-(**ppfcvWarpPerspectiveu8)
-(
- const uint8_t* __restrict src,
- unsigned int srcwidth,
- unsigned int srcheight,
- uint8_t* __restrict dst,
- unsigned int dstwidth,
- unsigned int dstheight,
- float* __restrict kernel
-);
-
-extern void
-(**ppfcvWarpPerspectiveu8_v2)
-(
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride,
- float* __restrict kernel
-);
-
-extern void
-(**ppfcv3ChannelWarpPerspectiveu8)
-(
- const uint8_t* __restrict src,
- unsigned int srcwidth,
- unsigned int srcheight,
- uint8_t* __restrict dst,
- unsigned int dstwidth,
- unsigned int dstheight,
- float* __restrict kernel
-);
-
-extern void
-(**ppfcv3ChannelWarpPerspectiveu8_v2)
-(
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride,
- float* __restrict kernel
-);
-
-extern void
-(**ppfcvFilterGaussian5x5s16_v2)
-(
- const int16_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dstImg,
- unsigned int dstStride,
- int blurBorder
-);
-
-extern void
-(**ppfcvFilterGaussian5x5s32_v2)
-(
- const int32_t* __restrict srcImg,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int32_t* __restrict dstImg,
- unsigned int dstStride,
- int blurBorder
-);
-
-extern int
-(**ppfcvTransformAffineu8)
-(
- const uint8_t* __restrict nImage,
- unsigned int imageWidth,
- unsigned int imageHeight,
- const float nPos[ 2 ],
- const float nAffine[ 4 ],
- uint8_t* __restrict nPatch,
- unsigned int patchWidth,
- unsigned int patchHeight
-);
-
-extern int
-(**ppfcvTransformAffineu8_v2)
-(
- const uint8_t* __restrict nImage,
- unsigned int imageWidth,
- unsigned int imageHeight,
- unsigned int imageStride,
- const float nPos[ 2 ],
- const float nAffine[ 4 ],
- uint8_t* __restrict nPatch,
- unsigned int patchWidth,
- unsigned int patchHeight,
- unsigned int patchStride
-);
-
-extern void
-(**ppfcvCopyRotated17x17u8)
-(
- const uint8_t*region,
- uint8_t*patch,
- int nOri
- );
-
-extern void
-(**ppfcvCornerFast9Scoreu8_v3)
-(
- const uint8_t*im,
- unsigned int xsize,
- unsigned int ysize,
- unsigned int stride,
- int barrier,
- unsigned int border,
- uint32_t* xy,
- uint32_t* __restrict scores,
- unsigned int maxnumcorners,
- uint32_t* numcorners
-);
-
-extern void
-(**ppfcvCornerFast9InMaskScoreu8_v3)
-(
- const uint8_t* __restrict im,
- unsigned int xsize,
- unsigned int ysize,
- unsigned int stride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners,
- const uint8_t* __restrict bitMask,
- unsigned int maskWidth,
- unsigned int maskHeight
-);
-
-extern void
-(**ppfcvCornerFast9Scoreu8_v4)
-(
- const uint8_t*im,
- unsigned int xsize,
- unsigned int ysize,
- unsigned int stride,
- int barrier,
- unsigned int border,
- uint32_t* xy,
- uint32_t* __restrict scores,
- unsigned int maxnumcorners,
- uint32_t* numcorners,
- uint32_t nmsEnabled,
- void* __restrict tempBuf
-);
-
-extern void
-(**ppfcvCornerFast9InMaskScoreu8_v4)
-(
- const uint8_t* __restrict im,
- unsigned int xsize,
- unsigned int ysize,
- unsigned int stride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners,
- const uint8_t* __restrict bitMask,
- unsigned int maskWidth,
- unsigned int maskHeight,
- uint32_t nmsEnabled,
- void* __restrict tempBuf
-);
-
-extern void
-(**ppfcvCornerFast10Scoreu8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- uint32_t nmsEnabled,
- void* __restrict tempBuf);
-
-extern void
-(**ppfcvCornerFast10InMaskScoreu8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- uint32_t maskWidth,
- uint32_t maskHeight,
- uint32_t nmsEnabled,
- void* __restrict tempBuf);
-
-extern void
-(**ppfcvTrackLKOpticalFlowu8)
-(
- const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int width,
- unsigned int height,
- const fcvPyramidLevel *src1Pyr,
- const fcvPyramidLevel *scr2Pyr,
- const fcvPyramidLevel *dx1Pyr,
- const fcvPyramidLevel *dy1Pyr,
- const float* featureXY,
- float* featureXY_out,
- int32_t* featureStatus,
- int featureLen,
- int windowWidth,
- int windowHeight,
- int maxIterations,
- int nPyramidLevels,
- float maxResidue,
- float minDisplacement,
- float minEigenvalue,
- int lightingNormalized
-);
-
-extern void
-(**ppfcvTrackLKOpticalFlowf32)
-(
- const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int width,
- unsigned int height,
- const fcvPyramidLevel *src1Pyr,
- const fcvPyramidLevel *scr2Pyr,
- const fcvPyramidLevel *dx1Pyr,
- const fcvPyramidLevel *dy1Pyr,
- const float* featureXY,
- float* featureXY_out,
- int32_t* featureStatus,
- int featureLen,
- int windowWidth,
- int windowHeight,
- int maxIterations,
- int nPyramidLevels,
- float maxResidue,
- float minDisplacement,
- float minEigenvalue,
- int lightingNormalized
-);
-
-extern int
-(**ppfcvPyramidCreatef32)
-(
- const float* __restrict base,
- unsigned int baseWidth,
- unsigned int baseHeight,
- unsigned int numLevels,
- fcvPyramidLevel* pyramid
-);
-
-extern int
-(**ppfcvPyramidCreateu8)
-(
- const uint8_t* __restrict base,
- unsigned int baseWidth,
- unsigned int baseHeight,
- unsigned int numLevels,
- fcvPyramidLevel * pyramid
-);
-
-extern int
-(**ppfcvPyramidAllocate)
-(
- fcvPyramidLevel* pyr,
- unsigned int baseWidth,
- unsigned int baseHeight,
- unsigned int bytesPerPixel,
- unsigned int numLevels,
- int allocateBase
-);
-
-extern void
-(**ppfcvPyramidDelete)
-(
- fcvPyramidLevel* pyr,
- unsigned int numLevels,
- unsigned int startLevel
-);
-
-extern int
-(**ppfcvPyramidSobelGradientCreatei16)
-(
- const fcvPyramidLevel * imgPyr,
- fcvPyramidLevel * dxPyr,
- fcvPyramidLevel * dyPyr,
- unsigned int numLevels
-);
-
-extern int
-(**ppfcvPyramidSobelGradientCreatei8)
-(
- const fcvPyramidLevel * imgPyr,
- fcvPyramidLevel * dxPyr,
- fcvPyramidLevel * dyPyr, unsigned int numLevels
-);
-
-extern int
-(**ppfcvPyramidSobelGradientCreatef32)
-(
- const fcvPyramidLevel * imgPyr,
- fcvPyramidLevel * dxPyr,
- fcvPyramidLevel * dyPyr,
- unsigned int numLevels
-);
-
-extern uint32_t
-(**ppfcvBitCountu8)
-(
- const uint8_t* __restrict src,
- unsigned int len
-);
-
-extern uint32_t
-(**ppfcvBitCount32x1u8)
-(
- const uint8_t* __restrict src
-);
-
-extern void
-(**ppfcvBitCount32x4u8)
-(
- const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- uint32_t* __restrict count
-);
-
-extern uint32_t
-(**ppfcvBitCount64x1u8)
-(
- const uint8_t* __restrict src
-);
-
-extern void
-(**ppfcvBitCount64x4u8)
-(
- const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- uint32_t count[4]
-);
-
-extern uint32_t
-(**ppfcvBitCountu32)
-(
- const uint32_t* __restrict src,
- unsigned int len
-);
-
-extern uint32_t
-(**ppfcvHammingDistanceu8)
-(
- const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- unsigned int len
-);
-
-extern uint32_t
-(**ppfcvHammingDistance32x1u8a4)
-(
- const uint8_t* __restrict a,
- const uint8_t* __restrict b
-);
-
-extern uint32_t
-(**ppfcvHammingDistance64x1u8a4)
-(
- const uint8_t* __restrict a,
- const uint8_t* __restrict b
-);
-
-extern uint32_t
-(**ppfcvHammingDistance32x1u8)
-(
- const uint8_t* __restrict a,
- const uint8_t* __restrict b
-);
-
-extern uint32_t
-(**ppfcvHammingDistance64x1u8)
-(
- const uint8_t* __restrict a,
- const uint8_t* __restrict b
-);
-
-extern void
-(**ppfcvHammingDistance32x4u8a4)
-(
- const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- const uint8_t* __restrict E,
- uint32_t HamminDistances[4]
-);
-
-extern void
-(**ppfcvHammingDistance64x4u8a4)
-(
- const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- const uint8_t* __restrict E,
- uint32_t HamminDistances[4]
-);
-
-extern void
-(**ppfcvHammingDistance64x4u8)
-(
- const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- const uint8_t* __restrict E,
- uint32_t HamminDistances[4]
-);
-
-extern int
-(**ppfcvTrackBMOpticalFlow16x16u8)
-(
- const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t roiLeft,
- uint32_t roiTop,
- uint32_t roiRight,
- uint32_t roiBottom,
- uint32_t shiftSize,
- uint32_t searchWidth,
- uint32_t searchHeight,
- uint32_t searchStep,
- uint32_t usePrevious,
- uint32_t * numMv,
- uint32_t * locX,
- uint32_t * locY,
- uint32_t * mvX,
- uint32_t * mvY
-);
-
-extern int
-(**ppfcvMserInit)
-(
- const unsigned int width,
- const unsigned int height,
- unsigned int delta,
- unsigned int minArea ,
- unsigned int maxArea ,
- float maxVariation ,
- float minDiversity , void ** mserHandle
-);
-
-extern void
-(**ppfcvMserRelease) (void *mserHandle);
-
-extern void
-(**ppfcvMseru8)
-(
- void *mserHandle,
- const uint8_t* __restrict srcPtr,unsigned int srcWidth,
- unsigned int srcHeight, unsigned int srcStride,
- unsigned int maxContours,
- unsigned int * __restrict numContours, unsigned int * __restrict numPointsInContour,
-unsigned int pointsArraySize,
-unsigned int* __restrict pointsArray
-);
-
-extern void
-(**ppfcvMserExtu8)( void *mserHandle,
- const uint8_t* __restrict srcPtr,unsigned int srcWidth,
- unsigned int srcHeight, unsigned int srcStride,
- unsigned int maxContours,
- unsigned int * __restrict numContours, unsigned int * __restrict numPointsInContour ,
- unsigned int* __restrict pointsArray, unsigned int pointsArraySize,
- unsigned int * __restrict contourVariation,
- int * __restrict contourPolarity,
- unsigned int * __restrict contourNodeId,
- unsigned int * __restrict contourNodeCounter
- );
-
-
-extern void
-(**ppfcvBoundingRectangle)
-(
-const uint32_t * __restrict xy, uint32_t numPoints,
- uint32_t * rectTopLeftX, uint32_t * rectTopLeftY,
- uint32_t * rectWidth, uint32_t *rectHeight
-);
-
-extern void
-(**ppfcvUpsampleVerticalu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvUpsampleHorizontalu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvUpsample2Du8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvUpsampleVerticalInterleavedu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvUpsampleHorizontalInterleavedu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvUpsample2DInterleavedu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGB565ToYCbCr444Planaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorRGB565ToYCbCr422Planaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorRGB565ToYCbCr420Planaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorRGB888ToYCbCr444Planaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorRGB888ToYCbCr422Planaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorRGB888ToYCbCr420Planaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorRGBA8888ToYCbCr444Planaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorRGBA8888ToYCbCr422Planaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorRGBA8888ToYCbCr420Planaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorRGB565ToYCbCr444PseudoPlanaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorRGB565ToYCbCr422PseudoPlanaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorRGB565ToYCbCr420PseudoPlanaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorRGB888ToYCbCr444PseudoPlanaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorRGB888ToYCbCr422PseudoPlanaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorRGB888ToYCbCr420PseudoPlanaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorRGBA8888ToYCbCr444PseudoPlanaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorRGBA8888ToYCbCr422PseudoPlanaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorRGBA8888ToYCbCr420PseudoPlanaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorRGB565ToRGB888u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGB565ToRGBA8888u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGB565ToBGR565u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGB565ToBGR888u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGB565ToBGRA8888u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGB888ToRGB565u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGB888ToRGBA8888u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGB888ToBGR565u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGB888ToBGR888u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGB888ToBGRA8888u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGBA8888ToRGB565u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGBA8888ToRGB888u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGBA8888ToBGR565u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGBA8888ToBGR888u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGBA8888ToBGRA8888u8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorRGBA8888ToLABu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PlanarToYCbCr422Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PlanarToYCbCr420Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PlanarToYCbCr444PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-
-extern void
-(**ppfcvColorYCbCr444PlanarToYCbCr422PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PlanarToYCbCr420PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PlanarToYCbCr444Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PlanarToYCbCr420Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PlanarToYCbCr444PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PlanarToYCbCr422PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PlanarToYCbCr420PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PlanarToYCbCr444Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PlanarToYCbCr422Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PlanarToYCbCr444PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PlanarToYCbCr422PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PlanarToYCbCr420PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-
-extern void
-(**ppfcvColorYCbCr444PseudoPlanarToYCbCr422PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PseudoPlanarToYCbCr420PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PseudoPlanarToYCbCr444Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PseudoPlanarToYCbCr422Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PseudoPlanarToYCbCr420Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PseudoPlanarToYCbCr444PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-
-extern void
-(**ppfcvColorYCbCr422PseudoPlanarToYCbCr420PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PseudoPlanarToYCbCr444Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PseudoPlanarToYCbCr422Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PseudoPlanarToYCbCr420Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PseudoPlanarToYCbCr444PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PseudoPlanarToYCbCr422PseudoPlanaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PseudoPlanarToYCbCr444Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PseudoPlanarToYCbCr422Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PseudoPlanarToYCbCr420Planaru8)
-(
- const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PlanarToRGB565u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PlanarToRGB888u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PlanarToRGBA8888u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PlanarToRGB565u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PlanarToRGB888u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PlanarToRGBA8888u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PlanarToRGB565u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PlanarToRGB888u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PlanarToRGBA8888u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PseudoPlanarToRGB565u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PseudoPlanarToRGB888u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr444PseudoPlanarToRGBA8888u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PseudoPlanarToRGB565u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PseudoPlanarToRGB888u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr422PseudoPlanarToRGBA8888u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PseudoPlanarToRGB565u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PseudoPlanarToRGB888u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvColorYCbCr420PseudoPlanarToRGBA8888u8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvEdgeWeightings16)
-(
- int16_t* __restrict edgeMap,
- const uint32_t edgeMapWidth,
- const uint32_t edgeMapHeight,
- const uint32_t edgeMapStride,
- const uint32_t weight,
- const uint32_t edge_limit,
- const uint32_t hl_threshold,
- const uint32_t hh_threshold,
- const uint32_t edge_denoise_factor
-);
-
-extern void
-(**ppfcvDeinterleaveu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst0,
- uint32_t dst0Stride,
- uint8_t* __restrict dst1,
- uint32_t dst1Stride
-);
-
-extern void
-(**ppfcvInterleaveu8)
-(
- const uint8_t* __restrict src0,
- const uint8_t* __restrict src1,
- uint32_t imageWidth,
- uint32_t imageHeight,
- uint32_t src0Stride,
- uint32_t src1Stride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvDWTHaarTransposeu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvDWT53TabTransposes16)
-(
- const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvIDWT53TabTransposes16)
-(
- const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvIDWTHaarTransposes16)
-(
- const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvDWTHaaru8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvDWT53Tabs16)
-(
- const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvIDWT53Tabs16)
-(
- const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvIDWTHaars16)
-(
- const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvDCTu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvIDCTs16)
-(
- const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvScaleUpPolyu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvScaleUpPolyInterleaveu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvScaleDownMNu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvScaleDownMNInterleaveu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride
-);
-
-extern uint32_t
-(**ppfcvKMeansTreeSearch36x10s8)
-(
- const int8_t* __restrict nodeChildrenCenter,
- const uint32_t* __restrict nodeChildrenInvLenQ32,
- const uint32_t* __restrict nodeChildrenIndex,
- const uint8_t* __restrict nodeNumChildren,
- uint32_t numNodes,
- const int8_t* __restrict key
-);
-
-extern void
-(**ppfcvLinearSearch8x36s8)
-(
- const uint32_t * __restrict dbLUT,
- uint32_t numDBLUT,
- const int8_t * __restrict descDB,
- const uint32_t * __restrict descDBInvLenQ38,
- const uint16_t * __restrict descDBTargetId,
- uint32_t numDescDB,
- const int8_t * __restrict srcDesc,
- const uint32_t * __restrict srcDescInvLenQ38,
- const uint32_t * __restrict srcDescIdx,
- uint32_t numSrcDesc,
- const uint16_t * __restrict targetsToIgnore,
- uint32_t numTargetsToIgnore,
- uint32_t maxDistanceQ31,
- uint32_t * __restrict correspondenceDBIdx,
- uint32_t * __restrict correspondencSrcDescIdx,
- uint32_t * __restrict correspondenceDistanceQ31,
- uint32_t maxNumCorrespondences,
- uint32_t * __restrict numCorrespondences
-);
-
-extern int
-(**ppfcvLinearSearchPrepare8x36s8_v2)
-(
- uint32_t * __restrict dbLUT,
- uint32_t numDBLUT,
- int8_t * __restrict descDB,
- uint32_t * __restrict descDBInvLenQ38,
- uint16_t * __restrict descDBTargetId,
- uint32_t * __restrict idxLUT,
- uint32_t numDescDB
-);
-
-extern void
-(**ppfcvFindContoursExternalu8) ( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- int32_t hierarchy[][4],
- void* contourHandle );
-
-extern void
-(**ppfcvFindContoursListu8) ( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t*__restrict numContours,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- void* contourHandle );
-
-extern void
-(**ppfcvFindContoursCcompu8)( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t*__restrict numContours,
- uint32_t* __restrict holeFlag,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- int32_t hierarchy[][4],
- void* contourHandle );
-
-extern void
-(**ppfcvFindContoursTreeu8) ( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict holeFlag,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- int32_t hierarchy[][4],
- void* contourHandle );
-
-extern void *
-(**ppfcvFindContoursAllocate) ( uint32_t srcStride );
-
-extern void
-(**ppfcvFindContoursDelete) ( void* contourHandle );
-
-extern void
-(**ppfcvSolvef32) (const float32_t * __restrict A,
- int32_t numRows,
- int32_t numCols,
- const float32_t * __restrict b,
- float32_t * __restrict x);
-
-extern void
-(**ppfcvGetPerspectiveTransformf32)( const float32_t* __restrict src,
- const float32_t* __restrict dst,
- float32_t* __restrict transformCoefficient );
-
-
-extern void
-(**ppfcvSetElementsu8)( uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t value,
- const uint8_t * __restrict mask ,
- uint32_t maskStride
- );
-
-extern void
-(**ppfcvSetElementss32)( int32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t value,
- const uint8_t * __restrict mask ,
- uint32_t maskStride
- );
-
-extern void
-(**ppfcvSetElementsf32)( float32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t value,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-extern void
-(**ppfcvSetElementsc4u8)( uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t value1,
- uint8_t value2,
- uint8_t value3,
- uint8_t value4,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-extern void
-(**ppfcvSetElementsc4s32)( int32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t value1,
- int32_t value2,
- int32_t value3,
- int32_t value4,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-extern void
-(**ppfcvSetElementsc4f32)( float32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t value1,
- float32_t value2,
- float32_t value3,
- float32_t value4,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-extern void
-(**ppfcvSetElementsc3u8)( uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t value1,
- uint8_t value2,
- uint8_t value3,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-extern void
-(**ppfcvSetElementsc3s32)( int32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t value1,
- int32_t value2,
- int32_t value3,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-extern void
-(**ppfcvSetElementsc3f32)( float32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t value1,
- float32_t value2,
- float32_t value3,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- );
-
-
-extern void
-(**ppfcvAdaptiveThresholdGaussian3x3u8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t maxValue,
- fcvThreshType thresholdType,
- int32_t value,
- uint8_t* __restrict dst,
- uint32_t dstStride );
-extern void
-(**ppfcvAdaptiveThresholdGaussian5x5u8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t maxValue,
- fcvThreshType thresholdType,
- int32_t value,
- uint8_t* __restrict dst,
- uint32_t dstStride );
-
-extern void
-(**ppfcvAdaptiveThresholdGaussian11x11u8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t maxValue,
- fcvThreshType thresholdType,
- int32_t value,
- uint8_t* __restrict dst,
- uint32_t dstStride );
-
-extern void
-(**ppfcvAdaptiveThresholdMean3x3u8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t maxValue,
- fcvThreshType thresholdType,
- int32_t value,
- uint8_t* __restrict dst,
- uint32_t dstStride );
-
-
-extern void
-(**ppfcvAdaptiveThresholdMean5x5u8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t maxValue,
- fcvThreshType thresholdType,
- int32_t value,
- uint8_t* __restrict dst,
- uint32_t dstStride );
-
-extern void
-(**ppfcvAdaptiveThresholdMean11x11u8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t maxValue,
- fcvThreshType thresholdType,
- int32_t value,
- uint8_t* __restrict dst,
- uint32_t dstStride );
-
-
-extern void
-(**ppfcvBoxFilter3x3u8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
- );
-
-
-
-extern void
-(**ppfcvBoxFilter5x5u8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
- );
-
-
-extern void
-(**ppfcvBoxFilter11x11u8)(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
- );
-
-extern void
-(**ppfcvBilateralFilter5x5u8)(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
- );
-
-
-
-extern void
-(**ppfcvBilateralFilter7x7u8)(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
- );
-
-
-extern void
-(**ppfcvBilateralFilter9x9u8)(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
- );
-
-extern void
-(**ppfcvSegmentFGMasku8)(uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t Polygonal,
- uint32_t perimScale);
-
-
-extern void
-(**ppfcvAbsDiffu8)(const uint8_t * __restrict src1,
- const uint8_t * __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride );
-
-
-
-extern void
-(**ppfcvAbsDiffs32)(const int32_t * __restrict src1,
- const int32_t * __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t * __restrict dst,
- uint32_t dstStride );
-
-
-
-extern void
-(**ppfcvAbsDifff32)(const float32_t * __restrict src1,
- const float32_t * __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t * __restrict dst,
- uint32_t dstStride );
-
-
-extern void
-(**ppfcvAbsDiffVu8)(const uint8_t * __restrict src,
- uint8_t value,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride );
-
-
-extern void
-(**ppfcvAbsDiffVs32)(const int32_t * __restrict src,
- int32_t value,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t * __restrict dst,
- uint32_t dstStride );
-
-extern void
-(**ppfcvAbsDiffVf32)(const float32_t * __restrict src,
- float32_t value,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t * __restrict dst,
- uint32_t dstStride );
-
-
-extern void
-(**ppfcvAbsDiffVc4u8)(const uint8_t * __restrict src,
- uint8_t value1,
- uint8_t value2,
- uint8_t value3,
- uint8_t value4,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride );
-
-
-extern void
-(**ppfcvAbsDiffVc4s32)(const int32_t * __restrict src,
- int32_t value1,
- int32_t value2,
- int32_t value3,
- int32_t value4,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t * __restrict dst,
- uint32_t dstStride );
-
-extern void
-(**ppfcvAbsDiffVc4f32)(const float32_t * __restrict src,
- float32_t value1,
- float32_t value2,
- float32_t value3,
- float32_t value4,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t * __restrict dst,
- uint32_t dstStride);
-
-extern void
-(**ppfcvAbsDiffVc3u8)(const uint8_t * __restrict src,
- uint8_t value1,
- uint8_t value2,
- uint8_t value3,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride );
-
-extern void
-(**ppfcvAbsDiffVc3s32)(const int32_t * __restrict src,
- int32_t value1,
- int32_t value2,
- int32_t value3,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t * __restrict dst,
- uint32_t dstStride );
-
-extern void
-(**ppfcvAbsDiffVc3f32)(const float32_t * __restrict src,
- float32_t value1,
- float32_t value2,
- float32_t value3,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t * __restrict dst,
- uint32_t dstStride);
-
-extern
-int (**ppfcvKDTreeCreate36s8f32)
-( const int8_t* __restrict vectors,
- const float32_t* __restrict invLengths,
- int numVectors,
- fcvKDTreeDatas8f32** kdtrees
-);
-
-extern
-int (**ppfcvKDTreeDestroy36s8f32)
-( fcvKDTreeDatas8f32* kdtrees
-);
-
-extern
-int (**ppfcvKDTreeQuery36s8f32)
-( fcvKDTreeDatas8f32* kdtrees,
- const int8_t* __restrict query,
- float32_t queryInvLen,
- int maxNNs,
- float32_t maxDist,
- int maxChecks,
- const uint8_t* __restrict mask,
- int32_t* numNNsFound,
- int32_t* __restrict NNInds,
- float32_t* __restrict NNDists
-);
-
-extern void (**ppfcvBitwiseOru8)
-(
- const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride,
- uint8_t * __restrict mask,
- uint32_t maskStride
-);
-
-extern void
-(**ppfcvBitwiseOrs32)
-(
- const int32_t* __restrict src1,
- const int32_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t * __restrict dst,
- uint32_t dstStride,
- uint8_t * __restrict mask,
- uint32_t maskStride
-);
-
-extern void
-(**ppfcvColorRGB888ToGrayu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvTiltedIntegralu8s32)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvConvValids16)
-(
- const int16_t* __restrict src1,
- uint32_t src1Width,
- uint32_t src1Height,
- uint32_t src1Stride,
- const int16_t* __restrict src2,
- uint32_t src2Width,
- uint32_t src2Height,
- uint32_t src2Stride,
- int32_t* __restrict dst,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvFloodfillSimpleu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride,
- uint32_t xBegin,
- uint32_t yBegin,
- uint8_t newVal, //new Val can't be zero. zero is background.
- fcvConnectedComponent *cc,
- uint8_t connectivity,
- void* lineBuffer);
-
-extern void
-(**ppfcvUpdateMotionHistoryu8s32)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth, uint32_t srcHeight,
- uint32_t srcStride,
- int32_t* __restrict dst,
- uint32_t dstStride,
- int32_t timeStamp,
- int32_t maxHistory);
-
-extern void
-(**ppfcvIntegrateImageYCbCr420PseudoPlanaru8)
-(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint32_t* __restrict integralY,
- uint32_t* __restrict integralCb,
- uint32_t* __restrict integralCr,
- uint32_t integralYStride,
- uint32_t integralCbStride,
- uint32_t integralCrStride
-);
-
-extern void
-(**ppfcvFindForegroundIntegrateImageYCbCr420u32)
-(
- const uint32_t * __restrict bgIntegralY,
- const uint32_t * __restrict bgIntegralCb,
- const uint32_t * __restrict bgIntegralCr,
- const uint32_t * __restrict fgIntegralY,
- const uint32_t * __restrict fgIntegralCb,
- const uint32_t * __restrict fgIntegralCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t *__restrict outputMask,
- uint32_t outputWidth,
- uint32_t outputHeight,
- uint32_t outputMaskStride,
- float32_t threshold
-);
-
-extern void
-(**ppfcvAverages32)
-(
- const int32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t* __restrict avgValue
-);
-
-extern void
-(**ppfcvAverageu8)
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t* __restrict avgValue
-);
-
-extern uint32_t
- (**ppfcvMeanShiftu8)
- (const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria);
-
-
-extern uint32_t
- (**ppfcvMeanShifts32)
- (const int32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria);
-
-
-extern uint32_t
- (**ppfcvMeanShiftf32)
- (const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria);
-
-
-extern uint32_t
- (**ppfcvConAdaTracku8)
- (const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria,
- fcvBox2D *circuBox);
-
-extern uint32_t
- (**ppfcvConAdaTracks32)
- (const int32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria,
- fcvBox2D *circuBox);
-
-extern uint32_t
- (**ppfcvConAdaTrackf32)
- (const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria,
- fcvBox2D *circuBox);
-
-extern void
-(**ppfcvSVDf32)
-(
- const float32_t * __restrict A,
- uint32_t m,
- uint32_t n,
- float32_t * __restrict w,
- float32_t * __restrict U,
- float32_t * __restrict Vt,
- float32_t * __restrict tmpU,
- float32_t * __restrict tmpV
-);
-
-extern void
-(**ppfcvFillConvexPolyu8)
-(
- uint32_t nPts,
- const uint32_t* __restrict polygon,
- uint32_t nChannel,
- const uint8_t* __restrict color,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride
-);
-
-extern void
-(**ppfcvPointPolygonTest)
-(
- uint32_t nPts,
- const uint32_t* __restrict polygonContour,
- uint32_t px,
- uint32_t py,
- float32_t* distance,
- int16_t* resultFlag
-);
-
-extern void
-(**ppfcvFindConvexHull)
-(
- uint32_t* __restrict polygonContour,
- uint32_t nPtsContour,
- uint32_t* __restrict convexHull,
- uint32_t* nPtsHull,
- uint32_t* __restrict tmpBuff
-);
-
-extern int32_t
-(**ppfcvSolveCholeskyf32)
-(
- float32_t* __restrict A,
- const float32_t* __restrict b,
- float32_t* __restrict diag,
- uint32_t N,
- float32_t* __restrict x
-);
-
-extern void
- (**ppfcvGeomDistortPoint2x1f32)
- (const float32_t* __restrict cameraCalibration,
- const float32_t* __restrict xyCamera,
- float32_t* __restrict xyDevice);
-
-extern void
-(**ppfcvGeomDistortPoint2xNf32)(const float32_t* __restrict cameraCalibration,
- const float32_t* __restrict xyCamera,
- uint32_t srcStride,
- uint32_t xySize,
- float32_t* __restrict xyDevice,
- uint32_t dstStride);
-
-extern void
- (**ppfcvGeomUndistortPoint2x1f32)
- (const float32_t* __restrict cameraCalibration,
- const float32_t* __restrict xyDevice,
- float32_t* __restrict xyCamera);
-
-extern void
-(**ppfcvGeomUndistortPoint2xNf32)(const float32_t* __restrict cameraCalibration,
- const float32_t* __restrict xyDevice,
- uint32_t srcStride,
- uint32_t xySize,
- float32_t* __restrict xyCamera,
- uint32_t dstStride);
-
-extern int32_t
-(**ppfcvGeomProjectPoint3x1f32)
-(const float32_t* __restrict pose,
- const float32_t* __restrict cameraCalibration,
- const float32_t* __restrict xyz,
- float32_t* __restrict xyCamera,
- float32_t* __restrict xyDevice);
-
-extern void
-(**ppfcvGeomProjectPoint3xNf32)(const float32_t* __restrict pose,
- const float32_t* __restrict cameraCalibration,
- const float32_t* __restrict xyz,
- uint32_t srcStride,
- uint32_t xyzSize,
- float32_t* __restrict xyCamera,
- float32_t* __restrict xyDevice,
- uint32_t dstStride,
- uint32_t* inFront);
-
-extern void
-(**ppfcvRemapRGBA8888NNu8)
-( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- const float32_t* __restrict mapX,
- const float32_t* __restrict mapY,
- uint32_t mapStride
-);
-
-extern void
-(**ppfcvRemapRGBA8888BLu8)
-( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- const float32_t* __restrict mapX,
- const float32_t* __restrict mapY,
- uint32_t mapStride
-);
-
-extern void
-(**ppfcvJacobianSE2f32)
-( const uint8_t *__restrict warpedImage,
- const uint16_t *__restrict warpedBorder,
- const uint8_t *__restrict targetImage,
- const int16_t *__restrict targetDX,
- const int16_t *__restrict targetDY,
- uint32_t width,
- uint32_t height,
- uint32_t stride,
- float32_t *__restrict sumJTJ,
- float32_t *__restrict sumJTE,
- float32_t *__restrict sumError,
- uint32_t * __restrict numPixels
-);
-
-extern void
-(**ppfcvTransformAffineClippedu8)
-( const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- const float32_t *__restrict affineMatrix,
- uint8_t *__restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- uint32_t *__restrict dstBorder
-);
-
-extern fcvBGCodeWord**
- (**ppfcvCreateBGCodeBookModel)
- (
- uint32_t srcWidth,
- uint32_t srcHeight,
- void** __restrict cbmodel
- );
-
-extern void
- (**ppfcvReleaseBGCodeBookModel)
- (
- void** cbmodel
- );
-
-extern void
- (**ppfcvBGCodeBookUpdateu8)
- (
- void* __restrict cbmodel,
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- const uint8_t* __restrict fgMask,
- uint32_t fgMaskStride,
- fcvBGCodeWord** __restrict cbMap,
- int32_t* __restrict updateTime
- );
-
-extern void
- (**ppfcvBGCodeBookDiffu8)
- (
- void* __restrict cbmodel,
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict fgMask,
- uint32_t fgMaskStride,
- fcvBGCodeWord** __restrict cbMap,
- int32_t* __restrict numFgMask
- );
-
-
-extern void
- (**ppfcvBGCodeBookClearStaleu8)
- (
- void* __restrict cbmodel,
- int32_t staleThresh,
- const uint8_t* __restrict fgMask,
- uint32_t fgMaskWidth,
- uint32_t fgMaskHeight,
- uint32_t fgMaskStride,
- fcvBGCodeWord** __restrict cbMap
- );
-
-extern void
-(**ppfcvHoughCircleu8)( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvCircle *circles,
- uint32_t* numCircle,
- uint32_t maxCircle,
- uint32_t minDist,
- uint32_t cannyThreshold,
- uint32_t accThreshold,
- uint32_t minRadius,
- uint32_t maxRadius,
- void *data);
-
-extern void
-(**ppfcvDrawContouru8)(uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t nContours,
- const uint32_t *__restrict holeFlag,
- const uint32_t *__restrict numContourPoints,
- const uint32_t **__restrict contourStartPoints,
- uint32_t pointBufferSize,
- const uint32_t *__restrict pointBuffer,
- int32_t hierarchy[][4],
- uint32_t max_level,
- int32_t thickness,
- uint8_t color,
- uint8_t hole_color);
-
-extern void
-(**ppfcvDrawContourInterleavedu8)(uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t nContours,
- const uint32_t *__restrict holeFlag,
- const uint32_t *__restrict numContourPoints,
- const uint32_t **__restrict contourStartPoints,
- uint32_t pointBufferSize,
- const uint32_t *__restrict pointBuffer,
- int32_t hierarchy[][4],
- uint32_t max_level,
- int32_t thickness,
- uint8_t colorR,
- uint8_t colorG,
- uint8_t colorB,
- uint8_t hole_colorR,
- uint8_t hole_colorG,
- uint8_t hole_colorB);
-
-extern void
-(**ppfcvDrawContourPlanaru8)(uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t nContours,
- const uint32_t *__restrict holeFlag,
- const uint32_t *__restrict numContourPoints,
- const uint32_t **__restrict contourStartPoints,
- uint32_t pointBufferSize,
- const uint32_t *__restrict pointBuffer,
- int32_t hierarchy[][4],
- uint32_t max_level,
- int32_t thickness,
- uint8_t colorR,
- uint8_t colorG,
- uint8_t colorB,
- uint8_t hole_colorR,
- uint8_t hole_colorG,
- uint8_t hole_colorB);
-
-//==============================================================================
-// Function Definitions
-//==============================================================================
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterMedian3x3u8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvFilterMedian3x3u8_v2)( src, width, height, width, dst, width );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterMedian3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( (srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvFilterMedian3x3u8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterGaussian3x3u8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst,
- int border )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( ((width - 2)/6)*6 <= (width - 2) &&
- ((width - 2)/6)*6 >= ((width - 2) - 5) );
-
- return (**ppfcvFilterGaussian3x3u8_v2)( src, width, height, width, dst,
- width, border );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterGaussian3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int border )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcStride == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
- fcvAssert( ((srcWidth - 2)/6)*6 <= (srcWidth - 2) &&
- ((srcWidth - 2)/6)*6 >= ((srcWidth - 2) - 5) );
-
- return (**ppfcvFilterGaussian3x3u8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride, border );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterGaussian5x5u8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst,
- int border )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvFilterGaussian5x5u8_v2)( src, width, height, width, dst, width,
- border );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterGaussian5x5u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int border )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcStride == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvFilterGaussian5x5u8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride, border );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterGaussian11x11u8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst,
- int blurBorder )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvFilterGaussian11x11u8_v2)( src, width, height, width, dst,
- width, blurBorder );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterGaussian11x11u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int blurBorder )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcStride == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return(**ppfcvFilterGaussian11x11u8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride, blurBorder );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYUV420toRGB8888u8
-(
- const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint32_t* __restrict dst
-)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvColorYCrCb420PseudoPlanarToRGB8888u8)( src, width, height, width, width, dst, width * sizeof(uint32_t) );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCrCb420PseudoPlanarToRGB8888u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcYStride,
- unsigned int srcCStride,
- uint32_t* __restrict dst,
- unsigned int dstStride )
-{
- srcYStride = (srcYStride==0 ? srcWidth : srcYStride);
- srcCStride = (srcCStride==0 ? srcWidth : srcCStride);
- dstStride = (dstStride==0 ? srcWidth*4 : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 4
- fcvAssert( (dstStride & 31) == 0 ); // multiple of 32
- fcvAssert( (srcYStride >= srcWidth) ); // Y-stride is at least as much as srcWidth
- fcvAssert( (srcCStride >= srcWidth) ); // Y-stride is at least as much as srcWidth/2
- fcvAssert( (dstStride >= srcWidth*4) ); // Dst-stride is at least as much as srcWidth*3
-#endif
-
- return (**ppfcvColorYCrCb420PseudoPlanarToRGB8888u8)( src, srcWidth, srcHeight,
- srcYStride, srcCStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYUV420toRGB565u8
-(
- const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint32_t* __restrict dst
-)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x3) == 0 ); // multiple of 4
-#endif
-
- return (**ppfcvColorYUV420toRGB565u8)( src, width, height, dst );
-}
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvColorYCrCbH1V1toRGB888u8
-(
- const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst
-)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvColorYCrCbH1V1toRGB888u8)( src, width, height, dst );
-}
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvColorYCrCbH2V2toRGB888u8
-(
- const uint8_t* __restrict y_src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst
-)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)y_src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvColorYCrCbH2V2toRGB888u8)( y_src, width, height, dst );
-}
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888toYCrCbu8_v2
-(
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride
-)
-{
- srcStride = (srcStride==0 ? srcWidth*3 : srcStride);
- dstStride = (dstStride==0 ? srcWidth*3 : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth*3) ); // multiple of 8
- fcvAssert( (dstStride >= srcWidth*3) ); // multiple of 8
-#endif
-
- return (**ppfcvColorRGB888toYCrCbu8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888toYCrCbu8
-(
- const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst
-)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvColorRGB888toYCrCbu8_v2)( src, width, height, width*3, dst, width*3 );
-}
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvColorYCrCbH2V1toRGB888u8
-(
- const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst
-)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvColorYCrCbH2V1toRGB888u8)( src, width, height, dst );
-}
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvColorYCrCbH1V2toRGB888u8
-(
- const uint8_t* __restrict ysrc,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst
-)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
-
- fcvAssert( ((int)(size_t)ysrc & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvColorYCrCbH1V2toRGB888u8)( ysrc, width, height, dst );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvDescriptor17x17u8To36s8( const uint8_t* __restrict patch,
- int8_t* __restrict descriptorChar,
- int32_t* __restrict descriptorNormSq )
-{
- return (**ppfcvDescriptor17x17u8To36s8)(patch, descriptorChar, descriptorNormSq);
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvDescriptorSampledMeanAndVar36f32(
- const float* __restrict src,
- int first,
- int last,
- int32_t* vind,
- float* __restrict means,
- float* __restrict vars,
- float* __restrict temp )
-{
- return (**ppfcvDescriptorSampledMeanAndVar36f32)(src, first, last, vind, means, vars, temp);
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int32_t
-fcvDotProducts8( const int8_t* __restrict a,
- const int8_t* __restrict b,
- unsigned int abSize )
-{
- return (**ppfcvDotProducts8)( a, b, abSize );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline uint32_t
-fcvDotProductu8( const uint8_t* __restrict a,
- const uint8_t* __restrict b,
- unsigned int abSize )
-{
- return (**ppfcvDotProductu8)( a, b, abSize );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int32_t
-fcvDotProduct36x1s8( const int8_t* __restrict a,
- const int8_t* __restrict b )
-{
- return (**ppfcvDotProduct36x1s8)( a, b );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProduct36x4s8( const int8_t* __restrict A,
- const int8_t* __restrict B,
- const int8_t* __restrict C,
- const int8_t* __restrict D,
- const int8_t* __restrict E,
- int32_t* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvDotProduct36x4s8)( A, B, C, D, E, dotProducts );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProductNorm36x4s8( const int8_t* __restrict A,
- float invLengthA,
- const int8_t* __restrict vB0,
- const int8_t* __restrict vB1,
- const int8_t* __restrict vB2,
- const int8_t* __restrict vB3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)invLengthsB & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( sizeof(*invLengthsB) == 4 );
- fcvAssert( sizeof(*dotProducts) == 4 );
-#endif
-
- (**ppfcvDotProductNorm36x4s8)( A, invLengthA, vB0, vB1, vB2, vB3, invLengthsB,
- dotProducts );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline uint32_t
-fcvDotProduct36x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b )
-{
- return (**ppfcvDotProduct36x1u8)( a, b );
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProduct36x4u8( const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- const uint8_t* __restrict E,
- uint32_t* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvDotProduct36x4u8)( A, B, C, D, E, dotProducts );
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProductNorm36x4u8( const uint8_t* __restrict A,
- float invLengthA,
- const uint8_t* __restrict vB0,
- const uint8_t* __restrict vB1,
- const uint8_t* __restrict vB2,
- const uint8_t* __restrict vB3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)invLengthsB & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( sizeof(*invLengthsB) == 4 );
- fcvAssert( sizeof(*dotProducts) == 4 );
-#endif
-
- (**ppfcvDotProductNorm36x4u8)( A, invLengthA, vB0, vB1, vB2, vB3, invLengthsB,
- dotProducts );
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int32_t
-fcvDotProduct64x1s8( const int8_t* __restrict a,
- const int8_t* __restrict b )
-{
- return (**ppfcvDotProduct64x1s8)( a, b );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProduct64x4s8( const int8_t* __restrict A,
- const int8_t* __restrict B,
- const int8_t* __restrict C,
- const int8_t* __restrict D,
- const int8_t* __restrict E,
- int32_t* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvDotProduct64x4s8)( A, B, C, D, E, dotProducts );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProductNorm64x4s8( const int8_t* __restrict A,
- float invLengthA,
- const int8_t* __restrict vB0,
- const int8_t* __restrict vB1,
- const int8_t* __restrict vB2,
- const int8_t* __restrict vB3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)invLengthsB & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( sizeof(*invLengthsB) == 4 );
- fcvAssert( sizeof(*dotProducts) == 4 );
-#endif
-
- (**ppfcvDotProductNorm64x4s8)( A, invLengthA,
- vB0,
- vB1,
- vB2,
- vB3, invLengthsB,
- dotProducts );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline uint32_t
-fcvDotProduct64x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b )
-{
- return (**ppfcvDotProduct64x1u8)( a, b );
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProduct64x4u8( const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- const uint8_t* __restrict E,
- uint32_t* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvDotProduct64x4u8)( A, B, C, D, E, dotProducts );
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProductNorm64x4u8( const uint8_t* __restrict A,
- float invLengthA,
- const uint8_t* __restrict vB0,
- const uint8_t* __restrict vB1,
- const uint8_t* __restrict vB2,
- const uint8_t* __restrict vB3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)invLengthsB & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( sizeof(*invLengthsB) == 4 );
- fcvAssert( sizeof(*dotProducts) == 4 );
-#endif
-
- (**ppfcvDotProductNorm64x4u8)( A, invLengthA,
- vB0,
- vB1,
- vB2,
- vB3, invLengthsB,
- dotProducts );
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int32_t
-fcvDotProduct128x1s8( const int8_t* __restrict a,
- const int8_t* __restrict b )
-{
- return (**ppfcvDotProduct128x1s8)( a, b );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProduct128x4s8( const int8_t* __restrict A,
- const int8_t* __restrict B,
- const int8_t* __restrict C,
- const int8_t* __restrict D,
- const int8_t* __restrict E,
- int32_t* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvDotProduct128x4s8)( A, B, C, D, E, dotProducts );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProductNorm128x4s8( const int8_t* __restrict A,
- float invLengthA,
- const int8_t* __restrict vB0,
- const int8_t* __restrict vB1,
- const int8_t* __restrict vB2,
- const int8_t* __restrict vB3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)invLengthsB & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( sizeof(*invLengthsB) == 4 );
- fcvAssert( sizeof(*dotProducts) == 4 );
-#endif
-
- (**ppfcvDotProductNorm128x4s8)( A, invLengthA, vB0, vB1, vB2, vB3, invLengthsB,
- dotProducts );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline uint32_t
-fcvDotProduct128x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b )
-{
- return (**ppfcvDotProduct128x1u8)( a, b );
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProduct128x4u8( const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- const uint8_t* __restrict E,
- uint32_t* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvDotProduct128x4u8)( A, B, C, D, E, dotProducts );
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProductNorm128x4u8( const uint8_t* __restrict A,
- float invLengthA,
- const uint8_t* __restrict vB0,
- const uint8_t* __restrict vB1,
- const uint8_t* __restrict vB2,
- const uint8_t* __restrict vB3,
- float* __restrict invLengthsB,
- float* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)invLengthsB & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( sizeof(*invLengthsB) == 4 );
- fcvAssert( sizeof(*dotProducts) == 4 );
-#endif
-
- (**ppfcvDotProductNorm128x4u8)( A, invLengthA, vB0, vB1, vB2, vB3, invLengthsB,
- dotProducts );
-};
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProduct8x8u8( const uint8_t* __restrict ptch,
- const uint8_t* __restrict img,
- unsigned short imgW, unsigned short imgH,
- int nX, int nY, unsigned int nNum, int32_t* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvDotProduct8x8u8)( ptch, img, imgW, imgH, nX, nY, nNum, dotProducts );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDotProduct11x12u8( const uint8_t* __restrict ptch,
- const uint8_t* __restrict img,
- unsigned short imgW, unsigned short imgH,
- int iX, int iY,
- int32_t* __restrict dotProducts )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)dotProducts & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvDotProduct11x12u8)( ptch, img, imgW, imgH, iX, iY, dotProducts );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterSobel3x3u8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvFilterSobel3x3u8_v2)( src, width, height, width, dst, width );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterSobel3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvFilterSobel3x3u8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCanny3x3u8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst,
- int low,
- int high )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( (low >=0 ) && (low <= 255) );
- fcvAssert( (high >=0 ) && (high <= 255) );
- fcvAssert( low <= high );
-
- return (**ppfcvFilterCanny3x3u8_v2)( src, width, height, width, dst, width, low, high );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCanny3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- int low,
- int high )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
-#endif
- fcvAssert( (low >=0 ) && (low <= 255) );
- fcvAssert( (high >=0 ) && (high <= 255) );
- fcvAssert( low <= high );
-
- return (**ppfcvFilterCanny3x3u8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride, low, high );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageDiffu8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- uint8_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src1 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src2 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
-#endif
-
- return(**ppfcvImageDiffu8_v2)( src1, src2, srcWidth, srcHeight, srcWidth, dst,
- srcWidth );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageDiffu8_v2( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src1 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src2 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( ( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || ( srcStride & 0x7 ) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return(**ppfcvImageDiffu8_v2)( src1, src2, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-inline void
-fcvImageDiffs16( const int16_t* __restrict src1,
- const int16_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? (srcWidth * sizeof (int16_t)) : srcStride);
- dstStride = (dstStride==0 ? (srcWidth * sizeof (int16_t)) : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src1 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src2 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( ( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || ( srcStride & 0x7 ) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return(**ppfcvImageDiffs16_v2)( src1, src2, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvImageDifff32( const float* __restrict src1,
- const float* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? (srcWidth * sizeof (float)) : srcStride);
- dstStride = (dstStride==0 ? (srcWidth * sizeof (float)) : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src1 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src2 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( ( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || ( srcStride & 0x7 ) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvImageDifff32_v2)( src1, src2, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvImageDiffu8f32( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dst,
- unsigned int dstStride )
-{
-
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? (srcWidth * sizeof (float)) : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src1 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src2 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( ( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || ( srcStride & 0x7 ) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvImageDiffu8f32_v3)( src1, src2, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvImageDiffu8s8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int8_t* __restrict dst,
- unsigned int dstStride )
-{
-
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src1 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src2 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( ( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || ( srcStride & 0x7 ) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvImageDiffu8s8_v2)( src1, src2, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-
-}
-
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientInterleaveds16( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients
- )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)gradients & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
-#endif
-
- return(**ppfcvImageGradientInterleaveds16_v2)(src,srcWidth,srcHeight,srcStride,gradients,(srcWidth-2)*2*sizeof(int16_t));
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientInterleaveds16_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients,
- unsigned int gradStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- gradStride = (gradStride==0 ? (srcWidth-2)*2*sizeof(int16_t) : gradStride); //4*(width-2) because 2 grad values, 2 bytes each.
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)gradients & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (gradStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
- fcvAssert( (gradStride >= ((srcWidth-2)*2*sizeof(int16_t))) ); // at least as much as 4*(width-2)
-#endif
-
- return(**ppfcvImageGradientInterleaveds16_v2)(src,srcWidth,srcHeight,srcStride,gradients,gradStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientInterleavedf32( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients )
-
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)gradients & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( sizeof(*gradients) == 4 );
-#endif
-
- return(**ppfcvImageGradientInterleavedf32_v2)(src,srcWidth,srcHeight,srcStride,gradients,(srcWidth-2)*2*sizeof(float));
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientInterleavedf32_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients,
- unsigned int gradStride )
-
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- gradStride = (gradStride==0 ? (srcWidth-2)*2*sizeof(float) : gradStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)gradients & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 7) == 0 ); // multiple of 8
- fcvAssert( (gradStride & 7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
- fcvAssert( (gradStride >= ((srcWidth-2)*2*sizeof(float))) ); // at least as much as 8*width
-#endif
-
- return(**ppfcvImageGradientInterleavedf32_v2)(src,srcWidth,srcHeight,srcStride,gradients,gradStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientPlanars16( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
-#endif
-
- return(**ppfcvImageGradientPlanars16_v2)(src,srcWidth,srcHeight,srcStride,dx,dy,srcWidth*sizeof(int16_t));
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientPlanars16_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- unsigned int dxyStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dxyStride = (dxyStride==0 ? (srcWidth<<1) : dxyStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dxyStride & 0xF) == 0 ); // multiple of 16
- fcvAssert( (srcStride >= srcWidth) ); // srcStride should be at least as much as srcWidth
- fcvAssert( (dxyStride >= (srcWidth<<1)) ); // dxyStride should be at least twice as much as srcWidth
-#endif
-
- return(**ppfcvImageGradientPlanars16_v2)(src,srcWidth,srcHeight,srcStride,dx,dy,dxyStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientPlanarf32( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dx,
- float* __restrict dy )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( sizeof(*dx) == 4 );
- fcvAssert( sizeof(*dy) == 4 );
-#endif
-
- return(**ppfcvImageGradientPlanarf32_v2)(src,srcWidth,srcHeight,srcStride,dx,dy,srcWidth*sizeof(float));
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientPlanarf32_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict dx,
- float* __restrict dy,
- unsigned int dxyStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dxyStride = (dxyStride==0 ? srcStride*4 : dxyStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dxyStride & 31) == 0 ); // multiple of (8 * 4 bytes)
- fcvAssert( srcStride >= srcWidth ); // at least as much as width
- fcvAssert( dxyStride >= srcWidth*4 ); // at least as much as 4*width
-#endif
-
- return(**ppfcvImageGradientPlanarf32_v2)(src,srcWidth,srcHeight,srcStride,dx,dy,dxyStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientSobelInterleaveds16( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)gradients & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
-#endif
-
- return(**ppfcvImageGradientSobelInterleaveds16_v2)(src,srcWidth,srcHeight,srcStride,gradients,(srcWidth-2)*2*sizeof(int16_t));
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientSobelInterleaveds16_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients,
- unsigned int gradStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- gradStride = (gradStride==0 ? (srcWidth-2)*2*sizeof(int16_t) : gradStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)gradients & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (gradStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
- fcvAssert( (gradStride >= ((srcWidth-2)*2*sizeof(int16_t))) ); // at least as much as 4*(width
-#endif
-
- return(**ppfcvImageGradientSobelInterleaveds16_v2)(src,srcWidth,srcHeight,srcStride,gradients,gradStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
- fcvImageGradientSobelInterleaveds16_v3( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict gradients,
- unsigned int gradStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- gradStride = (gradStride==0 ? (srcWidth-2)*2*sizeof(int16_t) : gradStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)gradients & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (gradStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
- fcvAssert( (gradStride >= ((srcWidth-2)*2*sizeof(int16_t))) ); // at least as much as 4*width
-#endif
-
- return(**ppfcvImageGradientSobelInterleaveds16_v3)(src,srcWidth,srcHeight,srcStride,gradients,gradStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientSobelInterleavedf32( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients)
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)gradients & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( sizeof(*gradients) == 4 );
-#endif
-
- return (**ppfcvImageGradientSobelInterleavedf32_v2)(src,srcWidth,srcHeight,srcStride,gradients,(srcWidth-2)*2*sizeof(float));
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientSobelInterleavedf32_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* __restrict gradients,
- unsigned int gradStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- gradStride = (gradStride==0 ? (srcWidth-2)*2*sizeof(float) : gradStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)gradients & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 7) == 0 ); // multiple of 8
- fcvAssert( (gradStride & 7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
- fcvAssert( (gradStride >= ((srcWidth-2)*2*sizeof(float))) ); // at least as much as 8*width
-#endif
-
- return (**ppfcvImageGradientSobelInterleavedf32_v2)(src,srcWidth,srcHeight,srcStride,gradients,gradStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientSobelPlanars16( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy)
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvImageGradientSobelPlanars16_v2)(src,srcWidth,srcHeight,srcStride,dx,dy,srcWidth*sizeof(int16_t));
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientSobelPlanars16_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- unsigned int dxyStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dxyStride = (dxyStride==0 ? (srcWidth*sizeof(int16_t)) : dxyStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dxyStride & 15 ) == 0 ); // multiple of 16
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dxyStride >= (srcWidth*sizeof(int16_t))) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvImageGradientSobelPlanars16_v2)(src,srcWidth,srcHeight,srcStride,dx,dy,dxyStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
- fcvImageGradientSobelPlanars16_v3( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dx,
- int16_t* __restrict dy,
- unsigned int dxyStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dxyStride = (dxyStride==0 ? (srcWidth*sizeof(int16_t)) : dxyStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dxyStride & 0x7 ) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dxyStride >= (srcWidth*sizeof(int16_t))) ); // Stride is at least as much as Width*2
-#endif
-
- return (**ppfcvImageGradientSobelPlanars16_v3)(src,srcWidth,srcHeight,srcStride,dx,dy,dxyStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientSobelPlanars8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int8_t* __restrict dx,
- int8_t* __restrict dy)
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvImageGradientSobelPlanars8_v2)(src,srcWidth,srcHeight,srcStride,dx,dy,srcWidth);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientSobelPlanars8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int8_t* __restrict dx,
- int8_t* __restrict dy,
- unsigned int dxyStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dxyStride = (dxyStride==0 ? srcWidth : dxyStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dxyStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dxyStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvImageGradientSobelPlanars8_v2)(src,srcWidth,srcHeight,srcStride,dx,dy,dxyStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientSobelPlanarf32( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy)
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvImageGradientSobelPlanarf32_v2)(src,srcWidth,srcHeight,srcStride,dx,dy,srcWidth*sizeof(float));
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientSobelPlanarf32_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy,
- unsigned int dxyStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dxyStride = (dxyStride==0 ? (srcWidth*sizeof(float)) : dxyStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dxyStride & 31 ) == 0 ); // multiple of 16
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dxyStride >= (srcWidth*sizeof(float))) ); // Stride is at least as much as Width*sizeof each value.
-#endif
-
- return (**ppfcvImageGradientSobelPlanarf32_v2)(src,srcWidth,srcHeight,srcStride,dx,dy,dxyStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientSobelPlanarf32f32( const float * __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy)
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( sizeof(*dx) == 4 );
- fcvAssert( sizeof(*dy) == 4 );
-#endif
-
- return (**ppfcvImageGradientSobelPlanarf32f32_v2)(src,srcWidth,srcHeight,srcStride*sizeof(float),dx,dy,srcWidth*sizeof(float));
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvImageGradientSobelPlanarf32f32_v2( const float * __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- float* dx,
- float* dy,
- unsigned int dxyStride )
-{
- srcStride = (srcStride==0 ? (srcWidth*sizeof(float)) : srcStride);
- dxyStride = (dxyStride==0 ? (srcWidth*sizeof(float)) : dxyStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dx & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 31) == 0 ); // multiple of (8 * 4 bytes)
- fcvAssert( (dxyStride & 31 ) == 0 ); // multiple of (8 * 4 bytes)
- fcvAssert( (srcStride >= (srcWidth*sizeof(float))) ); // Stride is at least as much as Width*sizeof each value.
- fcvAssert( (dxyStride >= (srcWidth*sizeof(float))) ); // Stride is at least as much as Width*sizeof each value.
-#endif
-
- return (**ppfcvImageGradientSobelPlanarf32f32_v2)(src,srcWidth,srcHeight,srcStride,dx,dy,dxyStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvClusterEuclideanNormed36f32( const float* __restrict points,
- int numPoints,
- int pointStride,
- const size_t* __restrict indices,
- int numIndices,
- int numClusters,
- float* __restrict clusterCenters,
- int clusterCenterStride,
- float* __restrict newClusterCenters,
- size_t* __restrict clusterMemberCounts,
- size_t* __restrict clusterBindings,
- float* sumOfClusterDistances )
-{
- return (**ppfcvClusterEuclideanNormed36f32)(points,numPoints,pointStride,indices,numIndices,numClusters,clusterCenters,
- clusterCenterStride,newClusterCenters,clusterMemberCounts,
- clusterBindings,sumOfClusterDistances);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvClusterEuclideanf32( const float* __restrict points,
- int numPoints, // actually not used but helpful
- int dim,
- int pointStride,
- const size_t* __restrict indices,
- int numIndices,
- int numClusters,
- float* __restrict clusterCenters,
- int clusterCenterStride,
- float* __restrict newClusterCenters,
- size_t* __restrict clusterMemberCounts,
- size_t* __restrict clusterBindings,
- float* sumOfClusterDistances )
-{
- return (**ppfcvClusterEuclideanf32)(points,numPoints,dim,pointStride,indices,numIndices,numClusters,
- clusterCenters,clusterCenterStride,
- newClusterCenters,clusterMemberCounts,clusterBindings,
- sumOfClusterDistances);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvClusterEuclideanNormedf32( const float* __restrict points,
- int numPoints,
- int dim,
- int pointStride,
- const size_t* __restrict indices,
- int numIndices,
- int numClusters,
- float* __restrict clusterCenters,
- int clusterCenterStride,
- float* __restrict newClusterCenters,
- size_t* __restrict clusterMemberCounts,
- size_t* __restrict clusterBindings,
- float* sumOfClusterDistances )
-{
- return (**ppfcvClusterEuclideanNormedf32)(points,numPoints,dim,pointStride,indices,numIndices,numClusters,clusterCenters,
- clusterCenterStride,newClusterCenters,clusterMemberCounts,
- clusterBindings,sumOfClusterDistances);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvCornerFast9u8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- unsigned int stride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( width <= 2048 );
-
- (**ppfcvCornerFast9u8_v2)( src, width, height, stride, barrier, border, xy,
- maxnumcorners, numcorners );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvCornerFast9InMasku8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- unsigned int stride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners,
- const uint8_t* __restrict bitMask,
- unsigned int maskWidth,
- unsigned int maskHeight )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( width <= 2048 );
-
- (**ppfcvCornerFast9InMasku8_v2)( src, width, height, stride, barrier, border, xy,
- maxnumcorners, numcorners,
- bitMask, maskWidth, maskHeight );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvCornerFast10u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( srcWidth <= 2048 );
-
- (**ppfcvCornerFast10u8)( src, srcWidth, srcHeight, srcStride, barrier, border, xy,
- nCornersMax, nCorners );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvCornerFast10InMasku8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- uint32_t maskWidth,
- uint32_t maskHeight )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( srcWidth <= 2048 );
-
- (**ppfcvCornerFast10InMasku8)( src, srcWidth, srcHeight, srcStride, barrier, border, xy,
- nCornersMax, nCorners,
- mask, maskWidth, maskHeight );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvCornerHarrisu8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- unsigned int stride,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners,
- int threshold )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvCornerHarrisu8)( src, width, height, stride, border, xy,
- maxnumcorners, numcorners, threshold );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline unsigned int
-fcvLocalHarrisMaxu8 (const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- unsigned int posX,
- unsigned int posY,
- unsigned int *maxX,
- unsigned int *maxY,
- int *maxScore )
-
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvLocalHarrisMaxu8)
- ( src, srcWidth, srcHeight, srcStride, posX,
- posY, maxX, maxY, maxScore);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvCornerHarrisInMasku8( const uint8_t* __restrict srcImg,
- unsigned int width,
- unsigned int height,
- unsigned int stride,
- unsigned int border,
- uint32_t* __restrict xy,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners,
- int threshold,
- const uint8_t* __restrict bitMask,
- unsigned int maskWidth,
- unsigned int maskHeight )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvCornerHarrisInMasku8)( srcImg, width, height, stride, border, xy, maxnumcorners,
- numcorners, threshold, bitMask, maskWidth,
- maskHeight );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvGeomAffineFitf32( const fcvCorrespondences* __restrict corrs,
- float* __restrict affine )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*affine) == 4 );
-#endif
-
- (**ppfcvGeomAffineFitf32)( corrs, affine );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline int
-fcvGeomAffineEvaluatef32( const fcvCorrespondences* __restrict corrs,
- float* __restrict affine,
- float maxsqerr,
- uint16_t* __restrict inliers,
- int32_t* numinliers )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*affine) == 4 );
-#endif
-
- return (**ppfcvGeomAffineEvaluatef32)( corrs, affine, maxsqerr, inliers,
- numinliers );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvGeomHomographyFitf32( const fcvCorrespondences* __restrict corrs,
- float* __restrict homography )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*homography) == 4 );
-#endif
-
- (**ppfcvGeomHomographyFitf32)( corrs, homography );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline int
-fcvGeomHomographyEvaluatef32( const fcvCorrespondences* __restrict corrs,
- float* __restrict homography,
- float maxsqerr,
- uint16_t* __restrict inliers,
- int32_t* numinliers )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*homography) == 4 );
-#endif
-
- return (**ppfcvGeomHomographyEvaluatef32)( corrs, homography, maxsqerr, inliers,
- numinliers );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline float
-fcvGeomPoseRefineGNf32( const fcvCorrespondences* __restrict corrs,
- short minIterations,
- short maxIterations,
- float stopCriteria,
- float* initpose,
- float* refinedpose )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*initpose) == 4 );
- fcvAssert( sizeof(*refinedpose) == 4 );
-#endif
-
- return (**ppfcvGeomPoseRefineGNf32)( corrs, minIterations, maxIterations, stopCriteria,
- initpose, refinedpose );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline int
-fcvGeomPoseUpdatef32(
- const float* __restrict projected,
- const float* __restrict reprojErr,
- const float* __restrict invz,
- const float* __restrict reprojVariance,
- unsigned int numpts,
- float* __restrict pose )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*pose) == 4 );
-#endif
-
- return (**ppfcvGeomPoseUpdatef32)( projected, reprojErr, invz,
- reprojVariance, numpts, pose );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline int
-fcvGeomPoseOptimizeGNf32(
- const float* __restrict projected,
- const float* __restrict reprojErr,
- const float* __restrict invz,
- const float* __restrict reprojVariance,
- unsigned int numpts,
- float* __restrict pose )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*pose) == 4 );
-#endif
-
- return (**ppfcvGeomPoseOptimizeGNf32)( projected, reprojErr, invz,
- reprojVariance, numpts, pose );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline float
-fcvGeomPoseEvaluateErrorf32(
- const fcvCorrespondences* __restrict corrs,
- const float* __restrict pose,
- float* __restrict projected,
- float* __restrict reprojErr,
- float* __restrict invz,
- float* __restrict reprojVariance )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*pose) == 4 );
-#endif
-
- return (**ppfcvGeomPoseEvaluateErrorf32)( corrs, pose, projected, reprojErr,
- invz, reprojVariance );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline int
-fcvGeomPoseEvaluatef32( const fcvCorrespondences* __restrict corrs,
- const float* pose,
- float maxSquErr,
- uint16_t* __restrict inliers,
- uint32_t* numInliers )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*pose) == 4 );
-#endif
-
- return (**ppfcvGeomPoseEvaluatef32)( corrs, pose, maxSquErr, inliers, numInliers );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvGeom3PointPoseEstimatef32( const fcvCorrespondences* __restrict corrs,
- float* pose,
- int32_t* numPoses )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*pose) == 4 );
-#endif
-
- return (**ppfcvGeom3PointPoseEstimatef32)( corrs, pose, numPoses );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCorr3x3s8( const int8_t* __restrict kernel,
- const uint8_t* __restrict src, unsigned int w, unsigned int h,
- uint8_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (w & 0x1) == 0 ); // even
- fcvAssert( (h & 0x1) == 0 ); // even
-#endif
-
- (**ppfcvFilterCorr3x3s8_v2)( kernel, src, w, h, w, dst, w );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCorr3x3s8_v2( const int8_t* __restrict kernel,
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x1) == 0 ); // even
- fcvAssert( (srcHeight & 0x1) == 0 ); // even
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- (**ppfcvFilterCorr3x3s8_v2)( kernel, src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCorrSep9x9s16( const int16_t* __restrict knl,
- const int16_t* __restrict src, unsigned int w, unsigned int h,
- int16_t* __restrict tmp,
- int16_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)knl & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmp & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (w & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( w >= 8 );
-
- (**ppfcvFilterCorrSep9x9s16_v3)( knl, src, w, h, w*sizeof(int16_t), tmp, dst, w*sizeof(int16_t) );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCorrSep11x11s16( const int16_t* __restrict knl,
- const int16_t* __restrict src, unsigned int w, unsigned int h,
- int16_t* __restrict tmp, int16_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)knl & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmp & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (w & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( w >= 8 );
-
- (**ppfcvFilterCorrSep11x11s16_v3)( knl, src, w, h, w*sizeof(int16_t), tmp, dst, w*sizeof(int16_t) );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCorrSep13x13s16( const int16_t* __restrict knl,
- const int16_t* __restrict src, unsigned int w, unsigned int h,
- int16_t* __restrict tmp,
- int16_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)knl & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmp & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (w & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( w >= 8 );
-
- (**ppfcvFilterCorrSep13x13s16)( knl, src, w, h, tmp, dst );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCorrSep15x15s16( const int16_t* __restrict knl,
- const int16_t* __restrict src, unsigned int w, unsigned int h,
- int16_t* __restrict tmp,
- int16_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)knl & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmp & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (w & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( w >= 8 );
-
- (**ppfcvFilterCorrSep15x15s16_v3)( knl, src, w, h, w*sizeof(int16_t), tmp, dst, w*sizeof(int16_t) );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCorrSep17x17s16( const int16_t* __restrict knl,
- const int16_t* __restrict src, unsigned int w, unsigned int h,
- int16_t* __restrict tmp,
- int16_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)knl & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmp & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (w & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( w >= 8 );
-
- (**ppfcvFilterCorrSep17x17s16_v3)( knl, src, w, h, w*sizeof(int16_t), tmp, dst, w*sizeof(int16_t) );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCorrSep9x9s16_v2( const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int w, unsigned int h, unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg, unsigned int dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)kernel & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmpImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (w & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( w >= 8 );
-
- return (**ppfcvFilterCorrSep9x9s16_v3) (kernel, srcImg, w, h, srcStride, tmpImg, dstImg, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCorrSep11x11s16_v2( const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int w, unsigned int h, unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg, unsigned int dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)kernel & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmpImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (w & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( w >= 8 );
-
- return (**ppfcvFilterCorrSep11x11s16_v3) (kernel, srcImg, w, h, srcStride, tmpImg, dstImg, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCorrSep13x13s16_v2( const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int w, unsigned int h, unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg, unsigned int dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)kernel & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmpImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (w & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( w >= 8 );
-
- return (**ppfcvFilterCorrSep13x13s16_v3) (kernel, srcImg, w, h, srcStride, tmpImg, dstImg, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCorrSep15x15s16_v2( const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int w, unsigned int h, unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg, unsigned int dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)kernel & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmpImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (w & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( w >= 8 );
-
- return (**ppfcvFilterCorrSep15x15s16_v3) (kernel, srcImg, w, h, srcStride, tmpImg, dstImg, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterCorrSep17x17s16_v2( const int16_t* __restrict kernel,
- const int16_t* __restrict srcImg,
- unsigned int w, unsigned int h, unsigned int srcStride,
- int16_t* __restrict tmpImg,
- int16_t* __restrict dstImg, unsigned int dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)kernel & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmpImg & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (w & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( w >= 8 );
-
- return (**ppfcvFilterCorrSep17x17s16_v3) (kernel, srcImg, w, h, srcStride, tmpImg, dstImg, dstStride );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-inline void
-fcvImageIntensityStats( const uint8_t* __restrict src,
- unsigned int srcWidth,
- int xBegin,
- int yBegin,
- unsigned int recWidth,
- unsigned int recHeight,
- float* mean,
- float* variance )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( sizeof(*mean) == 4 );
- fcvAssert( sizeof(*variance) == 4 );
-#endif
- fcvAssert( (recHeight * recWidth ) > 1 );
-
- (**ppfcvImageIntensityStats)( src, srcWidth, xBegin, yBegin, recWidth, recHeight, mean,
- variance );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-inline void
-fcvImageIntensityHistogram( const uint8_t* __restrict src,
- unsigned int srcWidth,
- int xBegin,
- int yBegin,
- unsigned int recWidth,
- unsigned int recHeight,
- int32_t* histogram )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)histogram & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvImageIntensityHistogram)( src, srcWidth, xBegin, yBegin, recWidth, recHeight,
- histogram );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvIntegrateImageu8( const uint8_t* __restrict src,
- unsigned int width, unsigned int height,
- uint32_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
- fcvAssert( height < 2048 );
-#endif
-
- (**ppfcvIntegrateImageu8_v2)( src, width, height, width, dst, (width+1)*sizeof(uint32_t) );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvIntegrateImageu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint32_t* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? ((srcWidth+1)*sizeof(uint32_t)) : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= ((srcWidth+1)*sizeof(uint32_t))) ); // Stride is at least as much as Width*4 (in bytes)
- fcvAssert( (srcHeight) < 2048 );
-#endif
-
- (**ppfcvIntegrateImageu8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvIntegratePatchu8( const uint8_t* __restrict src,
- unsigned int width, unsigned int height, int patchX, int patchY,
- unsigned int patchW, unsigned int patchH,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
- fcvAssert( (patchW*patchH) < 66051 ); // to avoid overflow
-#endif
- fcvAssert( height < 2048 );
-
- (**ppfcvIntegratePatchu8_v2)( src, width, height, width, patchX, patchY, patchW, patchH,
- intgrlImgOut, intgrlSqrdImgOut );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvIntegratePatchu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int patchX,
- int patchY,
- unsigned int patchW,
- unsigned int patchH,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (patchW*patchH) < 66051 ); // to avoid overflow
-#endif
- fcvAssert( srcHeight < 2048 );
-
- (**ppfcvIntegratePatchu8_v2)( src, srcWidth, srcHeight, srcStride, patchX, patchY,
- patchW, patchH, intgrlImgOut, intgrlSqrdImgOut );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvIntegratePatch12x12u8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvIntegratePatch12x12u8_v2)( src, srcWidth, srcHeight, srcWidth, patchX, patchY,
- intgrlImgOut, intgrlSqrdImgOut );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvIntegratePatch12x12u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- (**ppfcvIntegratePatch12x12u8_v2)( src, srcWidth, srcHeight, srcStride, patchX, patchY,
- intgrlImgOut, intgrlSqrdImgOut );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvIntegratePatch18x18u8( const uint8_t* __restrict src,
- unsigned int width, unsigned int height, int patchX, int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvIntegratePatch18x18u8_v2)( src, width, height, width, patchX, patchY,
- intgrlImgOut, intgrlSqrdImgOut );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvIntegratePatch18x18u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int patchX,
- int patchY,
- uint32_t* __restrict intgrlImgOut,
- uint32_t* __restrict intgrlSqrdImgOut )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- (**ppfcvIntegratePatch18x18u8_v2)( src, srcWidth, srcHeight, srcStride, patchX, patchY,
- intgrlImgOut, intgrlSqrdImgOut );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvIntegrateImageLineu8( const uint8_t* __restrict imageIn,
- unsigned short numPxls,
- uint32_t* intgrl,
- uint32_t* intgrlSqrd )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)imageIn & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvIntegrateImageLineu8)( imageIn, numPxls, intgrl, intgrlSqrd );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvIntegrateImageLine64u8( const uint8_t* __restrict imageIn,
- uint16_t* intgrl,
- uint32_t* intgrlSqrd )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)imageIn & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvIntegrateImageLine64u8)( imageIn, intgrl, intgrlSqrd );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvNCCPatchOnCircle8x8u8( const uint8_t* __restrict patch_pixels,
- const uint8_t* __restrict image_pixels,
- unsigned short image_w,
- unsigned short image_h,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_radius,
- uint16_t* bestX,
- uint16_t* bestY,
- uint32_t* bestNCC,
- int doSubPixel,
- float* subX,
- float* subY )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)image_pixels & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (image_w & 0x7) == 0 ); // multiple of 8
- fcvAssert( patch_pixels != 0 );
- fcvAssert( image_pixels != 0 );
- fcvAssert( search_radius <= 5 );
- fcvAssert( bestX != 0 );
- fcvAssert( bestY != 0 );
- fcvAssert( bestNCC != 0 );
- fcvAssert( (doSubPixel == 0) ||
- ( (subX != 0) && (subY != 0) ) );
-#endif
- const int defaultLowVariance = 0;
-
- return (**ppfcvNCCPatchOnCircle8x8u8_v2)
- ( patch_pixels, image_pixels,
- image_w, image_h, search_center_x, search_center_y,
- search_radius, defaultLowVariance, bestX, bestY, bestNCC,
- doSubPixel, subX, subY );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline int
-fcvNCCPatchOnSquare8x8u8( const uint8_t* __restrict patch_pixels,
- const uint8_t* __restrict image_pixels,
- unsigned short image_w,
- unsigned short image_h,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_w,
- uint16_t* bestX,
- uint16_t* bestY,
- uint32_t* bestNCC,
- int doSubPixel,
- float* subX,
- float* subY )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)image_pixels & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (image_w & 0x7) == 0 ); // multiple of 8
- fcvAssert( patch_pixels != 0 );
- fcvAssert( image_pixels != 0 );
- fcvAssert( search_w <= 11 );
- fcvAssert( bestX != 0 );
- fcvAssert( bestY != 0 );
- fcvAssert( bestNCC != 0 );
- fcvAssert( (doSubPixel == 0) ||
- ( (subX != 0) && (subY != 0) ) );
-#endif
- const int defaultLowVariance = 0;
-
- return (**ppfcvNCCPatchOnSquare8x8u8_v2)
- ( patch_pixels, image_pixels, image_w, image_h,
- search_center_x, search_center_y, search_w, defaultLowVariance,
- bestX, bestY, bestNCC, doSubPixel, subX, subY );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvNCCPatchOnCircle8x8u8_v2( const uint8_t* __restrict patch_pixels,
- const uint8_t* __restrict image_pixels,
- unsigned short image_w,
- unsigned short image_h,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_radius,
- int filterLowVariance,
- uint16_t* bestX,
- uint16_t* bestY,
- uint32_t* bestNCC,
- int doSubPixel,
- float* subX,
- float* subY )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)image_pixels & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (image_w & 0x7) == 0 ); // multiple of 8
- fcvAssert( patch_pixels != 0 );
- fcvAssert( image_pixels != 0 );
- fcvAssert( search_radius <= 5 );
- fcvAssert( bestX != 0 );
- fcvAssert( bestY != 0 );
- fcvAssert( bestNCC != 0 );
- fcvAssert( (doSubPixel == 0) ||
- ( (subX != 0) && (subY != 0) ) );
-#endif
-
- return (**ppfcvNCCPatchOnCircle8x8u8_v2)
- ( patch_pixels, image_pixels,
- image_w, image_h, search_center_x, search_center_y,
- search_radius, filterLowVariance, bestX, bestY, bestNCC,
- doSubPixel, subX, subY );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline int
-fcvNCCPatchOnSquare8x8u8_v2( const uint8_t* __restrict patch_pixels,
- const uint8_t* __restrict image_pixels,
- unsigned short image_w,
- unsigned short image_h,
- unsigned short search_center_x,
- unsigned short search_center_y,
- unsigned short search_w,
- int filterLowVariance,
- uint16_t* bestX,
- uint16_t* bestY,
- uint32_t* bestNCC,
- int doSubPixel,
- float* subX,
- float* subY )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)image_pixels & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (image_w & 0x7) == 0 ); // multiple of 8
- fcvAssert( patch_pixels != 0 );
- fcvAssert( image_pixels != 0 );
- fcvAssert( search_w <= 11 );
- fcvAssert( bestX != 0 );
- fcvAssert( bestY != 0 );
- fcvAssert( bestNCC != 0 );
- fcvAssert( (doSubPixel == 0) ||
- ( (subX != 0) && (subY != 0) ) );
-#endif
-
- return (**ppfcvNCCPatchOnSquare8x8u8_v2)
- ( patch_pixels, image_pixels, image_w, image_h,
- search_center_x, search_center_y, search_w, filterLowVariance,
- bestX, bestY, bestNCC, doSubPixel, subX, subY );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvSumOfAbsoluteDiffs8x8u8( const uint8_t* __restrict patch,
- const uint8_t* __restrict src,
- unsigned int width, unsigned int height,
- unsigned int pitch,
- uint16_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (patch != NULL) );
- fcvAssert( (src != NULL) );
- fcvAssert( (dst != NULL) );
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- return (**ppfcvSumOfAbsoluteDiffs8x8u8_v2)( patch, 8, src, width, height, pitch, dst, width*sizeof(uint16_t) );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvSumOfAbsoluteDiffs8x8u8_v2( const uint8_t* __restrict patch,
- unsigned int patchStride,
- const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint16_t* __restrict dst,
- unsigned int dstStride )
-{
- patchStride = (patchStride==0 ? 8 : patchStride);
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth*2 : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (patch != NULL) );
- fcvAssert( (src != NULL) );
- fcvAssert( (dst != NULL) );
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (patchStride >= 8) ); // Stride is at least as much as width
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as width
- fcvAssert( (dstStride >= (srcWidth*2)) ); // Stride is at least as much as 2*width
-#endif
-
- return (**ppfcvSumOfAbsoluteDiffs8x8u8_v2)( patch, patchStride, src, srcWidth, srcHeight,
- srcStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvScaleDownBy2u8( const uint8_t* __restrict src, unsigned int width, unsigned int height,
- uint8_t* __restrict dst)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- return (**ppfcvScaleDownBy2u8_v2)( src, width, height, width, dst, width/2 );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvScaleDownBy2u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth/2 : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as width
- fcvAssert( (dstStride >= (srcWidth/2)) ); // Stride is at least as much as width/2
-#endif
-
- return (**ppfcvScaleDownBy2u8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvScaleDownBy4u8( const uint8_t* __restrict src, unsigned int width, unsigned int height,
- uint8_t* __restrict dst)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- return (**ppfcvScaleDownBy4u8_v2)( src, width, height, width, dst, width/4 );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvScaleDownBy4u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth/4 : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as width
- fcvAssert( (dstStride >= (srcWidth/4)) ); // Stride is at least as much as (width/4)
-#endif
-
- return (**ppfcvScaleDownBy4u8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvScaleDown3To2u8( const uint8_t* __restrict src,
- unsigned srcWidth,
- unsigned srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- return (**ppfcvScaleDown3To2u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvScaleDownNNu8( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- return (**ppfcvScaleDownNNu8)( src, srcWidth, srcHeight, srcStride, dst, dstWidth, dstHeight, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvScaleDownu8( const uint8_t* __restrict src,
- unsigned int width, unsigned int height,
- uint8_t* __restrict dst,
- unsigned int dstWidth, unsigned int dstHeight)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( ( width % dstWidth ) == 0 && ( height % dstHeight ) == 0 );
-
- return (**ppfcvScaleDownu8_v2)( src, width, height, width, dst, dstWidth, dstHeight, dstWidth );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvScaleDownu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? dstWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as width
- fcvAssert( (dstStride >= dstWidth) ); // Stride is at least as much as width
-#endif
- fcvAssert( ( srcWidth % dstWidth ) == 0 && ( srcHeight % dstHeight ) == 0 );
-
- return (**ppfcvScaleDownu8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstWidth, dstHeight, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvScaleUpBy2Gaussian5x5u8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvScaleUpBy2Gaussian5x5u8_v2)( src, width, height, width, dst, width*2 );
-
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvScaleUpBy2Gaussian5x5u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth*2 : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as width
- fcvAssert( (dstStride >= (srcWidth*2)) ); // Stride is at least as much as 2*width
-#endif
-
- (**ppfcvScaleUpBy2Gaussian5x5u8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvScaleDownBy2Gaussian5x5u8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( (width&1)==0 && (height&1)==0 );
-
- (**ppfcvScaleDownBy2Gaussian5x5u8)( src, width, height, dst );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvScaleDownBy2Gaussian5x5u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth/2 : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcHeight & 1) == 0 ); // Height is multiple of 2
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= (srcWidth/2)) ); // Stride is at least as much as Width/2
-#endif
-
- (**ppfcvScaleDownBy2Gaussian5x5u8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline int
-fcvVecNormalize36s8f32( const int8_t* __restrict src,
- unsigned int srcStride,
- const float* __restrict invLen,
- unsigned int numVecs,
- float reqNorm,
- float* __restrict dst,
- int32_t* stopBuild )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
-#endif
- return (**ppfcvVecNormalize36s8f32)( src, srcStride, invLen, numVecs, reqNorm,
- dst, stopBuild );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvSumOfSquaredDiffs36x4s8( const int8_t* __restrict A,
- float invLenA,
- const int8_t* __restrict B,
- const int8_t* __restrict C,
- const int8_t* __restrict D,
- const int8_t* __restrict E,
- const float* __restrict invLenB,
- float* __restrict distances )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)invLenB & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)distances & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- return (**ppfcvSumOfSquaredDiffs36x4s8)( A, invLenA, B, C, D, E, invLenB,
- distances );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvSumOfSquaredDiffs36xNs8( const int8_t* __restrict A,
- float invLenA,
- const int8_t* const * __restrict B,
- const float* __restrict invLenB,
- unsigned int numB,
- float* __restrict distances )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*invLenB) == 4 );
- fcvAssert( sizeof(*distances) == 4 );
-#endif
-
- return (**ppfcvSumOfSquaredDiffs36xNs8)( A, invLenA, B, invLenB, numB,
- distances );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvSort8Scoresf32( float* __restrict inScores,
- float* __restrict outScores )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*inScores) == 4 );
- fcvAssert( sizeof(*outScores) == 4 );
-#endif
-
- return (**ppfcvSort8Scoresf32)( inScores, outScores );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterThresholdu8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- uint8_t* __restrict dst,
- unsigned int threshold )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvFilterThresholdu8_v2)( src, width, height, width, dst, width, threshold );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterThresholdu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride,
- unsigned int threshold )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcStride == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvFilterThresholdu8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride, threshold );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvFilterDilate3x3u8( const uint8_t* __restrict src,
- unsigned int width, unsigned int height,
- uint8_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvFilterDilate3x3u8_v2)( src, width, height, width, dst, width );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvFilterDilate3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( ( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || ( srcStride & 0x7 ) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvFilterDilate3x3u8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvFilterErode3x3u8( const uint8_t* __restrict src,
- unsigned int width, unsigned int height,
- uint8_t* __restrict dst )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvFilterErode3x3u8_v2)( src, width, height, width, dst, width );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvFilterErode3x3u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( ( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || ( srcStride & 0x7 ) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvFilterErode3x3u8_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline int
-fcvTransformAffine8x8u8( const uint8_t* __restrict src,
- unsigned int width, unsigned int height,
- const int32_t* __restrict nPos,
- const int32_t* __restrict nAffine,
- uint8_t* __restrict nPatch )
-
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)nPos & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)nAffine & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- return (**ppfcvTransformAffine8x8u8_v2)( src, width, height, width, nPos, nAffine, nPatch, 8 );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline int
-fcvTransformAffine8x8u8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- const int32_t* __restrict nPos,
- const int32_t* __restrict nAffine,
- uint8_t* __restrict patch,
- unsigned int patchStride )
-
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- patchStride = (patchStride==0 ? 8 : patchStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)nPos & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)nAffine & 0xF) == 0 ); // 128-bit alignment
-
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as width
- fcvAssert( (patchStride >= 8) ); // Stride is at least as much as 8 (patchWidth)
-#endif
-
- return (**ppfcvTransformAffine8x8u8_v2)( src, srcWidth, srcHeight, srcStride,
- nPos, nAffine, patch, patchStride );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvWarpPerspectiveu8( const uint8_t* __restrict src,
- unsigned int srcwidth,
- unsigned int srcheight,
- uint8_t* __restrict dst,
- unsigned int dstwidth,
- unsigned int dstheight,
- float* __restrict proj )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcwidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcheight & 0x7) == 0 ); // multiple of 8
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (dstwidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstheight & 0x7) == 0 ); // multiple of 8
- fcvAssert( ((int)(size_t)proj & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- return (**ppfcvWarpPerspectiveu8)( src, srcwidth, srcheight, dst,
- dstwidth, dstheight, proj );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvWarpPerspectiveu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride,
- float* __restrict proj )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? dstWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcHeight & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (dstWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstHeight & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( ((int)(size_t)proj & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
- fcvAssert( (dstStride >= dstWidth) ); // at least as much as width
-#endif
-
- return (**ppfcvWarpPerspectiveu8_v2)( src, srcWidth, srcHeight, srcStride,
- dst, dstWidth, dstHeight, dstStride,
- proj );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcv3ChannelWarpPerspectiveu8( const uint8_t* __restrict src,
- unsigned int srcwidth,
- unsigned int srcheight,
- uint8_t* __restrict dst,
- unsigned int dstwidth,
- unsigned int dstheight,
- float* __restrict proj )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcwidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcheight & 0x7) == 0 ); // multiple of 8
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (dstwidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstheight & 0x7) == 0 ); // multiple of 8
- fcvAssert( ((int)(size_t)proj & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- return (**ppfcv3ChannelWarpPerspectiveu8)( src, srcwidth, srcheight, dst,
- dstwidth, dstheight, proj );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcv3ChannelWarpPerspectiveu8_v2( const uint8_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- uint8_t* __restrict dst,
- unsigned int dstWidth,
- unsigned int dstHeight,
- unsigned int dstStride,
- float* __restrict proj )
-{
- srcStride = (srcStride==0 ? srcWidth*3 : srcStride);
- dstStride = (dstStride==0 ? dstWidth*3 : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcHeight & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (dstWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstHeight & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( ((int)(size_t)proj & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride >= (srcWidth*3)) ); // at least as much as 3*width (3-channel)
- fcvAssert( (dstStride >= (dstWidth*3)) ); // at least as much as 3*width (3-channel)
-#endif
-
- return (**ppfcv3ChannelWarpPerspectiveu8_v2)( src, srcWidth, srcHeight, srcStride,
- dst, dstWidth, dstHeight, dstStride,
- proj );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterGaussian5x5s16( const int16_t* __restrict src,
- unsigned int width,
- unsigned int height,
- int16_t* __restrict dst,
- int border )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- return (**ppfcvFilterGaussian5x5s16_v2)( src, width, height, width, dst,
- width, border );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterGaussian5x5s16_v2( const int16_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int16_t* __restrict dst,
- unsigned int dstStride,
- int border )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( (srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvFilterGaussian5x5s16_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride, border );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterGaussian5x5s32( const int32_t* __restrict src,
- unsigned int width,
- unsigned int height,
- int32_t* __restrict dst,
- int border )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
-
- return (**ppfcvFilterGaussian5x5s32_v2)( src, width, height, width, dst,
- width, border );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFilterGaussian5x5s32_v2( const int32_t* __restrict src,
- unsigned int srcWidth,
- unsigned int srcHeight,
- unsigned int srcStride,
- int32_t* __restrict dst,
- unsigned int dstStride,
- int border )
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? srcWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( (srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // Stride is at least as much as Width
- fcvAssert( (dstStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvFilterGaussian5x5s32_v2)( src, srcWidth, srcHeight, srcStride, dst, dstStride, border );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline int
-fcvTransformAffineu8( const uint8_t* __restrict nImage,
- unsigned int imageWidth,
- unsigned int imageHeight,
- const float* __restrict nPos,
- const float* __restrict nAffine,
- uint8_t* __restrict nPatch,
- unsigned int patchWidth,
- unsigned int patchHeight )
-
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)nPos & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)nAffine & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- return (**ppfcvTransformAffineu8_v2)( nImage,imageWidth,imageHeight,imageWidth,
- nPos, nAffine,
- nPatch, patchWidth, patchHeight, patchWidth );
-}
-
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline int
-fcvTransformAffineu8_v2( const uint8_t* __restrict nImage,
- unsigned int imageWidth,
- unsigned int imageHeight,
- unsigned int imageStride,
- const float* __restrict nPos,
- const float* __restrict nAffine,
- uint8_t* __restrict nPatch,
- unsigned int patchWidth,
- unsigned int patchHeight,
- unsigned int patchStride )
-
-{
- imageStride = (imageStride==0 ? imageWidth : imageStride);
- patchStride = (patchStride==0 ? patchWidth : patchStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)nPos & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)nAffine & 0xF) == 0 ); // 128-bit alignment
-
- fcvAssert( (imageStride >= imageWidth) ); // Stride is at least as much as width
- fcvAssert( (patchStride >= patchWidth) ); // Stride is at least as much as width
-#endif
-
- return (**ppfcvTransformAffineu8_v2)( nImage, imageWidth, imageHeight, imageStride,
- nPos, nAffine,
- nPatch, patchWidth, patchHeight, patchStride );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvCopyRotated17x17u8( const uint8_t* __restrict region,
- uint8_t* __restrict patch,
- int nOri )
-{
- (**ppfcvCopyRotated17x17u8)( region, patch, nOri );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvCornerFast9Scoreu8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- unsigned int stride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)scores & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( width <= 2048 );
-
- (**ppfcvCornerFast9Scoreu8_v3)( src, width, height, stride, barrier,border, xy, scores,
- maxnumcorners, numcorners );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvCornerFast9InMaskScoreu8( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- unsigned int stride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners,
- const uint8_t* __restrict bitMask,
- unsigned int maskWidth,
- unsigned int maskHeight )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)scores & 0xF) == 0 );// 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
-#endif
- fcvAssert( width <= 2048 );
-
- (**ppfcvCornerFast9InMaskScoreu8_v3)( src, width, height, stride, barrier, border, xy, scores,
- maxnumcorners, numcorners,
- bitMask, maskWidth, maskHeight );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvCornerFast9Scoreu8_v2( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- unsigned int stride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners,
- uint32_t nmsEnabled,
- void* __restrict tempBuf)
-{
- stride = (stride==0 ? width : stride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (src != NULL) && (xy != NULL) && (scores != NULL));
- fcvAssert( stride >= width );
- fcvAssert( (nmsEnabled==0) || (tempBuf != NULL));
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)scores & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
- fcvAssert( (stride & 0x7) == 0 ); // multiple of 8
- fcvAssert ((nmsEnabled==0) || (((int)(size_t)tempBuf & 0xF) == 0) ); // 128-bit alignment
-#endif
-
- (**ppfcvCornerFast9Scoreu8_v4)( src, width, height, stride, barrier,border, xy, scores,
- maxnumcorners, numcorners, nmsEnabled, tempBuf );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvCornerFast9InMaskScoreu8_v2( const uint8_t* __restrict src,
- unsigned int width,
- unsigned int height,
- unsigned int stride,
- int barrier,
- unsigned int border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- unsigned int maxnumcorners,
- uint32_t* __restrict numcorners,
- const uint8_t* __restrict bitMask,
- unsigned int maskWidth,
- unsigned int maskHeight,
- uint32_t nmsEnabled,
- void* __restrict tempBuf)
-{
- stride = (stride==0 ? width : stride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (src != NULL) && (xy != NULL) && (scores != NULL) && (bitMask != NULL));
- fcvAssert( stride >= width );
- fcvAssert( (nmsEnabled==0) || (tempBuf != NULL));
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)scores & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)bitMask & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (width & 0x7) == 0 ); // multiple of 8
- fcvAssert( (stride & 0x7) == 0 ); // multiple of 8
- fcvAssert ((nmsEnabled==0) || (((int)(size_t)tempBuf & 0xF) == 0) ); // 128-bit alignment
-#endif
-
- (**ppfcvCornerFast9InMaskScoreu8_v4)( src, width, height, stride, barrier, border, xy, scores,
- maxnumcorners, numcorners,
- bitMask, maskWidth, maskHeight, nmsEnabled, tempBuf );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvCornerFast10Scoreu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- uint32_t nmsEnabled,
- void* __restrict tempBuf)
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (src != NULL) && (xy != NULL) && (scores != NULL));
- fcvAssert( srcStride >= srcWidth );
- fcvAssert( (nmsEnabled==0) || (tempBuf != NULL));
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)scores & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert ((nmsEnabled==0) || (((int)(size_t)tempBuf & 0xF) == 0) ); // 128-bit alignment
-#endif
- (**ppfcvCornerFast10Scoreu8)( src, srcWidth, srcHeight, srcStride, barrier,border, xy, scores,
- nCornersMax, nCorners, nmsEnabled, tempBuf );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvCornerFast10InMaskScoreu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t barrier,
- uint32_t border,
- uint32_t* __restrict xy,
- uint32_t* __restrict scores,
- uint32_t nCornersMax,
- uint32_t* __restrict nCorners,
- const uint8_t* __restrict mask,
- uint32_t maskWidth,
- uint32_t maskHeight,
- uint32_t nmsEnabled,
- void* __restrict tempBuf)
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (src != NULL) && (xy != NULL) && (scores != NULL) && (mask != NULL) );
- fcvAssert( srcStride >= srcWidth );
- fcvAssert( (nmsEnabled==0) || (tempBuf != NULL));
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xy & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)scores & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)mask & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert ((nmsEnabled==0) || (((int)(size_t)tempBuf & 0xF) == 0) ); // 128-bit alignment
-#endif
-
- (**ppfcvCornerFast10InMaskScoreu8)( src, srcWidth, srcHeight, srcStride, barrier, border, xy, scores,
- nCornersMax, nCorners,
- mask, maskWidth, maskHeight, nmsEnabled, tempBuf );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvTrackLKOpticalFlowu8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- int width,
- int height,
- const fcvPyramidLevel *src1Pyr,
- const fcvPyramidLevel *scr2Pyr,
- const fcvPyramidLevel *dx1Pyr,
- const fcvPyramidLevel *dy1Pyr,
- const float* featureXY,
- float* featureXY_out,
- int32_t* featureStatus,
- int featureLen,
- int windowWidth,
- int windowHeight,
- int maxIterations,
- int nPyramidLevels,
- float maxResidue,
- float minDisplacement,
- float minEigenvalue,
- int lightingNormalized)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*featureXY) == 4 );
- fcvAssert( sizeof(*featureXY_out) == 4 );
- fcvAssert( ((int)(size_t)src1 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src2 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)featureXY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)featureXY_out & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)featureStatus & 0xF) == 0 ); // 128-bit alignment
- #ifndef NDEBUG
- int div = (1 << (nPyramidLevels - 1)) - 1;
- fcvAssert( ( (width & div) == 0 ) & ( (height & div) == 0 ) ); //width and height multiples of 2^(nPyramidLevels-1)
- #endif
-#endif
-
- (**ppfcvTrackLKOpticalFlowu8)( src1, src2, width, height,
- src1Pyr, scr2Pyr,
- dx1Pyr, dy1Pyr,
- featureXY, featureXY_out,
- featureStatus, featureLen,
- windowWidth, windowHeight,
- maxIterations, nPyramidLevels,
- maxResidue, minDisplacement,
- minEigenvalue, lightingNormalized);
-}
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline void
-fcvTrackLKOpticalFlowf32( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- unsigned int width,
- unsigned int height,
- const fcvPyramidLevel *src1Pyr,
- const fcvPyramidLevel *src2Pyr,
- const fcvPyramidLevel *dx1Pyr,
- const fcvPyramidLevel *dy1Pyr,
- const float* featureXY,
- float* featureXY_out,
- int32_t* featureStatus,
- int featureLen,
- int windowWidth,
- int windowHeight,
- int maxIterations,
- int nPyramidLevels,
- float maxResidue,
- float minDisplacement,
- float minEigenvalue,
- int lightingNormalized )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( sizeof(*featureXY) == 4 );
- fcvAssert( sizeof(*featureXY_out) == 4 );
- fcvAssert( ((int)(size_t)src1 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src2 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)featureXY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)featureXY_out & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)featureStatus & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvTrackLKOpticalFlowf32)( src1, src2, width, height,
- src1Pyr, src2Pyr,
- dx1Pyr,dy1Pyr,
- featureXY, featureXY_out,
- featureStatus, featureLen, windowWidth, windowHeight,
- maxIterations, nPyramidLevels, maxResidue,
- minDisplacement, minEigenvalue,
- lightingNormalized );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvPyramidCreatef32( const float* __restrict base, unsigned int baseWidth,
- unsigned int baseHeight,
- unsigned int numLevels, fcvPyramidLevel* pyramid )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)base & 0xF) == 0 ); // 128-bit alignment
- #ifndef NDEBUG
- int div = (1 << (numLevels - 1)) - 1;
- #endif
- fcvAssert( sizeof(*base) == 4 );
- fcvAssert( ( (baseWidth & div) == 0 ) & ( (baseHeight & div) == 0 ) );
-#endif
-
- return (**ppfcvPyramidCreatef32)( base, baseWidth, baseHeight,numLevels, pyramid );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvPyramidCreateu8( const uint8_t* __restrict base, unsigned int baseWidth, unsigned int baseHeight,
- unsigned int numLevels, fcvPyramidLevel * pyramid )
-{
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- #ifndef NDEBUG
- int div = (1 << (numLevels - 1)) - 1;
- #endif
- fcvAssert( ( (baseWidth & div) == 0 ) & ( (baseHeight & div) == 0 ) );
-#endif
- return (**ppfcvPyramidCreateu8)( base, baseWidth, baseHeight,numLevels, pyramid );
-
-}
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline int
-fcvPyramidAllocate( fcvPyramidLevel* pyr, unsigned int baseWidth,
- unsigned int baseHeight, unsigned int bytesPerPixel,
- unsigned int numLevels, int allocateBase )
-{
-
- return (**ppfcvPyramidAllocate)(pyr,baseWidth,baseHeight,bytesPerPixel,numLevels,allocateBase);
-
-}
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvPyramidDelete( fcvPyramidLevel * pyr, unsigned int numLevels, unsigned int startLevel )
-{
-
- (**ppfcvPyramidDelete)(pyr,numLevels,startLevel);
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvPyramidSobelGradientCreatei16( const fcvPyramidLevel* imgPyr,
- fcvPyramidLevel* dxPyr,
- fcvPyramidLevel* dyPyr, unsigned int numLevels )
-{
- return (**ppfcvPyramidSobelGradientCreatei16)( imgPyr,dxPyr, dyPyr, numLevels );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvPyramidSobelGradientCreatei8 ( const fcvPyramidLevel* imgPyr,
- fcvPyramidLevel* dxPyr,
- fcvPyramidLevel* dyPyr, unsigned int numLevels )
-{
- return (**ppfcvPyramidSobelGradientCreatei8)( imgPyr,dxPyr, dyPyr, numLevels );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvPyramidSobelGradientCreatef32 ( const fcvPyramidLevel* imgPyr,
- fcvPyramidLevel* dxPyr,
- fcvPyramidLevel* dyPyr, unsigned int numLevels )
-{
- return (**ppfcvPyramidSobelGradientCreatef32)( imgPyr,dxPyr, dyPyr, numLevels );
-}
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline uint32_t
-fcvBitCountu8( const uint8_t* __restrict src, unsigned int len )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0x3) == 0 ); // 32-bit alignment
-#endif
-
- return (**ppfcvBitCountu8)( src, len );
-}
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline uint32_t
-fcvBitCount32x1u8( const uint8_t* __restrict src )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0x3) == 0 ); // 128-bit alignment
-#endif
-
- return (**ppfcvBitCount32x1u8)( src );
-}
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline void
-fcvBitCount32x4u8( const uint8_t* __restrict A, const uint8_t* __restrict B,
- const uint8_t* __restrict C, const uint8_t* __restrict D,
- uint32_t* __restrict count )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)A & 0x3) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)B & 0x3) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)C & 0x3) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)D & 0x3) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)count & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvBitCount32x4u8)( A, B, C, D, count );
-}
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline uint32_t
-fcvBitCount64x1u8( const uint8_t* __restrict src )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0x7) == 0 ); // 64-bit alignment
-#endif
-
- return (**ppfcvBitCount64x1u8)( src );
-}
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline void
-fcvBitCount64x4u8( const uint8_t* __restrict A, const uint8_t* __restrict B,
- const uint8_t* __restrict C, const uint8_t* __restrict D,
- uint32_t* __restrict count )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)A & 0x7) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)B & 0x7) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)C & 0x7) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)D & 0x7) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)count & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvBitCount64x4u8)( A, B, C, D, count );
-}
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline uint32_t
-fcvBitCountu32( const uint32_t* __restrict src, unsigned int len )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0x3) == 0 ); // 32-bit alignment
-#endif
-
- return (**ppfcvBitCountu32)( src, len );
-}
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline uint32_t
-fcvHammingDistanceu8( const uint8_t* __restrict a,
- const uint8_t* __restrict b, unsigned int len )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)a & 0x3) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)b & 0x3) == 0 ); // 32-bit alignment
-#endif
-
- return (**ppfcvHammingDistanceu8)( a, b, len );
-}
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline uint32_t
-fcvHammingDistance32x1u8a4( const uint8_t* __restrict a,
- const uint8_t* __restrict b )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)a & 0x3) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)b & 0x3) == 0 ); // 32-bit alignment
-#endif
-
- return (**ppfcvHammingDistance32x1u8a4)( a, b );
-}
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline uint32_t
-fcvHammingDistance64x1u8a4( const uint8_t* __restrict a,
- const uint8_t* __restrict b )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)a & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)b & 0x7) == 0 ); // 64-bit alignment
-#endif
-
- return (**ppfcvHammingDistance64x1u8a4)( a, b );
-}
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline uint32_t
-fcvHammingDistance32x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)a & 0x3) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)b & 0x3) == 0 ); // 32-bit alignment
-#endif
-
- return (**ppfcvHammingDistance32x1u8)( a, b );
-}
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline uint32_t
-fcvHammingDistance64x1u8( const uint8_t* __restrict a,
- const uint8_t* __restrict b )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)a & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)b & 0x7) == 0 ); // 64-bit alignment
-#endif
-
- return (**ppfcvHammingDistance64x1u8)( a, b );
-}
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline void
-fcvHammingDistance32x4u8a4( const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- const uint8_t* __restrict E,
- uint32_t* __restrict distances )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)A & 0x3) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)B & 0x3) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)C & 0x3) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)D & 0x3) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)E & 0x3) == 0 ); // 32-bit alignment
- fcvAssert( ((int)(size_t)distances & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvHammingDistance32x4u8a4)( A, B, C, D, E, distances );
-}
-
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline void
-fcvHammingDistance64x4u8a4( const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- const uint8_t* __restrict E,
- uint32_t* __restrict distances )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)A & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)B & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)C & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)D & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)E & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)distances & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvHammingDistance64x4u8a4)( A, B, C, D, E, distances );
-}
-
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-
-inline void
-fcvHammingDistance64x4u8( const uint8_t* __restrict A,
- const uint8_t* __restrict B,
- const uint8_t* __restrict C,
- const uint8_t* __restrict D,
- const uint8_t* __restrict E,
- uint32_t* __restrict distances )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)A & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)B & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)C & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)D & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)E & 0x7) == 0 ); // 64-bit alignment
- fcvAssert( ((int)(size_t)distances & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvHammingDistance64x4u8)( A, B, C, D, E, distances );
-}
-
-inline void fcvMseru8( void *mserHandle,
- const uint8_t* __restrict srcPtr,unsigned int srcWidth,
- unsigned int srcHeight, unsigned int srcStride,
- unsigned int maxContours,
- unsigned int * __restrict numContours, unsigned int * __restrict numPointsInContour ,
- unsigned int pointsArraySize,
- unsigned int* __restrict pointsArray
- )
-
-{
- (**ppfcvMseru8)(mserHandle,srcPtr,srcWidth,srcHeight,srcStride
- ,maxContours,numContours,numPointsInContour,pointsArraySize,pointsArray);
-}
-
-inline void
-fcvMserExtu8( void *mserHandle,
- const uint8_t* __restrict srcPtr,unsigned int srcWidth,
- unsigned int srcHeight, unsigned int srcStride,
- unsigned int maxContours,
- unsigned int * __restrict numContours, unsigned int * __restrict numPointsInContour ,
- unsigned int* __restrict pointsArray, unsigned int pointsArraySize,
- unsigned int * __restrict contourVariation,
- int * __restrict contourPolarity,
- unsigned int * __restrict contourNodeId,
- unsigned int * __restrict contourNodeCounter
- )
-{
- (**ppfcvMserExtu8)(mserHandle,srcPtr,srcWidth,srcHeight,srcStride,maxContours, numContours, numPointsInContour,
- pointsArray,pointsArraySize,contourVariation,contourPolarity,contourNodeId, contourNodeCounter);
-}
-
-inline int fcvMserInit(const unsigned int width,
- const unsigned int height,
- unsigned int delta,
- unsigned int minArea ,
- unsigned int maxArea ,
- float maxVariation ,
- float minDiversity , void ** mserHandle )
-{
- return (*ppfcvMserInit)(width,height,delta,minArea,maxArea,maxVariation, minDiversity, mserHandle);
-}
-
-inline void fcvMserRelease(void *mserHandle)
-{
- (**ppfcvMserRelease)(mserHandle);
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int
-fcvTrackBMOpticalFlow16x16u8( const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t roiLeft,
- uint32_t roiTop,
- uint32_t roiRight,
- uint32_t roiBottom,
- uint32_t shiftSize,
- uint32_t searchWidth,
- uint32_t searchHeight,
- uint32_t searchStep,
- uint32_t usePrevious,
- uint32_t * numMv,
- uint32_t * locX,
- uint32_t * locY,
- uint32_t * mvX,
- uint32_t * mvY)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((static_cast(reinterpret_cast(src1))) & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((static_cast(reinterpret_cast(src1))) & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( numMv != NULL ); // NULL Check
- fcvAssert( locX != NULL ); // NULL Check
- fcvAssert( locY != NULL ); // NULL Check
- fcvAssert( mvX != NULL ); // NULL Check
- fcvAssert( mvY != NULL ); // NULL Check
-#endif
-
- return (**ppfcvTrackBMOpticalFlow16x16u8)( src1, src2, srcWidth, srcHeight, srcStride,
- roiLeft, roiTop, roiRight, roiBottom, shiftSize,
- searchWidth, searchHeight, searchStep, usePrevious,
- numMv, locX, locY, mvX, mvY );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void fcvBoundingRectangle (const uint32_t * __restrict xy, uint32_t numPoints,
- uint32_t * rectTopLeftX, uint32_t * rectTopLeftY,
- uint32_t * rectWidth, uint32_t *rectHeight)
-{
- (**ppfcvBoundingRectangle)(xy,numPoints,rectTopLeftX, rectTopLeftY, rectWidth, rectHeight);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvUpsampleVerticalu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcStride == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvUpsampleVerticalu8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvUpsampleHorizontalu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcStride == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvUpsampleHorizontalu8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvUpsample2Du8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcStride == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvUpsample2Du8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvUpsampleVerticalInterleavedu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcStride == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvUpsampleVerticalInterleavedu8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvUpsampleHorizontalInterleavedu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcStride == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvUpsampleHorizontalInterleavedu8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvUpsample2DInterleavedu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcStride == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvUpsample2DInterleavedu8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB565ToYCbCr444Planaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB565ToYCbCr444Planaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB565ToYCbCr422Planaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB565ToYCbCr422Planaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride);
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB565ToYCbCr420Planaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB565ToYCbCr420Planaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888ToYCbCr444Planaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB888ToYCbCr444Planaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888ToYCbCr422Planaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB888ToYCbCr422Planaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888ToYCbCr420Planaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB888ToYCbCr420Planaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGBA8888ToYCbCr444Planaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGBA8888ToYCbCr444Planaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGBA8888ToYCbCr422Planaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGBA8888ToYCbCr422Planaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGBA8888ToYCbCr420Planaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGBA8888ToYCbCr420Planaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB565ToYCbCr444PseudoPlanaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB565ToYCbCr444PseudoPlanaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstC, dstYStride, dstCStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB565ToYCbCr422PseudoPlanaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB565ToYCbCr422PseudoPlanaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstC, dstYStride, dstCStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB565ToYCbCr420PseudoPlanaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB565ToYCbCr420PseudoPlanaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstC, dstYStride, dstCStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888ToYCbCr444PseudoPlanaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB888ToYCbCr444PseudoPlanaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstC, dstYStride, dstCStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888ToYCbCr422PseudoPlanaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB888ToYCbCr422PseudoPlanaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstC, dstYStride, dstCStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888ToYCbCr420PseudoPlanaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB888ToYCbCr420PseudoPlanaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstC, dstYStride, dstCStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGBA8888ToYCbCr444PseudoPlanaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGBA8888ToYCbCr444PseudoPlanaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstC, dstYStride, dstCStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGBA8888ToYCbCr422PseudoPlanaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGBA8888ToYCbCr422PseudoPlanaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstC, dstYStride, dstCStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGBA8888ToYCbCr420PseudoPlanaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGBA8888ToYCbCr420PseudoPlanaru8)( src, srcWidth, srcHeight, srcStride, dstY, dstC, dstYStride, dstCStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB565ToRGB888u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB565ToRGB888u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB565ToRGBA8888u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB565ToRGBA8888u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB565ToBGR565u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB565ToBGR565u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB565ToBGR888u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB565ToBGR888u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB565ToBGRA8888u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB565ToBGRA8888u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888ToRGB565u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB888ToRGB565u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888ToRGBA8888u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB888ToRGBA8888u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888ToBGR565u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB888ToBGR565u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888ToBGR888u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB888ToBGR888u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGB888ToBGRA8888u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGB888ToBGRA8888u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGBA8888ToRGB565u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGBA8888ToRGB565u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGBA8888ToRGB888u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGBA8888ToRGB888u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGBA8888ToBGR565u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGBA8888ToBGR565u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGBA8888ToBGR888u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGBA8888ToBGR888u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGBA8888ToBGRA8888u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGBA8888ToBGRA8888u8)( src, srcWidth, srcHeight, srcStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorRGBA8888ToLABu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorRGBA8888ToLABu8)(src, srcWidth, srcHeight, srcStride, dst, dstStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PlanarToYCbCr422Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PlanarToYCbCr422Planaru8)( srcY, srcCb, srcCr,
- srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride, dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PlanarToYCbCr420Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PlanarToYCbCr420Planaru8)( srcY, srcCb, srcCr,
- srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride, dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PlanarToYCbCr444PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PlanarToYCbCr444PseudoPlanaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PlanarToYCbCr422PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PlanarToYCbCr422PseudoPlanaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PlanarToYCbCr420PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PlanarToYCbCr420PseudoPlanaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PlanarToYCbCr444Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PlanarToYCbCr444Planaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PlanarToYCbCr420Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PlanarToYCbCr420Planaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PlanarToYCbCr444PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PlanarToYCbCr444PseudoPlanaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PlanarToYCbCr422PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PlanarToYCbCr422PseudoPlanaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PlanarToYCbCr420PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PlanarToYCbCr420PseudoPlanaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PlanarToYCbCr444Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PlanarToYCbCr444Planaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PlanarToYCbCr422Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PlanarToYCbCr422Planaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PlanarToYCbCr444PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PlanarToYCbCr444PseudoPlanaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PlanarToYCbCr422PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PlanarToYCbCr422PseudoPlanaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PlanarToYCbCr420PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PlanarToYCbCr420PseudoPlanaru8)( srcY, srcCb, srcCr, srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PseudoPlanarToYCbCr422PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PseudoPlanarToYCbCr422PseudoPlanaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PseudoPlanarToYCbCr420PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PseudoPlanarToYCbCr420PseudoPlanaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PseudoPlanarToYCbCr444Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PseudoPlanarToYCbCr444Planaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PseudoPlanarToYCbCr422Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PseudoPlanarToYCbCr422Planaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PseudoPlanarToYCbCr420Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PseudoPlanarToYCbCr420Planaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PseudoPlanarToYCbCr444PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PseudoPlanarToYCbCr444PseudoPlanaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PseudoPlanarToYCbCr420PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PseudoPlanarToYCbCr420PseudoPlanaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PseudoPlanarToYCbCr444Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PseudoPlanarToYCbCr444Planaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PseudoPlanarToYCbCr422Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PseudoPlanarToYCbCr422Planaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PseudoPlanarToYCbCr420Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PseudoPlanarToYCbCr420Planaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PseudoPlanarToYCbCr444PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PseudoPlanarToYCbCr444PseudoPlanaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PseudoPlanarToYCbCr422PseudoPlanaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstC,
- uint32_t dstYStride,
- uint32_t dstCStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PseudoPlanarToYCbCr422PseudoPlanaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstC, dstYStride, dstCStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PseudoPlanarToYCbCr444Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PseudoPlanarToYCbCr444Planaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PseudoPlanarToYCbCr422Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PseudoPlanarToYCbCr422Planaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PseudoPlanarToYCbCr420Planaru8( const uint8_t* srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* dstY,
- uint8_t* __restrict dstCb,
- uint8_t* __restrict dstCr,
- uint32_t dstYStride,
- uint32_t dstCbStride,
- uint32_t dstCrStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstCrStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PseudoPlanarToYCbCr420Planaru8)( srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- dstY, dstCb, dstCr, dstYStride, dstCbStride, dstCrStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PlanarToRGB565u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PlanarToRGB565u8)( srcY, srcCb, srcCr,
- srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PlanarToRGB888u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PlanarToRGB888u8)( srcY, srcCb, srcCr,
- srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PlanarToRGBA8888u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PlanarToRGBA8888u8)( srcY, srcCb, srcCr,
- srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PlanarToRGB565u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PlanarToRGB565u8)( srcY, srcCb, srcCr,
- srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PlanarToRGB888u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PlanarToRGB888u8)( srcY, srcCb, srcCr,
- srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PlanarToRGBA8888u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PlanarToRGBA8888u8)( srcY, srcCb, srcCr,
- srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PlanarToRGB565u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PlanarToRGB565u8)( srcY, srcCb, srcCr,
- srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PlanarToRGB888u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PlanarToRGB888u8)( srcY, srcCb, srcCr,
- srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PlanarToRGBA8888u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcCb,
- const uint8_t* __restrict srcCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PlanarToRGBA8888u8)( srcY, srcCb, srcCr,
- srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PseudoPlanarToRGB565u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PseudoPlanarToRGB565u8)( srcY, srcC,
- srcWidth, srcHeight, srcYStride, srcCStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PseudoPlanarToRGB888u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PseudoPlanarToRGB888u8)( srcY, srcC,
- srcWidth, srcHeight, srcYStride, srcCStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr444PseudoPlanarToRGBA8888u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr444PseudoPlanarToRGBA8888u8)( srcY, srcC,
- srcWidth, srcHeight, srcYStride, srcCStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PseudoPlanarToRGB565u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PseudoPlanarToRGB565u8)( srcY, srcC,
- srcWidth, srcHeight, srcYStride, srcCStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PseudoPlanarToRGB888u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PseudoPlanarToRGB888u8)( srcY, srcC,
- srcWidth, srcHeight, srcYStride, srcCStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr422PseudoPlanarToRGBA8888u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr422PseudoPlanarToRGBA8888u8)( srcY, srcC,
- srcWidth, srcHeight, srcYStride, srcCStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PseudoPlanarToRGB565u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PseudoPlanarToRGB565u8)( srcY, srcC,
- srcWidth, srcHeight, srcYStride, srcCStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PseudoPlanarToRGB888u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PseudoPlanarToRGB888u8)( srcY, srcC,
- srcWidth, srcHeight, srcYStride, srcCStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvColorYCbCr420PseudoPlanarToRGBA8888u8( const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)srcC & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvColorYCbCr420PseudoPlanarToRGBA8888u8)( srcY, srcC,
- srcWidth, srcHeight, srcYStride, srcCStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvEdgeWeightings16( int16_t* __restrict edgeMap,
- const uint32_t edgeMapWidth,
- const uint32_t edgeMapHeight,
- const uint32_t edgeMapStride,
- const uint32_t weight,
- const uint32_t edge_limit,
- const uint32_t hl_threshold,
- const uint32_t hh_threshold,
- const uint32_t edge_denoise_factor )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)edgeMap & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( edgeMapStride == 0 && (edgeMapWidth & 0x7) == 0 ) || (edgeMapStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvEdgeWeightings16)( edgeMap, edgeMapWidth, edgeMapHeight, edgeMapStride,
- weight, edge_limit, hl_threshold, hh_threshold, edge_denoise_factor );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDeinterleaveu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst0,
- uint32_t dst0Stride,
- uint8_t* __restrict dst1,
- uint32_t dst1Stride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst0 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst1 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dst0Stride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dst1Stride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvDeinterleaveu8)( src, srcWidth, srcHeight, srcStride,
- dst0, dst0Stride, dst1, dst1Stride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvInterleaveu8( const uint8_t* __restrict src0,
- const uint8_t* __restrict src1,
- uint32_t imageWidth,
- uint32_t imageHeight,
- uint32_t src0Stride,
- uint32_t src1Stride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src0 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)src1 & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (imageWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (src0Stride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (src1Stride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvInterleaveu8)( src0, src1, imageWidth, imageHeight,
- src0Stride, src1Stride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDWTHarrTransposeu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvDWTHaarTransposeu8)( src, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDWTHaarTransposeu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcWidth == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvDWTHaarTransposeu8)( src, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDWT53TabTransposes16( const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcWidth == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvDWT53TabTransposes16)( src, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvIDWT53TabTransposes16( const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcWidth == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvIDWT53TabTransposes16)( src, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvIDWTHarrTransposes16( const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvIDWTHaarTransposes16)( src, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvIDWTHaarTransposes16( const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcWidth == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvIDWTHaarTransposes16)( src, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDWTHaaru8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcWidth == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvDWTHaaru8)( src, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDWT53Tabs16( const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcWidth == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvDWT53Tabs16)( src, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvIDWT53Tabs16( const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcWidth == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvIDWT53Tabs16)( src, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvIDWTHaars16( const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcWidth == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvIDWTHaars16)( src, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDCTu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int16_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcWidth == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvDCTu8)( src, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvIDCTs16( const int16_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcWidth == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvIDCTs16)( src, srcWidth, srcHeight, srcStride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvScaleUpPolyu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvScaleUpPolyu8)( src, srcWidth, srcHeight, srcStride,
- dst, dstWidth, dstHeight, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvScaleUpPolyInterleaveu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvScaleUpPolyInterleaveu8)( src, srcWidth, srcHeight, srcStride,
- dst, dstWidth, dstHeight, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvScaleDownMNu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvScaleDownMNu8)( src, srcWidth, srcHeight, srcStride,
- dst, dstWidth, dstHeight, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvScaleDownMNInterleaveu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvScaleDownMNInterleaveu8)( src, srcWidth, srcHeight, srcStride,
- dst, dstWidth, dstHeight, dstStride );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline uint32_t
-fcvKMeansTreeSearch36x10s8( const int8_t* __restrict nodeChildrenCenter,
- const uint32_t* __restrict nodeChildrenInvLenQ32,
- const uint32_t* __restrict nodeChildrenIndex,
- const uint8_t* __restrict nodeNumChildren,
- uint32_t numNodes,
- const int8_t* __restrict key )
-{
- return (**ppfcvKMeansTreeSearch36x10s8)( nodeChildrenCenter,
- nodeChildrenInvLenQ32,
- nodeChildrenIndex,
- nodeNumChildren,
- numNodes,
- key );
-
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline void
-fcvLinearSearch8x36s8(
- const uint32_t * __restrict dbLUT,
- uint32_t numDBLUT,
- const int8_t * __restrict descDB,
- const uint32_t * __restrict descDBInvLenQ38,
- const uint16_t * __restrict descDBTargetId,
- uint32_t numDescDB,
- const int8_t * __restrict srcDesc,
- const uint32_t * __restrict srcDescInvLenQ38,
- const uint32_t * __restrict srcDescIdx,
- uint32_t numSrcDesc,
- const uint16_t * __restrict targetsToIgnore,
- uint32_t numTargetsToIgnore,
- uint32_t maxDistanceQ31,
- uint32_t * __restrict correspondenceDBIdx,
- uint32_t * __restrict correspondencSrcDescIdx,
- uint32_t * __restrict correspondenceDistanceQ31,
- uint32_t maxNumCorrespondences,
- uint32_t * __restrict numCorrespondences )
-{
- return (**ppfcvLinearSearch8x36s8)( dbLUT,
- numDBLUT,
- descDB,
- descDBInvLenQ38,
- descDBTargetId,
- numDescDB,
- srcDesc,
- srcDescInvLenQ38,
- srcDescIdx,
- numSrcDesc,
- targetsToIgnore,
- numTargetsToIgnore,
- maxDistanceQ31,
- correspondenceDBIdx,
- correspondencSrcDescIdx,
- correspondenceDistanceQ31,
- maxNumCorrespondences,
- numCorrespondences );
-}
-
-//---------------------------------------------------------------------------
-//---------------------------------------------------------------------------
-
-inline int
-fcvLinearSearchPrepare8x36s8(
- uint32_t * __restrict dbLUT,
- uint32_t numDBLUT,
- int8_t * __restrict descDB,
- uint32_t * __restrict descDBInvLenQ38,
- uint16_t * __restrict descDBTargetId,
- uint32_t * __restrict idxLUT,
- uint32_t numDescDB )
-{
- return (**ppfcvLinearSearchPrepare8x36s8_v2)( dbLUT,
- numDBLUT,
- descDB,
- descDBInvLenQ38,
- descDBTargetId,
- idxLUT,
- numDescDB );
-}
-
-
-inline void
-fcvFindContoursExternalu8( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- int32_t hierarchy[][4],
- void* contourHandle )
-{
- return(**ppfcvFindContoursExternalu8)(src,srcWidth,srcHeight,srcStride,maxNumContours,numContours,numContourPoints,
- contourStartPoints,pointBuffer,pointBufferSize,hierarchy,contourHandle);
-}
-
-inline void
-fcvFindContoursListu8( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- void* contourHandle )
-{
- return(**ppfcvFindContoursListu8)(src,srcWidth,srcHeight,srcStride,maxNumContours,numContours,
- numContourPoints,contourStartPoints,pointBuffer,pointBufferSize,contourHandle);
-}
-
-inline void
-fcvFindContoursCcompu8( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t*__restrict numContours,
- uint32_t* __restrict holeFlag,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- int32_t hierarchy[][4],
- void* contourHandle )
-{
- return(**ppfcvFindContoursCcompu8) (src,srcWidth,srcHeight,srcStride,maxNumContours,numContours,
- holeFlag,numContourPoints,
- contourStartPoints,pointBuffer,pointBufferSize,hierarchy,contourHandle);
-}
-
-inline void
-fcvFindContoursTreeu8( uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t maxNumContours,
- uint32_t* __restrict numContours,
- uint32_t* __restrict holeFlag,
- uint32_t* __restrict numContourPoints,
- uint32_t** __restrict contourStartPoints,
- uint32_t* __restrict pointBuffer,
- uint32_t pointBufferSize,
- int32_t hierarchy[][4],
- void* contourHandle )
-{
- return(**ppfcvFindContoursTreeu8)(src,srcWidth,srcHeight,srcStride,maxNumContours,numContours,holeFlag,numContourPoints,
- contourStartPoints,pointBuffer,pointBufferSize,hierarchy,contourHandle);
-}
-
-inline void*
-fcvFindContoursAllocate( uint32_t srcStride )
-{
- return(**ppfcvFindContoursAllocate) (srcStride);
-}
-
-inline void
-fcvFindContoursDelete( void* contourHandle )
-{
- (**ppfcvFindContoursDelete) ( contourHandle );
-}
-
-
-inline void
-fcvSolvef32(const float32_t * __restrict A,
- int32_t numCols,
- int32_t numRows,
- const float32_t * __restrict b,
- float32_t * __restrict x)
-{
- return(**ppfcvSolvef32)(A,numCols,numRows,b,x);
-
-}
-
-inline void
-fcvGetPerspectiveTransformf32( const float32_t src1[8],
- const float32_t src2[8],
- float32_t transformCoefficient[9] )
-
-{
- (**ppfcvGetPerspectiveTransformf32)(src1,src2,transformCoefficient);
-
-}
-inline void
-fcvSetElementsu8( uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t value,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- )
-{
- (**ppfcvSetElementsu8)( src, srcWidth, srcHeight, srcStride, value, mask, maskStride );
-}
-
-inline void
-fcvSetElementss32( int32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t value,
- const uint8_t * __restrict mask ,
- uint32_t maskStride
- )
-{
- (**ppfcvSetElementss32)( src, srcWidth, srcHeight, srcStride, value, mask , maskStride);
-
-}
-
-inline void
-fcvSetElementsf32( float32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t value,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- )
-{
- (**ppfcvSetElementsf32)( src, srcWidth, srcHeight, srcStride, value, mask, maskStride);
-
-}
-
-inline void
-fcvSetElementsc4u8( uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t value1,
- uint8_t value2,
- uint8_t value3,
- uint8_t value4,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- )
-{
- (**ppfcvSetElementsc4u8)( src, srcWidth, srcHeight, srcStride, value1, value2, value3, value4, mask, maskStride );
-
-}
-
-inline void
-fcvSetElementsc4s32( int32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t value1,
- int32_t value2,
- int32_t value3,
- int32_t value4,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- )
-{
- (**ppfcvSetElementsc4s32)( src, srcWidth, srcHeight, srcStride, value1, value2, value3, value4, mask, maskStride );
-}
-
-inline void
-fcvSetElementsc4f32( float32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t value1,
- float32_t value2,
- float32_t value3,
- float32_t value4,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- )
-{
- (**ppfcvSetElementsc4f32)( src, srcWidth, srcHeight, srcStride, value1, value2, value3, value4, mask, maskStride );
-}
-
-inline void
-fcvSetElementsc3u8( uint8_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t value1,
- uint8_t value2,
- uint8_t value3,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- )
-{
- return (**ppfcvSetElementsc3u8)( src, srcWidth, srcHeight, srcStride, value1, value2, value3, mask, maskStride );
-
-}
-
-inline void
-fcvSetElementsc3s32( int32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t value1,
- int32_t value2,
- int32_t value3,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- )
-{
- (**ppfcvSetElementsc3s32)( src, srcWidth, srcHeight, srcStride, value1, value2, value3, mask, maskStride );
-}
-
-inline void
-fcvSetElementsc3f32( float32_t * __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t value1,
- float32_t value2,
- float32_t value3,
- const uint8_t * __restrict mask,
- uint32_t maskStride
- )
-{
- (**ppfcvSetElementsc3f32)( src, srcWidth, srcHeight, srcStride, value1, value2, value3, mask, maskStride );
-}
-
-
-
-
-inline void
-fcvAdaptiveThresholdGaussian3x3u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t maxValue,
- fcvThreshType thresholdType,
- int32_t value,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
- (**ppfcvAdaptiveThresholdGaussian3x3u8)( src,srcWidth, srcHeight, srcStride,
- maxValue,thresholdType, value, dst,dstStride );
-}
-inline void
-fcvAdaptiveThresholdGaussian5x5u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t maxValue,
- fcvThreshType thresholdType,
- int32_t value,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
- (**ppfcvAdaptiveThresholdGaussian5x5u8)( src,srcWidth, srcHeight, srcStride,
- maxValue,thresholdType, value, dst,dstStride );
-}
-
-inline void
-fcvAdaptiveThresholdGaussian11x11u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t maxValue,
- fcvThreshType thresholdType,
- int32_t value,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
- (**ppfcvAdaptiveThresholdGaussian11x11u8)( src,srcWidth, srcHeight, srcStride,
- maxValue,thresholdType, value, dst,dstStride );
-}
-
-inline void
-fcvAdaptiveThresholdMean3x3u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t maxValue,
- fcvThreshType thresholdType,
- int32_t value,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
- (**ppfcvAdaptiveThresholdMean3x3u8)( src,srcWidth, srcHeight, srcStride,
- maxValue,thresholdType, value, dst,dstStride );
-
-}
-
-inline void
-fcvAdaptiveThresholdMean5x5u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t maxValue,
- fcvThreshType thresholdType,
- int32_t value,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
- (**ppfcvAdaptiveThresholdMean5x5u8)( src,srcWidth, srcHeight, srcStride,
- maxValue,thresholdType, value, dst,dstStride );
-}
-
-inline void
-fcvAdaptiveThresholdMean11x11u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t maxValue,
- fcvThreshType thresholdType,
- int32_t value,
- uint8_t* __restrict dst,
- uint32_t dstStride )
-{
- (**ppfcvAdaptiveThresholdMean11x11u8)( src,srcWidth, srcHeight, srcStride,
- maxValue,thresholdType, value, dst,dstStride );
-}
-
-inline void
-fcvBoxFilter3x3u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
- )
-{
- (*ppfcvBoxFilter3x3u8)(src,srcWidth,srcHeight,srcStride,dst,dstStride);
-
-}
-
-
-inline void
-fcvBoxFilter5x5u8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
- )
-{
- (*ppfcvBoxFilter5x5u8)(src,srcWidth,srcHeight,srcStride,dst,dstStride);
-
-}
-
-
-inline void
-fcvBoxFilter11x11u8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
- )
-{
- (**ppfcvBoxFilter11x11u8)(src,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-inline void
-fcvBilateralFilter5x5u8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
- )
-{
- (**ppfcvBilateralFilter5x5u8)(src,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-
-
-inline void
-fcvBilateralFilter7x7u8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
- )
-{
-
- (**ppfcvBilateralFilter7x7u8)(src,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-inline void
-fcvBilateralFilter9x9u8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
- )
-{
- (**ppfcvBilateralFilter9x9u8)(src,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-inline void
-fcvSegmentFGMasku8(uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t Polygonal,
- uint32_t perimScale)
-{
- (**ppfcvSegmentFGMasku8)(src,srcWidth,srcHeight,srcStride,Polygonal,perimScale);
-}
-
-
-inline void
-fcvAbsDiffu8(const uint8_t * __restrict src1,
- const uint8_t * __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth*sizeof (uint8_t) : srcStride);
- dstStride = (dstStride==0 ? srcWidth*sizeof (uint8_t) : dstStride);
-
-
- (*ppfcvAbsDiffu8)(src1,src2,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-
-
-inline void
-fcvAbsDiffs32(const int32_t * __restrict src1,
- const int32_t * __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t * __restrict dst,
- uint32_t dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth*sizeof (int32_t) : srcStride);
- dstStride = (dstStride==0 ? srcWidth*sizeof (int32_t) : dstStride);
-
- (*ppfcvAbsDiffs32)(src1,src2,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-
-
-inline void
-fcvAbsDifff32(const float32_t * __restrict src1,
- const float32_t * __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t * __restrict dst,
- uint32_t dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth*sizeof (float32_t) : srcStride);
- dstStride = (dstStride==0 ? srcWidth*sizeof (float32_t) : dstStride);
-
- (*ppfcvAbsDifff32)(src1,src2,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-
-inline void
-fcvAbsDiffVu8(const uint8_t * __restrict src,
- uint8_t value,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth*sizeof (uint8_t) : srcStride);
- dstStride = (dstStride==0 ? srcWidth*sizeof (uint8_t) : dstStride);
-
- (**ppfcvAbsDiffVu8)(src,value,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-inline void
-fcvAbsDiffVs32(const int32_t * __restrict src,
- int32_t value,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t * __restrict dst,
- uint32_t dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth*sizeof (int32_t) : srcStride);
- dstStride = (dstStride==0 ? srcWidth*sizeof (int32_t) : dstStride);
-
- (**ppfcvAbsDiffVs32)(src,value,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-inline void
-fcvAbsDiffVf32(const float32_t * __restrict src,
- float32_t value,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t * __restrict dst,
- uint32_t dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth*sizeof (float32_t) : srcStride);
- dstStride = (dstStride==0 ? srcWidth*sizeof (float32_t) : dstStride);
-
- (**ppfcvAbsDiffVf32)(src,value,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-
-inline void
-fcvAbsDiffVc4u8(const uint8_t * __restrict src,
- uint8_t value1,
- uint8_t value2,
- uint8_t value3,
- uint8_t value4,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth*4*sizeof (uint8_t) : srcStride);
- dstStride = (dstStride==0 ? srcWidth*4*sizeof (uint8_t) : dstStride);
-
- (*ppfcvAbsDiffVc4u8)(src,value1,value2,value3,value4,
- srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-
-inline void
-fcvAbsDiffVc4s32(const int32_t * __restrict src,
- int32_t value1,
- int32_t value2,
- int32_t value3,
- int32_t value4,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t * __restrict dst,
- uint32_t dstStride )
-{
-
- srcStride = (srcStride==0 ? srcWidth*4*sizeof (int32_t) : srcStride);
- dstStride = (dstStride==0 ? srcWidth*4*sizeof (int32_t) : dstStride);
-
- (*ppfcvAbsDiffVc4s32)(src,value1,value2,value3,value4,
- srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-inline void
-fcvAbsDiffVc4f32(const float32_t * __restrict src,
- float32_t value1,
- float32_t value2,
- float32_t value3,
- float32_t value4,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t * __restrict dst,
- uint32_t dstStride)
-{
-
- srcStride = (srcStride==0 ? srcWidth*4*sizeof (float32_t) : srcStride);
- dstStride = (dstStride==0 ? srcWidth*4*sizeof (float32_t) : dstStride);
-
- (*ppfcvAbsDiffVc4f32)(src,value1,value2,value3,value4,
- srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-inline void
-fcvAbsDiffVc3u8(const uint8_t * __restrict src,
- uint8_t value1,
- uint8_t value2,
- uint8_t value3,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth*3*sizeof (uint8_t) : srcStride);
- dstStride = (dstStride==0 ? srcWidth*3*sizeof (uint8_t) : dstStride);
-
- (**ppfcvAbsDiffVc3u8)(src,value1,value2,value3,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-inline void
-fcvAbsDiffVc3s32(const int32_t * __restrict src,
- int32_t value1,
- int32_t value2,
- int32_t value3,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t * __restrict dst,
- uint32_t dstStride )
-{
- srcStride = (srcStride==0 ? srcWidth*3*sizeof (int32_t) : srcStride);
- dstStride = (dstStride==0 ? srcWidth*3*sizeof (int32_t) : dstStride);
-
- (**ppfcvAbsDiffVc3s32)(src,value1,value2,value3,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-inline void
-fcvAbsDiffVc3f32(const float32_t * __restrict src,
- float32_t value1,
- float32_t value2,
- float32_t value3,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t * __restrict dst,
- uint32_t dstStride)
-{
- srcStride = (srcStride==0 ? srcWidth*3*sizeof (float32_t) : srcStride);
- dstStride = (dstStride==0 ? srcWidth*3*sizeof (float32_t) : dstStride);
-
- (**ppfcvAbsDiffVc3f32)(src,value1,value2,value3,srcWidth,srcHeight,srcStride,dst,dstStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline
-int fcvKDTreeCreate36s8f32( const int8_t* __restrict vectors,
- const float32_t* __restrict invLengths,
- int numVectors,
- fcvKDTreeDatas8f32** kdtrees )
-{
- return (**ppfcvKDTreeCreate36s8f32)(vectors, invLengths, numVectors, kdtrees );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline
-int fcvKDTreeDestroy36s8f32( fcvKDTreeDatas8f32* kdtrees )
-{
- return (**ppfcvKDTreeDestroy36s8f32) ( kdtrees );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline
-int fcvKDTreeQuery36s8f32( fcvKDTreeDatas8f32* kdtrees,
- const int8_t* __restrict query,
- float32_t queryInvLen,
- int maxNNs,
- float32_t maxDist,
- int maxChecks,
- const uint8_t* __restrict mask,
- int32_t* numNNsFound,
- int32_t* __restrict NNInds,
- float32_t* __restrict NNDists )
-{
- return (**ppfcvKDTreeQuery36s8f32) ( kdtrees, query, queryInvLen, maxNNs,
- maxDist, maxChecks, mask, numNNsFound,
- NNInds, NNDists );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline
-void fcvBitwiseOru8
-(
- const uint8_t* __restrict src1,
- const uint8_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t * __restrict dst,
- uint32_t dstStride,
- uint8_t * __restrict mask,
- uint32_t maskStride
-)
-{
- return (**ppfcvBitwiseOru8) ( src1, src2, srcWidth, srcHeight,
- srcStride, dst, dstStride, mask,
- maskStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline
-void fcvBitwiseOrs32
-(
- const int32_t* __restrict src1,
- const int32_t* __restrict src2,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t * __restrict dst,
- uint32_t dstStride,
- uint8_t * __restrict mask,
- uint32_t maskStride
-)
-{
- return (**ppfcvBitwiseOrs32) ( src1, src2, srcWidth, srcHeight,
- srcStride, dst, dstStride, mask,
- maskStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline
-void fcvColorRGB888ToGrayu8
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride
-)
-{
- return (**ppfcvColorRGB888ToGrayu8) ( src, srcWidth, srcHeight,
- srcStride, dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline
-void fcvTiltedIntegralu8s32
-(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- int32_t* __restrict dst,
- uint32_t dstStride
-)
-{
- return (**ppfcvTiltedIntegralu8s32) ( src, srcWidth, srcHeight,
- srcStride, dst, dstStride );
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline
-void fcvConvValids16
-(
- const int16_t* __restrict src1,
- uint32_t src1Width,
- uint32_t src1Height,
- uint32_t src1Stride,
- const int16_t* __restrict src2,
- uint32_t src2Width,
- uint32_t src2Height,
- uint32_t src2Stride,
- int32_t* __restrict dst,
- uint32_t dstStride
-)
-{
- return (**ppfcvConvValids16) ( src1, src1Width, src1Height, src1Stride,
- src2, src2Width, src2Height, src2Stride,
- dst, dstStride );
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvIntegrateImageYCbCr420PseudoPlanaru8(
- const uint8_t* __restrict srcY,
- const uint8_t* __restrict srcC,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCStride,
- uint32_t* __restrict integralY,
- uint32_t* __restrict integralCb,
- uint32_t* __restrict integralCr,
- uint32_t integralYStride,
- uint32_t integralCbStride,
- uint32_t integralCrStride)
-{
- srcYStride=(srcYStride==0 ? srcWidth : srcYStride);
- srcCStride=(srcCStride==0 ? srcWidth : srcCStride);
- integralYStride=(integralYStride==0 ? (srcWidth+8)*sizeof(uint32_t) : integralYStride);
- integralCbStride=(integralCbStride==0 ? ((srcWidth>>1)+8) *sizeof(uint32_t) : integralCbStride);
- integralCrStride=(integralCrStride==0 ? ((srcWidth>>1)+8) *sizeof(uint32_t) : integralCrStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)srcY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)integralY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)integralCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)integralCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0xF) == 0 ); // multiple of 16
- fcvAssert( (srcYStride & 0xF) == 0 ); // multiple of 8
- fcvAssert( (srcCStride & 0xF) == 0 ); // multiple of 8
- fcvAssert( (integralYStride & 0x7) == 0 ); // multiple of 32 (8 values)
- fcvAssert( (integralCbStride & 0x7) == 0 ); // multiple of 32 (8 values)
- fcvAssert( (integralCrStride & 0x7) == 0 ); // multiple of 32 (8 values)
- fcvAssert( (srcYStride >= srcWidth) ); // at least as much as width
- fcvAssert( (srcCStride >= srcWidth>>1) ); // at least as much as width
- fcvAssert( (integralYStride >= srcWidth*sizeof(uint32_t))); // at least as much as 2*width values (or 4*width bytes)
- fcvAssert( (integralCbStride >= srcWidth>>1*sizeof(uint32_t))); // at least as much as 2*width values (or 4*width bytes)
- fcvAssert( (integralCrStride >= srcWidth>>1*sizeof(uint32_t))); // at least as much as 2*width values (or 4*width bytes)
-#endif
- (**ppfcvIntegrateImageYCbCr420PseudoPlanaru8)(srcY, srcC, srcWidth, srcHeight, srcYStride, srcCStride,
- integralY, integralCb, integralCr, integralYStride, integralCbStride, integralCrStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFindForegroundIntegrateImageYCbCr420u32(
- const uint32_t * __restrict bgIntegralY,
- const uint32_t * __restrict bgIntegralCb,
- const uint32_t * __restrict bgIntegralCr,
- const uint32_t * __restrict fgIntegralY,
- const uint32_t * __restrict fgIntegralCb,
- const uint32_t * __restrict fgIntegralCr,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcYStride,
- uint32_t srcCbStride,
- uint32_t srcCrStride,
- uint8_t *__restrict outputMask,
- uint32_t outputWidth,
- uint32_t outputHeight,
- uint32_t outputMaskStride,
- float32_t threshold )
-{
- srcYStride=(srcYStride==0 ? (srcWidth+8)*sizeof(uint32_t) : srcYStride);
- srcCbStride=(srcCbStride==0 ? ((srcWidth>>1)+8)*sizeof(uint32_t) : srcCbStride);
- srcCrStride=(srcCrStride==0 ? ((srcWidth>>1)+8)*sizeof(uint32_t) : srcCrStride);
- outputMaskStride=(outputMaskStride==0 ? outputWidth : outputMaskStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)outputMask & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)bgIntegralY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)bgIntegralCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)bgIntegralCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)fgIntegralY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)fgIntegralCb & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)fgIntegralCr & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0xF) == 0 ); // multiple of 8
- fcvAssert( (srcYStride & 0x7) == 0 ); // multiple of 32
- fcvAssert( (srcCbStride & 0x7) == 0 ); // multiple of 32
- fcvAssert( (srcCrStride & 0x7) == 0 ); // multiple of 32
- fcvAssert( (outputMaskStride & 0x7) == 0 ); // multiple of 8 (8 values)
- fcvAssert( (srcYStride >= srcWidth*sizeof(uint32_t)) ); // at least as much as width
- fcvAssert( (srcCbStride >= srcWidth>>1*sizeof(uint32_t)) ); // at least as much as width
- fcvAssert( (srcCrStride >= srcWidth>>1*sizeof(uint32_t)) ); // at least as much as width
- fcvAssert( (outputMaskStride >= (uint32_t)outputWidth)); // at least as much as 2*width values (or 4*width bytes)
-#endif
- (**ppfcvFindForegroundIntegrateImageYCbCr420u32)(bgIntegralY, bgIntegralCb, bgIntegralCr, fgIntegralY, fgIntegralCb, fgIntegralCr,
- srcWidth, srcHeight, srcYStride, srcCbStride, srcCrStride,
- outputMask, outputWidth, outputHeight, outputMaskStride, threshold);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvFloodfillSimpleu8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict dst,
- uint32_t dstStride,
- uint32_t xBegin,
- uint32_t yBegin,
- uint8_t newVal, //new Val can't be zero. zero is background.
- fcvConnectedComponent *cc,
- uint8_t connectivity,
- void* lineBuffer)
-{
- srcStride=(srcStride==0 ? srcWidth : srcStride);
- dstStride=(dstStride==0 ? srcWidth : dstStride);
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)lineBuffer & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0xF) == 0 ); // multiple of 16 (8 values)
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
- fcvAssert( (dstStride >= srcWidth) ); // at least as much as 2*width values (or 4*width bytes)
-#endif
- (**ppfcvFloodfillSimpleu8)(src, srcWidth, srcHeight, srcStride, dst, dstStride, xBegin, yBegin, newVal, cc, connectivity, lineBuffer);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvUpdateMotionHistoryu8s32(
- const uint8_t* __restrict src,
- uint32_t srcWidth, uint32_t srcHeight,
- uint32_t srcStride,
- int32_t* __restrict dst,
- uint32_t dstStride,
- int32_t timeStamp,
- int32_t maxHistory)
-{
- srcStride=(srcStride==0 ? srcWidth : srcStride);
- dstStride=(dstStride==0 ? srcWidth*sizeof(int32_t) : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 32 (8 values)
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
- fcvAssert( (dstStride >= srcWidth*sizeof(int32_t))); // at least as much as 2*width values (or 4*width bytes)
-#endif
- (**ppfcvUpdateMotionHistoryu8s32)(src, srcWidth, srcHeight, srcStride, dst, dstStride, timeStamp, maxHistory);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
- fcvAverages32(
- const int32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t* __restrict avgValue)
-{
- srcStride=(srcStride==0 ? srcWidth*sizeof(uint32_t) : srcStride);
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcStride == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth*sizeof(uint32_t)) ); // at least as much as width
-#endif
- (**ppfcvAverages32)(src, srcWidth, srcHeight, srcStride, avgValue);
-
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
- fcvAverageu8(
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- float32_t* __restrict avgValue)
-{
- srcStride=(srcStride==0 ? srcWidth : srcStride);
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ( srcStride == 0 && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
-#endif
- (**ppfcvAverageu8)(src, srcWidth, srcHeight, srcStride, avgValue);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline uint32_t
- fcvMeanShiftu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria)
-{
- srcStride=(srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (window != NULL) && (src != NULL));
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
-#endif
-
- return (**ppfcvMeanShiftu8)( src, srcWidth, srcHeight, srcStride, window, criteria);
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline uint32_t
- fcvMeanShifts32( const int32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria)
-{
- srcStride=(srcStride==0 ? srcWidth*4 : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (window != NULL) && (src != NULL));
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth*4) ); // at least as much as width*4
-#endif
-
- return (**ppfcvMeanShifts32)( src, srcWidth, srcHeight, srcStride, window, criteria);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline uint32_t
- fcvMeanShiftf32( const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria)
-{
- srcStride=(srcStride==0 ? srcWidth*4 : srcStride);
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (window != NULL) && (src != NULL));
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth*4) ); // at least as much as width*4
-#endif
-
- return (**ppfcvMeanShiftf32)( src, srcWidth, srcHeight, srcStride, window, criteria);
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline uint32_t
- fcvConAdaTracku8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria,
- fcvBox2D *circuBox)
-{
- srcStride=(srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (window != NULL) && (src != NULL));
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
-#endif
-
- return (**ppfcvConAdaTracku8)( src, srcWidth, srcHeight, srcStride, window, criteria, circuBox);
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline uint32_t
- fcvConAdaTracks32( const int32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria,
- fcvBox2D *circuBox)
-{
- srcStride=(srcStride==0 ? srcWidth*4 : srcStride);
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (window != NULL) && (src != NULL));
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth*4) ); // at least as much as width*4
-#endif
-
- return (**ppfcvConAdaTracks32)( src, srcWidth, srcHeight, srcStride, window, criteria, circuBox);
-}
-
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline uint32_t
- fcvConAdaTrackf32( const float32_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvRectangleInt* window,
- fcvTermCriteria criteria,
- fcvBox2D *circuBox)
-{
- srcStride=(srcStride==0 ? srcWidth*4 : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (window != NULL) && (src != NULL));
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (( srcStride == 0 ) && (srcWidth & 0x7) == 0 ) || (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth*4) ); // at least as much as width*4
-#endif
-
- return (**ppfcvConAdaTrackf32)( src, srcWidth, srcHeight, srcStride, window, criteria, circuBox);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvSVDf32(const float32_t * __restrict A,
- uint32_t m,
- uint32_t n,
- float32_t * __restrict w,
- float32_t * __restrict U,
- float32_t * __restrict Vt,
- float32_t * tmpU,
- float32_t * tmpV)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)A & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)w & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)U & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)Vt & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmpU & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmpV & 0xF) == 0 ); // 128-bit alignment
-#endif
- (**ppfcvSVDf32)(A,m,n,w,U,Vt,tmpU,tmpV);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvFillConvexPolyu8( uint32_t nPts,
- const uint32_t* __restrict polygon,
- uint32_t nChannel,
- const uint8_t* __restrict color,
- uint8_t* __restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride)
-{
-
- dstStride = (dstStride==0 ? dstWidth * nChannel : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (polygon != NULL) && (dst != NULL) && (color != NULL));
- fcvAssert( ((int)(size_t)polygon & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (dstWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-
-#endif
- (**ppfcvFillConvexPolyu8)(nPts, polygon, nChannel, color, dst, dstWidth, dstHeight, dstStride);
-
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvPointPolygonTest(uint32_t nPts,
- const uint32_t* __restrict polygonContour,
- uint32_t px,
- uint32_t py,
- float32_t* distance,
- int16_t* resultFlag)
-{
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (polygonContour != NULL) && (nPts >= 2) );
- fcvAssert( ((int)(size_t)polygonContour & 0xF) == 0 ); // 128-bit alignment
-#endif
-
- (**ppfcvPointPolygonTest)(nPts, polygonContour, px, py, distance, resultFlag);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void fcvFindConvexHull( uint32_t* __restrict polygonContour,
- uint32_t nPtsContour,
- uint32_t* __restrict convexHull,
- uint32_t* nPtsHull,
- uint32_t* __restrict tmpBuff)
-{
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (polygonContour != NULL) && (convexHull != NULL) && (tmpBuff != NULL));
- fcvAssert( ((int)(size_t)polygonContour & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)convexHull & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)tmpBuff & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( nPtsContour>0 ); // non negative number of input points
-#endif
-
- (**ppfcvFindConvexHull)(polygonContour,nPtsContour,convexHull,nPtsHull,tmpBuff);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline int32_t
-fcvSolveCholeskyf32( float32_t *__restrict A,
- const float32_t *__restrict b,
- float32_t *__restrict diag,
- uint32_t N,
- float32_t *__restrict x)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (A != NULL) && (b != NULL) );
- fcvAssert( (diag != NULL) && (x != NULL) );
- fcvAssert( ((int)(size_t)A & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)b & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)diag & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)x & 0xF) == 0 ); // 128-bit alignment
-#endif
- return (**ppfcvSolveCholeskyf32)(A, b, diag, N, x);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
- fcvGeomUndistortPoint2x1f32(const float32_t* __restrict cameraCalibration,
- const float32_t* __restrict xyDevice,
- float32_t* __restrict xyCamera)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (cameraCalibration != NULL) && (xyCamera != NULL) && (xyDevice != NULL) );
- fcvAssert( ((int)(size_t)cameraCalibration & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xyCamera & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xyDevice & 0xF) == 0 ); // 128-bit alignment
-#endif
- (**ppfcvGeomUndistortPoint2x1f32)(cameraCalibration,
- xyDevice,
- xyCamera);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvGeomUndistortPoint2xNf32(const float32_t* __restrict cameraCalibration,
- const float32_t* __restrict xyDevice,
- uint32_t srcStride,
- uint32_t xySize,
- float32_t* __restrict xyCamera,
- uint32_t dstStride)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (cameraCalibration != NULL) && (xyCamera != NULL) && (xyDevice != NULL) );
- fcvAssert( ((int)(size_t)cameraCalibration & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xyCamera & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xyDevice & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
- (**ppfcvGeomUndistortPoint2xNf32)(cameraCalibration,xyDevice,srcStride,xySize,xyCamera,dstStride);
-
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
- fcvGeomDistortPoint2x1f32(const float32_t* __restrict cameraCalibration,
- const float32_t* __restrict xyCamera,
- float32_t* __restrict xyDevice)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (cameraCalibration != NULL) && (xyCamera != NULL) && (xyDevice != NULL) );
- fcvAssert( ((int)(size_t)cameraCalibration & 0xF) == 0 ); // 128-bit alignment
-#endif
- (**ppfcvGeomDistortPoint2x1f32)(cameraCalibration,
- xyCamera,
- xyDevice);
-}
-
-inline void
-fcvGeomDistortPoint2xNf32(const float32_t* __restrict cameraCalibration,
- const float32_t* __restrict xyCamera,
- uint32_t srcStride,
- uint32_t xySize,
- float32_t* __restrict xyDevice,
- uint32_t dstStride)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (cameraCalibration != NULL) && (xyCamera != NULL) && (xyDevice != NULL) );
- fcvAssert( ((int)(size_t)cameraCalibration & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xyCamera & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xyDevice & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
- (**ppfcvGeomDistortPoint2xNf32)(cameraCalibration,xyCamera,srcStride,xySize,xyDevice,dstStride);
-
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline int32_t
- fcvGeomProjectPoint3x1f32(const float32_t* __restrict pose,
- const float32_t* __restrict cameraCalibration,
- const float32_t* __restrict xyz,
- float32_t* __restrict xyCamera,
- float32_t* __restrict xyDevice)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (pose != NULL) && (xyz != NULL) );
- fcvAssert( (cameraCalibration != NULL) && (xyCamera != NULL) && (xyDevice != NULL) );
- fcvAssert( ((int)(size_t)cameraCalibration & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xyCamera & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xyDevice & 0xF) == 0 ); // 128-bit alignment
-#endif
- return (**ppfcvGeomProjectPoint3x1f32)(pose, cameraCalibration, xyz, xyCamera, xyDevice);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvGeomProjectPoint3xNf32(const float32_t* __restrict pose,
- const float32_t* __restrict cameraCalibration,
- const float32_t* __restrict xyz,
- uint32_t srcStride,
- uint32_t xyzSize,
- float32_t* __restrict xyCamera,
- float32_t* __restrict xyDevice,
- uint32_t dstStride,
- uint32_t* inFront)
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (pose != NULL) && (cameraCalibration != NULL));
- fcvAssert( (xyz != NULL) && (xyCamera != NULL) && (xyDevice != NULL) && (inFront != NULL));
- fcvAssert( ((int)(size_t)pose & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)cameraCalibration & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xyz & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xyCamera & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)xyDevice & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvGeomProjectPoint3xNf32)(pose,cameraCalibration,xyz,srcStride,xyzSize,xyCamera,xyDevice,dstStride,inFront);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvRemapRGBA8888NNu8(const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t *__restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- const float32_t *__restrict mapX,
- const float32_t *__restrict mapY,
- uint32_t mapStride)
-{
- srcStride = (srcStride==0 ? srcWidth*4 : srcStride);
- dstStride = (dstStride==0 ? dstWidth*4 : dstStride);
- mapStride = (mapStride==0 ? dstWidth*sizeof(float32_t) : mapStride);
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (src != NULL) && (dst!=NULL) && (mapX!=NULL) && (mapY!=NULL));
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)mapX & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)mapY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (mapStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth*4) ); // at least as much as width*4(4 channels)
- fcvAssert( (dstStride >= dstWidth*4) ); // at least as much as width*4(4 channels)
- fcvAssert( (mapStride >= (dstWidth*sizeof(float32_t))) ); //at least as much as dstWidth*4 (float)
-#endif
-
- return (**ppfcvRemapRGBA8888NNu8)(src, srcWidth, srcHeight, srcStride, dst,
- dstWidth, dstHeight, dstStride, mapX, mapY, mapStride);
-}
-
-//----------------------------------------------------------------------------------------
-//----------------------------------------------------------------------------------------
-inline void
-fcvRemapRGBA8888BLu8 ( const uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t *__restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- const float32_t *__restrict mapX,
- const float32_t *__restrict mapY,
- uint32_t mapStride )
-{
- srcStride = (srcStride==0 ? srcWidth*4 : srcStride);
- dstStride = (dstStride==0 ? dstWidth*4 : dstStride);
- mapStride = (mapStride==0 ? dstWidth*sizeof(float32_t) : mapStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (src != NULL) && (dst!=NULL) && (mapX!=NULL) && (mapY!=NULL));
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)mapX & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)mapY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (mapStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth*4) ); // at least as much as width *4 ( 4 channels)
- fcvAssert( (dstStride >= dstWidth*4) ); // at least as much as width *4 (4 channels)
- fcvAssert( (mapStride >= (dstWidth*sizeof(float32_t))) ); //at least as much as dstWidth *4 (float )
-#endif
-
- return (**ppfcvRemapRGBA8888BLu8)(src, srcWidth, srcHeight, srcStride, dst,
- dstWidth, dstHeight, dstStride, mapX, mapY, mapStride);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-inline void
-fcvJacobianSE2f32(const uint8_t* __restrict warpedImage,
- const uint16_t *__restrict warpedBorder,
- const uint8_t *__restrict targetImage,
- const int16_t *__restrict targetDX,
- const int16_t *__restrict targetDY,
- uint32_t width,
- uint32_t height,
- uint32_t stride,
- float32_t *__restrict sumJTJ,
- float32_t *__restrict sumJTE,
- float32_t *__restrict sumError,
- uint32_t *__restrict numPixels)
-{
- stride=(stride==0 ? width : stride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)warpedImage & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)targetImage & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)warpedBorder & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)targetDX & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)targetDY & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)sumJTJ & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (stride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (stride >= width) ); // at least as much as width
-#endif
-
- (**ppfcvJacobianSE2f32)(warpedImage, warpedBorder, targetImage, targetDX,
- targetDY, width, height, stride, sumJTJ, sumJTE,
- sumError, numPixels);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvTransformAffineClippedu8(const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- const float32_t *__restrict affineMatrix,
- uint8_t *__restrict dst,
- uint32_t dstWidth,
- uint32_t dstHeight,
- uint32_t dstStride,
- uint32_t *__restrict dstBorder)
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
- dstStride = (dstStride==0 ? dstWidth : dstStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dst & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)affineMatrix & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)dstBorder & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (dstStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
- fcvAssert( (dstStride >= dstWidth) ); // at least as much as width
-#endif
-
- (**ppfcvTransformAffineClippedu8)(src, srcWidth, srcHeight, srcStride,
- affineMatrix, dst, dstWidth, dstHeight,
- dstStride, dstBorder);
-}
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-inline fcvBGCodeWord**
- fcvCreateBGCodeBookModel( uint32_t srcWidth,
- uint32_t srcHeight,
- void** __restrict cbmodel )
-{
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
-#endif
- return (**ppfcvCreateBGCodeBookModel) ( srcWidth, srcHeight, cbmodel );
-}
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-inline void
- fcvReleaseBGCodeBookModel( void** cbmodel )
-{
- return (**ppfcvReleaseBGCodeBookModel) ( cbmodel );
-}
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-inline void
- fcvBGCodeBookUpdateu8( void* __restrict cbmodel,
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- const uint8_t* __restrict fgMask,
- uint32_t fgMaskStride,
- fcvBGCodeWord** __restrict cbMap,
- int32_t* __restrict updateTime )
-{
- srcStride = (srcStride==0 ? srcWidth*3 : srcStride);
- fgMaskStride = (fgMaskStride==0 ? srcWidth : fgMaskStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)fgMask & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (fgMaskStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= 3*srcWidth) ); // Stride is at least 3 times of Width. Input image must have 3 channels.
- fcvAssert( (fgMaskStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
- return (**ppfcvBGCodeBookUpdateu8) ( cbmodel, src, srcWidth, srcHeight, srcStride, fgMask, fgMaskStride, cbMap, updateTime );
-}
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-inline void
- fcvBGCodeBookDiffu8( void* __restrict cbmodel,
- const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint8_t* __restrict fgMask,
- uint32_t fgMaskStride,
- fcvBGCodeWord** __restrict cbMap,
- int32_t* __restrict numFgMask )
-{
- srcStride = (srcStride==0 ? srcWidth*3 : srcStride);
- fgMaskStride = (fgMaskStride==0 ? srcWidth : fgMaskStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)fgMask & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (fgMaskStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= 3*srcWidth) ); // Stride is at least 3 times of Width. Input image must have 3 channels.
- fcvAssert( (fgMaskStride >= srcWidth) ); // Stride is at least as much as Width
-#endif
-
- return (**ppfcvBGCodeBookDiffu8) ( cbmodel, src, srcWidth, srcHeight, srcStride, fgMask, fgMaskStride, cbMap, numFgMask);
-}
-
-// -----------------------------------------------------------------------------
-// -----------------------------------------------------------------------------
-inline void
- fcvBGCodeBookClearStaleu8( void* __restrict cbmodel,
- int32_t staleThresh,
- const uint8_t* __restrict fgMask,
- uint32_t fgMaskWidth,
- uint32_t fgMaskHeight,
- uint32_t fgMaskStride,
- fcvBGCodeWord** __restrict cbMap )
-{
- fgMaskStride = (fgMaskStride==0 ? fgMaskWidth : fgMaskStride);
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)fgMask & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (fgMaskWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (fgMaskStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (fgMaskStride >= fgMaskWidth) ); // Stride is at least as much as Width
-#endif
- return (**ppfcvBGCodeBookClearStaleu8) ( cbmodel, staleThresh, fgMask, fgMaskWidth, fgMaskHeight, fgMaskStride, cbMap);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvHoughCircleu8( const uint8_t* __restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- fcvCircle *circles,
- uint32_t* numCircle,
- uint32_t maxCircle,
- uint32_t minDist,
- uint32_t cannyThreshold,
- uint32_t accThreshold,
- uint32_t minRadius,
- uint32_t maxRadius,
- void *data)
-{
- srcStride = (srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( ((int)(size_t)data & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcWidth & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
-#endif
-
- (**ppfcvHoughCircleu8)(src, srcWidth, srcHeight, srcStride, circles, numCircle, maxCircle, minDist, cannyThreshold, accThreshold, minRadius, maxRadius, data);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDrawContouru8(uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t nContours,
- const uint32_t *__restrict holeFlag,
- const uint32_t *__restrict numContourPoints,
- const uint32_t **__restrict contourStartPoints,
- uint32_t pointBufferSize,
- const uint32_t *__restrict pointBuffer,
- int32_t hierarchy[][4],
- uint32_t max_level,
- int32_t thickness,
- uint8_t color,
- uint8_t hole_color)
-{
- srcStride=(srcStride==0 ? srcWidth : srcStride);
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
- fcvAssert( ((int)(size_t) pointBuffer & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvDrawContouru8) (src, srcWidth, srcHeight, srcStride, nContours, holeFlag, numContourPoints, contourStartPoints, pointBufferSize, pointBuffer, hierarchy, max_level, thickness, color, hole_color);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDrawContourInterleavedu8(uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t nContours,
- const uint32_t *__restrict holeFlag,
- const uint32_t *__restrict numContourPoints,
- const uint32_t **__restrict contourStartPoints,
- uint32_t pointBufferSize,
- const uint32_t *__restrict pointBuffer,
- int32_t hierarchy[][4],
- uint32_t max_level,
- int32_t thickness,
- uint8_t colorR,
- uint8_t colorG,
- uint8_t colorB,
- uint8_t hole_colorR,
- uint8_t hole_colorG,
- uint8_t hole_colorB)
-{
- srcStride=(srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
- fcvAssert( ((int)(size_t) pointBuffer & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvDrawContourInterleavedu8)( src, srcWidth, srcHeight, srcStride, nContours, holeFlag, numContourPoints, contourStartPoints, pointBufferSize, pointBuffer, hierarchy, max_level, thickness, colorR, colorG, colorB, hole_colorR, hole_colorG, hole_colorB);
-}
-
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-
-inline void
-fcvDrawContourPlanaru8(uint8_t *__restrict src,
- uint32_t srcWidth,
- uint32_t srcHeight,
- uint32_t srcStride,
- uint32_t nContours,
- const uint32_t *__restrict holeFlag,
- const uint32_t *__restrict numContourPoints,
- const uint32_t **__restrict contourStartPoints,
- uint32_t pointBufferSize,
- const uint32_t *__restrict pointBuffer,
- int32_t hierarchy[][4],
- uint32_t max_level,
- int32_t thickness,
- uint8_t colorR,
- uint8_t colorG,
- uint8_t colorB,
- uint8_t hole_colorR,
- uint8_t hole_colorG,
- uint8_t hole_colorB)
-{
- srcStride=(srcStride==0 ? srcWidth : srcStride);
-
-#ifndef FASTCV_DISABLE_API_ENFORCEMENT
- fcvAssert( ((int)(size_t)src & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride >= srcWidth) ); // at least as much as width
- fcvAssert( ((int)(size_t) pointBuffer & 0xF) == 0 ); // 128-bit alignment
- fcvAssert( (srcStride & 0x7) == 0 ); // multiple of 8
-#endif
-
- (**ppfcvDrawContourPlanaru8)( src, srcWidth, srcHeight, srcStride, nContours, holeFlag, numContourPoints, contourStartPoints, pointBufferSize, pointBuffer, hierarchy, max_level, thickness, colorR, colorG, colorB, hole_colorR, hole_colorG, hole_colorB);
-}
diff --git a/phonelibs/fastcv/x64/include/stdint_.h b/phonelibs/fastcv/x64/include/stdint_.h
deleted file mode 100755
index d02608a59..000000000
--- a/phonelibs/fastcv/x64/include/stdint_.h
+++ /dev/null
@@ -1,247 +0,0 @@
-// ISO C9x compliant stdint.h for Microsoft Visual Studio
-// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
-//
-// Copyright (c) 2006-2008 Alexander Chemeris
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// 1. Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-//
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-//
-// 3. The name of the author may be used to endorse or promote products
-// derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _MSC_VER // [
-#error "Use this header only with Microsoft Visual C++ compilers!"
-#endif // _MSC_VER ]
-
-#ifndef _MSC_STDINT_H_ // [
-#define _MSC_STDINT_H_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif
-
-#include
-
-// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
-// compiling for ARM we should wrap include with 'extern "C++" {}'
-// or compiler give many errors like this:
-// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
-#ifdef __cplusplus
-extern "C" {
-#endif
-# include
-#ifdef __cplusplus
-}
-#endif
-
-// Define _W64 macros to mark types changing their size, like intptr_t.
-#ifndef _W64
-# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
-# define _W64 __w64
-# else
-# define _W64
-# endif
-#endif
-
-
-// 7.18.1 Integer types
-
-// 7.18.1.1 Exact-width integer types
-
-// Visual Studio 6 and Embedded Visual C++ 4 doesn't
-// realize that, e.g. char has the same size as __int8
-// so we give up on __intX for them.
-#if (_MSC_VER < 1300)
- typedef signed char int8_t;
- typedef signed short int16_t;
- typedef signed int int32_t;
- typedef unsigned char uint8_t;
- typedef unsigned short uint16_t;
- typedef unsigned int uint32_t;
-#else
- typedef signed __int8 int8_t;
- typedef signed __int16 int16_t;
- typedef signed __int32 int32_t;
- typedef unsigned __int8 uint8_t;
- typedef unsigned __int16 uint16_t;
- typedef unsigned __int32 uint32_t;
-#endif
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-
-
-// 7.18.1.2 Minimum-width integer types
-typedef int8_t int_least8_t;
-typedef int16_t int_least16_t;
-typedef int32_t int_least32_t;
-typedef int64_t int_least64_t;
-typedef uint8_t uint_least8_t;
-typedef uint16_t uint_least16_t;
-typedef uint32_t uint_least32_t;
-typedef uint64_t uint_least64_t;
-
-// 7.18.1.3 Fastest minimum-width integer types
-typedef int8_t int_fast8_t;
-typedef int16_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef int64_t int_fast64_t;
-typedef uint8_t uint_fast8_t;
-typedef uint16_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-typedef uint64_t uint_fast64_t;
-
-// 7.18.1.4 Integer types capable of holding object pointers
-#ifdef _WIN64 // [
- typedef signed __int64 intptr_t;
- typedef unsigned __int64 uintptr_t;
-#else // _WIN64 ][
- typedef _W64 signed int intptr_t;
- typedef _W64 unsigned int uintptr_t;
-#endif // _WIN64 ]
-
-// 7.18.1.5 Greatest-width integer types
-typedef int64_t intmax_t;
-typedef uint64_t uintmax_t;
-
-
-// 7.18.2 Limits of specified-width integer types
-
-#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
-
-// 7.18.2.1 Limits of exact-width integer types
-#define INT8_MIN ((int8_t)_I8_MIN)
-#define INT8_MAX _I8_MAX
-#define INT16_MIN ((int16_t)_I16_MIN)
-#define INT16_MAX _I16_MAX
-#define INT32_MIN ((int32_t)_I32_MIN)
-#define INT32_MAX _I32_MAX
-#define INT64_MIN ((int64_t)_I64_MIN)
-#define INT64_MAX _I64_MAX
-#define UINT8_MAX _UI8_MAX
-#define UINT16_MAX _UI16_MAX
-#define UINT32_MAX _UI32_MAX
-#define UINT64_MAX _UI64_MAX
-
-// 7.18.2.2 Limits of minimum-width integer types
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST8_MAX INT8_MAX
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST16_MAX INT16_MAX
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST32_MAX INT32_MAX
-#define INT_LEAST64_MIN INT64_MIN
-#define INT_LEAST64_MAX INT64_MAX
-#define UINT_LEAST8_MAX UINT8_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-#define UINT_LEAST64_MAX UINT64_MAX
-
-// 7.18.2.3 Limits of fastest minimum-width integer types
-#define INT_FAST8_MIN INT8_MIN
-#define INT_FAST8_MAX INT8_MAX
-#define INT_FAST16_MIN INT16_MIN
-#define INT_FAST16_MAX INT16_MAX
-#define INT_FAST32_MIN INT32_MIN
-#define INT_FAST32_MAX INT32_MAX
-#define INT_FAST64_MIN INT64_MIN
-#define INT_FAST64_MAX INT64_MAX
-#define UINT_FAST8_MAX UINT8_MAX
-#define UINT_FAST16_MAX UINT16_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-#define UINT_FAST64_MAX UINT64_MAX
-
-// 7.18.2.4 Limits of integer types capable of holding object pointers
-#ifdef _WIN64 // [
-# define INTPTR_MIN INT64_MIN
-# define INTPTR_MAX INT64_MAX
-# define UINTPTR_MAX UINT64_MAX
-#else // _WIN64 ][
-# define INTPTR_MIN INT32_MIN
-# define INTPTR_MAX INT32_MAX
-# define UINTPTR_MAX UINT32_MAX
-#endif // _WIN64 ]
-
-// 7.18.2.5 Limits of greatest-width integer types
-#define INTMAX_MIN INT64_MIN
-#define INTMAX_MAX INT64_MAX
-#define UINTMAX_MAX UINT64_MAX
-
-// 7.18.3 Limits of other integer types
-
-#ifdef _WIN64 // [
-# define PTRDIFF_MIN _I64_MIN
-# define PTRDIFF_MAX _I64_MAX
-#else // _WIN64 ][
-# define PTRDIFF_MIN _I32_MIN
-# define PTRDIFF_MAX _I32_MAX
-#endif // _WIN64 ]
-
-#define SIG_ATOMIC_MIN INT_MIN
-#define SIG_ATOMIC_MAX INT_MAX
-
-#ifndef SIZE_MAX // [
-# ifdef _WIN64 // [
-# define SIZE_MAX _UI64_MAX
-# else // _WIN64 ][
-# define SIZE_MAX _UI32_MAX
-# endif // _WIN64 ]
-#endif // SIZE_MAX ]
-
-// WCHAR_MIN and WCHAR_MAX are also defined in
-#ifndef WCHAR_MIN // [
-# define WCHAR_MIN 0
-#endif // WCHAR_MIN ]
-#ifndef WCHAR_MAX // [
-# define WCHAR_MAX _UI16_MAX
-#endif // WCHAR_MAX ]
-
-#define WINT_MIN 0
-#define WINT_MAX _UI16_MAX
-
-#endif // __STDC_LIMIT_MACROS ]
-
-
-// 7.18.4 Limits of other integer types
-
-#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
-
-// 7.18.4.1 Macros for minimum-width integer constants
-
-#define INT8_C(val) val##i8
-#define INT16_C(val) val##i16
-#define INT32_C(val) val##i32
-#define INT64_C(val) val##i64
-
-#define UINT8_C(val) val##ui8
-#define UINT16_C(val) val##ui16
-#define UINT32_C(val) val##ui32
-#define UINT64_C(val) val##ui64
-
-// 7.18.4.2 Macros for greatest-width integer constants
-#define INTMAX_C INT64_C
-#define UINTMAX_C UINT64_C
-
-#endif // __STDC_CONSTANT_MACROS ]
-
-
-#endif // _MSC_STDINT_H_ ]
diff --git a/phonelibs/fastcv/x64/lib/libfastcv.a b/phonelibs/fastcv/x64/lib/libfastcv.a
deleted file mode 100755
index 6d33d734e..000000000
Binary files a/phonelibs/fastcv/x64/lib/libfastcv.a and /dev/null differ
diff --git a/phonelibs/install_capnp.sh b/phonelibs/install_capnp.sh
deleted file mode 100755
index b1ea7602f..000000000
--- a/phonelibs/install_capnp.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-set -e
-echo "Installing capnp"
-
-cd /tmp
-VERSION=0.6.1
-wget https://capnproto.org/capnproto-c++-${VERSION}.tar.gz
-tar xvf capnproto-c++-${VERSION}.tar.gz
-cd capnproto-c++-${VERSION}
-CXXFLAGS="-fPIC" ./configure
-
-make -j4
-make install
-
-# manually build binaries statically
-g++ -std=gnu++11 -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -pthread -o .libs/capnp src/capnp/compiler/module-loader.o src/capnp/compiler/capnp.o ./.libs/libcapnpc.a ./.libs/libcapnp.a ./.libs/libkj.a -lpthread -pthread
-
-g++ -std=gnu++11 -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -pthread -o .libs/capnpc-c++ src/capnp/compiler/capnpc-c++.o ./.libs/libcapnp.a ./.libs/libkj.a -lpthread -pthread
-
-g++ -std=gnu++11 -I./src -I./src -DKJ_HEADER_WARNINGS -DCAPNP_HEADER_WARNINGS -DCAPNP_INCLUDE_DIR=\"/usr/local/include\" -pthread -O2 -DNDEBUG -pthread -pthread -o .libs/capnpc-capnp src/capnp/compiler/capnpc-capnp.o ./.libs/libcapnp.a ./.libs/libkj.a -lpthread -pthread
-
-cp .libs/capnp /usr/local/bin/
-rm /usr/local/bin/capnpc
-ln -s /usr/local/bin/capnp /usr/local/bin/capnpc
-cp .libs/capnpc-c++ /usr/local/bin/
-cp .libs/capnpc-capnp /usr/local/bin/
-cp .libs/*.a /usr/local/lib
-
-cd /tmp
-echo "Installing c-capnp"
-git clone https://github.com/commaai/c-capnproto.git
-cd c-capnproto
-git submodule update --init --recursive
-autoreconf -f -i -s
-CXXFLAGS="-fPIC" ./configure
-make -j4
-make install
-
-# manually build binaries statically
-gcc -fPIC -o .libs/capnpc-c compiler/capnpc-c.o compiler/schema.capnp.o compiler/str.o ./.libs/libcapnp_c.a
-
-cp .libs/capnpc-c /usr/local/bin/
-cp .libs/*.a /usr/local/lib
diff --git a/phonelibs/libyuv/LICENSE b/phonelibs/libyuv/LICENSE
deleted file mode 100644
index c911747a6..000000000
--- a/phonelibs/libyuv/LICENSE
+++ /dev/null
@@ -1,29 +0,0 @@
-Copyright 2011 The LibYuv Project Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Google nor the names of its contributors may
- be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/phonelibs/libyuv/LICENSE.libyuv b/phonelibs/libyuv/LICENSE.libyuv
deleted file mode 100644
index c911747a6..000000000
--- a/phonelibs/libyuv/LICENSE.libyuv
+++ /dev/null
@@ -1,29 +0,0 @@
-Copyright 2011 The LibYuv Project Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in
- the documentation and/or other materials provided with the
- distribution.
-
- * Neither the name of Google nor the names of its contributors may
- be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/phonelibs/libyuv/build.txt b/phonelibs/libyuv/build.txt
deleted file mode 100644
index 376e981ec..000000000
--- a/phonelibs/libyuv/build.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-git clone https://chromium.googlesource.com/libyuv/libyuv
-cd libyuv
-git reset --hard 4a14cb2e81235ecd656e799aecaaf139db8ce4a2
-cmake .
diff --git a/phonelibs/libyuv/mac/lib/libyuv.a b/phonelibs/libyuv/mac/lib/libyuv.a
deleted file mode 100644
index 4a1609ca7..000000000
Binary files a/phonelibs/libyuv/mac/lib/libyuv.a and /dev/null differ
diff --git a/phonelibs/libyuv/tx2/libyuv.a b/phonelibs/libyuv/tx2/libyuv.a
deleted file mode 100644
index bfe5b5b37..000000000
Binary files a/phonelibs/libyuv/tx2/libyuv.a and /dev/null differ
diff --git a/phonelibs/libyuv/x64/include b/phonelibs/libyuv/x64/include
deleted file mode 120000
index f5030fe88..000000000
--- a/phonelibs/libyuv/x64/include
+++ /dev/null
@@ -1 +0,0 @@
-../include
\ No newline at end of file
diff --git a/phonelibs/libyuv/x64/lib/libyuv.a b/phonelibs/libyuv/x64/lib/libyuv.a
deleted file mode 100644
index c6afc5643..000000000
Binary files a/phonelibs/libyuv/x64/lib/libyuv.a and /dev/null differ
diff --git a/phonelibs/qpoases/INCLUDE/Bounds.hpp b/phonelibs/qpoases/INCLUDE/Bounds.hpp
index 1fbd28ab3..7260756da 100644
--- a/phonelibs/qpoases/INCLUDE/Bounds.hpp
+++ b/phonelibs/qpoases/INCLUDE/Bounds.hpp
@@ -1,189 +1,189 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file INCLUDE/Bounds.hpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Declaration of the Bounds class designed to manage working sets of
- * bounds within a QProblem.
- */
-
-
-#ifndef QPOASES_BOUNDS_HPP
-#define QPOASES_BOUNDS_HPP
-
-
-#include
-
-
-
-/** This class manages working sets of bounds by storing
- * index sets and other status information.
- *
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- */
-class Bounds : public SubjectTo
-{
- /*
- * PUBLIC MEMBER FUNCTIONS
- */
- public:
- /** Default constructor. */
- Bounds( );
-
- /** Copy constructor (deep copy). */
- Bounds( const Bounds& rhs /**< Rhs object. */
- );
-
- /** Destructor. */
- ~Bounds( );
-
- /** Assignment operator (deep copy). */
- Bounds& operator=( const Bounds& rhs /**< Rhs object. */
- );
-
-
- /** Pseudo-constructor takes the number of bounds.
- * \return SUCCESSFUL_RETURN */
- returnValue init( int n /**< Number of bounds. */
- );
-
-
- /** Initially adds number of a new (i.e. not yet in the list) bound to
- * given index set.
- * \return SUCCESSFUL_RETURN \n
- RET_SETUP_BOUND_FAILED \n
- RET_INDEX_OUT_OF_BOUNDS \n
- RET_INVALID_ARGUMENTS */
- returnValue setupBound( int _number, /**< Number of new bound. */
- SubjectToStatus _status /**< Status of new bound. */
- );
-
- /** Initially adds all numbers of new (i.e. not yet in the list) bounds to
- * to the index set of free bounds; the order depends on the SujectToType
- * of each index.
- * \return SUCCESSFUL_RETURN \n
- RET_SETUP_BOUND_FAILED */
- returnValue setupAllFree( );
-
-
- /** Moves index of a bound from index list of fixed to that of free bounds.
- * \return SUCCESSFUL_RETURN \n
- RET_MOVING_BOUND_FAILED \n
- RET_INDEX_OUT_OF_BOUNDS */
- returnValue moveFixedToFree( int _number /**< Number of bound to be freed. */
- );
-
- /** Moves index of a bound from index list of free to that of fixed bounds.
- * \return SUCCESSFUL_RETURN \n
- RET_MOVING_BOUND_FAILED \n
- RET_INDEX_OUT_OF_BOUNDS */
- returnValue moveFreeToFixed( int _number, /**< Number of bound to be fixed. */
- SubjectToStatus _status /**< Status of bound to be fixed. */
- );
-
- /** Swaps the indices of two free bounds within the index set.
- * \return SUCCESSFUL_RETURN \n
- RET_SWAPINDEX_FAILED */
- returnValue swapFree( int number1, /**< Number of first constraint or bound. */
- int number2 /**< Number of second constraint or bound. */
- );
-
-
- /** Returns number of variables.
- * \return Number of variables. */
- inline int getNV( ) const;
-
- /** Returns number of implicitly fixed variables.
- * \return Number of implicitly fixed variables. */
- inline int getNFV( ) const;
-
- /** Returns number of bounded (but possibly free) variables.
- * \return Number of bounded (but possibly free) variables. */
- inline int getNBV( ) const;
-
- /** Returns number of unbounded variables.
- * \return Number of unbounded variables. */
- inline int getNUV( ) const;
-
-
- /** Sets number of implicitly fixed variables.
- * \return SUCCESSFUL_RETURN */
- inline returnValue setNFV( int n /**< Number of implicitly fixed variables. */
- );
-
- /** Sets number of bounded (but possibly free) variables.
- * \return SUCCESSFUL_RETURN */
- inline returnValue setNBV( int n /**< Number of bounded (but possibly free) variables. */
- );
-
- /** Sets number of unbounded variables.
- * \return SUCCESSFUL_RETURN */
- inline returnValue setNUV( int n /**< Number of unbounded variables */
- );
-
-
- /** Returns number of free variables.
- * \return Number of free variables. */
- inline int getNFR( );
-
- /** Returns number of fixed variables.
- * \return Number of fixed variables. */
- inline int getNFX( );
-
-
- /** Returns a pointer to free variables index list.
- * \return Pointer to free variables index list. */
- inline Indexlist* getFree( );
-
- /** Returns a pointer to fixed variables index list.
- * \return Pointer to fixed variables index list. */
- inline Indexlist* getFixed( );
-
-
- /*
- * PROTECTED MEMBER VARIABLES
- */
- protected:
- int nV; /**< Number of variables (nV = nFV + nBV + nUV). */
- int nFV; /**< Number of implicitly fixed variables. */
- int nBV; /**< Number of bounded (but possibly free) variables. */
- int nUV; /**< Number of unbounded variables. */
-
- Indexlist free; /**< Index list of free variables. */
- Indexlist fixed; /**< Index list of fixed variables. */
-};
-
-#include
-
-#endif /* QPOASES_BOUNDS_HPP */
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file INCLUDE/Bounds.hpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Declaration of the Bounds class designed to manage working sets of
+ * bounds within a QProblem.
+ */
+
+
+#ifndef QPOASES_BOUNDS_HPP
+#define QPOASES_BOUNDS_HPP
+
+
+#include
+
+
+
+/** This class manages working sets of bounds by storing
+ * index sets and other status information.
+ *
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ */
+class Bounds : public SubjectTo
+{
+ /*
+ * PUBLIC MEMBER FUNCTIONS
+ */
+ public:
+ /** Default constructor. */
+ Bounds( );
+
+ /** Copy constructor (deep copy). */
+ Bounds( const Bounds& rhs /**< Rhs object. */
+ );
+
+ /** Destructor. */
+ ~Bounds( );
+
+ /** Assignment operator (deep copy). */
+ Bounds& operator=( const Bounds& rhs /**< Rhs object. */
+ );
+
+
+ /** Pseudo-constructor takes the number of bounds.
+ * \return SUCCESSFUL_RETURN */
+ returnValue init( int n /**< Number of bounds. */
+ );
+
+
+ /** Initially adds number of a new (i.e. not yet in the list) bound to
+ * given index set.
+ * \return SUCCESSFUL_RETURN \n
+ RET_SETUP_BOUND_FAILED \n
+ RET_INDEX_OUT_OF_BOUNDS \n
+ RET_INVALID_ARGUMENTS */
+ returnValue setupBound( int _number, /**< Number of new bound. */
+ SubjectToStatus _status /**< Status of new bound. */
+ );
+
+ /** Initially adds all numbers of new (i.e. not yet in the list) bounds to
+ * to the index set of free bounds; the order depends on the SujectToType
+ * of each index.
+ * \return SUCCESSFUL_RETURN \n
+ RET_SETUP_BOUND_FAILED */
+ returnValue setupAllFree( );
+
+
+ /** Moves index of a bound from index list of fixed to that of free bounds.
+ * \return SUCCESSFUL_RETURN \n
+ RET_MOVING_BOUND_FAILED \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ returnValue moveFixedToFree( int _number /**< Number of bound to be freed. */
+ );
+
+ /** Moves index of a bound from index list of free to that of fixed bounds.
+ * \return SUCCESSFUL_RETURN \n
+ RET_MOVING_BOUND_FAILED \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ returnValue moveFreeToFixed( int _number, /**< Number of bound to be fixed. */
+ SubjectToStatus _status /**< Status of bound to be fixed. */
+ );
+
+ /** Swaps the indices of two free bounds within the index set.
+ * \return SUCCESSFUL_RETURN \n
+ RET_SWAPINDEX_FAILED */
+ returnValue swapFree( int number1, /**< Number of first constraint or bound. */
+ int number2 /**< Number of second constraint or bound. */
+ );
+
+
+ /** Returns number of variables.
+ * \return Number of variables. */
+ inline int getNV( ) const;
+
+ /** Returns number of implicitly fixed variables.
+ * \return Number of implicitly fixed variables. */
+ inline int getNFV( ) const;
+
+ /** Returns number of bounded (but possibly free) variables.
+ * \return Number of bounded (but possibly free) variables. */
+ inline int getNBV( ) const;
+
+ /** Returns number of unbounded variables.
+ * \return Number of unbounded variables. */
+ inline int getNUV( ) const;
+
+
+ /** Sets number of implicitly fixed variables.
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setNFV( int n /**< Number of implicitly fixed variables. */
+ );
+
+ /** Sets number of bounded (but possibly free) variables.
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setNBV( int n /**< Number of bounded (but possibly free) variables. */
+ );
+
+ /** Sets number of unbounded variables.
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setNUV( int n /**< Number of unbounded variables */
+ );
+
+
+ /** Returns number of free variables.
+ * \return Number of free variables. */
+ inline int getNFR( );
+
+ /** Returns number of fixed variables.
+ * \return Number of fixed variables. */
+ inline int getNFX( );
+
+
+ /** Returns a pointer to free variables index list.
+ * \return Pointer to free variables index list. */
+ inline Indexlist* getFree( );
+
+ /** Returns a pointer to fixed variables index list.
+ * \return Pointer to fixed variables index list. */
+ inline Indexlist* getFixed( );
+
+
+ /*
+ * PROTECTED MEMBER VARIABLES
+ */
+ protected:
+ int nV; /**< Number of variables (nV = nFV + nBV + nUV). */
+ int nFV; /**< Number of implicitly fixed variables. */
+ int nBV; /**< Number of bounded (but possibly free) variables. */
+ int nUV; /**< Number of unbounded variables. */
+
+ Indexlist free; /**< Index list of free variables. */
+ Indexlist fixed; /**< Index list of fixed variables. */
+};
+
+#include
+
+#endif /* QPOASES_BOUNDS_HPP */
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/INCLUDE/Constants.hpp b/phonelibs/qpoases/INCLUDE/Constants.hpp
index 8293fa514..92ee81229 100644
--- a/phonelibs/qpoases/INCLUDE/Constants.hpp
+++ b/phonelibs/qpoases/INCLUDE/Constants.hpp
@@ -1,108 +1,108 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file INCLUDE/Constants.hpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2008
- *
- * Definition of all global constants.
- */
-
-
-#ifndef QPOASES_CONSTANTS_HPP
-#define QPOASES_CONSTANTS_HPP
-
-#ifndef QPOASES_CUSTOM_INTERFACE
-#include "acado_qpoases_interface.hpp"
-#else
- #define XSTR(x) #x
- #define STR(x) XSTR(x)
- #include STR(QPOASES_CUSTOM_INTERFACE)
-#endif
-
-/** Maximum number of variables within a QP formulation.
- Note: this value has to be positive! */
-const int NVMAX = QPOASES_NVMAX;
-
-/** Maximum number of constraints within a QP formulation.
- Note: this value has to be positive! */
-const int NCMAX = QPOASES_NCMAX;
-
-/** Redefinition of NCMAX used for memory allocation, to avoid zero sized arrays
- and compiler errors. */
-const int NCMAX_ALLOC = (NCMAX == 0) ? 1 : NCMAX;
-
-/**< Maximum number of working set recalculations.
- Note: this value has to be positive! */
-const int NWSRMAX = QPOASES_NWSRMAX;
-
-/** Desired KKT tolerance of QP solution; a warning RET_INACCURATE_SOLUTION is
- * issued if this tolerance is not met.
- * Note: this value has to be positive! */
-const real_t DESIREDACCURACY = (real_t) 1.0e-3;
-
-/** Critical KKT tolerance of QP solution; an error is issued if this
- * tolerance is not met.
- * Note: this value has to be positive! */
-const real_t CRITICALACCURACY = (real_t) 1.0e-2;
-
-
-
-/** Numerical value of machine precision (min eps, s.t. 1+eps > 1).
- Note: this value has to be positive! */
-const real_t EPS = (real_t) QPOASES_EPS;
-
-/** Numerical value of zero (for situations in which it would be
- * unreasonable to compare with 0.0).
- * Note: this value has to be positive! */
-const real_t ZERO = (real_t) 1.0e-50;
-
-/** Numerical value of infinity (e.g. for non-existing bounds).
- * Note: this value has to be positive! */
-const real_t INFTY = (real_t) 1.0e12;
-
-
-/** Lower/upper (constraints') bound tolerance (an inequality constraint
- * whose lower and upper bound differ by less than BOUNDTOL is regarded
- * to be an equality constraint).
- * Note: this value has to be positive! */
-const real_t BOUNDTOL = (real_t) 1.0e-10;
-
-/** Offset for relaxing (constraints') bounds at beginning of an initial homotopy.
- * Note: this value has to be positive! */
-const real_t BOUNDRELAXATION = (real_t) 1.0e3;
-
-
-/** Factor that determines physical lengths of index lists.
- * Note: this value has to be greater than 1! */
-const int INDEXLISTFACTOR = 5;
-
-
-#endif /* QPOASES_CONSTANTS_HPP */
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file INCLUDE/Constants.hpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2008
+ *
+ * Definition of all global constants.
+ */
+
+
+#ifndef QPOASES_CONSTANTS_HPP
+#define QPOASES_CONSTANTS_HPP
+
+#ifndef QPOASES_CUSTOM_INTERFACE
+#include "acado_qpoases_interface.hpp"
+#else
+ #define XSTR(x) #x
+ #define STR(x) XSTR(x)
+ #include STR(QPOASES_CUSTOM_INTERFACE)
+#endif
+
+/** Maximum number of variables within a QP formulation.
+ Note: this value has to be positive! */
+const int NVMAX = QPOASES_NVMAX;
+
+/** Maximum number of constraints within a QP formulation.
+ Note: this value has to be positive! */
+const int NCMAX = QPOASES_NCMAX;
+
+/** Redefinition of NCMAX used for memory allocation, to avoid zero sized arrays
+ and compiler errors. */
+const int NCMAX_ALLOC = (NCMAX == 0) ? 1 : NCMAX;
+
+/**< Maximum number of working set recalculations.
+ Note: this value has to be positive! */
+const int NWSRMAX = QPOASES_NWSRMAX;
+
+/** Desired KKT tolerance of QP solution; a warning RET_INACCURATE_SOLUTION is
+ * issued if this tolerance is not met.
+ * Note: this value has to be positive! */
+const real_t DESIREDACCURACY = (real_t) 1.0e-3;
+
+/** Critical KKT tolerance of QP solution; an error is issued if this
+ * tolerance is not met.
+ * Note: this value has to be positive! */
+const real_t CRITICALACCURACY = (real_t) 1.0e-2;
+
+
+
+/** Numerical value of machine precision (min eps, s.t. 1+eps > 1).
+ Note: this value has to be positive! */
+const real_t EPS = (real_t) QPOASES_EPS;
+
+/** Numerical value of zero (for situations in which it would be
+ * unreasonable to compare with 0.0).
+ * Note: this value has to be positive! */
+const real_t ZERO = (real_t) 1.0e-50;
+
+/** Numerical value of infinity (e.g. for non-existing bounds).
+ * Note: this value has to be positive! */
+const real_t INFTY = (real_t) 1.0e12;
+
+
+/** Lower/upper (constraints') bound tolerance (an inequality constraint
+ * whose lower and upper bound differ by less than BOUNDTOL is regarded
+ * to be an equality constraint).
+ * Note: this value has to be positive! */
+const real_t BOUNDTOL = (real_t) 1.0e-10;
+
+/** Offset for relaxing (constraints') bounds at beginning of an initial homotopy.
+ * Note: this value has to be positive! */
+const real_t BOUNDRELAXATION = (real_t) 1.0e3;
+
+
+/** Factor that determines physical lengths of index lists.
+ * Note: this value has to be greater than 1! */
+const int INDEXLISTFACTOR = 5;
+
+
+#endif /* QPOASES_CONSTANTS_HPP */
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/INCLUDE/Constraints.hpp b/phonelibs/qpoases/INCLUDE/Constraints.hpp
index 0b78747e2..899167942 100644
--- a/phonelibs/qpoases/INCLUDE/Constraints.hpp
+++ b/phonelibs/qpoases/INCLUDE/Constraints.hpp
@@ -1,181 +1,181 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file INCLUDE/Constraints.hpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Declaration of the Constraints class designed to manage working sets of
- * constraints within a QProblem.
- */
-
-
-#ifndef QPOASES_CONSTRAINTS_HPP
-#define QPOASES_CONSTRAINTS_HPP
-
-
-#include
-
-
-
-/** This class manages working sets of constraints by storing
- * index sets and other status information.
- *
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- */
-class Constraints : public SubjectTo
-{
- /*
- * PUBLIC MEMBER FUNCTIONS
- */
- public:
- /** Default constructor. */
- Constraints( );
-
- /** Copy constructor (deep copy). */
- Constraints( const Constraints& rhs /**< Rhs object. */
- );
-
- /** Destructor. */
- ~Constraints( );
-
- /** Assignment operator (deep copy). */
- Constraints& operator=( const Constraints& rhs /**< Rhs object. */
- );
-
-
- /** Pseudo-constructor takes the number of constraints.
- * \return SUCCESSFUL_RETURN */
- returnValue init( int n /**< Number of constraints. */
- );
-
-
- /** Initially adds number of a new (i.e. not yet in the list) constraint to
- * a given index set.
- * \return SUCCESSFUL_RETURN \n
- RET_SETUP_CONSTRAINT_FAILED \n
- RET_INDEX_OUT_OF_BOUNDS \n
- RET_INVALID_ARGUMENTS */
- returnValue setupConstraint( int _number, /**< Number of new constraint. */
- SubjectToStatus _status /**< Status of new constraint. */
- );
-
- /** Initially adds all enabled numbers of new (i.e. not yet in the list) constraints to
- * to the index set of inactive constraints; the order depends on the SujectToType
- * of each index. Only disabled constraints are added to index set of disabled constraints!
- * \return SUCCESSFUL_RETURN \n
- RET_SETUP_CONSTRAINT_FAILED */
- returnValue setupAllInactive( );
-
-
- /** Moves index of a constraint from index list of active to that of inactive constraints.
- * \return SUCCESSFUL_RETURN \n
- RET_MOVING_CONSTRAINT_FAILED */
- returnValue moveActiveToInactive( int _number /**< Number of constraint to become inactive. */
- );
-
- /** Moves index of a constraint from index list of inactive to that of active constraints.
- * \return SUCCESSFUL_RETURN \n
- RET_MOVING_CONSTRAINT_FAILED */
- returnValue moveInactiveToActive( int _number, /**< Number of constraint to become active. */
- SubjectToStatus _status /**< Status of constraint to become active. */
- );
-
-
- /** Returns the number of constraints.
- * \return Number of constraints. */
- inline int getNC( ) const;
-
- /** Returns the number of implicit equality constraints.
- * \return Number of implicit equality constraints. */
- inline int getNEC( ) const;
-
- /** Returns the number of "real" inequality constraints.
- * \return Number of "real" inequality constraints. */
- inline int getNIC( ) const;
-
- /** Returns the number of unbounded constraints (i.e. without any bounds).
- * \return Number of unbounded constraints (i.e. without any bounds). */
- inline int getNUC( ) const;
-
-
- /** Sets number of implicit equality constraints.
- * \return SUCCESSFUL_RETURN */
- inline returnValue setNEC( int n /**< Number of implicit equality constraints. */
- );
-
- /** Sets number of "real" inequality constraints.
- * \return SUCCESSFUL_RETURN */
- inline returnValue setNIC( int n /**< Number of "real" inequality constraints. */
- );
-
- /** Sets number of unbounded constraints (i.e. without any bounds).
- * \return SUCCESSFUL_RETURN */
- inline returnValue setNUC( int n /**< Number of unbounded constraints (i.e. without any bounds). */
- );
-
-
- /** Returns the number of active constraints.
- * \return Number of constraints. */
- inline int getNAC( );
-
- /** Returns the number of inactive constraints.
- * \return Number of constraints. */
- inline int getNIAC( );
-
-
- /** Returns a pointer to active constraints index list.
- * \return Pointer to active constraints index list. */
- inline Indexlist* getActive( );
-
- /** Returns a pointer to inactive constraints index list.
- * \return Pointer to inactive constraints index list. */
- inline Indexlist* getInactive( );
-
-
- /*
- * PROTECTED MEMBER VARIABLES
- */
- protected:
- int nC; /**< Number of constraints (nC = nEC + nIC + nUC). */
- int nEC; /**< Number of implicit equality constraints. */
- int nIC; /**< Number of "real" inequality constraints. */
- int nUC; /**< Number of unbounded constraints (i.e. without any bounds). */
-
- Indexlist active; /**< Index list of active constraints. */
- Indexlist inactive; /**< Index list of inactive constraints. */
-};
-
-
-#include
-
-#endif /* QPOASES_CONSTRAINTS_HPP */
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file INCLUDE/Constraints.hpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Declaration of the Constraints class designed to manage working sets of
+ * constraints within a QProblem.
+ */
+
+
+#ifndef QPOASES_CONSTRAINTS_HPP
+#define QPOASES_CONSTRAINTS_HPP
+
+
+#include
+
+
+
+/** This class manages working sets of constraints by storing
+ * index sets and other status information.
+ *
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ */
+class Constraints : public SubjectTo
+{
+ /*
+ * PUBLIC MEMBER FUNCTIONS
+ */
+ public:
+ /** Default constructor. */
+ Constraints( );
+
+ /** Copy constructor (deep copy). */
+ Constraints( const Constraints& rhs /**< Rhs object. */
+ );
+
+ /** Destructor. */
+ ~Constraints( );
+
+ /** Assignment operator (deep copy). */
+ Constraints& operator=( const Constraints& rhs /**< Rhs object. */
+ );
+
+
+ /** Pseudo-constructor takes the number of constraints.
+ * \return SUCCESSFUL_RETURN */
+ returnValue init( int n /**< Number of constraints. */
+ );
+
+
+ /** Initially adds number of a new (i.e. not yet in the list) constraint to
+ * a given index set.
+ * \return SUCCESSFUL_RETURN \n
+ RET_SETUP_CONSTRAINT_FAILED \n
+ RET_INDEX_OUT_OF_BOUNDS \n
+ RET_INVALID_ARGUMENTS */
+ returnValue setupConstraint( int _number, /**< Number of new constraint. */
+ SubjectToStatus _status /**< Status of new constraint. */
+ );
+
+ /** Initially adds all enabled numbers of new (i.e. not yet in the list) constraints to
+ * to the index set of inactive constraints; the order depends on the SujectToType
+ * of each index. Only disabled constraints are added to index set of disabled constraints!
+ * \return SUCCESSFUL_RETURN \n
+ RET_SETUP_CONSTRAINT_FAILED */
+ returnValue setupAllInactive( );
+
+
+ /** Moves index of a constraint from index list of active to that of inactive constraints.
+ * \return SUCCESSFUL_RETURN \n
+ RET_MOVING_CONSTRAINT_FAILED */
+ returnValue moveActiveToInactive( int _number /**< Number of constraint to become inactive. */
+ );
+
+ /** Moves index of a constraint from index list of inactive to that of active constraints.
+ * \return SUCCESSFUL_RETURN \n
+ RET_MOVING_CONSTRAINT_FAILED */
+ returnValue moveInactiveToActive( int _number, /**< Number of constraint to become active. */
+ SubjectToStatus _status /**< Status of constraint to become active. */
+ );
+
+
+ /** Returns the number of constraints.
+ * \return Number of constraints. */
+ inline int getNC( ) const;
+
+ /** Returns the number of implicit equality constraints.
+ * \return Number of implicit equality constraints. */
+ inline int getNEC( ) const;
+
+ /** Returns the number of "real" inequality constraints.
+ * \return Number of "real" inequality constraints. */
+ inline int getNIC( ) const;
+
+ /** Returns the number of unbounded constraints (i.e. without any bounds).
+ * \return Number of unbounded constraints (i.e. without any bounds). */
+ inline int getNUC( ) const;
+
+
+ /** Sets number of implicit equality constraints.
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setNEC( int n /**< Number of implicit equality constraints. */
+ );
+
+ /** Sets number of "real" inequality constraints.
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setNIC( int n /**< Number of "real" inequality constraints. */
+ );
+
+ /** Sets number of unbounded constraints (i.e. without any bounds).
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setNUC( int n /**< Number of unbounded constraints (i.e. without any bounds). */
+ );
+
+
+ /** Returns the number of active constraints.
+ * \return Number of constraints. */
+ inline int getNAC( );
+
+ /** Returns the number of inactive constraints.
+ * \return Number of constraints. */
+ inline int getNIAC( );
+
+
+ /** Returns a pointer to active constraints index list.
+ * \return Pointer to active constraints index list. */
+ inline Indexlist* getActive( );
+
+ /** Returns a pointer to inactive constraints index list.
+ * \return Pointer to inactive constraints index list. */
+ inline Indexlist* getInactive( );
+
+
+ /*
+ * PROTECTED MEMBER VARIABLES
+ */
+ protected:
+ int nC; /**< Number of constraints (nC = nEC + nIC + nUC). */
+ int nEC; /**< Number of implicit equality constraints. */
+ int nIC; /**< Number of "real" inequality constraints. */
+ int nUC; /**< Number of unbounded constraints (i.e. without any bounds). */
+
+ Indexlist active; /**< Index list of active constraints. */
+ Indexlist inactive; /**< Index list of inactive constraints. */
+};
+
+
+#include
+
+#endif /* QPOASES_CONSTRAINTS_HPP */
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/INCLUDE/CyclingManager.hpp b/phonelibs/qpoases/INCLUDE/CyclingManager.hpp
index 9b5c064a0..b4410b106 100644
--- a/phonelibs/qpoases/INCLUDE/CyclingManager.hpp
+++ b/phonelibs/qpoases/INCLUDE/CyclingManager.hpp
@@ -1,126 +1,126 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file INCLUDE/CyclingManager.hpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Declaration of the CyclingManager class designed to detect
- * and handle possible cycling during QP iterations.
- */
-
-
-#ifndef QPOASES_CYCLINGMANAGER_HPP
-#define QPOASES_CYCLINGMANAGER_HPP
-
-
-#include
-
-
-
-/** This class is intended to detect and handle possible cycling during QP iterations.
- * As cycling seems to occur quite rarely, this class is NOT FULLY IMPLEMENTED YET!
- *
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- */
-class CyclingManager
-{
- /*
- * PUBLIC MEMBER FUNCTIONS
- */
- public:
- /** Default constructor. */
- CyclingManager( );
-
- /** Copy constructor (deep copy). */
- CyclingManager( const CyclingManager& rhs /**< Rhs object. */
- );
-
- /** Destructor. */
- ~CyclingManager( );
-
- /** Copy asingment operator (deep copy). */
- CyclingManager& operator=( const CyclingManager& rhs /**< Rhs object. */
- );
-
-
- /** Pseudo-constructor which takes the number of bounds/constraints.
- * \return SUCCESSFUL_RETURN */
- returnValue init( int _nV, /**< Number of bounds to be managed. */
- int _nC /**< Number of constraints to be managed. */
- );
-
-
- /** Stores index of a bound/constraint that might cause cycling.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- returnValue setCyclingStatus( int number, /**< Number of bound/constraint. */
- BooleanType isBound, /**< Flag that indicates if given number corresponds to a
- * bound (BT_TRUE) or a constraint (BT_FALSE). */
- CyclingStatus _status /**< Cycling status of bound/constraint. */
- );
-
- /** Returns if bound/constraint might cause cycling.
- * \return BT_TRUE: bound/constraint might cause cycling \n
- BT_FALSE: otherwise */
- CyclingStatus getCyclingStatus( int number, /**< Number of bound/constraint. */
- BooleanType isBound /**< Flag that indicates if given number corresponds to
- * a bound (BT_TRUE) or a constraint (BT_FALSE). */
- ) const;
-
-
- /** Clears all previous cycling information.
- * \return SUCCESSFUL_RETURN */
- returnValue clearCyclingData( );
-
-
- /** Returns if cycling was detected.
- * \return BT_TRUE iff cycling was detected. */
- inline BooleanType isCyclingDetected( ) const;
-
-
- /*
- * PROTECTED MEMBER VARIABLES
- */
- protected:
- int nV; /**< Number of managed bounds. */
- int nC; /**< Number of managed constraints. */
-
- CyclingStatus status[NVMAX+NCMAX]; /**< Array to store cycling status of all bounds/constraints. */
-
- BooleanType cyclingDetected; /**< Flag if cycling was detected. */
-};
-
-
-#include
-
-#endif /* QPOASES_CYCLINGMANAGER_HPP */
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file INCLUDE/CyclingManager.hpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Declaration of the CyclingManager class designed to detect
+ * and handle possible cycling during QP iterations.
+ */
+
+
+#ifndef QPOASES_CYCLINGMANAGER_HPP
+#define QPOASES_CYCLINGMANAGER_HPP
+
+
+#include
+
+
+
+/** This class is intended to detect and handle possible cycling during QP iterations.
+ * As cycling seems to occur quite rarely, this class is NOT FULLY IMPLEMENTED YET!
+ *
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ */
+class CyclingManager
+{
+ /*
+ * PUBLIC MEMBER FUNCTIONS
+ */
+ public:
+ /** Default constructor. */
+ CyclingManager( );
+
+ /** Copy constructor (deep copy). */
+ CyclingManager( const CyclingManager& rhs /**< Rhs object. */
+ );
+
+ /** Destructor. */
+ ~CyclingManager( );
+
+ /** Copy asingment operator (deep copy). */
+ CyclingManager& operator=( const CyclingManager& rhs /**< Rhs object. */
+ );
+
+
+ /** Pseudo-constructor which takes the number of bounds/constraints.
+ * \return SUCCESSFUL_RETURN */
+ returnValue init( int _nV, /**< Number of bounds to be managed. */
+ int _nC /**< Number of constraints to be managed. */
+ );
+
+
+ /** Stores index of a bound/constraint that might cause cycling.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ returnValue setCyclingStatus( int number, /**< Number of bound/constraint. */
+ BooleanType isBound, /**< Flag that indicates if given number corresponds to a
+ * bound (BT_TRUE) or a constraint (BT_FALSE). */
+ CyclingStatus _status /**< Cycling status of bound/constraint. */
+ );
+
+ /** Returns if bound/constraint might cause cycling.
+ * \return BT_TRUE: bound/constraint might cause cycling \n
+ BT_FALSE: otherwise */
+ CyclingStatus getCyclingStatus( int number, /**< Number of bound/constraint. */
+ BooleanType isBound /**< Flag that indicates if given number corresponds to
+ * a bound (BT_TRUE) or a constraint (BT_FALSE). */
+ ) const;
+
+
+ /** Clears all previous cycling information.
+ * \return SUCCESSFUL_RETURN */
+ returnValue clearCyclingData( );
+
+
+ /** Returns if cycling was detected.
+ * \return BT_TRUE iff cycling was detected. */
+ inline BooleanType isCyclingDetected( ) const;
+
+
+ /*
+ * PROTECTED MEMBER VARIABLES
+ */
+ protected:
+ int nV; /**< Number of managed bounds. */
+ int nC; /**< Number of managed constraints. */
+
+ CyclingStatus status[NVMAX+NCMAX]; /**< Array to store cycling status of all bounds/constraints. */
+
+ BooleanType cyclingDetected; /**< Flag if cycling was detected. */
+};
+
+
+#include
+
+#endif /* QPOASES_CYCLINGMANAGER_HPP */
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/INCLUDE/Indexlist.hpp b/phonelibs/qpoases/INCLUDE/Indexlist.hpp
index 18e3494e3..21c31ddb9 100644
--- a/phonelibs/qpoases/INCLUDE/Indexlist.hpp
+++ b/phonelibs/qpoases/INCLUDE/Indexlist.hpp
@@ -1,154 +1,154 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file INCLUDE/Indexlist.hpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Declaration of the Indexlist class designed to manage index lists of
- * constraints and bounds within a SubjectTo object.
- */
-
-
-#ifndef QPOASES_INDEXLIST_HPP
-#define QPOASES_INDEXLIST_HPP
-
-
-#include
-
-
-/** This class manages index lists.
- *
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- */
-class Indexlist
-{
- /*
- * PUBLIC MEMBER FUNCTIONS
- */
- public:
- /** Default constructor. */
- Indexlist( );
-
- /** Copy constructor (deep copy). */
- Indexlist( const Indexlist& rhs /**< Rhs object. */
- );
-
- /** Destructor. */
- ~Indexlist( );
-
- /** Assingment operator (deep copy). */
- Indexlist& operator=( const Indexlist& rhs /**< Rhs object. */
- );
-
- /** Pseudo-constructor.
- * \return SUCCESSFUL_RETURN */
- returnValue init( );
-
-
- /** Creates an array of all numbers within the index set in correct order.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEXLIST_CORRUPTED */
- returnValue getNumberArray( int* const numberarray /**< Output: Array of numbers (NULL on error). */
- ) const;
-
-
- /** Determines the index within the index list at with a given number is stored.
- * \return >= 0: Index of given number. \n
- -1: Number not found. */
- int getIndex( int givennumber /**< Number whose index shall be determined. */
- ) const;
-
- /** Determines the physical index within the index list at with a given number is stored.
- * \return >= 0: Index of given number. \n
- -1: Number not found. */
- int getPhysicalIndex( int givennumber /**< Number whose physical index shall be determined. */
- ) const;
-
- /** Returns the number stored at a given physical index.
- * \return >= 0: Number stored at given physical index. \n
- -RET_INDEXLIST_OUTOFBOUNDS */
- int getNumber( int physicalindex /**< Physical index of the number to be returned. */
- ) const;
-
-
- /** Returns the current length of the index list.
- * \return Current length of the index list. */
- inline int getLength( );
-
- /** Returns last number within the index list.
- * \return Last number within the index list. */
- inline int getLastNumber( ) const;
-
-
- /** Adds number to index list.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEXLIST_MUST_BE_REORDERD \n
- RET_INDEXLIST_EXCEEDS_MAX_LENGTH */
- returnValue addNumber( int addnumber /**< Number to be added. */
- );
-
- /** Removes number from index list.
- * \return SUCCESSFUL_RETURN */
- returnValue removeNumber( int removenumber /**< Number to be removed. */
- );
-
- /** Swaps two numbers within index list.
- * \return SUCCESSFUL_RETURN */
- returnValue swapNumbers( int number1,/**< First number for swapping. */
- int number2 /**< Second number for swapping. */
- );
-
- /** Determines if a given number is contained in the index set.
- * \return BT_TRUE iff number is contain in the index set */
- inline BooleanType isMember( int _number /**< Number to be tested for membership. */
- ) const;
-
-
- /*
- * PROTECTED MEMBER VARIABLES
- */
- protected:
- int number[INDEXLISTFACTOR*(NVMAX+NCMAX)]; /**< Array to store numbers of constraints or bounds. */
- int next[INDEXLISTFACTOR*(NVMAX+NCMAX)]; /**< Array to store physical index of successor. */
- int previous[INDEXLISTFACTOR*(NVMAX+NCMAX)]; /**< Array to store physical index of predecossor. */
- int length; /**< Length of index list. */
- int first; /**< Physical index of first element. */
- int last; /**< Physical index of last element. */
- int lastusedindex; /**< Physical index of last entry in index list. */
- int physicallength; /**< Physical length of index list. */
-};
-
-
-#include
-
-#endif /* QPOASES_INDEXLIST_HPP */
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file INCLUDE/Indexlist.hpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Declaration of the Indexlist class designed to manage index lists of
+ * constraints and bounds within a SubjectTo object.
+ */
+
+
+#ifndef QPOASES_INDEXLIST_HPP
+#define QPOASES_INDEXLIST_HPP
+
+
+#include
+
+
+/** This class manages index lists.
+ *
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ */
+class Indexlist
+{
+ /*
+ * PUBLIC MEMBER FUNCTIONS
+ */
+ public:
+ /** Default constructor. */
+ Indexlist( );
+
+ /** Copy constructor (deep copy). */
+ Indexlist( const Indexlist& rhs /**< Rhs object. */
+ );
+
+ /** Destructor. */
+ ~Indexlist( );
+
+ /** Assingment operator (deep copy). */
+ Indexlist& operator=( const Indexlist& rhs /**< Rhs object. */
+ );
+
+ /** Pseudo-constructor.
+ * \return SUCCESSFUL_RETURN */
+ returnValue init( );
+
+
+ /** Creates an array of all numbers within the index set in correct order.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEXLIST_CORRUPTED */
+ returnValue getNumberArray( int* const numberarray /**< Output: Array of numbers (NULL on error). */
+ ) const;
+
+
+ /** Determines the index within the index list at with a given number is stored.
+ * \return >= 0: Index of given number. \n
+ -1: Number not found. */
+ int getIndex( int givennumber /**< Number whose index shall be determined. */
+ ) const;
+
+ /** Determines the physical index within the index list at with a given number is stored.
+ * \return >= 0: Index of given number. \n
+ -1: Number not found. */
+ int getPhysicalIndex( int givennumber /**< Number whose physical index shall be determined. */
+ ) const;
+
+ /** Returns the number stored at a given physical index.
+ * \return >= 0: Number stored at given physical index. \n
+ -RET_INDEXLIST_OUTOFBOUNDS */
+ int getNumber( int physicalindex /**< Physical index of the number to be returned. */
+ ) const;
+
+
+ /** Returns the current length of the index list.
+ * \return Current length of the index list. */
+ inline int getLength( );
+
+ /** Returns last number within the index list.
+ * \return Last number within the index list. */
+ inline int getLastNumber( ) const;
+
+
+ /** Adds number to index list.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEXLIST_MUST_BE_REORDERD \n
+ RET_INDEXLIST_EXCEEDS_MAX_LENGTH */
+ returnValue addNumber( int addnumber /**< Number to be added. */
+ );
+
+ /** Removes number from index list.
+ * \return SUCCESSFUL_RETURN */
+ returnValue removeNumber( int removenumber /**< Number to be removed. */
+ );
+
+ /** Swaps two numbers within index list.
+ * \return SUCCESSFUL_RETURN */
+ returnValue swapNumbers( int number1,/**< First number for swapping. */
+ int number2 /**< Second number for swapping. */
+ );
+
+ /** Determines if a given number is contained in the index set.
+ * \return BT_TRUE iff number is contain in the index set */
+ inline BooleanType isMember( int _number /**< Number to be tested for membership. */
+ ) const;
+
+
+ /*
+ * PROTECTED MEMBER VARIABLES
+ */
+ protected:
+ int number[INDEXLISTFACTOR*(NVMAX+NCMAX)]; /**< Array to store numbers of constraints or bounds. */
+ int next[INDEXLISTFACTOR*(NVMAX+NCMAX)]; /**< Array to store physical index of successor. */
+ int previous[INDEXLISTFACTOR*(NVMAX+NCMAX)]; /**< Array to store physical index of predecossor. */
+ int length; /**< Length of index list. */
+ int first; /**< Physical index of first element. */
+ int last; /**< Physical index of last element. */
+ int lastusedindex; /**< Physical index of last entry in index list. */
+ int physicallength; /**< Physical length of index list. */
+};
+
+
+#include
+
+#endif /* QPOASES_INDEXLIST_HPP */
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/INCLUDE/MessageHandling.hpp b/phonelibs/qpoases/INCLUDE/MessageHandling.hpp
index f0b0c79a4..3d17498ad 100644
--- a/phonelibs/qpoases/INCLUDE/MessageHandling.hpp
+++ b/phonelibs/qpoases/INCLUDE/MessageHandling.hpp
@@ -1,415 +1,415 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file INCLUDE/MessageHandling.hpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Declaration of the MessageHandling class including global return values.
- */
-
-
-#ifndef QPOASES_MESSAGEHANDLING_HPP
-#define QPOASES_MESSAGEHANDLING_HPP
-
-// #define PC_DEBUG
-
-#ifdef PC_DEBUG
- #include
-
- /** Defines an alias for FILE from stdio.h. */
- #define myFILE FILE
- /** Defines an alias for stderr from stdio.h. */
- #define myStderr stderr
- /** Defines an alias for stdout from stdio.h. */
- #define myStdout stdout
-#else
- /** Defines an alias for FILE from stdio.h. */
- #define myFILE int
- /** Defines an alias for stderr from stdio.h. */
- #define myStderr 0
- /** Defines an alias for stdout from stdio.h. */
- #define myStdout 0
-#endif
-
-
-#include
-#include
-
-
-/** Defines symbols for global return values. \n
- * Important: All return values are assumed to be nonnegative! */
-enum returnValue
-{
-TERMINAL_LIST_ELEMENT = -1, /**< Terminal list element, internal usage only! */
-/* miscellaneous */
-SUCCESSFUL_RETURN = 0, /**< Successful return. */
-RET_DIV_BY_ZERO, /**< Division by zero. */
-RET_INDEX_OUT_OF_BOUNDS, /**< Index out of bounds. */
-RET_INVALID_ARGUMENTS, /**< At least one of the arguments is invalid. */
-RET_ERROR_UNDEFINED, /**< Error number undefined. */
-RET_WARNING_UNDEFINED, /**< Warning number undefined. */
-RET_INFO_UNDEFINED, /**< Info number undefined. */
-RET_EWI_UNDEFINED, /**< Error/warning/info number undefined. */
-RET_AVAILABLE_WITH_LINUX_ONLY, /**< This function is available under Linux only. */
-RET_UNKNOWN_BUG, /**< The error occured is not yet known. */
-RET_PRINTLEVEL_CHANGED, /**< 10 Print level changed. */
-RET_NOT_YET_IMPLEMENTED, /**< Requested function is not yet implemented in this version of qpOASES. */
-/* Indexlist */
-RET_INDEXLIST_MUST_BE_REORDERD, /**< Index list has to be reordered. */
-RET_INDEXLIST_EXCEEDS_MAX_LENGTH, /**< Index list exceeds its maximal physical length. */
-RET_INDEXLIST_CORRUPTED, /**< Index list corrupted. */
-RET_INDEXLIST_OUTOFBOUNDS, /**< Physical index is out of bounds. */
-RET_INDEXLIST_ADD_FAILED, /**< Adding indices from another index set failed. */
-RET_INDEXLIST_INTERSECT_FAILED, /**< Intersection with another index set failed. */
-/* SubjectTo / Bounds / Constraints */
-RET_INDEX_ALREADY_OF_DESIRED_STATUS, /**< Index is already of desired status. */
-RET_ADDINDEX_FAILED, /**< Cannot swap between different indexsets. */
-RET_SWAPINDEX_FAILED, /**< 20 Adding index to index set failed. */
-RET_NOTHING_TO_DO, /**< Nothing to do. */
-RET_SETUP_BOUND_FAILED, /**< Setting up bound index failed. */
-RET_SETUP_CONSTRAINT_FAILED, /**< Setting up constraint index failed. */
-RET_MOVING_BOUND_FAILED, /**< Moving bound between index sets failed. */
-RET_MOVING_CONSTRAINT_FAILED, /**< Moving constraint between index sets failed. */
-/* QProblem */
-RET_QP_ALREADY_INITIALISED, /**< QProblem has already been initialised. */
-RET_NO_INIT_WITH_STANDARD_SOLVER, /**< Initialisation via extern QP solver is not yet implemented. */
-RET_RESET_FAILED, /**< Reset failed. */
-RET_INIT_FAILED, /**< Initialisation failed. */
-RET_INIT_FAILED_TQ, /**< 30 Initialisation failed due to TQ factorisation. */
-RET_INIT_FAILED_CHOLESKY, /**< Initialisation failed due to Cholesky decomposition. */
-RET_INIT_FAILED_HOTSTART, /**< Initialisation failed! QP could not be solved! */
-RET_INIT_FAILED_INFEASIBILITY, /**< Initial QP could not be solved due to infeasibility! */
-RET_INIT_FAILED_UNBOUNDEDNESS, /**< Initial QP could not be solved due to unboundedness! */
-RET_INIT_SUCCESSFUL, /**< Initialisation done. */
-RET_OBTAINING_WORKINGSET_FAILED, /**< Failed to obtain working set for auxiliary QP. */
-RET_SETUP_WORKINGSET_FAILED, /**< Failed to setup working set for auxiliary QP. */
-RET_SETUP_AUXILIARYQP_FAILED, /**< Failed to setup auxiliary QP for initialised homotopy. */
-RET_NO_EXTERN_SOLVER, /**< No extern QP solver available. */
-RET_QP_UNBOUNDED, /**< 40 QP is unbounded. */
-RET_QP_INFEASIBLE, /**< QP is infeasible. */
-RET_QP_NOT_SOLVED, /**< Problems occured while solving QP with standard solver. */
-RET_QP_SOLVED, /**< QP successfully solved. */
-RET_UNABLE_TO_SOLVE_QP, /**< Problems occured while solving QP. */
-RET_INITIALISATION_STARTED, /**< Starting problem initialisation. */
-RET_HOTSTART_FAILED, /**< Unable to perform homotopy due to internal error. */
-RET_HOTSTART_FAILED_TO_INIT, /**< Unable to initialise problem. */
-RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED, /**< Unable to perform homotopy as previous QP is not solved. */
-RET_ITERATION_STARTED, /**< Iteration... */
-RET_SHIFT_DETERMINATION_FAILED, /**< 50 Determination of shift of the QP data failed. */
-RET_STEPDIRECTION_DETERMINATION_FAILED, /**< Determination of step direction failed. */
-RET_STEPLENGTH_DETERMINATION_FAILED, /**< Determination of step direction failed. */
-RET_OPTIMAL_SOLUTION_FOUND, /**< Optimal solution of neighbouring QP found. */
-RET_HOMOTOPY_STEP_FAILED, /**< Unable to perform homotopy step. */
-RET_HOTSTART_STOPPED_INFEASIBILITY, /**< Premature homotopy termination because QP is infeasible. */
-RET_HOTSTART_STOPPED_UNBOUNDEDNESS, /**< Premature homotopy termination because QP is unbounded. */
-RET_WORKINGSET_UPDATE_FAILED, /**< Unable to update working sets according to initial guesses. */
-RET_MAX_NWSR_REACHED, /**< Maximum number of working set recalculations performed. */
-RET_CONSTRAINTS_NOT_SPECIFIED, /**< Problem does comprise constraints! You also have to specify new constraints' bounds. */
-RET_INVALID_FACTORISATION_FLAG, /**< 60 Invalid factorisation flag. */
-RET_UNABLE_TO_SAVE_QPDATA, /**< Unable to save QP data. */
-RET_STEPDIRECTION_FAILED_TQ, /**< Abnormal termination due to TQ factorisation. */
-RET_STEPDIRECTION_FAILED_CHOLESKY, /**< Abnormal termination due to Cholesky factorisation. */
-RET_CYCLING_DETECTED, /**< Cycling detected. */
-RET_CYCLING_NOT_RESOLVED, /**< Cycling cannot be resolved, QP probably infeasible. */
-RET_CYCLING_RESOLVED, /**< Cycling probably resolved. */
-RET_STEPSIZE, /**< For displaying performed stepsize. */
-RET_STEPSIZE_NONPOSITIVE, /**< For displaying non-positive stepsize. */
-RET_SETUPSUBJECTTOTYPE_FAILED, /**< Setup of SubjectToTypes failed. */
-RET_ADDCONSTRAINT_FAILED, /**< 70 Addition of constraint to working set failed. */
-RET_ADDCONSTRAINT_FAILED_INFEASIBILITY, /**< Addition of constraint to working set failed (due to QP infeasibility). */
-RET_ADDBOUND_FAILED, /**< Addition of bound to working set failed. */
-RET_ADDBOUND_FAILED_INFEASIBILITY, /**< Addition of bound to working set failed (due to QP infeasibility). */
-RET_REMOVECONSTRAINT_FAILED, /**< Removal of constraint from working set failed. */
-RET_REMOVEBOUND_FAILED, /**< Removal of bound from working set failed. */
-RET_REMOVE_FROM_ACTIVESET, /**< Removing from active set... */
-RET_ADD_TO_ACTIVESET, /**< Adding to active set... */
-RET_REMOVE_FROM_ACTIVESET_FAILED, /**< Removing from active set failed. */
-RET_ADD_TO_ACTIVESET_FAILED, /**< Adding to active set failed. */
-RET_CONSTRAINT_ALREADY_ACTIVE, /**< 80 Constraint is already active. */
-RET_ALL_CONSTRAINTS_ACTIVE, /**< All constraints are active, no further constraint can be added. */
-RET_LINEARLY_DEPENDENT, /**< New bound/constraint is linearly dependent. */
-RET_LINEARLY_INDEPENDENT, /**< New bound/constraint is linearly independent. */
-RET_LI_RESOLVED, /**< Linear independence of active contraint matrix successfully resolved. */
-RET_ENSURELI_FAILED, /**< Failed to ensure linear indepence of active contraint matrix. */
-RET_ENSURELI_FAILED_TQ, /**< Abnormal termination due to TQ factorisation. */
-RET_ENSURELI_FAILED_NOINDEX, /**< No index found, QP probably infeasible. */
-RET_ENSURELI_FAILED_CYCLING, /**< Cycling detected, QP probably infeasible. */
-RET_BOUND_ALREADY_ACTIVE, /**< Bound is already active. */
-RET_ALL_BOUNDS_ACTIVE, /**< 90 All bounds are active, no further bound can be added. */
-RET_CONSTRAINT_NOT_ACTIVE, /**< Constraint is not active. */
-RET_BOUND_NOT_ACTIVE, /**< Bound is not active. */
-RET_HESSIAN_NOT_SPD, /**< Projected Hessian matrix not positive definite. */
-RET_MATRIX_SHIFT_FAILED, /**< Unable to update matrices or to transform vectors. */
-RET_MATRIX_FACTORISATION_FAILED, /**< Unable to calculate new matrix factorisations. */
-RET_PRINT_ITERATION_FAILED, /**< Unable to print information on current iteration. */
-RET_NO_GLOBAL_MESSAGE_OUTPUTFILE, /**< No global message output file initialised. */
-/* Utils */
-RET_UNABLE_TO_OPEN_FILE, /**< Unable to open file. */
-RET_UNABLE_TO_WRITE_FILE, /**< Unable to write into file. */
-RET_UNABLE_TO_READ_FILE, /**< 100 Unable to read from file. */
-RET_FILEDATA_INCONSISTENT, /**< File contains inconsistent data. */
-/* SolutionAnalysis */
-RET_NO_SOLUTION, /**< QP solution does not satisfy KKT optimality conditions. */
-RET_INACCURATE_SOLUTION /**< KKT optimality conditions not satisfied to sufficient accuracy. */
-};
-
-
-
-/** This class handles all kinds of messages (errors, warnings, infos) initiated
- * by qpOASES modules and stores the correspoding global preferences.
- *
- * \author Hans Joachim Ferreau (special thanks to Leonard Wirsching)
- * \version 1.3embedded
- * \date 2007-2008
- */
-class MessageHandling
-{
- /*
- * INTERNAL DATA STRUCTURES
- */
- public:
- /** Data structure for entries in global message list. */
- typedef struct {
- returnValue key; /**< Global return value. */
- const char* data; /**< Corresponding message. */
- VisibilityStatus globalVisibilityStatus; /**< Determines if message can be printed.
- * If this value is set to VS_HIDDEN, no message is printed! */
- } ReturnValueList;
-
-
- /*
- * PUBLIC MEMBER FUNCTIONS
- */
- public:
- /** Default constructor. */
- MessageHandling( );
-
- /** Constructor which takes the desired output file. */
- MessageHandling( myFILE* _outputFile /**< Output file. */
- );
-
- /** Constructor which takes the desired visibility states. */
- MessageHandling( VisibilityStatus _errorVisibility, /**< Visibility status for error messages. */
- VisibilityStatus _warningVisibility,/**< Visibility status for warning messages. */
- VisibilityStatus _infoVisibility /**< Visibility status for info messages. */
- );
-
- /** Constructor which takes the desired output file and desired visibility states. */
- MessageHandling( myFILE* _outputFile, /**< Output file. */
- VisibilityStatus _errorVisibility, /**< Visibility status for error messages. */
- VisibilityStatus _warningVisibility,/**< Visibility status for warning messages. */
- VisibilityStatus _infoVisibility /**< Visibility status for info messages. */
- );
-
- /** Copy constructor (deep copy). */
- MessageHandling( const MessageHandling& rhs /**< Rhs object. */
- );
-
- /** Destructor. */
- ~MessageHandling( );
-
- /** Assignment operator (deep copy). */
- MessageHandling& operator=( const MessageHandling& rhs /**< Rhs object. */
- );
-
-
- /** Prints an error message(a simplified macro THROWERROR is also provided). \n
- * Errors are definied as abnormal events which cause an immediate termination of the current (sub) function.
- * Errors of a sub function should be commented by the calling function by means of a warning message
- * (if this error does not cause an error of the calling function, either)!
- * \return Error number returned by sub function call
- */
- returnValue throwError(
- returnValue Enumber, /**< Error number returned by sub function call. */
- const char* additionaltext, /**< Additional error text (0, if none). */
- const char* functionname, /**< Name of function which caused the error. */
- const char* filename, /**< Name of file which caused the error. */
- const unsigned long linenumber, /**< Number of line which caused the error.incompatible binary file */
- VisibilityStatus localVisibilityStatus /**< Determines (locally) if error message can be printed to myStderr.
- * If GLOBAL visibility status of the message is set to VS_HIDDEN,
- * no message is printed, anyway! */
- );
-
- /** Prints a warning message (a simplified macro THROWWARNING is also provided).
- * Warnings are definied as abnormal events which does NOT cause an immediate termination of the current (sub) function.
- * \return Warning number returned by sub function call
- */
- returnValue throwWarning(
- returnValue Wnumber, /**< Warning number returned by sub function call. */
- const char* additionaltext, /**< Additional warning text (0, if none). */
- const char* functionname, /**< Name of function which caused the warning. */
- const char* filename, /**< Name of file which caused the warning. */
- const unsigned long linenumber, /**< Number of line which caused the warning. */
- VisibilityStatus localVisibilityStatus /**< Determines (locally) if warning message can be printed to myStderr.
- * If GLOBAL visibility status of the message is set to VS_HIDDEN,
- * no message is printed, anyway! */
- );
-
- /** Prints a info message (a simplified macro THROWINFO is also provided).
- * \return Info number returned by sub function call
- */
- returnValue throwInfo(
- returnValue Inumber, /**< Info number returned by sub function call. */
- const char* additionaltext, /**< Additional warning text (0, if none). */
- const char* functionname, /**< Name of function which submitted the info. */
- const char* filename, /**< Name of file which submitted the info. */
- const unsigned long linenumber, /**< Number of line which submitted the info. */
- VisibilityStatus localVisibilityStatus /**< Determines (locally) if info message can be printed to myStderr.
- * If GLOBAL visibility status of the message is set to VS_HIDDEN,
- * no message is printed, anyway! */
- );
-
-
- /** Resets all preferences to default values.
- * \return SUCCESSFUL_RETURN */
- returnValue reset( );
-
-
- /** Prints a complete list of all messages to output file.
- * \return SUCCESSFUL_RETURN */
- returnValue listAllMessages( );
-
-
- /** Returns visibility status for error messages.
- * \return Visibility status for error messages. */
- inline VisibilityStatus getErrorVisibilityStatus( ) const;
-
- /** Returns visibility status for warning messages.
- * \return Visibility status for warning messages. */
- inline VisibilityStatus getWarningVisibilityStatus( ) const;
-
- /** Returns visibility status for info messages.
- * \return Visibility status for info messages. */
- inline VisibilityStatus getInfoVisibilityStatus( ) const;
-
- /** Returns pointer to output file.
- * \return Pointer to output file. */
- inline myFILE* getOutputFile( ) const;
-
- /** Returns error count value.
- * \return Error count value. */
- inline int getErrorCount( ) const;
-
-
- /** Changes visibility status for error messages. */
- inline void setErrorVisibilityStatus( VisibilityStatus _errorVisibility /**< New visibility status for error messages. */
- );
-
- /** Changes visibility status for warning messages. */
- inline void setWarningVisibilityStatus( VisibilityStatus _warningVisibility /**< New visibility status for warning messages. */
- );
-
- /** Changes visibility status for info messages. */
- inline void setInfoVisibilityStatus( VisibilityStatus _infoVisibility /**< New visibility status for info messages. */
- );
-
- /** Changes output file for messages. */
- inline void setOutputFile( myFILE* _outputFile /**< New output file for messages. */
- );
-
- /** Changes error count.
- * \return SUCCESSFUL_RETURN \n
- * RET_INVALID_ARGUMENT */
- inline returnValue setErrorCount( int _errorCount /**< New error count value. */
- );
-
- /** Return the error code string. */
- static const char* getErrorString(int error);
-
- /*
- * PROTECTED MEMBER FUNCTIONS
- */
- protected:
- /** Prints a info message to myStderr (auxiliary function).
- * \return Error/warning/info number returned by sub function call
- */
- returnValue throwMessage(
- returnValue RETnumber, /**< Error/warning/info number returned by sub function call. */
- const char* additionaltext, /**< Additional warning text (0, if none). */
- const char* functionname, /**< Name of function which caused the error/warning/info. */
- const char* filename, /**< Name of file which caused the error/warning/info. */
- const unsigned long linenumber, /**< Number of line which caused the error/warning/info. */
- VisibilityStatus localVisibilityStatus, /**< Determines (locally) if info message can be printed to myStderr.
- * If GLOBAL visibility status of the message is set to VS_HIDDEN,
- * no message is printed, anyway! */
- const char* RETstring /**< Leading string of error/warning/info message. */
- );
-
-
- /*
- * PROTECTED MEMBER VARIABLES
- */
- protected:
- VisibilityStatus errorVisibility; /**< Error messages visible? */
- VisibilityStatus warningVisibility; /**< Warning messages visible? */
- VisibilityStatus infoVisibility; /**< Info messages visible? */
-
- myFILE* outputFile; /**< Output file for messages. */
-
- int errorCount; /**< Counts number of errors (for nicer output only). */
-};
-
-
-#ifndef __FUNCTION__
- /** Ensures that __FUNCTION__ macro is defined. */
- #define __FUNCTION__ 0
-#endif
-
-#ifndef __FILE__
- /** Ensures that __FILE__ macro is defined. */
- #define __FILE__ 0
-#endif
-
-#ifndef __LINE__
- /** Ensures that __LINE__ macro is defined. */
- #define __LINE__ 0
-#endif
-
-
-/** Short version of throwError with default values, only returnValue is needed */
-#define THROWERROR(retval) ( getGlobalMessageHandler( )->throwError((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )
-
-/** Short version of throwWarning with default values, only returnValue is needed */
-#define THROWWARNING(retval) ( getGlobalMessageHandler( )->throwWarning((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )
-
-/** Short version of throwInfo with default values, only returnValue is needed */
-#define THROWINFO(retval) ( getGlobalMessageHandler( )->throwInfo((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )
-
-
-/** Returns a pointer to global message handler.
- * \return Pointer to global message handler.
- */
-MessageHandling* getGlobalMessageHandler( );
-
-
-#include
-
-#endif /* QPOASES_MESSAGEHANDLING_HPP */
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file INCLUDE/MessageHandling.hpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Declaration of the MessageHandling class including global return values.
+ */
+
+
+#ifndef QPOASES_MESSAGEHANDLING_HPP
+#define QPOASES_MESSAGEHANDLING_HPP
+
+// #define PC_DEBUG
+
+#ifdef PC_DEBUG
+ #include
+
+ /** Defines an alias for FILE from stdio.h. */
+ #define myFILE FILE
+ /** Defines an alias for stderr from stdio.h. */
+ #define myStderr stderr
+ /** Defines an alias for stdout from stdio.h. */
+ #define myStdout stdout
+#else
+ /** Defines an alias for FILE from stdio.h. */
+ #define myFILE int
+ /** Defines an alias for stderr from stdio.h. */
+ #define myStderr 0
+ /** Defines an alias for stdout from stdio.h. */
+ #define myStdout 0
+#endif
+
+
+#include
+#include
+
+
+/** Defines symbols for global return values. \n
+ * Important: All return values are assumed to be nonnegative! */
+enum returnValue
+{
+TERMINAL_LIST_ELEMENT = -1, /**< Terminal list element, internal usage only! */
+/* miscellaneous */
+SUCCESSFUL_RETURN = 0, /**< Successful return. */
+RET_DIV_BY_ZERO, /**< Division by zero. */
+RET_INDEX_OUT_OF_BOUNDS, /**< Index out of bounds. */
+RET_INVALID_ARGUMENTS, /**< At least one of the arguments is invalid. */
+RET_ERROR_UNDEFINED, /**< Error number undefined. */
+RET_WARNING_UNDEFINED, /**< Warning number undefined. */
+RET_INFO_UNDEFINED, /**< Info number undefined. */
+RET_EWI_UNDEFINED, /**< Error/warning/info number undefined. */
+RET_AVAILABLE_WITH_LINUX_ONLY, /**< This function is available under Linux only. */
+RET_UNKNOWN_BUG, /**< The error occured is not yet known. */
+RET_PRINTLEVEL_CHANGED, /**< 10 Print level changed. */
+RET_NOT_YET_IMPLEMENTED, /**< Requested function is not yet implemented in this version of qpOASES. */
+/* Indexlist */
+RET_INDEXLIST_MUST_BE_REORDERD, /**< Index list has to be reordered. */
+RET_INDEXLIST_EXCEEDS_MAX_LENGTH, /**< Index list exceeds its maximal physical length. */
+RET_INDEXLIST_CORRUPTED, /**< Index list corrupted. */
+RET_INDEXLIST_OUTOFBOUNDS, /**< Physical index is out of bounds. */
+RET_INDEXLIST_ADD_FAILED, /**< Adding indices from another index set failed. */
+RET_INDEXLIST_INTERSECT_FAILED, /**< Intersection with another index set failed. */
+/* SubjectTo / Bounds / Constraints */
+RET_INDEX_ALREADY_OF_DESIRED_STATUS, /**< Index is already of desired status. */
+RET_ADDINDEX_FAILED, /**< Cannot swap between different indexsets. */
+RET_SWAPINDEX_FAILED, /**< 20 Adding index to index set failed. */
+RET_NOTHING_TO_DO, /**< Nothing to do. */
+RET_SETUP_BOUND_FAILED, /**< Setting up bound index failed. */
+RET_SETUP_CONSTRAINT_FAILED, /**< Setting up constraint index failed. */
+RET_MOVING_BOUND_FAILED, /**< Moving bound between index sets failed. */
+RET_MOVING_CONSTRAINT_FAILED, /**< Moving constraint between index sets failed. */
+/* QProblem */
+RET_QP_ALREADY_INITIALISED, /**< QProblem has already been initialised. */
+RET_NO_INIT_WITH_STANDARD_SOLVER, /**< Initialisation via extern QP solver is not yet implemented. */
+RET_RESET_FAILED, /**< Reset failed. */
+RET_INIT_FAILED, /**< Initialisation failed. */
+RET_INIT_FAILED_TQ, /**< 30 Initialisation failed due to TQ factorisation. */
+RET_INIT_FAILED_CHOLESKY, /**< Initialisation failed due to Cholesky decomposition. */
+RET_INIT_FAILED_HOTSTART, /**< Initialisation failed! QP could not be solved! */
+RET_INIT_FAILED_INFEASIBILITY, /**< Initial QP could not be solved due to infeasibility! */
+RET_INIT_FAILED_UNBOUNDEDNESS, /**< Initial QP could not be solved due to unboundedness! */
+RET_INIT_SUCCESSFUL, /**< Initialisation done. */
+RET_OBTAINING_WORKINGSET_FAILED, /**< Failed to obtain working set for auxiliary QP. */
+RET_SETUP_WORKINGSET_FAILED, /**< Failed to setup working set for auxiliary QP. */
+RET_SETUP_AUXILIARYQP_FAILED, /**< Failed to setup auxiliary QP for initialised homotopy. */
+RET_NO_EXTERN_SOLVER, /**< No extern QP solver available. */
+RET_QP_UNBOUNDED, /**< 40 QP is unbounded. */
+RET_QP_INFEASIBLE, /**< QP is infeasible. */
+RET_QP_NOT_SOLVED, /**< Problems occured while solving QP with standard solver. */
+RET_QP_SOLVED, /**< QP successfully solved. */
+RET_UNABLE_TO_SOLVE_QP, /**< Problems occured while solving QP. */
+RET_INITIALISATION_STARTED, /**< Starting problem initialisation. */
+RET_HOTSTART_FAILED, /**< Unable to perform homotopy due to internal error. */
+RET_HOTSTART_FAILED_TO_INIT, /**< Unable to initialise problem. */
+RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED, /**< Unable to perform homotopy as previous QP is not solved. */
+RET_ITERATION_STARTED, /**< Iteration... */
+RET_SHIFT_DETERMINATION_FAILED, /**< 50 Determination of shift of the QP data failed. */
+RET_STEPDIRECTION_DETERMINATION_FAILED, /**< Determination of step direction failed. */
+RET_STEPLENGTH_DETERMINATION_FAILED, /**< Determination of step direction failed. */
+RET_OPTIMAL_SOLUTION_FOUND, /**< Optimal solution of neighbouring QP found. */
+RET_HOMOTOPY_STEP_FAILED, /**< Unable to perform homotopy step. */
+RET_HOTSTART_STOPPED_INFEASIBILITY, /**< Premature homotopy termination because QP is infeasible. */
+RET_HOTSTART_STOPPED_UNBOUNDEDNESS, /**< Premature homotopy termination because QP is unbounded. */
+RET_WORKINGSET_UPDATE_FAILED, /**< Unable to update working sets according to initial guesses. */
+RET_MAX_NWSR_REACHED, /**< Maximum number of working set recalculations performed. */
+RET_CONSTRAINTS_NOT_SPECIFIED, /**< Problem does comprise constraints! You also have to specify new constraints' bounds. */
+RET_INVALID_FACTORISATION_FLAG, /**< 60 Invalid factorisation flag. */
+RET_UNABLE_TO_SAVE_QPDATA, /**< Unable to save QP data. */
+RET_STEPDIRECTION_FAILED_TQ, /**< Abnormal termination due to TQ factorisation. */
+RET_STEPDIRECTION_FAILED_CHOLESKY, /**< Abnormal termination due to Cholesky factorisation. */
+RET_CYCLING_DETECTED, /**< Cycling detected. */
+RET_CYCLING_NOT_RESOLVED, /**< Cycling cannot be resolved, QP probably infeasible. */
+RET_CYCLING_RESOLVED, /**< Cycling probably resolved. */
+RET_STEPSIZE, /**< For displaying performed stepsize. */
+RET_STEPSIZE_NONPOSITIVE, /**< For displaying non-positive stepsize. */
+RET_SETUPSUBJECTTOTYPE_FAILED, /**< Setup of SubjectToTypes failed. */
+RET_ADDCONSTRAINT_FAILED, /**< 70 Addition of constraint to working set failed. */
+RET_ADDCONSTRAINT_FAILED_INFEASIBILITY, /**< Addition of constraint to working set failed (due to QP infeasibility). */
+RET_ADDBOUND_FAILED, /**< Addition of bound to working set failed. */
+RET_ADDBOUND_FAILED_INFEASIBILITY, /**< Addition of bound to working set failed (due to QP infeasibility). */
+RET_REMOVECONSTRAINT_FAILED, /**< Removal of constraint from working set failed. */
+RET_REMOVEBOUND_FAILED, /**< Removal of bound from working set failed. */
+RET_REMOVE_FROM_ACTIVESET, /**< Removing from active set... */
+RET_ADD_TO_ACTIVESET, /**< Adding to active set... */
+RET_REMOVE_FROM_ACTIVESET_FAILED, /**< Removing from active set failed. */
+RET_ADD_TO_ACTIVESET_FAILED, /**< Adding to active set failed. */
+RET_CONSTRAINT_ALREADY_ACTIVE, /**< 80 Constraint is already active. */
+RET_ALL_CONSTRAINTS_ACTIVE, /**< All constraints are active, no further constraint can be added. */
+RET_LINEARLY_DEPENDENT, /**< New bound/constraint is linearly dependent. */
+RET_LINEARLY_INDEPENDENT, /**< New bound/constraint is linearly independent. */
+RET_LI_RESOLVED, /**< Linear independence of active contraint matrix successfully resolved. */
+RET_ENSURELI_FAILED, /**< Failed to ensure linear indepence of active contraint matrix. */
+RET_ENSURELI_FAILED_TQ, /**< Abnormal termination due to TQ factorisation. */
+RET_ENSURELI_FAILED_NOINDEX, /**< No index found, QP probably infeasible. */
+RET_ENSURELI_FAILED_CYCLING, /**< Cycling detected, QP probably infeasible. */
+RET_BOUND_ALREADY_ACTIVE, /**< Bound is already active. */
+RET_ALL_BOUNDS_ACTIVE, /**< 90 All bounds are active, no further bound can be added. */
+RET_CONSTRAINT_NOT_ACTIVE, /**< Constraint is not active. */
+RET_BOUND_NOT_ACTIVE, /**< Bound is not active. */
+RET_HESSIAN_NOT_SPD, /**< Projected Hessian matrix not positive definite. */
+RET_MATRIX_SHIFT_FAILED, /**< Unable to update matrices or to transform vectors. */
+RET_MATRIX_FACTORISATION_FAILED, /**< Unable to calculate new matrix factorisations. */
+RET_PRINT_ITERATION_FAILED, /**< Unable to print information on current iteration. */
+RET_NO_GLOBAL_MESSAGE_OUTPUTFILE, /**< No global message output file initialised. */
+/* Utils */
+RET_UNABLE_TO_OPEN_FILE, /**< Unable to open file. */
+RET_UNABLE_TO_WRITE_FILE, /**< Unable to write into file. */
+RET_UNABLE_TO_READ_FILE, /**< 100 Unable to read from file. */
+RET_FILEDATA_INCONSISTENT, /**< File contains inconsistent data. */
+/* SolutionAnalysis */
+RET_NO_SOLUTION, /**< QP solution does not satisfy KKT optimality conditions. */
+RET_INACCURATE_SOLUTION /**< KKT optimality conditions not satisfied to sufficient accuracy. */
+};
+
+
+
+/** This class handles all kinds of messages (errors, warnings, infos) initiated
+ * by qpOASES modules and stores the correspoding global preferences.
+ *
+ * \author Hans Joachim Ferreau (special thanks to Leonard Wirsching)
+ * \version 1.3embedded
+ * \date 2007-2008
+ */
+class MessageHandling
+{
+ /*
+ * INTERNAL DATA STRUCTURES
+ */
+ public:
+ /** Data structure for entries in global message list. */
+ typedef struct {
+ returnValue key; /**< Global return value. */
+ const char* data; /**< Corresponding message. */
+ VisibilityStatus globalVisibilityStatus; /**< Determines if message can be printed.
+ * If this value is set to VS_HIDDEN, no message is printed! */
+ } ReturnValueList;
+
+
+ /*
+ * PUBLIC MEMBER FUNCTIONS
+ */
+ public:
+ /** Default constructor. */
+ MessageHandling( );
+
+ /** Constructor which takes the desired output file. */
+ MessageHandling( myFILE* _outputFile /**< Output file. */
+ );
+
+ /** Constructor which takes the desired visibility states. */
+ MessageHandling( VisibilityStatus _errorVisibility, /**< Visibility status for error messages. */
+ VisibilityStatus _warningVisibility,/**< Visibility status for warning messages. */
+ VisibilityStatus _infoVisibility /**< Visibility status for info messages. */
+ );
+
+ /** Constructor which takes the desired output file and desired visibility states. */
+ MessageHandling( myFILE* _outputFile, /**< Output file. */
+ VisibilityStatus _errorVisibility, /**< Visibility status for error messages. */
+ VisibilityStatus _warningVisibility,/**< Visibility status for warning messages. */
+ VisibilityStatus _infoVisibility /**< Visibility status for info messages. */
+ );
+
+ /** Copy constructor (deep copy). */
+ MessageHandling( const MessageHandling& rhs /**< Rhs object. */
+ );
+
+ /** Destructor. */
+ ~MessageHandling( );
+
+ /** Assignment operator (deep copy). */
+ MessageHandling& operator=( const MessageHandling& rhs /**< Rhs object. */
+ );
+
+
+ /** Prints an error message(a simplified macro THROWERROR is also provided). \n
+ * Errors are definied as abnormal events which cause an immediate termination of the current (sub) function.
+ * Errors of a sub function should be commented by the calling function by means of a warning message
+ * (if this error does not cause an error of the calling function, either)!
+ * \return Error number returned by sub function call
+ */
+ returnValue throwError(
+ returnValue Enumber, /**< Error number returned by sub function call. */
+ const char* additionaltext, /**< Additional error text (0, if none). */
+ const char* functionname, /**< Name of function which caused the error. */
+ const char* filename, /**< Name of file which caused the error. */
+ const unsigned long linenumber, /**< Number of line which caused the error.incompatible binary file */
+ VisibilityStatus localVisibilityStatus /**< Determines (locally) if error message can be printed to myStderr.
+ * If GLOBAL visibility status of the message is set to VS_HIDDEN,
+ * no message is printed, anyway! */
+ );
+
+ /** Prints a warning message (a simplified macro THROWWARNING is also provided).
+ * Warnings are definied as abnormal events which does NOT cause an immediate termination of the current (sub) function.
+ * \return Warning number returned by sub function call
+ */
+ returnValue throwWarning(
+ returnValue Wnumber, /**< Warning number returned by sub function call. */
+ const char* additionaltext, /**< Additional warning text (0, if none). */
+ const char* functionname, /**< Name of function which caused the warning. */
+ const char* filename, /**< Name of file which caused the warning. */
+ const unsigned long linenumber, /**< Number of line which caused the warning. */
+ VisibilityStatus localVisibilityStatus /**< Determines (locally) if warning message can be printed to myStderr.
+ * If GLOBAL visibility status of the message is set to VS_HIDDEN,
+ * no message is printed, anyway! */
+ );
+
+ /** Prints a info message (a simplified macro THROWINFO is also provided).
+ * \return Info number returned by sub function call
+ */
+ returnValue throwInfo(
+ returnValue Inumber, /**< Info number returned by sub function call. */
+ const char* additionaltext, /**< Additional warning text (0, if none). */
+ const char* functionname, /**< Name of function which submitted the info. */
+ const char* filename, /**< Name of file which submitted the info. */
+ const unsigned long linenumber, /**< Number of line which submitted the info. */
+ VisibilityStatus localVisibilityStatus /**< Determines (locally) if info message can be printed to myStderr.
+ * If GLOBAL visibility status of the message is set to VS_HIDDEN,
+ * no message is printed, anyway! */
+ );
+
+
+ /** Resets all preferences to default values.
+ * \return SUCCESSFUL_RETURN */
+ returnValue reset( );
+
+
+ /** Prints a complete list of all messages to output file.
+ * \return SUCCESSFUL_RETURN */
+ returnValue listAllMessages( );
+
+
+ /** Returns visibility status for error messages.
+ * \return Visibility status for error messages. */
+ inline VisibilityStatus getErrorVisibilityStatus( ) const;
+
+ /** Returns visibility status for warning messages.
+ * \return Visibility status for warning messages. */
+ inline VisibilityStatus getWarningVisibilityStatus( ) const;
+
+ /** Returns visibility status for info messages.
+ * \return Visibility status for info messages. */
+ inline VisibilityStatus getInfoVisibilityStatus( ) const;
+
+ /** Returns pointer to output file.
+ * \return Pointer to output file. */
+ inline myFILE* getOutputFile( ) const;
+
+ /** Returns error count value.
+ * \return Error count value. */
+ inline int getErrorCount( ) const;
+
+
+ /** Changes visibility status for error messages. */
+ inline void setErrorVisibilityStatus( VisibilityStatus _errorVisibility /**< New visibility status for error messages. */
+ );
+
+ /** Changes visibility status for warning messages. */
+ inline void setWarningVisibilityStatus( VisibilityStatus _warningVisibility /**< New visibility status for warning messages. */
+ );
+
+ /** Changes visibility status for info messages. */
+ inline void setInfoVisibilityStatus( VisibilityStatus _infoVisibility /**< New visibility status for info messages. */
+ );
+
+ /** Changes output file for messages. */
+ inline void setOutputFile( myFILE* _outputFile /**< New output file for messages. */
+ );
+
+ /** Changes error count.
+ * \return SUCCESSFUL_RETURN \n
+ * RET_INVALID_ARGUMENT */
+ inline returnValue setErrorCount( int _errorCount /**< New error count value. */
+ );
+
+ /** Return the error code string. */
+ static const char* getErrorString(int error);
+
+ /*
+ * PROTECTED MEMBER FUNCTIONS
+ */
+ protected:
+ /** Prints a info message to myStderr (auxiliary function).
+ * \return Error/warning/info number returned by sub function call
+ */
+ returnValue throwMessage(
+ returnValue RETnumber, /**< Error/warning/info number returned by sub function call. */
+ const char* additionaltext, /**< Additional warning text (0, if none). */
+ const char* functionname, /**< Name of function which caused the error/warning/info. */
+ const char* filename, /**< Name of file which caused the error/warning/info. */
+ const unsigned long linenumber, /**< Number of line which caused the error/warning/info. */
+ VisibilityStatus localVisibilityStatus, /**< Determines (locally) if info message can be printed to myStderr.
+ * If GLOBAL visibility status of the message is set to VS_HIDDEN,
+ * no message is printed, anyway! */
+ const char* RETstring /**< Leading string of error/warning/info message. */
+ );
+
+
+ /*
+ * PROTECTED MEMBER VARIABLES
+ */
+ protected:
+ VisibilityStatus errorVisibility; /**< Error messages visible? */
+ VisibilityStatus warningVisibility; /**< Warning messages visible? */
+ VisibilityStatus infoVisibility; /**< Info messages visible? */
+
+ myFILE* outputFile; /**< Output file for messages. */
+
+ int errorCount; /**< Counts number of errors (for nicer output only). */
+};
+
+
+#ifndef __FUNCTION__
+ /** Ensures that __FUNCTION__ macro is defined. */
+ #define __FUNCTION__ 0
+#endif
+
+#ifndef __FILE__
+ /** Ensures that __FILE__ macro is defined. */
+ #define __FILE__ 0
+#endif
+
+#ifndef __LINE__
+ /** Ensures that __LINE__ macro is defined. */
+ #define __LINE__ 0
+#endif
+
+
+/** Short version of throwError with default values, only returnValue is needed */
+#define THROWERROR(retval) ( getGlobalMessageHandler( )->throwError((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )
+
+/** Short version of throwWarning with default values, only returnValue is needed */
+#define THROWWARNING(retval) ( getGlobalMessageHandler( )->throwWarning((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )
+
+/** Short version of throwInfo with default values, only returnValue is needed */
+#define THROWINFO(retval) ( getGlobalMessageHandler( )->throwInfo((retval),0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE) )
+
+
+/** Returns a pointer to global message handler.
+ * \return Pointer to global message handler.
+ */
+MessageHandling* getGlobalMessageHandler( );
+
+
+#include
+
+#endif /* QPOASES_MESSAGEHANDLING_HPP */
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/INCLUDE/QProblem.hpp b/phonelibs/qpoases/INCLUDE/QProblem.hpp
index 68fc1af9c..91dc43417 100644
--- a/phonelibs/qpoases/INCLUDE/QProblem.hpp
+++ b/phonelibs/qpoases/INCLUDE/QProblem.hpp
@@ -1,666 +1,666 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file INCLUDE/QProblem.hpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Declaration of the QProblem class which is able to use the newly
- * developed online active set strategy for parametric quadratic programming.
- */
-
-
-
-#ifndef QPOASES_QPROBLEM_HPP
-#define QPOASES_QPROBLEM_HPP
-
-
-#include
-#include
-#include
-
-
-/** A class for setting up and solving quadratic programs. The main feature is
- * the possibily to use the newly developed online active set strategy for
- * parametric quadratic programming.
- *
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- */
-class QProblem : public QProblemB
-{
- /* allow SolutionAnalysis class to access private members */
- friend class SolutionAnalysis;
-
- /*
- * PUBLIC MEMBER FUNCTIONS
- */
- public:
- /** Default constructor. */
- QProblem( );
-
- /** Constructor which takes the QP dimensions only. */
- QProblem( int _nV, /**< Number of variables. */
- int _nC /**< Number of constraints. */
- );
-
- /** Copy constructor (deep copy). */
- QProblem( const QProblem& rhs /**< Rhs object. */
- );
-
- /** Destructor. */
- ~QProblem( );
-
- /** Assignment operator (deep copy). */
- QProblem& operator=( const QProblem& rhs /**< Rhs object. */
- );
-
-
- /** Clears all data structures of QProblemB except for QP data.
- * \return SUCCESSFUL_RETURN \n
- RET_RESET_FAILED */
- returnValue reset( );
-
-
- /** Initialises a QProblem with given QP data and solves it
- * using an initial homotopy with empty working set (at most nWSR iterations).
- * \return SUCCESSFUL_RETURN \n
- RET_INIT_FAILED \n
- RET_INIT_FAILED_CHOLESKY \n
- RET_INIT_FAILED_TQ \n
- RET_INIT_FAILED_HOTSTART \n
- RET_INIT_FAILED_INFEASIBILITY \n
- RET_INIT_FAILED_UNBOUNDEDNESS \n
- RET_MAX_NWSR_REACHED \n
- RET_INVALID_ARGUMENTS \n
- RET_INACCURATE_SOLUTION \n
- RET_NO_SOLUTION */
- returnValue init( const real_t* const _H, /**< Hessian matrix. */
- const real_t* const _g, /**< Gradient vector. */
- const real_t* const _A, /**< Constraint matrix. */
- const real_t* const _lb, /**< Lower bound vector (on variables). \n
- If no lower bounds exist, a NULL pointer can be passed. */
- const real_t* const _ub, /**< Upper bound vector (on variables). \n
- If no upper bounds exist, a NULL pointer can be passed. */
- const real_t* const _lbA, /**< Lower constraints' bound vector. \n
- If no lower constraints' bounds exist, a NULL pointer can be passed. */
- const real_t* const _ubA, /**< Upper constraints' bound vector. \n
- If no lower constraints' bounds exist, a NULL pointer can be passed. */
- int& nWSR, /**< Input: Maximum number of working set recalculations when using initial homotopy.
- Output: Number of performed working set recalculations. */
- const real_t* const yOpt = 0, /**< Initial guess for dual solution vector. */
- real_t* const cputime = 0 /**< Output: CPU time required to initialise QP. */
- );
-
-
- /** Initialises a QProblem with given QP data and solves it
- * using an initial homotopy with empty working set (at most nWSR iterations).
- * \return SUCCESSFUL_RETURN \n
- RET_INIT_FAILED \n
- RET_INIT_FAILED_CHOLESKY \n
- RET_INIT_FAILED_TQ \n
- RET_INIT_FAILED_HOTSTART \n
- RET_INIT_FAILED_INFEASIBILITY \n
- RET_INIT_FAILED_UNBOUNDEDNESS \n
- RET_MAX_NWSR_REACHED \n
- RET_INVALID_ARGUMENTS \n
- RET_INACCURATE_SOLUTION \n
- RET_NO_SOLUTION */
- returnValue init( const real_t* const _H, /**< Hessian matrix. */
- const real_t* const _R, /**< Cholesky factorization of the Hessian matrix. */
- const real_t* const _g, /**< Gradient vector. */
- const real_t* const _A, /**< Constraint matrix. */
- const real_t* const _lb, /**< Lower bound vector (on variables). \n
- If no lower bounds exist, a NULL pointer can be passed. */
- const real_t* const _ub, /**< Upper bound vector (on variables). \n
- If no upper bounds exist, a NULL pointer can be passed. */
- const real_t* const _lbA, /**< Lower constraints' bound vector. \n
- If no lower constraints' bounds exist, a NULL pointer can be passed. */
- const real_t* const _ubA, /**< Upper constraints' bound vector. \n
- If no lower constraints' bounds exist, a NULL pointer can be passed. */
- int& nWSR, /**< Input: Maximum number of working set recalculations when using initial homotopy.
- Output: Number of performed working set recalculations. */
- const real_t* const yOpt = 0, /**< Initial guess for dual solution vector. */
- real_t* const cputime = 0 /**< Output: CPU time required to initialise QP. */
- );
-
-
- /** Solves QProblem using online active set strategy.
- * \return SUCCESSFUL_RETURN \n
- RET_MAX_NWSR_REACHED \n
- RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED \n
- RET_HOTSTART_FAILED \n
- RET_SHIFT_DETERMINATION_FAILED \n
- RET_STEPDIRECTION_DETERMINATION_FAILED \n
- RET_STEPLENGTH_DETERMINATION_FAILED \n
- RET_HOMOTOPY_STEP_FAILED \n
- RET_HOTSTART_STOPPED_INFEASIBILITY \n
- RET_HOTSTART_STOPPED_UNBOUNDEDNESS \n
- RET_INACCURATE_SOLUTION \n
- RET_NO_SOLUTION */
- returnValue hotstart( const real_t* const g_new, /**< Gradient of neighbouring QP to be solved. */
- const real_t* const lb_new, /**< Lower bounds of neighbouring QP to be solved. \n
- If no lower bounds exist, a NULL pointer can be passed. */
- const real_t* const ub_new, /**< Upper bounds of neighbouring QP to be solved. \n
- If no upper bounds exist, a NULL pointer can be passed. */
- const real_t* const lbA_new, /**< Lower constraints' bounds of neighbouring QP to be solved. \n
- If no lower constraints' bounds exist, a NULL pointer can be passed. */
- const real_t* const ubA_new, /**< Upper constraints' bounds of neighbouring QP to be solved. \n
- If no upper constraints' bounds exist, a NULL pointer can be passed. */
- int& nWSR, /**< Input: Maximum number of working set recalculations; \n
- Output: Number of performed working set recalculations. */
- real_t* const cputime /**< Output: CPU time required to solve QP (or to perform nWSR iterations). */
- );
-
-
- /** Returns constraint matrix of the QP (deep copy).
- * \return SUCCESSFUL_RETURN */
- inline returnValue getA( real_t* const _A /**< Array of appropriate dimension for copying constraint matrix.*/
- ) const;
-
- /** Returns a single row of constraint matrix of the QP (deep copy).
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline returnValue getA( int number, /**< Number of entry to be returned. */
- real_t* const row /**< Array of appropriate dimension for copying (number)th constraint. */
- ) const;
-
- /** Returns lower constraints' bound vector of the QP (deep copy).
- * \return SUCCESSFUL_RETURN */
- inline returnValue getLBA( real_t* const _lbA /**< Array of appropriate dimension for copying lower constraints' bound vector.*/
- ) const;
-
- /** Returns single entry of lower constraints' bound vector of the QP.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline returnValue getLBA( int number, /**< Number of entry to be returned. */
- real_t& value /**< Output: lbA[number].*/
- ) const;
-
- /** Returns upper constraints' bound vector of the QP (deep copy).
- * \return SUCCESSFUL_RETURN */
- inline returnValue getUBA( real_t* const _ubA /**< Array of appropriate dimension for copying upper constraints' bound vector.*/
- ) const;
-
- /** Returns single entry of upper constraints' bound vector of the QP.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline returnValue getUBA( int number, /**< Number of entry to be returned. */
- real_t& value /**< Output: ubA[number].*/
- ) const;
-
-
- /** Returns current constraints object of the QP (deep copy).
- * \return SUCCESSFUL_RETURN */
- inline returnValue getConstraints( Constraints* const _constraints /** Output: Constraints object. */
- ) const;
-
-
- /** Returns the number of constraints.
- * \return Number of constraints. */
- inline int getNC( ) const;
-
- /** Returns the number of (implicitly defined) equality constraints.
- * \return Number of (implicitly defined) equality constraints. */
- inline int getNEC( ) const;
-
- /** Returns the number of active constraints.
- * \return Number of active constraints. */
- inline int getNAC( );
-
- /** Returns the number of inactive constraints.
- * \return Number of inactive constraints. */
- inline int getNIAC( );
-
- /** Returns the dimension of null space.
- * \return Dimension of null space. */
- int getNZ( );
-
-
- /** Returns the dual solution vector (deep copy).
- * \return SUCCESSFUL_RETURN \n
- RET_QP_NOT_SOLVED */
- returnValue getDualSolution( real_t* const yOpt /**< Output: Dual solution vector (if QP has been solved). */
- ) const;
-
-
- /*
- * PROTECTED MEMBER FUNCTIONS
- */
- protected:
- /** Determines type of constraints and bounds (i.e. implicitly fixed, unbounded etc.).
- * \return SUCCESSFUL_RETURN \n
- RET_SETUPSUBJECTTOTYPE_FAILED */
- returnValue setupSubjectToType( );
-
- /** Computes the Cholesky decomposition R of the projected Hessian (i.e. R^T*R = Z^T*H*Z).
- * \return SUCCESSFUL_RETURN \n
- * RET_INDEXLIST_CORRUPTED */
- returnValue setupCholeskyDecompositionProjected( );
-
- /** Initialises TQ factorisation of A (i.e. A*Q = [0 T]) if NO constraint is active.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEXLIST_CORRUPTED */
- returnValue setupTQfactorisation( );
-
-
- /** Solves a QProblem whose QP data is assumed to be stored in the member variables.
- * A guess for its primal/dual optimal solution vectors and the corresponding
- * working sets of bounds and constraints can be provided.
- * \return SUCCESSFUL_RETURN \n
- RET_INIT_FAILED \n
- RET_INIT_FAILED_CHOLESKY \n
- RET_INIT_FAILED_TQ \n
- RET_INIT_FAILED_HOTSTART \n
- RET_INIT_FAILED_INFEASIBILITY \n
- RET_INIT_FAILED_UNBOUNDEDNESS \n
- RET_MAX_NWSR_REACHED */
- returnValue solveInitialQP( const real_t* const xOpt, /**< Optimal primal solution vector.
- * A NULL pointer can be passed. */
- const real_t* const yOpt, /**< Optimal dual solution vector.
- * A NULL pointer can be passed. */
- const Bounds* const guessedBounds, /**< Guessed working set of bounds for solution (xOpt,yOpt).
- * A NULL pointer can be passed. */
- const Constraints* const guessedConstraints, /**< Optimal working set of constraints for solution (xOpt,yOpt).
- * A NULL pointer can be passed. */
- int& nWSR, /**< Input: Maximum number of working set recalculations; \n
- * Output: Number of performed working set recalculations. */
- real_t* const cputime /**< Output: CPU time required to solve QP (or to perform nWSR iterations). */
- );
-
- /** Obtains the desired working set for the auxiliary initial QP in
- * accordance with the user specifications
- * (assumes that member AX has already been initialised!)
- * \return SUCCESSFUL_RETURN \n
- RET_OBTAINING_WORKINGSET_FAILED \n
- RET_INVALID_ARGUMENTS */
- returnValue obtainAuxiliaryWorkingSet( const real_t* const xOpt, /**< Optimal primal solution vector.
- * If a NULL pointer is passed, all entries are assumed to be zero. */
- const real_t* const yOpt, /**< Optimal dual solution vector.
- * If a NULL pointer is passed, all entries are assumed to be zero. */
- const Bounds* const guessedBounds, /**< Guessed working set of bounds for solution (xOpt,yOpt). */
- const Constraints* const guessedConstraints, /**< Guessed working set for solution (xOpt,yOpt). */
- Bounds* auxiliaryBounds, /**< Input: Allocated bound object. \n
- * Ouput: Working set of constraints for auxiliary QP. */
- Constraints* auxiliaryConstraints /**< Input: Allocated bound object. \n
- * Ouput: Working set for auxiliary QP. */
- ) const;
-
- /** Setups bound and constraints data structures according to auxiliaryBounds/Constraints.
- * (If the working set shall be setup afresh, make sure that
- * bounds and constraints data structure have been resetted
- * and the TQ factorisation has been initialised!)
- * \return SUCCESSFUL_RETURN \n
- RET_SETUP_WORKINGSET_FAILED \n
- RET_INVALID_ARGUMENTS \n
- RET_UNKNOWN BUG */
- returnValue setupAuxiliaryWorkingSet( const Bounds* const auxiliaryBounds, /**< Working set of bounds for auxiliary QP. */
- const Constraints* const auxiliaryConstraints, /**< Working set of constraints for auxiliary QP. */
- BooleanType setupAfresh /**< Flag indicating if given working set shall be
- * setup afresh or by updating the current one. */
- );
-
- /** Setups the optimal primal/dual solution of the auxiliary initial QP.
- * \return SUCCESSFUL_RETURN */
- returnValue setupAuxiliaryQPsolution( const real_t* const xOpt, /**< Optimal primal solution vector.
- * If a NULL pointer is passed, all entries are set to zero. */
- const real_t* const yOpt /**< Optimal dual solution vector.
- * If a NULL pointer is passed, all entries are set to zero. */
- );
-
- /** Setups gradient of the auxiliary initial QP for given
- * optimal primal/dual solution and given initial working set
- * (assumes that members X, Y and BOUNDS, CONSTRAINTS have already been initialised!).
- * \return SUCCESSFUL_RETURN */
- returnValue setupAuxiliaryQPgradient( );
-
- /** Setups (constraints') bounds of the auxiliary initial QP for given
- * optimal primal/dual solution and given initial working set
- * (assumes that members X, Y and BOUNDS, CONSTRAINTS have already been initialised!).
- * \return SUCCESSFUL_RETURN \n
- RET_UNKNOWN BUG */
- returnValue setupAuxiliaryQPbounds( const Bounds* const auxiliaryBounds, /**< Working set of bounds for auxiliary QP. */
- const Constraints* const auxiliaryConstraints, /**< Working set of constraints for auxiliary QP. */
- BooleanType useRelaxation /**< Flag indicating if inactive (constraints') bounds shall be relaxed. */
- );
-
-
- /** Adds a constraint to active set.
- * \return SUCCESSFUL_RETURN \n
- RET_ADDCONSTRAINT_FAILED \n
- RET_ADDCONSTRAINT_FAILED_INFEASIBILITY \n
- RET_ENSURELI_FAILED */
- returnValue addConstraint( int number, /**< Number of constraint to be added to active set. */
- SubjectToStatus C_status, /**< Status of new active constraint. */
- BooleanType updateCholesky /**< Flag indicating if Cholesky decomposition shall be updated. */
- );
-
- /** Checks if new active constraint to be added is linearly dependent from
- * from row of the active constraints matrix.
- * \return RET_LINEARLY_DEPENDENT \n
- RET_LINEARLY_INDEPENDENT \n
- RET_INDEXLIST_CORRUPTED */
- returnValue addConstraint_checkLI( int number /**< Number of constraint to be added to active set. */
- );
-
- /** Ensures linear independence of constraint matrix when a new constraint is added.
- * To this end a bound or constraint is removed simultaneously if necessary.
- * \return SUCCESSFUL_RETURN \n
- RET_LI_RESOLVED \n
- RET_ENSURELI_FAILED \n
- RET_ENSURELI_FAILED_TQ \n
- RET_ENSURELI_FAILED_NOINDEX \n
- RET_REMOVE_FROM_ACTIVESET */
- returnValue addConstraint_ensureLI( int number, /**< Number of constraint to be added to active set. */
- SubjectToStatus C_status /**< Status of new active bound. */
- );
-
- /** Adds a bound to active set.
- * \return SUCCESSFUL_RETURN \n
- RET_ADDBOUND_FAILED \n
- RET_ADDBOUND_FAILED_INFEASIBILITY \n
- RET_ENSURELI_FAILED */
- returnValue addBound( int number, /**< Number of bound to be added to active set. */
- SubjectToStatus B_status, /**< Status of new active bound. */
- BooleanType updateCholesky /**< Flag indicating if Cholesky decomposition shall be updated. */
- );
-
- /** Checks if new active bound to be added is linearly dependent from
- * from row of the active constraints matrix.
- * \return RET_LINEARLY_DEPENDENT \n
- RET_LINEARLY_INDEPENDENT */
- returnValue addBound_checkLI( int number /**< Number of bound to be added to active set. */
- );
-
- /** Ensures linear independence of constraint matrix when a new bound is added.
- * To this end a bound or constraint is removed simultaneously if necessary.
- * \return SUCCESSFUL_RETURN \n
- RET_LI_RESOLVED \n
- RET_ENSURELI_FAILED \n
- RET_ENSURELI_FAILED_TQ \n
- RET_ENSURELI_FAILED_NOINDEX \n
- RET_REMOVE_FROM_ACTIVESET */
- returnValue addBound_ensureLI( int number, /**< Number of bound to be added to active set. */
- SubjectToStatus B_status /**< Status of new active bound. */
- );
-
- /** Removes a constraint from active set.
- * \return SUCCESSFUL_RETURN \n
- RET_CONSTRAINT_NOT_ACTIVE \n
- RET_REMOVECONSTRAINT_FAILED \n
- RET_HESSIAN_NOT_SPD */
- returnValue removeConstraint( int number, /**< Number of constraint to be removed from active set. */
- BooleanType updateCholesky /**< Flag indicating if Cholesky decomposition shall be updated. */
- );
-
- /** Removes a bounds from active set.
- * \return SUCCESSFUL_RETURN \n
- RET_BOUND_NOT_ACTIVE \n
- RET_HESSIAN_NOT_SPD \n
- RET_REMOVEBOUND_FAILED */
- returnValue removeBound( int number, /**< Number of bound to be removed from active set. */
- BooleanType updateCholesky /**< Flag indicating if Cholesky decomposition shall be updated. */
- );
-
-
- /** Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix.
- * \return SUCCESSFUL_RETURN \n
- RET_DIV_BY_ZERO */
- returnValue backsolveR( const real_t* const b, /**< Right hand side vector. */
- BooleanType transposed, /**< Indicates if the transposed system shall be solved. */
- real_t* const a /**< Output: Solution vector */
- );
-
- /** Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix. \n
- * Special variant for the case that this function is called from within "removeBound()".
- * \return SUCCESSFUL_RETURN \n
- RET_DIV_BY_ZERO */
- returnValue backsolveR( const real_t* const b, /**< Right hand side vector. */
- BooleanType transposed, /**< Indicates if the transposed system shall be solved. */
- BooleanType removingBound, /**< Indicates if function is called from "removeBound()". */
- real_t* const a /**< Output: Solution vector */
- );
-
-
- /** Solves the system Ta = b or T^Ta = b where T is a reverse upper triangular matrix.
- * \return SUCCESSFUL_RETURN \n
- RET_DIV_BY_ZERO */
- returnValue backsolveT( const real_t* const b, /**< Right hand side vector. */
- BooleanType transposed, /**< Indicates if the transposed system shall be solved. */
- real_t* const a /**< Output: Solution vector */
- );
-
-
- /** Determines step direction of the shift of the QP data.
- * \return SUCCESSFUL_RETURN */
- returnValue hotstart_determineDataShift(const int* const FX_idx, /**< Index array of fixed variables. */
- const int* const AC_idx, /**< Index array of active constraints. */
- const real_t* const g_new, /**< New gradient vector. */
- const real_t* const lbA_new,/**< New lower constraints' bounds. */
- const real_t* const ubA_new,/**< New upper constraints' bounds. */
- const real_t* const lb_new, /**< New lower bounds. */
- const real_t* const ub_new, /**< New upper bounds. */
- real_t* const delta_g, /**< Output: Step direction of gradient vector. */
- real_t* const delta_lbA, /**< Output: Step direction of lower constraints' bounds. */
- real_t* const delta_ubA, /**< Output: Step direction of upper constraints' bounds. */
- real_t* const delta_lb, /**< Output: Step direction of lower bounds. */
- real_t* const delta_ub, /**< Output: Step direction of upper bounds. */
- BooleanType& Delta_bC_isZero,/**< Output: Indicates if active constraints' bounds are to be shifted. */
- BooleanType& Delta_bB_isZero/**< Output: Indicates if active bounds are to be shifted. */
- );
-
- /** Determines step direction of the homotopy path.
- * \return SUCCESSFUL_RETURN \n
- RET_STEPDIRECTION_FAILED_TQ \n
- RET_STEPDIRECTION_FAILED_CHOLESKY */
- returnValue hotstart_determineStepDirection(const int* const FR_idx, /**< Index array of free variables. */
- const int* const FX_idx, /**< Index array of fixed variables. */
- const int* const AC_idx, /**< Index array of active constraints. */
- const real_t* const delta_g, /**< Step direction of gradient vector. */
- const real_t* const delta_lbA, /**< Step direction of lower constraints' bounds. */
- const real_t* const delta_ubA, /**< Step direction of upper constraints' bounds. */
- const real_t* const delta_lb, /**< Step direction of lower bounds. */
- const real_t* const delta_ub, /**< Step direction of upper bounds. */
- BooleanType Delta_bC_isZero, /**< Indicates if active constraints' bounds are to be shifted. */
- BooleanType Delta_bB_isZero, /**< Indicates if active bounds are to be shifted. */
- real_t* const delta_xFX, /**< Output: Primal homotopy step direction of fixed variables. */
- real_t* const delta_xFR, /**< Output: Primal homotopy step direction of free variables. */
- real_t* const delta_yAC, /**< Output: Dual homotopy step direction of active constraints' multiplier. */
- real_t* const delta_yFX /**< Output: Dual homotopy step direction of fixed variables' multiplier. */
- );
-
- /** Determines the maximum possible step length along the homotopy path.
- * \return SUCCESSFUL_RETURN */
- returnValue hotstart_determineStepLength( const int* const FR_idx, /**< Index array of free variables. */
- const int* const FX_idx, /**< Index array of fixed variables. */
- const int* const AC_idx, /**< Index array of active constraints. */
- const int* const IAC_idx, /**< Index array of inactive constraints. */
- const real_t* const delta_lbA, /**< Step direction of lower constraints' bounds. */
- const real_t* const delta_ubA, /**< Step direction of upper constraints' bounds. */
- const real_t* const delta_lb, /**< Step direction of lower bounds. */
- const real_t* const delta_ub, /**< Step direction of upper bounds. */
- const real_t* const delta_xFX, /**< Primal homotopy step direction of fixed variables. */
- const real_t* const delta_xFR, /**< Primal homotopy step direction of free variables. */
- const real_t* const delta_yAC, /**< Dual homotopy step direction of active constraints' multiplier. */
- const real_t* const delta_yFX, /**< Dual homotopy step direction of fixed variables' multiplier. */
- real_t* const delta_Ax, /**< Output: Step in vector Ax. */
- int& BC_idx, /**< Output: Index of blocking constraint. */
- SubjectToStatus& BC_status, /**< Output: Status of blocking constraint. */
- BooleanType& BC_isBound /**< Output: Indicates if blocking constraint is a bound. */
- );
-
- /** Performs a step along the homotopy path (and updates active set).
- * \return SUCCESSFUL_RETURN \n
- RET_OPTIMAL_SOLUTION_FOUND \n
- RET_REMOVE_FROM_ACTIVESET_FAILED \n
- RET_ADD_TO_ACTIVESET_FAILED \n
- RET_QP_INFEASIBLE */
- returnValue hotstart_performStep( const int* const FR_idx, /**< Index array of free variables. */
- const int* const FX_idx, /**< Index array of fixed variables. */
- const int* const AC_idx, /**< Index array of active constraints. */
- const int* const IAC_idx, /**< Index array of inactive constraints. */
- const real_t* const delta_g, /**< Step direction of gradient vector. */
- const real_t* const delta_lbA, /**< Step direction of lower constraints' bounds. */
- const real_t* const delta_ubA, /**< Step direction of upper constraints' bounds. */
- const real_t* const delta_lb, /**< Step direction of lower bounds. */
- const real_t* const delta_ub, /**< Step direction of upper bounds. */
- const real_t* const delta_xFX, /**< Primal homotopy step direction of fixed variables. */
- const real_t* const delta_xFR, /**< Primal homotopy step direction of free variables. */
- const real_t* const delta_yAC, /**< Dual homotopy step direction of active constraints' multiplier. */
- const real_t* const delta_yFX, /**< Dual homotopy step direction of fixed variables' multiplier. */
- const real_t* const delta_Ax, /**< Step in vector Ax. */
- int BC_idx, /**< Index of blocking constraint. */
- SubjectToStatus BC_status, /**< Status of blocking constraint. */
- BooleanType BC_isBound /**< Indicates if blocking constraint is a bound. */
- );
-
-
- /** Checks if lower/upper (constraints') bounds remain consistent
- * (i.e. if lb <= ub and lbA <= ubA ) during the current step.
- * \return BT_TRUE iff (constraints") bounds remain consistent
- */
- BooleanType areBoundsConsistent( const real_t* const delta_lb, /**< Step direction of lower bounds. */
- const real_t* const delta_ub, /**< Step direction of upper bounds. */
- const real_t* const delta_lbA, /**< Step direction of lower constraints' bounds. */
- const real_t* const delta_ubA /**< Step direction of upper constraints' bounds. */
- ) const;
-
-
- /** Setups internal QP data.
- * \return SUCCESSFUL_RETURN \n
- RET_INVALID_ARGUMENTS */
- returnValue setupQPdata( const real_t* const _H, /**< Hessian matrix. */
- const real_t* const _R, /**< Cholesky factorization of the Hessian matrix. */
- const real_t* const _g, /**< Gradient vector. */
- const real_t* const _A, /**< Constraint matrix. */
- const real_t* const _lb, /**< Lower bound vector (on variables). \n
- If no lower bounds exist, a NULL pointer can be passed. */
- const real_t* const _ub, /**< Upper bound vector (on variables). \n
- If no upper bounds exist, a NULL pointer can be passed. */
- const real_t* const _lbA, /**< Lower constraints' bound vector. \n
- If no lower constraints' bounds exist, a NULL pointer can be passed. */
- const real_t* const _ubA /**< Upper constraints' bound vector. \n
- If no lower constraints' bounds exist, a NULL pointer can be passed. */
- );
-
-
- #ifdef PC_DEBUG /* Define print functions only for debugging! */
-
- /** Prints concise information on the current iteration.
- * \return SUCCESSFUL_RETURN \n */
- returnValue printIteration( int iteration, /**< Number of current iteration. */
- int BC_idx, /**< Index of blocking constraint. */
- SubjectToStatus BC_status, /**< Status of blocking constraint. */
- BooleanType BC_isBound /**< Indicates if blocking constraint is a bound. */
- );
-
- /** Prints concise information on the current iteration.
- * NOTE: ONLY DEFINED FOR SUPPRESSING A COMPILER WARNING!!
- * \return SUCCESSFUL_RETURN \n */
- returnValue printIteration( int iteration, /**< Number of current iteration. */
- int BC_idx, /**< Index of blocking bound. */
- SubjectToStatus BC_status /**< Status of blocking bound. */
- );
-
- #endif /* PC_DEBUG */
-
-
- /** Determines the maximum violation of the KKT optimality conditions
- * of the current iterate within the QProblem object.
- * \return SUCCESSFUL_RETURN \n
- * RET_INACCURATE_SOLUTION \n
- * RET_NO_SOLUTION */
- returnValue checkKKTconditions( );
-
-
- /** Sets constraint matrix of the QP. \n
- (Remark: Also internal vector Ax is recomputed!)
- * \return SUCCESSFUL_RETURN */
- inline returnValue setA( const real_t* const A_new /**< New constraint matrix (with correct dimension!). */
- );
-
- /** Changes single row of constraint matrix of the QP. \n
- (Remark: Also correponding component of internal vector Ax is recomputed!)
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline returnValue setA( int number, /**< Number of row to be changed. */
- const real_t* const value /**< New (number)th constraint (with correct dimension!). */
- );
-
-
- /** Sets constraints' lower bound vector of the QP.
- * \return SUCCESSFUL_RETURN */
- inline returnValue setLBA( const real_t* const lbA_new /**< New constraints' lower bound vector (with correct dimension!). */
- );
-
- /** Changes single entry of lower constraints' bound vector of the QP.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline returnValue setLBA( int number, /**< Number of entry to be changed. */
- real_t value /**< New value for entry of lower constraints' bound vector (with correct dimension!). */
- );
-
- /** Sets constraints' upper bound vector of the QP.
- * \return SUCCESSFUL_RETURN */
- inline returnValue setUBA( const real_t* const ubA_new /**< New constraints' upper bound vector (with correct dimension!). */
- );
-
- /** Changes single entry of upper constraints' bound vector of the QP.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline returnValue setUBA( int number, /**< Number of entry to be changed. */
- real_t value /**< New value for entry of upper constraints' bound vector (with correct dimension!). */
- );
-
-
- /*
- * PROTECTED MEMBER VARIABLES
- */
- protected:
- real_t A[NCMAX_ALLOC*NVMAX]; /**< Constraint matrix. */
- real_t lbA[NCMAX_ALLOC]; /**< Lower constraints' bound vector. */
- real_t ubA[NCMAX_ALLOC]; /**< Upper constraints' bound vector. */
-
- Constraints constraints; /**< Data structure for problem's constraints. */
-
- real_t T[NVMAX*NVMAX]; /**< Reverse triangular matrix, A = [0 T]*Q'. */
- real_t Q[NVMAX*NVMAX]; /**< Orthonormal quadratic matrix, A = [0 T]*Q'. */
- int sizeT; /**< Matrix T is stored in a (sizeT x sizeT) array. */
-
- real_t Ax[NCMAX_ALLOC]; /**< Stores the current product A*x (for increased efficiency only). */
-
- CyclingManager cyclingManager; /**< Data structure for storing (possible) cycling information (NOT YET IMPLEMENTED!). */
-};
-
-
-#include
-
-#endif /* QPOASES_QPROBLEM_HPP */
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file INCLUDE/QProblem.hpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Declaration of the QProblem class which is able to use the newly
+ * developed online active set strategy for parametric quadratic programming.
+ */
+
+
+
+#ifndef QPOASES_QPROBLEM_HPP
+#define QPOASES_QPROBLEM_HPP
+
+
+#include
+#include
+#include
+
+
+/** A class for setting up and solving quadratic programs. The main feature is
+ * the possibily to use the newly developed online active set strategy for
+ * parametric quadratic programming.
+ *
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ */
+class QProblem : public QProblemB
+{
+ /* allow SolutionAnalysis class to access private members */
+ friend class SolutionAnalysis;
+
+ /*
+ * PUBLIC MEMBER FUNCTIONS
+ */
+ public:
+ /** Default constructor. */
+ QProblem( );
+
+ /** Constructor which takes the QP dimensions only. */
+ QProblem( int _nV, /**< Number of variables. */
+ int _nC /**< Number of constraints. */
+ );
+
+ /** Copy constructor (deep copy). */
+ QProblem( const QProblem& rhs /**< Rhs object. */
+ );
+
+ /** Destructor. */
+ ~QProblem( );
+
+ /** Assignment operator (deep copy). */
+ QProblem& operator=( const QProblem& rhs /**< Rhs object. */
+ );
+
+
+ /** Clears all data structures of QProblemB except for QP data.
+ * \return SUCCESSFUL_RETURN \n
+ RET_RESET_FAILED */
+ returnValue reset( );
+
+
+ /** Initialises a QProblem with given QP data and solves it
+ * using an initial homotopy with empty working set (at most nWSR iterations).
+ * \return SUCCESSFUL_RETURN \n
+ RET_INIT_FAILED \n
+ RET_INIT_FAILED_CHOLESKY \n
+ RET_INIT_FAILED_TQ \n
+ RET_INIT_FAILED_HOTSTART \n
+ RET_INIT_FAILED_INFEASIBILITY \n
+ RET_INIT_FAILED_UNBOUNDEDNESS \n
+ RET_MAX_NWSR_REACHED \n
+ RET_INVALID_ARGUMENTS \n
+ RET_INACCURATE_SOLUTION \n
+ RET_NO_SOLUTION */
+ returnValue init( const real_t* const _H, /**< Hessian matrix. */
+ const real_t* const _g, /**< Gradient vector. */
+ const real_t* const _A, /**< Constraint matrix. */
+ const real_t* const _lb, /**< Lower bound vector (on variables). \n
+ If no lower bounds exist, a NULL pointer can be passed. */
+ const real_t* const _ub, /**< Upper bound vector (on variables). \n
+ If no upper bounds exist, a NULL pointer can be passed. */
+ const real_t* const _lbA, /**< Lower constraints' bound vector. \n
+ If no lower constraints' bounds exist, a NULL pointer can be passed. */
+ const real_t* const _ubA, /**< Upper constraints' bound vector. \n
+ If no lower constraints' bounds exist, a NULL pointer can be passed. */
+ int& nWSR, /**< Input: Maximum number of working set recalculations when using initial homotopy.
+ Output: Number of performed working set recalculations. */
+ const real_t* const yOpt = 0, /**< Initial guess for dual solution vector. */
+ real_t* const cputime = 0 /**< Output: CPU time required to initialise QP. */
+ );
+
+
+ /** Initialises a QProblem with given QP data and solves it
+ * using an initial homotopy with empty working set (at most nWSR iterations).
+ * \return SUCCESSFUL_RETURN \n
+ RET_INIT_FAILED \n
+ RET_INIT_FAILED_CHOLESKY \n
+ RET_INIT_FAILED_TQ \n
+ RET_INIT_FAILED_HOTSTART \n
+ RET_INIT_FAILED_INFEASIBILITY \n
+ RET_INIT_FAILED_UNBOUNDEDNESS \n
+ RET_MAX_NWSR_REACHED \n
+ RET_INVALID_ARGUMENTS \n
+ RET_INACCURATE_SOLUTION \n
+ RET_NO_SOLUTION */
+ returnValue init( const real_t* const _H, /**< Hessian matrix. */
+ const real_t* const _R, /**< Cholesky factorization of the Hessian matrix. */
+ const real_t* const _g, /**< Gradient vector. */
+ const real_t* const _A, /**< Constraint matrix. */
+ const real_t* const _lb, /**< Lower bound vector (on variables). \n
+ If no lower bounds exist, a NULL pointer can be passed. */
+ const real_t* const _ub, /**< Upper bound vector (on variables). \n
+ If no upper bounds exist, a NULL pointer can be passed. */
+ const real_t* const _lbA, /**< Lower constraints' bound vector. \n
+ If no lower constraints' bounds exist, a NULL pointer can be passed. */
+ const real_t* const _ubA, /**< Upper constraints' bound vector. \n
+ If no lower constraints' bounds exist, a NULL pointer can be passed. */
+ int& nWSR, /**< Input: Maximum number of working set recalculations when using initial homotopy.
+ Output: Number of performed working set recalculations. */
+ const real_t* const yOpt = 0, /**< Initial guess for dual solution vector. */
+ real_t* const cputime = 0 /**< Output: CPU time required to initialise QP. */
+ );
+
+
+ /** Solves QProblem using online active set strategy.
+ * \return SUCCESSFUL_RETURN \n
+ RET_MAX_NWSR_REACHED \n
+ RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED \n
+ RET_HOTSTART_FAILED \n
+ RET_SHIFT_DETERMINATION_FAILED \n
+ RET_STEPDIRECTION_DETERMINATION_FAILED \n
+ RET_STEPLENGTH_DETERMINATION_FAILED \n
+ RET_HOMOTOPY_STEP_FAILED \n
+ RET_HOTSTART_STOPPED_INFEASIBILITY \n
+ RET_HOTSTART_STOPPED_UNBOUNDEDNESS \n
+ RET_INACCURATE_SOLUTION \n
+ RET_NO_SOLUTION */
+ returnValue hotstart( const real_t* const g_new, /**< Gradient of neighbouring QP to be solved. */
+ const real_t* const lb_new, /**< Lower bounds of neighbouring QP to be solved. \n
+ If no lower bounds exist, a NULL pointer can be passed. */
+ const real_t* const ub_new, /**< Upper bounds of neighbouring QP to be solved. \n
+ If no upper bounds exist, a NULL pointer can be passed. */
+ const real_t* const lbA_new, /**< Lower constraints' bounds of neighbouring QP to be solved. \n
+ If no lower constraints' bounds exist, a NULL pointer can be passed. */
+ const real_t* const ubA_new, /**< Upper constraints' bounds of neighbouring QP to be solved. \n
+ If no upper constraints' bounds exist, a NULL pointer can be passed. */
+ int& nWSR, /**< Input: Maximum number of working set recalculations; \n
+ Output: Number of performed working set recalculations. */
+ real_t* const cputime /**< Output: CPU time required to solve QP (or to perform nWSR iterations). */
+ );
+
+
+ /** Returns constraint matrix of the QP (deep copy).
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue getA( real_t* const _A /**< Array of appropriate dimension for copying constraint matrix.*/
+ ) const;
+
+ /** Returns a single row of constraint matrix of the QP (deep copy).
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline returnValue getA( int number, /**< Number of entry to be returned. */
+ real_t* const row /**< Array of appropriate dimension for copying (number)th constraint. */
+ ) const;
+
+ /** Returns lower constraints' bound vector of the QP (deep copy).
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue getLBA( real_t* const _lbA /**< Array of appropriate dimension for copying lower constraints' bound vector.*/
+ ) const;
+
+ /** Returns single entry of lower constraints' bound vector of the QP.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline returnValue getLBA( int number, /**< Number of entry to be returned. */
+ real_t& value /**< Output: lbA[number].*/
+ ) const;
+
+ /** Returns upper constraints' bound vector of the QP (deep copy).
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue getUBA( real_t* const _ubA /**< Array of appropriate dimension for copying upper constraints' bound vector.*/
+ ) const;
+
+ /** Returns single entry of upper constraints' bound vector of the QP.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline returnValue getUBA( int number, /**< Number of entry to be returned. */
+ real_t& value /**< Output: ubA[number].*/
+ ) const;
+
+
+ /** Returns current constraints object of the QP (deep copy).
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue getConstraints( Constraints* const _constraints /** Output: Constraints object. */
+ ) const;
+
+
+ /** Returns the number of constraints.
+ * \return Number of constraints. */
+ inline int getNC( ) const;
+
+ /** Returns the number of (implicitly defined) equality constraints.
+ * \return Number of (implicitly defined) equality constraints. */
+ inline int getNEC( ) const;
+
+ /** Returns the number of active constraints.
+ * \return Number of active constraints. */
+ inline int getNAC( );
+
+ /** Returns the number of inactive constraints.
+ * \return Number of inactive constraints. */
+ inline int getNIAC( );
+
+ /** Returns the dimension of null space.
+ * \return Dimension of null space. */
+ int getNZ( );
+
+
+ /** Returns the dual solution vector (deep copy).
+ * \return SUCCESSFUL_RETURN \n
+ RET_QP_NOT_SOLVED */
+ returnValue getDualSolution( real_t* const yOpt /**< Output: Dual solution vector (if QP has been solved). */
+ ) const;
+
+
+ /*
+ * PROTECTED MEMBER FUNCTIONS
+ */
+ protected:
+ /** Determines type of constraints and bounds (i.e. implicitly fixed, unbounded etc.).
+ * \return SUCCESSFUL_RETURN \n
+ RET_SETUPSUBJECTTOTYPE_FAILED */
+ returnValue setupSubjectToType( );
+
+ /** Computes the Cholesky decomposition R of the projected Hessian (i.e. R^T*R = Z^T*H*Z).
+ * \return SUCCESSFUL_RETURN \n
+ * RET_INDEXLIST_CORRUPTED */
+ returnValue setupCholeskyDecompositionProjected( );
+
+ /** Initialises TQ factorisation of A (i.e. A*Q = [0 T]) if NO constraint is active.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEXLIST_CORRUPTED */
+ returnValue setupTQfactorisation( );
+
+
+ /** Solves a QProblem whose QP data is assumed to be stored in the member variables.
+ * A guess for its primal/dual optimal solution vectors and the corresponding
+ * working sets of bounds and constraints can be provided.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INIT_FAILED \n
+ RET_INIT_FAILED_CHOLESKY \n
+ RET_INIT_FAILED_TQ \n
+ RET_INIT_FAILED_HOTSTART \n
+ RET_INIT_FAILED_INFEASIBILITY \n
+ RET_INIT_FAILED_UNBOUNDEDNESS \n
+ RET_MAX_NWSR_REACHED */
+ returnValue solveInitialQP( const real_t* const xOpt, /**< Optimal primal solution vector.
+ * A NULL pointer can be passed. */
+ const real_t* const yOpt, /**< Optimal dual solution vector.
+ * A NULL pointer can be passed. */
+ const Bounds* const guessedBounds, /**< Guessed working set of bounds for solution (xOpt,yOpt).
+ * A NULL pointer can be passed. */
+ const Constraints* const guessedConstraints, /**< Optimal working set of constraints for solution (xOpt,yOpt).
+ * A NULL pointer can be passed. */
+ int& nWSR, /**< Input: Maximum number of working set recalculations; \n
+ * Output: Number of performed working set recalculations. */
+ real_t* const cputime /**< Output: CPU time required to solve QP (or to perform nWSR iterations). */
+ );
+
+ /** Obtains the desired working set for the auxiliary initial QP in
+ * accordance with the user specifications
+ * (assumes that member AX has already been initialised!)
+ * \return SUCCESSFUL_RETURN \n
+ RET_OBTAINING_WORKINGSET_FAILED \n
+ RET_INVALID_ARGUMENTS */
+ returnValue obtainAuxiliaryWorkingSet( const real_t* const xOpt, /**< Optimal primal solution vector.
+ * If a NULL pointer is passed, all entries are assumed to be zero. */
+ const real_t* const yOpt, /**< Optimal dual solution vector.
+ * If a NULL pointer is passed, all entries are assumed to be zero. */
+ const Bounds* const guessedBounds, /**< Guessed working set of bounds for solution (xOpt,yOpt). */
+ const Constraints* const guessedConstraints, /**< Guessed working set for solution (xOpt,yOpt). */
+ Bounds* auxiliaryBounds, /**< Input: Allocated bound object. \n
+ * Ouput: Working set of constraints for auxiliary QP. */
+ Constraints* auxiliaryConstraints /**< Input: Allocated bound object. \n
+ * Ouput: Working set for auxiliary QP. */
+ ) const;
+
+ /** Setups bound and constraints data structures according to auxiliaryBounds/Constraints.
+ * (If the working set shall be setup afresh, make sure that
+ * bounds and constraints data structure have been resetted
+ * and the TQ factorisation has been initialised!)
+ * \return SUCCESSFUL_RETURN \n
+ RET_SETUP_WORKINGSET_FAILED \n
+ RET_INVALID_ARGUMENTS \n
+ RET_UNKNOWN BUG */
+ returnValue setupAuxiliaryWorkingSet( const Bounds* const auxiliaryBounds, /**< Working set of bounds for auxiliary QP. */
+ const Constraints* const auxiliaryConstraints, /**< Working set of constraints for auxiliary QP. */
+ BooleanType setupAfresh /**< Flag indicating if given working set shall be
+ * setup afresh or by updating the current one. */
+ );
+
+ /** Setups the optimal primal/dual solution of the auxiliary initial QP.
+ * \return SUCCESSFUL_RETURN */
+ returnValue setupAuxiliaryQPsolution( const real_t* const xOpt, /**< Optimal primal solution vector.
+ * If a NULL pointer is passed, all entries are set to zero. */
+ const real_t* const yOpt /**< Optimal dual solution vector.
+ * If a NULL pointer is passed, all entries are set to zero. */
+ );
+
+ /** Setups gradient of the auxiliary initial QP for given
+ * optimal primal/dual solution and given initial working set
+ * (assumes that members X, Y and BOUNDS, CONSTRAINTS have already been initialised!).
+ * \return SUCCESSFUL_RETURN */
+ returnValue setupAuxiliaryQPgradient( );
+
+ /** Setups (constraints') bounds of the auxiliary initial QP for given
+ * optimal primal/dual solution and given initial working set
+ * (assumes that members X, Y and BOUNDS, CONSTRAINTS have already been initialised!).
+ * \return SUCCESSFUL_RETURN \n
+ RET_UNKNOWN BUG */
+ returnValue setupAuxiliaryQPbounds( const Bounds* const auxiliaryBounds, /**< Working set of bounds for auxiliary QP. */
+ const Constraints* const auxiliaryConstraints, /**< Working set of constraints for auxiliary QP. */
+ BooleanType useRelaxation /**< Flag indicating if inactive (constraints') bounds shall be relaxed. */
+ );
+
+
+ /** Adds a constraint to active set.
+ * \return SUCCESSFUL_RETURN \n
+ RET_ADDCONSTRAINT_FAILED \n
+ RET_ADDCONSTRAINT_FAILED_INFEASIBILITY \n
+ RET_ENSURELI_FAILED */
+ returnValue addConstraint( int number, /**< Number of constraint to be added to active set. */
+ SubjectToStatus C_status, /**< Status of new active constraint. */
+ BooleanType updateCholesky /**< Flag indicating if Cholesky decomposition shall be updated. */
+ );
+
+ /** Checks if new active constraint to be added is linearly dependent from
+ * from row of the active constraints matrix.
+ * \return RET_LINEARLY_DEPENDENT \n
+ RET_LINEARLY_INDEPENDENT \n
+ RET_INDEXLIST_CORRUPTED */
+ returnValue addConstraint_checkLI( int number /**< Number of constraint to be added to active set. */
+ );
+
+ /** Ensures linear independence of constraint matrix when a new constraint is added.
+ * To this end a bound or constraint is removed simultaneously if necessary.
+ * \return SUCCESSFUL_RETURN \n
+ RET_LI_RESOLVED \n
+ RET_ENSURELI_FAILED \n
+ RET_ENSURELI_FAILED_TQ \n
+ RET_ENSURELI_FAILED_NOINDEX \n
+ RET_REMOVE_FROM_ACTIVESET */
+ returnValue addConstraint_ensureLI( int number, /**< Number of constraint to be added to active set. */
+ SubjectToStatus C_status /**< Status of new active bound. */
+ );
+
+ /** Adds a bound to active set.
+ * \return SUCCESSFUL_RETURN \n
+ RET_ADDBOUND_FAILED \n
+ RET_ADDBOUND_FAILED_INFEASIBILITY \n
+ RET_ENSURELI_FAILED */
+ returnValue addBound( int number, /**< Number of bound to be added to active set. */
+ SubjectToStatus B_status, /**< Status of new active bound. */
+ BooleanType updateCholesky /**< Flag indicating if Cholesky decomposition shall be updated. */
+ );
+
+ /** Checks if new active bound to be added is linearly dependent from
+ * from row of the active constraints matrix.
+ * \return RET_LINEARLY_DEPENDENT \n
+ RET_LINEARLY_INDEPENDENT */
+ returnValue addBound_checkLI( int number /**< Number of bound to be added to active set. */
+ );
+
+ /** Ensures linear independence of constraint matrix when a new bound is added.
+ * To this end a bound or constraint is removed simultaneously if necessary.
+ * \return SUCCESSFUL_RETURN \n
+ RET_LI_RESOLVED \n
+ RET_ENSURELI_FAILED \n
+ RET_ENSURELI_FAILED_TQ \n
+ RET_ENSURELI_FAILED_NOINDEX \n
+ RET_REMOVE_FROM_ACTIVESET */
+ returnValue addBound_ensureLI( int number, /**< Number of bound to be added to active set. */
+ SubjectToStatus B_status /**< Status of new active bound. */
+ );
+
+ /** Removes a constraint from active set.
+ * \return SUCCESSFUL_RETURN \n
+ RET_CONSTRAINT_NOT_ACTIVE \n
+ RET_REMOVECONSTRAINT_FAILED \n
+ RET_HESSIAN_NOT_SPD */
+ returnValue removeConstraint( int number, /**< Number of constraint to be removed from active set. */
+ BooleanType updateCholesky /**< Flag indicating if Cholesky decomposition shall be updated. */
+ );
+
+ /** Removes a bounds from active set.
+ * \return SUCCESSFUL_RETURN \n
+ RET_BOUND_NOT_ACTIVE \n
+ RET_HESSIAN_NOT_SPD \n
+ RET_REMOVEBOUND_FAILED */
+ returnValue removeBound( int number, /**< Number of bound to be removed from active set. */
+ BooleanType updateCholesky /**< Flag indicating if Cholesky decomposition shall be updated. */
+ );
+
+
+ /** Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix.
+ * \return SUCCESSFUL_RETURN \n
+ RET_DIV_BY_ZERO */
+ returnValue backsolveR( const real_t* const b, /**< Right hand side vector. */
+ BooleanType transposed, /**< Indicates if the transposed system shall be solved. */
+ real_t* const a /**< Output: Solution vector */
+ );
+
+ /** Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix. \n
+ * Special variant for the case that this function is called from within "removeBound()".
+ * \return SUCCESSFUL_RETURN \n
+ RET_DIV_BY_ZERO */
+ returnValue backsolveR( const real_t* const b, /**< Right hand side vector. */
+ BooleanType transposed, /**< Indicates if the transposed system shall be solved. */
+ BooleanType removingBound, /**< Indicates if function is called from "removeBound()". */
+ real_t* const a /**< Output: Solution vector */
+ );
+
+
+ /** Solves the system Ta = b or T^Ta = b where T is a reverse upper triangular matrix.
+ * \return SUCCESSFUL_RETURN \n
+ RET_DIV_BY_ZERO */
+ returnValue backsolveT( const real_t* const b, /**< Right hand side vector. */
+ BooleanType transposed, /**< Indicates if the transposed system shall be solved. */
+ real_t* const a /**< Output: Solution vector */
+ );
+
+
+ /** Determines step direction of the shift of the QP data.
+ * \return SUCCESSFUL_RETURN */
+ returnValue hotstart_determineDataShift(const int* const FX_idx, /**< Index array of fixed variables. */
+ const int* const AC_idx, /**< Index array of active constraints. */
+ const real_t* const g_new, /**< New gradient vector. */
+ const real_t* const lbA_new,/**< New lower constraints' bounds. */
+ const real_t* const ubA_new,/**< New upper constraints' bounds. */
+ const real_t* const lb_new, /**< New lower bounds. */
+ const real_t* const ub_new, /**< New upper bounds. */
+ real_t* const delta_g, /**< Output: Step direction of gradient vector. */
+ real_t* const delta_lbA, /**< Output: Step direction of lower constraints' bounds. */
+ real_t* const delta_ubA, /**< Output: Step direction of upper constraints' bounds. */
+ real_t* const delta_lb, /**< Output: Step direction of lower bounds. */
+ real_t* const delta_ub, /**< Output: Step direction of upper bounds. */
+ BooleanType& Delta_bC_isZero,/**< Output: Indicates if active constraints' bounds are to be shifted. */
+ BooleanType& Delta_bB_isZero/**< Output: Indicates if active bounds are to be shifted. */
+ );
+
+ /** Determines step direction of the homotopy path.
+ * \return SUCCESSFUL_RETURN \n
+ RET_STEPDIRECTION_FAILED_TQ \n
+ RET_STEPDIRECTION_FAILED_CHOLESKY */
+ returnValue hotstart_determineStepDirection(const int* const FR_idx, /**< Index array of free variables. */
+ const int* const FX_idx, /**< Index array of fixed variables. */
+ const int* const AC_idx, /**< Index array of active constraints. */
+ const real_t* const delta_g, /**< Step direction of gradient vector. */
+ const real_t* const delta_lbA, /**< Step direction of lower constraints' bounds. */
+ const real_t* const delta_ubA, /**< Step direction of upper constraints' bounds. */
+ const real_t* const delta_lb, /**< Step direction of lower bounds. */
+ const real_t* const delta_ub, /**< Step direction of upper bounds. */
+ BooleanType Delta_bC_isZero, /**< Indicates if active constraints' bounds are to be shifted. */
+ BooleanType Delta_bB_isZero, /**< Indicates if active bounds are to be shifted. */
+ real_t* const delta_xFX, /**< Output: Primal homotopy step direction of fixed variables. */
+ real_t* const delta_xFR, /**< Output: Primal homotopy step direction of free variables. */
+ real_t* const delta_yAC, /**< Output: Dual homotopy step direction of active constraints' multiplier. */
+ real_t* const delta_yFX /**< Output: Dual homotopy step direction of fixed variables' multiplier. */
+ );
+
+ /** Determines the maximum possible step length along the homotopy path.
+ * \return SUCCESSFUL_RETURN */
+ returnValue hotstart_determineStepLength( const int* const FR_idx, /**< Index array of free variables. */
+ const int* const FX_idx, /**< Index array of fixed variables. */
+ const int* const AC_idx, /**< Index array of active constraints. */
+ const int* const IAC_idx, /**< Index array of inactive constraints. */
+ const real_t* const delta_lbA, /**< Step direction of lower constraints' bounds. */
+ const real_t* const delta_ubA, /**< Step direction of upper constraints' bounds. */
+ const real_t* const delta_lb, /**< Step direction of lower bounds. */
+ const real_t* const delta_ub, /**< Step direction of upper bounds. */
+ const real_t* const delta_xFX, /**< Primal homotopy step direction of fixed variables. */
+ const real_t* const delta_xFR, /**< Primal homotopy step direction of free variables. */
+ const real_t* const delta_yAC, /**< Dual homotopy step direction of active constraints' multiplier. */
+ const real_t* const delta_yFX, /**< Dual homotopy step direction of fixed variables' multiplier. */
+ real_t* const delta_Ax, /**< Output: Step in vector Ax. */
+ int& BC_idx, /**< Output: Index of blocking constraint. */
+ SubjectToStatus& BC_status, /**< Output: Status of blocking constraint. */
+ BooleanType& BC_isBound /**< Output: Indicates if blocking constraint is a bound. */
+ );
+
+ /** Performs a step along the homotopy path (and updates active set).
+ * \return SUCCESSFUL_RETURN \n
+ RET_OPTIMAL_SOLUTION_FOUND \n
+ RET_REMOVE_FROM_ACTIVESET_FAILED \n
+ RET_ADD_TO_ACTIVESET_FAILED \n
+ RET_QP_INFEASIBLE */
+ returnValue hotstart_performStep( const int* const FR_idx, /**< Index array of free variables. */
+ const int* const FX_idx, /**< Index array of fixed variables. */
+ const int* const AC_idx, /**< Index array of active constraints. */
+ const int* const IAC_idx, /**< Index array of inactive constraints. */
+ const real_t* const delta_g, /**< Step direction of gradient vector. */
+ const real_t* const delta_lbA, /**< Step direction of lower constraints' bounds. */
+ const real_t* const delta_ubA, /**< Step direction of upper constraints' bounds. */
+ const real_t* const delta_lb, /**< Step direction of lower bounds. */
+ const real_t* const delta_ub, /**< Step direction of upper bounds. */
+ const real_t* const delta_xFX, /**< Primal homotopy step direction of fixed variables. */
+ const real_t* const delta_xFR, /**< Primal homotopy step direction of free variables. */
+ const real_t* const delta_yAC, /**< Dual homotopy step direction of active constraints' multiplier. */
+ const real_t* const delta_yFX, /**< Dual homotopy step direction of fixed variables' multiplier. */
+ const real_t* const delta_Ax, /**< Step in vector Ax. */
+ int BC_idx, /**< Index of blocking constraint. */
+ SubjectToStatus BC_status, /**< Status of blocking constraint. */
+ BooleanType BC_isBound /**< Indicates if blocking constraint is a bound. */
+ );
+
+
+ /** Checks if lower/upper (constraints') bounds remain consistent
+ * (i.e. if lb <= ub and lbA <= ubA ) during the current step.
+ * \return BT_TRUE iff (constraints") bounds remain consistent
+ */
+ BooleanType areBoundsConsistent( const real_t* const delta_lb, /**< Step direction of lower bounds. */
+ const real_t* const delta_ub, /**< Step direction of upper bounds. */
+ const real_t* const delta_lbA, /**< Step direction of lower constraints' bounds. */
+ const real_t* const delta_ubA /**< Step direction of upper constraints' bounds. */
+ ) const;
+
+
+ /** Setups internal QP data.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INVALID_ARGUMENTS */
+ returnValue setupQPdata( const real_t* const _H, /**< Hessian matrix. */
+ const real_t* const _R, /**< Cholesky factorization of the Hessian matrix. */
+ const real_t* const _g, /**< Gradient vector. */
+ const real_t* const _A, /**< Constraint matrix. */
+ const real_t* const _lb, /**< Lower bound vector (on variables). \n
+ If no lower bounds exist, a NULL pointer can be passed. */
+ const real_t* const _ub, /**< Upper bound vector (on variables). \n
+ If no upper bounds exist, a NULL pointer can be passed. */
+ const real_t* const _lbA, /**< Lower constraints' bound vector. \n
+ If no lower constraints' bounds exist, a NULL pointer can be passed. */
+ const real_t* const _ubA /**< Upper constraints' bound vector. \n
+ If no lower constraints' bounds exist, a NULL pointer can be passed. */
+ );
+
+
+ #ifdef PC_DEBUG /* Define print functions only for debugging! */
+
+ /** Prints concise information on the current iteration.
+ * \return SUCCESSFUL_RETURN \n */
+ returnValue printIteration( int iteration, /**< Number of current iteration. */
+ int BC_idx, /**< Index of blocking constraint. */
+ SubjectToStatus BC_status, /**< Status of blocking constraint. */
+ BooleanType BC_isBound /**< Indicates if blocking constraint is a bound. */
+ );
+
+ /** Prints concise information on the current iteration.
+ * NOTE: ONLY DEFINED FOR SUPPRESSING A COMPILER WARNING!!
+ * \return SUCCESSFUL_RETURN \n */
+ returnValue printIteration( int iteration, /**< Number of current iteration. */
+ int BC_idx, /**< Index of blocking bound. */
+ SubjectToStatus BC_status /**< Status of blocking bound. */
+ );
+
+ #endif /* PC_DEBUG */
+
+
+ /** Determines the maximum violation of the KKT optimality conditions
+ * of the current iterate within the QProblem object.
+ * \return SUCCESSFUL_RETURN \n
+ * RET_INACCURATE_SOLUTION \n
+ * RET_NO_SOLUTION */
+ returnValue checkKKTconditions( );
+
+
+ /** Sets constraint matrix of the QP. \n
+ (Remark: Also internal vector Ax is recomputed!)
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setA( const real_t* const A_new /**< New constraint matrix (with correct dimension!). */
+ );
+
+ /** Changes single row of constraint matrix of the QP. \n
+ (Remark: Also correponding component of internal vector Ax is recomputed!)
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline returnValue setA( int number, /**< Number of row to be changed. */
+ const real_t* const value /**< New (number)th constraint (with correct dimension!). */
+ );
+
+
+ /** Sets constraints' lower bound vector of the QP.
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setLBA( const real_t* const lbA_new /**< New constraints' lower bound vector (with correct dimension!). */
+ );
+
+ /** Changes single entry of lower constraints' bound vector of the QP.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline returnValue setLBA( int number, /**< Number of entry to be changed. */
+ real_t value /**< New value for entry of lower constraints' bound vector (with correct dimension!). */
+ );
+
+ /** Sets constraints' upper bound vector of the QP.
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setUBA( const real_t* const ubA_new /**< New constraints' upper bound vector (with correct dimension!). */
+ );
+
+ /** Changes single entry of upper constraints' bound vector of the QP.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline returnValue setUBA( int number, /**< Number of entry to be changed. */
+ real_t value /**< New value for entry of upper constraints' bound vector (with correct dimension!). */
+ );
+
+
+ /*
+ * PROTECTED MEMBER VARIABLES
+ */
+ protected:
+ real_t A[NCMAX_ALLOC*NVMAX]; /**< Constraint matrix. */
+ real_t lbA[NCMAX_ALLOC]; /**< Lower constraints' bound vector. */
+ real_t ubA[NCMAX_ALLOC]; /**< Upper constraints' bound vector. */
+
+ Constraints constraints; /**< Data structure for problem's constraints. */
+
+ real_t T[NVMAX*NVMAX]; /**< Reverse triangular matrix, A = [0 T]*Q'. */
+ real_t Q[NVMAX*NVMAX]; /**< Orthonormal quadratic matrix, A = [0 T]*Q'. */
+ int sizeT; /**< Matrix T is stored in a (sizeT x sizeT) array. */
+
+ real_t Ax[NCMAX_ALLOC]; /**< Stores the current product A*x (for increased efficiency only). */
+
+ CyclingManager cyclingManager; /**< Data structure for storing (possible) cycling information (NOT YET IMPLEMENTED!). */
+};
+
+
+#include
+
+#endif /* QPOASES_QPROBLEM_HPP */
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/INCLUDE/QProblemB.hpp b/phonelibs/qpoases/INCLUDE/QProblemB.hpp
index 8b3acb82b..49ace9ef9 100644
--- a/phonelibs/qpoases/INCLUDE/QProblemB.hpp
+++ b/phonelibs/qpoases/INCLUDE/QProblemB.hpp
@@ -1,628 +1,628 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file INCLUDE/QProblemB.hpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Declaration of the QProblemB class which is able to use the newly
- * developed online active set strategy for parametric quadratic programming
- * for problems with (simple) bounds only.
- */
-
-
-
-#ifndef QPOASES_QPROBLEMB_HPP
-#define QPOASES_QPROBLEMB_HPP
-
-
-#include
-
-
-
-class SolutionAnalysis;
-
-/** Class for setting up and solving quadratic programs with (simple) bounds only.
- * The main feature is the possibily to use the newly developed online active set strategy
- * for parametric quadratic programming.
- *
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- */
-class QProblemB
-{
- /* allow SolutionAnalysis class to access private members */
- friend class SolutionAnalysis;
-
- /*
- * PUBLIC MEMBER FUNCTIONS
- */
- public:
- /** Default constructor. */
- QProblemB( );
-
- /** Constructor which takes the QP dimension only. */
- QProblemB( int _nV /**< Number of variables. */
- );
-
- /** Copy constructor (deep copy). */
- QProblemB( const QProblemB& rhs /**< Rhs object. */
- );
-
- /** Destructor. */
- ~QProblemB( );
-
- /** Assignment operator (deep copy). */
- QProblemB& operator=( const QProblemB& rhs /**< Rhs object. */
- );
-
-
- /** Clears all data structures of QProblemB except for QP data.
- * \return SUCCESSFUL_RETURN \n
- RET_RESET_FAILED */
- returnValue reset( );
-
-
- /** Initialises a QProblemB with given QP data and solves it
- * using an initial homotopy with empty working set (at most nWSR iterations).
- * \return SUCCESSFUL_RETURN \n
- RET_INIT_FAILED \n
- RET_INIT_FAILED_CHOLESKY \n
- RET_INIT_FAILED_HOTSTART \n
- RET_INIT_FAILED_INFEASIBILITY \n
- RET_INIT_FAILED_UNBOUNDEDNESS \n
- RET_MAX_NWSR_REACHED \n
- RET_INVALID_ARGUMENTS \n
- RET_INACCURATE_SOLUTION \n
- RET_NO_SOLUTION */
- returnValue init( const real_t* const _H, /**< Hessian matrix. */
- const real_t* const _g, /**< Gradient vector. */
- const real_t* const _lb, /**< Lower bounds (on variables). \n
- If no lower bounds exist, a NULL pointer can be passed. */
- const real_t* const _ub, /**< Upper bounds (on variables). \n
- If no upper bounds exist, a NULL pointer can be passed. */
- int& nWSR, /**< Input: Maximum number of working set recalculations when using initial homotopy. \n
- Output: Number of performed working set recalculations. */
- const real_t* const yOpt = 0, /**< Initial guess for dual solution vector. */
- real_t* const cputime = 0 /**< Output: CPU time required to initialise QP. */
- );
-
-
- /** Initialises a QProblemB with given QP data and solves it
- * using an initial homotopy with empty working set (at most nWSR iterations).
- * \return SUCCESSFUL_RETURN \n
- RET_INIT_FAILED \n
- RET_INIT_FAILED_CHOLESKY \n
- RET_INIT_FAILED_HOTSTART \n
- RET_INIT_FAILED_INFEASIBILITY \n
- RET_INIT_FAILED_UNBOUNDEDNESS \n
- RET_MAX_NWSR_REACHED \n
- RET_INVALID_ARGUMENTS \n
- RET_INACCURATE_SOLUTION \n
- RET_NO_SOLUTION */
- returnValue init( const real_t* const _H, /**< Hessian matrix. */
- const real_t* const _R, /**< Cholesky factorization of the Hessian matrix. */
- const real_t* const _g, /**< Gradient vector. */
- const real_t* const _lb, /**< Lower bounds (on variables). \n
- If no lower bounds exist, a NULL pointer can be passed. */
- const real_t* const _ub, /**< Upper bounds (on variables). \n
- If no upper bounds exist, a NULL pointer can be passed. */
- int& nWSR, /**< Input: Maximum number of working set recalculations when using initial homotopy. \n
- Output: Number of performed working set recalculations. */
- const real_t* const yOpt = 0, /**< Initial guess for dual solution vector. */
- real_t* const cputime = 0 /**< Output: CPU time required to initialise QP. */
- );
-
-
- /** Solves an initialised QProblemB using online active set strategy.
- * \return SUCCESSFUL_RETURN \n
- RET_MAX_NWSR_REACHED \n
- RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED \n
- RET_HOTSTART_FAILED \n
- RET_SHIFT_DETERMINATION_FAILED \n
- RET_STEPDIRECTION_DETERMINATION_FAILED \n
- RET_STEPLENGTH_DETERMINATION_FAILED \n
- RET_HOMOTOPY_STEP_FAILED \n
- RET_HOTSTART_STOPPED_INFEASIBILITY \n
- RET_HOTSTART_STOPPED_UNBOUNDEDNESS \n
- RET_INACCURATE_SOLUTION \n
- RET_NO_SOLUTION */
- returnValue hotstart( const real_t* const g_new, /**< Gradient of neighbouring QP to be solved. */
- const real_t* const lb_new, /**< Lower bounds of neighbouring QP to be solved. \n
- If no lower bounds exist, a NULL pointer can be passed. */
- const real_t* const ub_new, /**< Upper bounds of neighbouring QP to be solved. \n
- If no upper bounds exist, a NULL pointer can be passed. */
- int& nWSR, /**< Input: Maximum number of working set recalculations; \n
- Output: Number of performed working set recalculations. */
- real_t* const cputime /**< Output: CPU time required to solve QP (or to perform nWSR iterations). */
- );
-
-
- /** Returns Hessian matrix of the QP (deep copy).
- * \return SUCCESSFUL_RETURN */
- inline returnValue getH( real_t* const _H /**< Array of appropriate dimension for copying Hessian matrix.*/
- ) const;
-
- /** Returns gradient vector of the QP (deep copy).
- * \return SUCCESSFUL_RETURN */
- inline returnValue getG( real_t* const _g /**< Array of appropriate dimension for copying gradient vector.*/
- ) const;
-
- /** Returns lower bound vector of the QP (deep copy).
- * \return SUCCESSFUL_RETURN */
- inline returnValue getLB( real_t* const _lb /**< Array of appropriate dimension for copying lower bound vector.*/
- ) const;
-
- /** Returns single entry of lower bound vector of the QP.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline returnValue getLB( int number, /**< Number of entry to be returned. */
- real_t& value /**< Output: lb[number].*/
- ) const;
-
- /** Returns upper bound vector of the QP (deep copy).
- * \return SUCCESSFUL_RETURN */
- inline returnValue getUB( real_t* const _ub /**< Array of appropriate dimension for copying upper bound vector.*/
- ) const;
-
- /** Returns single entry of upper bound vector of the QP.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline returnValue getUB( int number, /**< Number of entry to be returned. */
- real_t& value /**< Output: ub[number].*/
- ) const;
-
-
- /** Returns current bounds object of the QP (deep copy).
- * \return SUCCESSFUL_RETURN */
- inline returnValue getBounds( Bounds* const _bounds /** Output: Bounds object. */
- ) const;
-
-
- /** Returns the number of variables.
- * \return Number of variables. */
- inline int getNV( ) const;
-
- /** Returns the number of free variables.
- * \return Number of free variables. */
- inline int getNFR( );
-
- /** Returns the number of fixed variables.
- * \return Number of fixed variables. */
- inline int getNFX( );
-
- /** Returns the number of implicitly fixed variables.
- * \return Number of implicitly fixed variables. */
- inline int getNFV( ) const;
-
- /** Returns the dimension of null space.
- * \return Dimension of null space. */
- int getNZ( );
-
-
- /** Returns the optimal objective function value.
- * \return finite value: Optimal objective function value (QP was solved) \n
- +infinity: QP was not yet solved */
- real_t getObjVal( ) const;
-
- /** Returns the objective function value at an arbitrary point x.
- * \return Objective function value at point x */
- real_t getObjVal( const real_t* const _x /**< Point at which the objective function shall be evaluated. */
- ) const;
-
- /** Returns the primal solution vector.
- * \return SUCCESSFUL_RETURN \n
- RET_QP_NOT_SOLVED */
- returnValue getPrimalSolution( real_t* const xOpt /**< Output: Primal solution vector (if QP has been solved). */
- ) const;
-
- /** Returns the dual solution vector.
- * \return SUCCESSFUL_RETURN \n
- RET_QP_NOT_SOLVED */
- returnValue getDualSolution( real_t* const yOpt /**< Output: Dual solution vector (if QP has been solved). */
- ) const;
-
-
- /** Returns status of the solution process.
- * \return Status of solution process. */
- inline QProblemStatus getStatus( ) const;
-
-
- /** Returns if the QProblem object is initialised.
- * \return BT_TRUE: QProblemB initialised \n
- BT_FALSE: QProblemB not initialised */
- inline BooleanType isInitialised( ) const;
-
- /** Returns if the QP has been solved.
- * \return BT_TRUE: QProblemB solved \n
- BT_FALSE: QProblemB not solved */
- inline BooleanType isSolved( ) const;
-
- /** Returns if the QP is infeasible.
- * \return BT_TRUE: QP infeasible \n
- BT_FALSE: QP feasible (or not known to be infeasible!) */
- inline BooleanType isInfeasible( ) const;
-
- /** Returns if the QP is unbounded.
- * \return BT_TRUE: QP unbounded \n
- BT_FALSE: QP unbounded (or not known to be unbounded!) */
- inline BooleanType isUnbounded( ) const;
-
-
- /** Returns the print level.
- * \return Print level. */
- inline PrintLevel getPrintLevel( ) const;
-
- /** Changes the print level.
- * \return SUCCESSFUL_RETURN */
- returnValue setPrintLevel( PrintLevel _printlevel /**< New print level. */
- );
-
-
- /** Returns Hessian type flag (type is not determined due to this call!).
- * \return Hessian type. */
- inline HessianType getHessianType( ) const;
-
- /** Changes the print level.
- * \return SUCCESSFUL_RETURN */
- inline returnValue setHessianType( HessianType _hessianType /**< New Hessian type. */
- );
-
-
- /*
- * PROTECTED MEMBER FUNCTIONS
- */
- protected:
- /** Checks if Hessian happens to be the identity matrix,
- * and sets corresponding status flag (otherwise the flag remains unaltered!).
- * \return SUCCESSFUL_RETURN */
- returnValue checkForIdentityHessian( );
-
- /** Determines type of constraints and bounds (i.e. implicitly fixed, unbounded etc.).
- * \return SUCCESSFUL_RETURN \n
- RET_SETUPSUBJECTTOTYPE_FAILED */
- returnValue setupSubjectToType( );
-
- /** Computes the Cholesky decomposition R of the (simply projected) Hessian (i.e. R^T*R = Z^T*H*Z).
- * It only works in the case where Z is a simple projection matrix!
- * \return SUCCESSFUL_RETURN \n
- * RET_INDEXLIST_CORRUPTED */
- returnValue setupCholeskyDecomposition( );
-
-
- /** Solves a QProblemB whose QP data is assumed to be stored in the member variables.
- * A guess for its primal/dual optimal solution vectors and the corresponding
- * optimal working set can be provided.
- * \return SUCCESSFUL_RETURN \n
- RET_INIT_FAILED \n
- RET_INIT_FAILED_CHOLESKY \n
- RET_INIT_FAILED_HOTSTART \n
- RET_INIT_FAILED_INFEASIBILITY \n
- RET_INIT_FAILED_UNBOUNDEDNESS \n
- RET_MAX_NWSR_REACHED */
- returnValue solveInitialQP( const real_t* const xOpt, /**< Optimal primal solution vector.
- * A NULL pointer can be passed. */
- const real_t* const yOpt, /**< Optimal dual solution vector.
- * A NULL pointer can be passed. */
- const Bounds* const guessedBounds, /**< Guessed working set for solution (xOpt,yOpt).
- * A NULL pointer can be passed. */
- int& nWSR, /**< Input: Maximum number of working set recalculations; \n
- * Output: Number of performed working set recalculations. */
- real_t* const cputime /**< Output: CPU time required to solve QP (or to perform nWSR iterations). */
- );
-
-
- /** Obtains the desired working set for the auxiliary initial QP in
- * accordance with the user specifications
- * \return SUCCESSFUL_RETURN \n
- RET_OBTAINING_WORKINGSET_FAILED \n
- RET_INVALID_ARGUMENTS */
- returnValue obtainAuxiliaryWorkingSet( const real_t* const xOpt, /**< Optimal primal solution vector.
- * If a NULL pointer is passed, all entries are assumed to be zero. */
- const real_t* const yOpt, /**< Optimal dual solution vector.
- * If a NULL pointer is passed, all entries are assumed to be zero. */
- const Bounds* const guessedBounds, /**< Guessed working set for solution (xOpt,yOpt). */
- Bounds* auxiliaryBounds /**< Input: Allocated bound object. \n
- * Ouput: Working set for auxiliary QP. */
- ) const;
-
- /** Setups bound data structure according to auxiliaryBounds.
- * (If the working set shall be setup afresh, make sure that
- * bounds data structure has been resetted!)
- * \return SUCCESSFUL_RETURN \n
- RET_SETUP_WORKINGSET_FAILED \n
- RET_INVALID_ARGUMENTS \n
- RET_UNKNOWN BUG */
- returnValue setupAuxiliaryWorkingSet( const Bounds* const auxiliaryBounds, /**< Working set for auxiliary QP. */
- BooleanType setupAfresh /**< Flag indicating if given working set shall be
- * setup afresh or by updating the current one. */
- );
-
- /** Setups the optimal primal/dual solution of the auxiliary initial QP.
- * \return SUCCESSFUL_RETURN */
- returnValue setupAuxiliaryQPsolution( const real_t* const xOpt, /**< Optimal primal solution vector.
- * If a NULL pointer is passed, all entries are set to zero. */
- const real_t* const yOpt /**< Optimal dual solution vector.
- * If a NULL pointer is passed, all entries are set to zero. */
- );
-
- /** Setups gradient of the auxiliary initial QP for given
- * optimal primal/dual solution and given initial working set
- * (assumes that members X, Y and BOUNDS have already been initialised!).
- * \return SUCCESSFUL_RETURN */
- returnValue setupAuxiliaryQPgradient( );
-
- /** Setups bounds of the auxiliary initial QP for given
- * optimal primal/dual solution and given initial working set
- * (assumes that members X, Y and BOUNDS have already been initialised!).
- * \return SUCCESSFUL_RETURN \n
- RET_UNKNOWN BUG */
- returnValue setupAuxiliaryQPbounds( BooleanType useRelaxation /**< Flag indicating if inactive bounds shall be relaxed. */
- );
-
-
- /** Adds a bound to active set (specialised version for the case where no constraints exist).
- * \return SUCCESSFUL_RETURN \n
- RET_ADDBOUND_FAILED */
- returnValue addBound( int number, /**< Number of bound to be added to active set. */
- SubjectToStatus B_status, /**< Status of new active bound. */
- BooleanType updateCholesky /**< Flag indicating if Cholesky decomposition shall be updated. */
- );
-
- /** Removes a bounds from active set (specialised version for the case where no constraints exist).
- * \return SUCCESSFUL_RETURN \n
- RET_HESSIAN_NOT_SPD \n
- RET_REMOVEBOUND_FAILED */
- returnValue removeBound( int number, /**< Number of bound to be removed from active set. */
- BooleanType updateCholesky /**< Flag indicating if Cholesky decomposition shall be updated. */
- );
-
-
- /** Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix.
- * \return SUCCESSFUL_RETURN \n
- RET_DIV_BY_ZERO */
- returnValue backsolveR( const real_t* const b, /**< Right hand side vector. */
- BooleanType transposed, /**< Indicates if the transposed system shall be solved. */
- real_t* const a /**< Output: Solution vector */
- );
-
- /** Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix. \n
- * Special variant for the case that this function is called from within "removeBound()".
- * \return SUCCESSFUL_RETURN \n
- RET_DIV_BY_ZERO */
- returnValue backsolveR( const real_t* const b, /**< Right hand side vector. */
- BooleanType transposed, /**< Indicates if the transposed system shall be solved. */
- BooleanType removingBound, /**< Indicates if function is called from "removeBound()". */
- real_t* const a /**< Output: Solution vector */
- );
-
-
- /** Determines step direction of the shift of the QP data.
- * \return SUCCESSFUL_RETURN */
- returnValue hotstart_determineDataShift(const int* const FX_idx, /**< Index array of fixed variables. */
- const real_t* const g_new, /**< New gradient vector. */
- const real_t* const lb_new, /**< New lower bounds. */
- const real_t* const ub_new, /**< New upper bounds. */
- real_t* const delta_g, /**< Output: Step direction of gradient vector. */
- real_t* const delta_lb, /**< Output: Step direction of lower bounds. */
- real_t* const delta_ub, /**< Output: Step direction of upper bounds. */
- BooleanType& Delta_bB_isZero/**< Output: Indicates if active bounds are to be shifted. */
- );
-
-
- /** Checks if lower/upper bounds remain consistent
- * (i.e. if lb <= ub) during the current step.
- * \return BT_TRUE iff bounds remain consistent
- */
- BooleanType areBoundsConsistent( const real_t* const delta_lb, /**< Step direction of lower bounds. */
- const real_t* const delta_ub /**< Step direction of upper bounds. */
- ) const;
-
-
- /** Setups internal QP data.
- * \return SUCCESSFUL_RETURN \n
- RET_INVALID_ARGUMENTS */
- returnValue setupQPdata( const real_t* const _H, /**< Hessian matrix. */
- const real_t* const _R, /**< Cholesky factorization of the Hessian matrix. */
- const real_t* const _g, /**< Gradient vector. */
- const real_t* const _lb, /**< Lower bounds (on variables). \n
- If no lower bounds exist, a NULL pointer can be passed. */
- const real_t* const _ub /**< Upper bounds (on variables). \n
- If no upper bounds exist, a NULL pointer can be passed. */
- );
-
-
- /** Sets Hessian matrix of the QP.
- * \return SUCCESSFUL_RETURN */
- inline returnValue setH( const real_t* const H_new /**< New Hessian matrix (with correct dimension!). */
- );
-
- /** Changes gradient vector of the QP.
- * \return SUCCESSFUL_RETURN */
- inline returnValue setG( const real_t* const g_new /**< New gradient vector (with correct dimension!). */
- );
-
- /** Changes lower bound vector of the QP.
- * \return SUCCESSFUL_RETURN */
- inline returnValue setLB( const real_t* const lb_new /**< New lower bound vector (with correct dimension!). */
- );
-
- /** Changes single entry of lower bound vector of the QP.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline returnValue setLB( int number, /**< Number of entry to be changed. */
- real_t value /**< New value for entry of lower bound vector. */
- );
-
- /** Changes upper bound vector of the QP.
- * \return SUCCESSFUL_RETURN */
- inline returnValue setUB( const real_t* const ub_new /**< New upper bound vector (with correct dimension!). */
- );
-
- /** Changes single entry of upper bound vector of the QP.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline returnValue setUB( int number, /**< Number of entry to be changed. */
- real_t value /**< New value for entry of upper bound vector. */
- );
-
-
- /** Computes parameters for the Givens matrix G for which [x,y]*G = [z,0]
- * \return SUCCESSFUL_RETURN */
- inline void computeGivens( real_t xold, /**< Matrix entry to be normalised. */
- real_t yold, /**< Matrix entry to be annihilated. */
- real_t& xnew, /**< Output: Normalised matrix entry. */
- real_t& ynew, /**< Output: Annihilated matrix entry. */
- real_t& c, /**< Output: Cosine entry of Givens matrix. */
- real_t& s /**< Output: Sine entry of Givens matrix. */
- ) const;
-
- /** Applies Givens matrix determined by c and s (cf. computeGivens).
- * \return SUCCESSFUL_RETURN */
- inline void applyGivens( real_t c, /**< Cosine entry of Givens matrix. */
- real_t s, /**< Sine entry of Givens matrix. */
- real_t xold, /**< Matrix entry to be transformed corresponding to
- * the normalised entry of the original matrix. */
- real_t yold, /**< Matrix entry to be transformed corresponding to
- * the annihilated entry of the original matrix. */
- real_t& xnew, /**< Output: Transformed matrix entry corresponding to
- * the normalised entry of the original matrix. */
- real_t& ynew /**< Output: Transformed matrix entry corresponding to
- * the annihilated entry of the original matrix. */
- ) const;
-
-
- /*
- * PRIVATE MEMBER FUNCTIONS
- */
- private:
- /** Determines step direction of the homotopy path.
- * \return SUCCESSFUL_RETURN \n
- RET_STEPDIRECTION_FAILED_CHOLESKY */
- returnValue hotstart_determineStepDirection(const int* const FR_idx, /**< Index array of free variables. */
- const int* const FX_idx, /**< Index array of fixed variables. */
- const real_t* const delta_g, /**< Step direction of gradient vector. */
- const real_t* const delta_lb, /**< Step direction of lower bounds. */
- const real_t* const delta_ub, /**< Step direction of upper bounds. */
- BooleanType Delta_bB_isZero, /**< Indicates if active bounds are to be shifted. */
- real_t* const delta_xFX, /**< Output: Primal homotopy step direction of fixed variables. */
- real_t* const delta_xFR, /**< Output: Primal homotopy step direction of free variables. */
- real_t* const delta_yFX /**< Output: Dual homotopy step direction of fixed variables' multiplier. */
- );
-
- /** Determines the maximum possible step length along the homotopy path.
- * \return SUCCESSFUL_RETURN */
- returnValue hotstart_determineStepLength( const int* const FR_idx, /**< Index array of free variables. */
- const int* const FX_idx, /**< Index array of fixed variables. */
- const real_t* const delta_lb, /**< Step direction of lower bounds. */
- const real_t* const delta_ub, /**< Step direction of upper bounds. */
- const real_t* const delta_xFR, /**< Primal homotopy step direction of free variables. */
- const real_t* const delta_yFX, /**< Dual homotopy step direction of fixed variables' multiplier. */
- int& BC_idx, /**< Output: Index of blocking constraint. */
- SubjectToStatus& BC_status /**< Output: Status of blocking constraint. */
- );
-
- /** Performs a step along the homotopy path (and updates active set).
- * \return SUCCESSFUL_RETURN \n
- RET_OPTIMAL_SOLUTION_FOUND \n
- RET_REMOVE_FROM_ACTIVESET_FAILED \n
- RET_ADD_TO_ACTIVESET_FAILED \n
- RET_QP_INFEASIBLE */
- returnValue hotstart_performStep( const int* const FR_idx, /**< Index array of free variables. */
- const int* const FX_idx, /**< Index array of fixed variables. */
- const real_t* const delta_g, /**< Step direction of gradient vector. */
- const real_t* const delta_lb, /**< Step direction of lower bounds. */
- const real_t* const delta_ub, /**< Step direction of upper bounds. */
- const real_t* const delta_xFX, /**< Primal homotopy step direction of fixed variables. */
- const real_t* const delta_xFR, /**< Primal homotopy step direction of free variables. */
- const real_t* const delta_yFX, /**< Dual homotopy step direction of fixed variables' multiplier. */
- int BC_idx, /**< Index of blocking constraint. */
- SubjectToStatus BC_status /**< Status of blocking constraint. */
- );
-
-
- #ifdef PC_DEBUG /* Define print functions only for debugging! */
-
- /** Prints concise information on the current iteration.
- * \return SUCCESSFUL_RETURN \n */
- returnValue printIteration( int iteration, /**< Number of current iteration. */
- int BC_idx, /**< Index of blocking bound. */
- SubjectToStatus BC_status /**< Status of blocking bound. */
- );
-
- #endif /* PC_DEBUG */
-
-
- /** Determines the maximum violation of the KKT optimality conditions
- * of the current iterate within the QProblemB object.
- * \return SUCCESSFUL_RETURN \n
- * RET_INACCURATE_SOLUTION \n
- * RET_NO_SOLUTION */
- returnValue checkKKTconditions( );
-
-
- /*
- * PROTECTED MEMBER VARIABLES
- */
- protected:
- real_t H[NVMAX*NVMAX]; /**< Hessian matrix. */
- BooleanType hasHessian; /**< Flag indicating whether H contains Hessian or corresponding Cholesky factor R; \sa init. */
-
- real_t g[NVMAX]; /**< Gradient. */
- real_t lb[NVMAX]; /**< Lower bound vector (on variables). */
- real_t ub[NVMAX]; /**< Upper bound vector (on variables). */
-
- Bounds bounds; /**< Data structure for problem's bounds. */
-
- real_t R[NVMAX*NVMAX]; /**< Cholesky decomposition of H (i.e. H = R^T*R). */
- BooleanType hasCholesky; /**< Flag indicating whether Cholesky decomposition has already been setup. */
-
- real_t x[NVMAX]; /**< Primal solution vector. */
- real_t y[NVMAX+NCMAX]; /**< Dual solution vector. */
-
- real_t tau; /**< Last homotopy step length. */
-
- QProblemStatus status; /**< Current status of the solution process. */
-
- BooleanType infeasible; /**< QP infeasible? */
- BooleanType unbounded; /**< QP unbounded? */
-
- HessianType hessianType; /**< Type of Hessian matrix. */
-
- PrintLevel printlevel; /**< Print level. */
-
- int count; /**< Counts the number of hotstart function calls (internal usage only!). */
-};
-
-
-#include
-
-#endif /* QPOASES_QPROBLEMB_HPP */
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file INCLUDE/QProblemB.hpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Declaration of the QProblemB class which is able to use the newly
+ * developed online active set strategy for parametric quadratic programming
+ * for problems with (simple) bounds only.
+ */
+
+
+
+#ifndef QPOASES_QPROBLEMB_HPP
+#define QPOASES_QPROBLEMB_HPP
+
+
+#include
+
+
+
+class SolutionAnalysis;
+
+/** Class for setting up and solving quadratic programs with (simple) bounds only.
+ * The main feature is the possibily to use the newly developed online active set strategy
+ * for parametric quadratic programming.
+ *
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ */
+class QProblemB
+{
+ /* allow SolutionAnalysis class to access private members */
+ friend class SolutionAnalysis;
+
+ /*
+ * PUBLIC MEMBER FUNCTIONS
+ */
+ public:
+ /** Default constructor. */
+ QProblemB( );
+
+ /** Constructor which takes the QP dimension only. */
+ QProblemB( int _nV /**< Number of variables. */
+ );
+
+ /** Copy constructor (deep copy). */
+ QProblemB( const QProblemB& rhs /**< Rhs object. */
+ );
+
+ /** Destructor. */
+ ~QProblemB( );
+
+ /** Assignment operator (deep copy). */
+ QProblemB& operator=( const QProblemB& rhs /**< Rhs object. */
+ );
+
+
+ /** Clears all data structures of QProblemB except for QP data.
+ * \return SUCCESSFUL_RETURN \n
+ RET_RESET_FAILED */
+ returnValue reset( );
+
+
+ /** Initialises a QProblemB with given QP data and solves it
+ * using an initial homotopy with empty working set (at most nWSR iterations).
+ * \return SUCCESSFUL_RETURN \n
+ RET_INIT_FAILED \n
+ RET_INIT_FAILED_CHOLESKY \n
+ RET_INIT_FAILED_HOTSTART \n
+ RET_INIT_FAILED_INFEASIBILITY \n
+ RET_INIT_FAILED_UNBOUNDEDNESS \n
+ RET_MAX_NWSR_REACHED \n
+ RET_INVALID_ARGUMENTS \n
+ RET_INACCURATE_SOLUTION \n
+ RET_NO_SOLUTION */
+ returnValue init( const real_t* const _H, /**< Hessian matrix. */
+ const real_t* const _g, /**< Gradient vector. */
+ const real_t* const _lb, /**< Lower bounds (on variables). \n
+ If no lower bounds exist, a NULL pointer can be passed. */
+ const real_t* const _ub, /**< Upper bounds (on variables). \n
+ If no upper bounds exist, a NULL pointer can be passed. */
+ int& nWSR, /**< Input: Maximum number of working set recalculations when using initial homotopy. \n
+ Output: Number of performed working set recalculations. */
+ const real_t* const yOpt = 0, /**< Initial guess for dual solution vector. */
+ real_t* const cputime = 0 /**< Output: CPU time required to initialise QP. */
+ );
+
+
+ /** Initialises a QProblemB with given QP data and solves it
+ * using an initial homotopy with empty working set (at most nWSR iterations).
+ * \return SUCCESSFUL_RETURN \n
+ RET_INIT_FAILED \n
+ RET_INIT_FAILED_CHOLESKY \n
+ RET_INIT_FAILED_HOTSTART \n
+ RET_INIT_FAILED_INFEASIBILITY \n
+ RET_INIT_FAILED_UNBOUNDEDNESS \n
+ RET_MAX_NWSR_REACHED \n
+ RET_INVALID_ARGUMENTS \n
+ RET_INACCURATE_SOLUTION \n
+ RET_NO_SOLUTION */
+ returnValue init( const real_t* const _H, /**< Hessian matrix. */
+ const real_t* const _R, /**< Cholesky factorization of the Hessian matrix. */
+ const real_t* const _g, /**< Gradient vector. */
+ const real_t* const _lb, /**< Lower bounds (on variables). \n
+ If no lower bounds exist, a NULL pointer can be passed. */
+ const real_t* const _ub, /**< Upper bounds (on variables). \n
+ If no upper bounds exist, a NULL pointer can be passed. */
+ int& nWSR, /**< Input: Maximum number of working set recalculations when using initial homotopy. \n
+ Output: Number of performed working set recalculations. */
+ const real_t* const yOpt = 0, /**< Initial guess for dual solution vector. */
+ real_t* const cputime = 0 /**< Output: CPU time required to initialise QP. */
+ );
+
+
+ /** Solves an initialised QProblemB using online active set strategy.
+ * \return SUCCESSFUL_RETURN \n
+ RET_MAX_NWSR_REACHED \n
+ RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED \n
+ RET_HOTSTART_FAILED \n
+ RET_SHIFT_DETERMINATION_FAILED \n
+ RET_STEPDIRECTION_DETERMINATION_FAILED \n
+ RET_STEPLENGTH_DETERMINATION_FAILED \n
+ RET_HOMOTOPY_STEP_FAILED \n
+ RET_HOTSTART_STOPPED_INFEASIBILITY \n
+ RET_HOTSTART_STOPPED_UNBOUNDEDNESS \n
+ RET_INACCURATE_SOLUTION \n
+ RET_NO_SOLUTION */
+ returnValue hotstart( const real_t* const g_new, /**< Gradient of neighbouring QP to be solved. */
+ const real_t* const lb_new, /**< Lower bounds of neighbouring QP to be solved. \n
+ If no lower bounds exist, a NULL pointer can be passed. */
+ const real_t* const ub_new, /**< Upper bounds of neighbouring QP to be solved. \n
+ If no upper bounds exist, a NULL pointer can be passed. */
+ int& nWSR, /**< Input: Maximum number of working set recalculations; \n
+ Output: Number of performed working set recalculations. */
+ real_t* const cputime /**< Output: CPU time required to solve QP (or to perform nWSR iterations). */
+ );
+
+
+ /** Returns Hessian matrix of the QP (deep copy).
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue getH( real_t* const _H /**< Array of appropriate dimension for copying Hessian matrix.*/
+ ) const;
+
+ /** Returns gradient vector of the QP (deep copy).
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue getG( real_t* const _g /**< Array of appropriate dimension for copying gradient vector.*/
+ ) const;
+
+ /** Returns lower bound vector of the QP (deep copy).
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue getLB( real_t* const _lb /**< Array of appropriate dimension for copying lower bound vector.*/
+ ) const;
+
+ /** Returns single entry of lower bound vector of the QP.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline returnValue getLB( int number, /**< Number of entry to be returned. */
+ real_t& value /**< Output: lb[number].*/
+ ) const;
+
+ /** Returns upper bound vector of the QP (deep copy).
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue getUB( real_t* const _ub /**< Array of appropriate dimension for copying upper bound vector.*/
+ ) const;
+
+ /** Returns single entry of upper bound vector of the QP.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline returnValue getUB( int number, /**< Number of entry to be returned. */
+ real_t& value /**< Output: ub[number].*/
+ ) const;
+
+
+ /** Returns current bounds object of the QP (deep copy).
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue getBounds( Bounds* const _bounds /** Output: Bounds object. */
+ ) const;
+
+
+ /** Returns the number of variables.
+ * \return Number of variables. */
+ inline int getNV( ) const;
+
+ /** Returns the number of free variables.
+ * \return Number of free variables. */
+ inline int getNFR( );
+
+ /** Returns the number of fixed variables.
+ * \return Number of fixed variables. */
+ inline int getNFX( );
+
+ /** Returns the number of implicitly fixed variables.
+ * \return Number of implicitly fixed variables. */
+ inline int getNFV( ) const;
+
+ /** Returns the dimension of null space.
+ * \return Dimension of null space. */
+ int getNZ( );
+
+
+ /** Returns the optimal objective function value.
+ * \return finite value: Optimal objective function value (QP was solved) \n
+ +infinity: QP was not yet solved */
+ real_t getObjVal( ) const;
+
+ /** Returns the objective function value at an arbitrary point x.
+ * \return Objective function value at point x */
+ real_t getObjVal( const real_t* const _x /**< Point at which the objective function shall be evaluated. */
+ ) const;
+
+ /** Returns the primal solution vector.
+ * \return SUCCESSFUL_RETURN \n
+ RET_QP_NOT_SOLVED */
+ returnValue getPrimalSolution( real_t* const xOpt /**< Output: Primal solution vector (if QP has been solved). */
+ ) const;
+
+ /** Returns the dual solution vector.
+ * \return SUCCESSFUL_RETURN \n
+ RET_QP_NOT_SOLVED */
+ returnValue getDualSolution( real_t* const yOpt /**< Output: Dual solution vector (if QP has been solved). */
+ ) const;
+
+
+ /** Returns status of the solution process.
+ * \return Status of solution process. */
+ inline QProblemStatus getStatus( ) const;
+
+
+ /** Returns if the QProblem object is initialised.
+ * \return BT_TRUE: QProblemB initialised \n
+ BT_FALSE: QProblemB not initialised */
+ inline BooleanType isInitialised( ) const;
+
+ /** Returns if the QP has been solved.
+ * \return BT_TRUE: QProblemB solved \n
+ BT_FALSE: QProblemB not solved */
+ inline BooleanType isSolved( ) const;
+
+ /** Returns if the QP is infeasible.
+ * \return BT_TRUE: QP infeasible \n
+ BT_FALSE: QP feasible (or not known to be infeasible!) */
+ inline BooleanType isInfeasible( ) const;
+
+ /** Returns if the QP is unbounded.
+ * \return BT_TRUE: QP unbounded \n
+ BT_FALSE: QP unbounded (or not known to be unbounded!) */
+ inline BooleanType isUnbounded( ) const;
+
+
+ /** Returns the print level.
+ * \return Print level. */
+ inline PrintLevel getPrintLevel( ) const;
+
+ /** Changes the print level.
+ * \return SUCCESSFUL_RETURN */
+ returnValue setPrintLevel( PrintLevel _printlevel /**< New print level. */
+ );
+
+
+ /** Returns Hessian type flag (type is not determined due to this call!).
+ * \return Hessian type. */
+ inline HessianType getHessianType( ) const;
+
+ /** Changes the print level.
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setHessianType( HessianType _hessianType /**< New Hessian type. */
+ );
+
+
+ /*
+ * PROTECTED MEMBER FUNCTIONS
+ */
+ protected:
+ /** Checks if Hessian happens to be the identity matrix,
+ * and sets corresponding status flag (otherwise the flag remains unaltered!).
+ * \return SUCCESSFUL_RETURN */
+ returnValue checkForIdentityHessian( );
+
+ /** Determines type of constraints and bounds (i.e. implicitly fixed, unbounded etc.).
+ * \return SUCCESSFUL_RETURN \n
+ RET_SETUPSUBJECTTOTYPE_FAILED */
+ returnValue setupSubjectToType( );
+
+ /** Computes the Cholesky decomposition R of the (simply projected) Hessian (i.e. R^T*R = Z^T*H*Z).
+ * It only works in the case where Z is a simple projection matrix!
+ * \return SUCCESSFUL_RETURN \n
+ * RET_INDEXLIST_CORRUPTED */
+ returnValue setupCholeskyDecomposition( );
+
+
+ /** Solves a QProblemB whose QP data is assumed to be stored in the member variables.
+ * A guess for its primal/dual optimal solution vectors and the corresponding
+ * optimal working set can be provided.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INIT_FAILED \n
+ RET_INIT_FAILED_CHOLESKY \n
+ RET_INIT_FAILED_HOTSTART \n
+ RET_INIT_FAILED_INFEASIBILITY \n
+ RET_INIT_FAILED_UNBOUNDEDNESS \n
+ RET_MAX_NWSR_REACHED */
+ returnValue solveInitialQP( const real_t* const xOpt, /**< Optimal primal solution vector.
+ * A NULL pointer can be passed. */
+ const real_t* const yOpt, /**< Optimal dual solution vector.
+ * A NULL pointer can be passed. */
+ const Bounds* const guessedBounds, /**< Guessed working set for solution (xOpt,yOpt).
+ * A NULL pointer can be passed. */
+ int& nWSR, /**< Input: Maximum number of working set recalculations; \n
+ * Output: Number of performed working set recalculations. */
+ real_t* const cputime /**< Output: CPU time required to solve QP (or to perform nWSR iterations). */
+ );
+
+
+ /** Obtains the desired working set for the auxiliary initial QP in
+ * accordance with the user specifications
+ * \return SUCCESSFUL_RETURN \n
+ RET_OBTAINING_WORKINGSET_FAILED \n
+ RET_INVALID_ARGUMENTS */
+ returnValue obtainAuxiliaryWorkingSet( const real_t* const xOpt, /**< Optimal primal solution vector.
+ * If a NULL pointer is passed, all entries are assumed to be zero. */
+ const real_t* const yOpt, /**< Optimal dual solution vector.
+ * If a NULL pointer is passed, all entries are assumed to be zero. */
+ const Bounds* const guessedBounds, /**< Guessed working set for solution (xOpt,yOpt). */
+ Bounds* auxiliaryBounds /**< Input: Allocated bound object. \n
+ * Ouput: Working set for auxiliary QP. */
+ ) const;
+
+ /** Setups bound data structure according to auxiliaryBounds.
+ * (If the working set shall be setup afresh, make sure that
+ * bounds data structure has been resetted!)
+ * \return SUCCESSFUL_RETURN \n
+ RET_SETUP_WORKINGSET_FAILED \n
+ RET_INVALID_ARGUMENTS \n
+ RET_UNKNOWN BUG */
+ returnValue setupAuxiliaryWorkingSet( const Bounds* const auxiliaryBounds, /**< Working set for auxiliary QP. */
+ BooleanType setupAfresh /**< Flag indicating if given working set shall be
+ * setup afresh or by updating the current one. */
+ );
+
+ /** Setups the optimal primal/dual solution of the auxiliary initial QP.
+ * \return SUCCESSFUL_RETURN */
+ returnValue setupAuxiliaryQPsolution( const real_t* const xOpt, /**< Optimal primal solution vector.
+ * If a NULL pointer is passed, all entries are set to zero. */
+ const real_t* const yOpt /**< Optimal dual solution vector.
+ * If a NULL pointer is passed, all entries are set to zero. */
+ );
+
+ /** Setups gradient of the auxiliary initial QP for given
+ * optimal primal/dual solution and given initial working set
+ * (assumes that members X, Y and BOUNDS have already been initialised!).
+ * \return SUCCESSFUL_RETURN */
+ returnValue setupAuxiliaryQPgradient( );
+
+ /** Setups bounds of the auxiliary initial QP for given
+ * optimal primal/dual solution and given initial working set
+ * (assumes that members X, Y and BOUNDS have already been initialised!).
+ * \return SUCCESSFUL_RETURN \n
+ RET_UNKNOWN BUG */
+ returnValue setupAuxiliaryQPbounds( BooleanType useRelaxation /**< Flag indicating if inactive bounds shall be relaxed. */
+ );
+
+
+ /** Adds a bound to active set (specialised version for the case where no constraints exist).
+ * \return SUCCESSFUL_RETURN \n
+ RET_ADDBOUND_FAILED */
+ returnValue addBound( int number, /**< Number of bound to be added to active set. */
+ SubjectToStatus B_status, /**< Status of new active bound. */
+ BooleanType updateCholesky /**< Flag indicating if Cholesky decomposition shall be updated. */
+ );
+
+ /** Removes a bounds from active set (specialised version for the case where no constraints exist).
+ * \return SUCCESSFUL_RETURN \n
+ RET_HESSIAN_NOT_SPD \n
+ RET_REMOVEBOUND_FAILED */
+ returnValue removeBound( int number, /**< Number of bound to be removed from active set. */
+ BooleanType updateCholesky /**< Flag indicating if Cholesky decomposition shall be updated. */
+ );
+
+
+ /** Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix.
+ * \return SUCCESSFUL_RETURN \n
+ RET_DIV_BY_ZERO */
+ returnValue backsolveR( const real_t* const b, /**< Right hand side vector. */
+ BooleanType transposed, /**< Indicates if the transposed system shall be solved. */
+ real_t* const a /**< Output: Solution vector */
+ );
+
+ /** Solves the system Ra = b or R^Ta = b where R is an upper triangular matrix. \n
+ * Special variant for the case that this function is called from within "removeBound()".
+ * \return SUCCESSFUL_RETURN \n
+ RET_DIV_BY_ZERO */
+ returnValue backsolveR( const real_t* const b, /**< Right hand side vector. */
+ BooleanType transposed, /**< Indicates if the transposed system shall be solved. */
+ BooleanType removingBound, /**< Indicates if function is called from "removeBound()". */
+ real_t* const a /**< Output: Solution vector */
+ );
+
+
+ /** Determines step direction of the shift of the QP data.
+ * \return SUCCESSFUL_RETURN */
+ returnValue hotstart_determineDataShift(const int* const FX_idx, /**< Index array of fixed variables. */
+ const real_t* const g_new, /**< New gradient vector. */
+ const real_t* const lb_new, /**< New lower bounds. */
+ const real_t* const ub_new, /**< New upper bounds. */
+ real_t* const delta_g, /**< Output: Step direction of gradient vector. */
+ real_t* const delta_lb, /**< Output: Step direction of lower bounds. */
+ real_t* const delta_ub, /**< Output: Step direction of upper bounds. */
+ BooleanType& Delta_bB_isZero/**< Output: Indicates if active bounds are to be shifted. */
+ );
+
+
+ /** Checks if lower/upper bounds remain consistent
+ * (i.e. if lb <= ub) during the current step.
+ * \return BT_TRUE iff bounds remain consistent
+ */
+ BooleanType areBoundsConsistent( const real_t* const delta_lb, /**< Step direction of lower bounds. */
+ const real_t* const delta_ub /**< Step direction of upper bounds. */
+ ) const;
+
+
+ /** Setups internal QP data.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INVALID_ARGUMENTS */
+ returnValue setupQPdata( const real_t* const _H, /**< Hessian matrix. */
+ const real_t* const _R, /**< Cholesky factorization of the Hessian matrix. */
+ const real_t* const _g, /**< Gradient vector. */
+ const real_t* const _lb, /**< Lower bounds (on variables). \n
+ If no lower bounds exist, a NULL pointer can be passed. */
+ const real_t* const _ub /**< Upper bounds (on variables). \n
+ If no upper bounds exist, a NULL pointer can be passed. */
+ );
+
+
+ /** Sets Hessian matrix of the QP.
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setH( const real_t* const H_new /**< New Hessian matrix (with correct dimension!). */
+ );
+
+ /** Changes gradient vector of the QP.
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setG( const real_t* const g_new /**< New gradient vector (with correct dimension!). */
+ );
+
+ /** Changes lower bound vector of the QP.
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setLB( const real_t* const lb_new /**< New lower bound vector (with correct dimension!). */
+ );
+
+ /** Changes single entry of lower bound vector of the QP.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline returnValue setLB( int number, /**< Number of entry to be changed. */
+ real_t value /**< New value for entry of lower bound vector. */
+ );
+
+ /** Changes upper bound vector of the QP.
+ * \return SUCCESSFUL_RETURN */
+ inline returnValue setUB( const real_t* const ub_new /**< New upper bound vector (with correct dimension!). */
+ );
+
+ /** Changes single entry of upper bound vector of the QP.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline returnValue setUB( int number, /**< Number of entry to be changed. */
+ real_t value /**< New value for entry of upper bound vector. */
+ );
+
+
+ /** Computes parameters for the Givens matrix G for which [x,y]*G = [z,0]
+ * \return SUCCESSFUL_RETURN */
+ inline void computeGivens( real_t xold, /**< Matrix entry to be normalised. */
+ real_t yold, /**< Matrix entry to be annihilated. */
+ real_t& xnew, /**< Output: Normalised matrix entry. */
+ real_t& ynew, /**< Output: Annihilated matrix entry. */
+ real_t& c, /**< Output: Cosine entry of Givens matrix. */
+ real_t& s /**< Output: Sine entry of Givens matrix. */
+ ) const;
+
+ /** Applies Givens matrix determined by c and s (cf. computeGivens).
+ * \return SUCCESSFUL_RETURN */
+ inline void applyGivens( real_t c, /**< Cosine entry of Givens matrix. */
+ real_t s, /**< Sine entry of Givens matrix. */
+ real_t xold, /**< Matrix entry to be transformed corresponding to
+ * the normalised entry of the original matrix. */
+ real_t yold, /**< Matrix entry to be transformed corresponding to
+ * the annihilated entry of the original matrix. */
+ real_t& xnew, /**< Output: Transformed matrix entry corresponding to
+ * the normalised entry of the original matrix. */
+ real_t& ynew /**< Output: Transformed matrix entry corresponding to
+ * the annihilated entry of the original matrix. */
+ ) const;
+
+
+ /*
+ * PRIVATE MEMBER FUNCTIONS
+ */
+ private:
+ /** Determines step direction of the homotopy path.
+ * \return SUCCESSFUL_RETURN \n
+ RET_STEPDIRECTION_FAILED_CHOLESKY */
+ returnValue hotstart_determineStepDirection(const int* const FR_idx, /**< Index array of free variables. */
+ const int* const FX_idx, /**< Index array of fixed variables. */
+ const real_t* const delta_g, /**< Step direction of gradient vector. */
+ const real_t* const delta_lb, /**< Step direction of lower bounds. */
+ const real_t* const delta_ub, /**< Step direction of upper bounds. */
+ BooleanType Delta_bB_isZero, /**< Indicates if active bounds are to be shifted. */
+ real_t* const delta_xFX, /**< Output: Primal homotopy step direction of fixed variables. */
+ real_t* const delta_xFR, /**< Output: Primal homotopy step direction of free variables. */
+ real_t* const delta_yFX /**< Output: Dual homotopy step direction of fixed variables' multiplier. */
+ );
+
+ /** Determines the maximum possible step length along the homotopy path.
+ * \return SUCCESSFUL_RETURN */
+ returnValue hotstart_determineStepLength( const int* const FR_idx, /**< Index array of free variables. */
+ const int* const FX_idx, /**< Index array of fixed variables. */
+ const real_t* const delta_lb, /**< Step direction of lower bounds. */
+ const real_t* const delta_ub, /**< Step direction of upper bounds. */
+ const real_t* const delta_xFR, /**< Primal homotopy step direction of free variables. */
+ const real_t* const delta_yFX, /**< Dual homotopy step direction of fixed variables' multiplier. */
+ int& BC_idx, /**< Output: Index of blocking constraint. */
+ SubjectToStatus& BC_status /**< Output: Status of blocking constraint. */
+ );
+
+ /** Performs a step along the homotopy path (and updates active set).
+ * \return SUCCESSFUL_RETURN \n
+ RET_OPTIMAL_SOLUTION_FOUND \n
+ RET_REMOVE_FROM_ACTIVESET_FAILED \n
+ RET_ADD_TO_ACTIVESET_FAILED \n
+ RET_QP_INFEASIBLE */
+ returnValue hotstart_performStep( const int* const FR_idx, /**< Index array of free variables. */
+ const int* const FX_idx, /**< Index array of fixed variables. */
+ const real_t* const delta_g, /**< Step direction of gradient vector. */
+ const real_t* const delta_lb, /**< Step direction of lower bounds. */
+ const real_t* const delta_ub, /**< Step direction of upper bounds. */
+ const real_t* const delta_xFX, /**< Primal homotopy step direction of fixed variables. */
+ const real_t* const delta_xFR, /**< Primal homotopy step direction of free variables. */
+ const real_t* const delta_yFX, /**< Dual homotopy step direction of fixed variables' multiplier. */
+ int BC_idx, /**< Index of blocking constraint. */
+ SubjectToStatus BC_status /**< Status of blocking constraint. */
+ );
+
+
+ #ifdef PC_DEBUG /* Define print functions only for debugging! */
+
+ /** Prints concise information on the current iteration.
+ * \return SUCCESSFUL_RETURN \n */
+ returnValue printIteration( int iteration, /**< Number of current iteration. */
+ int BC_idx, /**< Index of blocking bound. */
+ SubjectToStatus BC_status /**< Status of blocking bound. */
+ );
+
+ #endif /* PC_DEBUG */
+
+
+ /** Determines the maximum violation of the KKT optimality conditions
+ * of the current iterate within the QProblemB object.
+ * \return SUCCESSFUL_RETURN \n
+ * RET_INACCURATE_SOLUTION \n
+ * RET_NO_SOLUTION */
+ returnValue checkKKTconditions( );
+
+
+ /*
+ * PROTECTED MEMBER VARIABLES
+ */
+ protected:
+ real_t H[NVMAX*NVMAX]; /**< Hessian matrix. */
+ BooleanType hasHessian; /**< Flag indicating whether H contains Hessian or corresponding Cholesky factor R; \sa init. */
+
+ real_t g[NVMAX]; /**< Gradient. */
+ real_t lb[NVMAX]; /**< Lower bound vector (on variables). */
+ real_t ub[NVMAX]; /**< Upper bound vector (on variables). */
+
+ Bounds bounds; /**< Data structure for problem's bounds. */
+
+ real_t R[NVMAX*NVMAX]; /**< Cholesky decomposition of H (i.e. H = R^T*R). */
+ BooleanType hasCholesky; /**< Flag indicating whether Cholesky decomposition has already been setup. */
+
+ real_t x[NVMAX]; /**< Primal solution vector. */
+ real_t y[NVMAX+NCMAX]; /**< Dual solution vector. */
+
+ real_t tau; /**< Last homotopy step length. */
+
+ QProblemStatus status; /**< Current status of the solution process. */
+
+ BooleanType infeasible; /**< QP infeasible? */
+ BooleanType unbounded; /**< QP unbounded? */
+
+ HessianType hessianType; /**< Type of Hessian matrix. */
+
+ PrintLevel printlevel; /**< Print level. */
+
+ int count; /**< Counts the number of hotstart function calls (internal usage only!). */
+};
+
+
+#include
+
+#endif /* QPOASES_QPROBLEMB_HPP */
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/INCLUDE/SubjectTo.hpp b/phonelibs/qpoases/INCLUDE/SubjectTo.hpp
index a014843ce..e07bf0421 100644
--- a/phonelibs/qpoases/INCLUDE/SubjectTo.hpp
+++ b/phonelibs/qpoases/INCLUDE/SubjectTo.hpp
@@ -1,178 +1,178 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file INCLUDE/SubjectTo.hpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Declaration of the SubjectTo class designed to manage working sets of
- * constraints and bounds within a QProblem.
- */
-
-
-#ifndef QPOASES_SUBJECTTO_HPP
-#define QPOASES_SUBJECTTO_HPP
-
-
-#include
-
-
-
-/** This class manages working sets of constraints and bounds by storing
- * index sets and other status information.
- *
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- */
-class SubjectTo
-{
- /*
- * PUBLIC MEMBER FUNCTIONS
- */
- public:
- /** Default constructor. */
- SubjectTo( );
-
- /** Copy constructor (deep copy). */
- SubjectTo( const SubjectTo& rhs /**< Rhs object. */
- );
-
- /** Destructor. */
- ~SubjectTo( );
-
- /** Assignment operator (deep copy). */
- SubjectTo& operator=( const SubjectTo& rhs /**< Rhs object. */
- );
-
-
- /** Pseudo-constructor takes the number of constraints or bounds.
- * \return SUCCESSFUL_RETURN */
- returnValue init( int n /**< Number of constraints or bounds. */
- );
-
-
- /** Returns type of (constraints') bound.
- * \return Type of (constraints') bound \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline SubjectToType getType( int i /**< Number of (constraints') bound. */
- ) const ;
-
- /** Returns status of (constraints') bound.
- * \return Status of (constraints') bound \n
- ST_UNDEFINED */
- inline SubjectToStatus getStatus( int i /**< Number of (constraints') bound. */
- ) const;
-
-
- /** Sets type of (constraints') bound.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline returnValue setType( int i, /**< Number of (constraints') bound. */
- SubjectToType value /**< Type of (constraints') bound. */
- );
-
- /** Sets status of (constraints') bound.
- * \return SUCCESSFUL_RETURN \n
- RET_INDEX_OUT_OF_BOUNDS */
- inline returnValue setStatus( int i, /**< Number of (constraints') bound. */
- SubjectToStatus value /**< Status of (constraints') bound. */
- );
-
-
- /** Sets status of lower (constraints') bounds. */
- inline void setNoLower( BooleanType _status /**< Status of lower (constraints') bounds. */
- );
-
- /** Sets status of upper (constraints') bounds. */
- inline void setNoUpper( BooleanType _status /**< Status of upper (constraints') bounds. */
- );
-
-
- /** Returns status of lower (constraints') bounds.
- * \return BT_TRUE if there is no lower (constraints') bound on any variable. */
- inline BooleanType isNoLower( ) const;
-
- /** Returns status of upper bounds.
- * \return BT_TRUE if there is no upper (constraints') bound on any variable. */
- inline BooleanType isNoUpper( ) const;
-
-
- /*
- * PROTECTED MEMBER FUNCTIONS
- */
- protected:
- /** Adds the index of a new constraint or bound to index set.
- * \return SUCCESSFUL_RETURN \n
- RET_ADDINDEX_FAILED */
- returnValue addIndex( Indexlist* const indexlist, /**< Index list to which the new index shall be added. */
- int newnumber, /**< Number of new constraint or bound. */
- SubjectToStatus newstatus /**< Status of new constraint or bound. */
- );
-
- /** Removes the index of a constraint or bound from index set.
- * \return SUCCESSFUL_RETURN \n
- RET_UNKNOWN_BUG */
- returnValue removeIndex( Indexlist* const indexlist, /**< Index list from which the new index shall be removed. */
- int removenumber /**< Number of constraint or bound to be removed. */
- );
-
- /** Swaps the indices of two constraints or bounds within the index set.
- * \return SUCCESSFUL_RETURN \n
- RET_SWAPINDEX_FAILED */
- returnValue swapIndex( Indexlist* const indexlist, /**< Index list in which the indices shold be swapped. */
- int number1, /**< Number of first constraint or bound. */
- int number2 /**< Number of second constraint or bound. */
- );
-
-
- /*
- * PROTECTED MEMBER VARIABLES
- */
- protected:
- SubjectToType type[NVMAX+NCMAX]; /**< Type of constraints/bounds. */
- SubjectToStatus status[NVMAX+NCMAX]; /**< Status of constraints/bounds. */
-
- BooleanType noLower; /**< This flag indicates if there is no lower bound on any variable. */
- BooleanType noUpper; /**< This flag indicates if there is no upper bound on any variable. */
-
-
- /*
- * PRIVATE MEMBER VARIABLES
- */
- private:
- int size;
-};
-
-
-
-#include
-
-#endif /* QPOASES_SUBJECTTO_HPP */
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file INCLUDE/SubjectTo.hpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Declaration of the SubjectTo class designed to manage working sets of
+ * constraints and bounds within a QProblem.
+ */
+
+
+#ifndef QPOASES_SUBJECTTO_HPP
+#define QPOASES_SUBJECTTO_HPP
+
+
+#include
+
+
+
+/** This class manages working sets of constraints and bounds by storing
+ * index sets and other status information.
+ *
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ */
+class SubjectTo
+{
+ /*
+ * PUBLIC MEMBER FUNCTIONS
+ */
+ public:
+ /** Default constructor. */
+ SubjectTo( );
+
+ /** Copy constructor (deep copy). */
+ SubjectTo( const SubjectTo& rhs /**< Rhs object. */
+ );
+
+ /** Destructor. */
+ ~SubjectTo( );
+
+ /** Assignment operator (deep copy). */
+ SubjectTo& operator=( const SubjectTo& rhs /**< Rhs object. */
+ );
+
+
+ /** Pseudo-constructor takes the number of constraints or bounds.
+ * \return SUCCESSFUL_RETURN */
+ returnValue init( int n /**< Number of constraints or bounds. */
+ );
+
+
+ /** Returns type of (constraints') bound.
+ * \return Type of (constraints') bound \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline SubjectToType getType( int i /**< Number of (constraints') bound. */
+ ) const ;
+
+ /** Returns status of (constraints') bound.
+ * \return Status of (constraints') bound \n
+ ST_UNDEFINED */
+ inline SubjectToStatus getStatus( int i /**< Number of (constraints') bound. */
+ ) const;
+
+
+ /** Sets type of (constraints') bound.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline returnValue setType( int i, /**< Number of (constraints') bound. */
+ SubjectToType value /**< Type of (constraints') bound. */
+ );
+
+ /** Sets status of (constraints') bound.
+ * \return SUCCESSFUL_RETURN \n
+ RET_INDEX_OUT_OF_BOUNDS */
+ inline returnValue setStatus( int i, /**< Number of (constraints') bound. */
+ SubjectToStatus value /**< Status of (constraints') bound. */
+ );
+
+
+ /** Sets status of lower (constraints') bounds. */
+ inline void setNoLower( BooleanType _status /**< Status of lower (constraints') bounds. */
+ );
+
+ /** Sets status of upper (constraints') bounds. */
+ inline void setNoUpper( BooleanType _status /**< Status of upper (constraints') bounds. */
+ );
+
+
+ /** Returns status of lower (constraints') bounds.
+ * \return BT_TRUE if there is no lower (constraints') bound on any variable. */
+ inline BooleanType isNoLower( ) const;
+
+ /** Returns status of upper bounds.
+ * \return BT_TRUE if there is no upper (constraints') bound on any variable. */
+ inline BooleanType isNoUpper( ) const;
+
+
+ /*
+ * PROTECTED MEMBER FUNCTIONS
+ */
+ protected:
+ /** Adds the index of a new constraint or bound to index set.
+ * \return SUCCESSFUL_RETURN \n
+ RET_ADDINDEX_FAILED */
+ returnValue addIndex( Indexlist* const indexlist, /**< Index list to which the new index shall be added. */
+ int newnumber, /**< Number of new constraint or bound. */
+ SubjectToStatus newstatus /**< Status of new constraint or bound. */
+ );
+
+ /** Removes the index of a constraint or bound from index set.
+ * \return SUCCESSFUL_RETURN \n
+ RET_UNKNOWN_BUG */
+ returnValue removeIndex( Indexlist* const indexlist, /**< Index list from which the new index shall be removed. */
+ int removenumber /**< Number of constraint or bound to be removed. */
+ );
+
+ /** Swaps the indices of two constraints or bounds within the index set.
+ * \return SUCCESSFUL_RETURN \n
+ RET_SWAPINDEX_FAILED */
+ returnValue swapIndex( Indexlist* const indexlist, /**< Index list in which the indices shold be swapped. */
+ int number1, /**< Number of first constraint or bound. */
+ int number2 /**< Number of second constraint or bound. */
+ );
+
+
+ /*
+ * PROTECTED MEMBER VARIABLES
+ */
+ protected:
+ SubjectToType type[NVMAX+NCMAX]; /**< Type of constraints/bounds. */
+ SubjectToStatus status[NVMAX+NCMAX]; /**< Status of constraints/bounds. */
+
+ BooleanType noLower; /**< This flag indicates if there is no lower bound on any variable. */
+ BooleanType noUpper; /**< This flag indicates if there is no upper bound on any variable. */
+
+
+ /*
+ * PRIVATE MEMBER VARIABLES
+ */
+ private:
+ int size;
+};
+
+
+
+#include
+
+#endif /* QPOASES_SUBJECTTO_HPP */
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/INCLUDE/Types.hpp b/phonelibs/qpoases/INCLUDE/Types.hpp
index 330f187c1..5b873ad07 100644
--- a/phonelibs/qpoases/INCLUDE/Types.hpp
+++ b/phonelibs/qpoases/INCLUDE/Types.hpp
@@ -1,131 +1,131 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file INCLUDE/Types.hpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2008
- *
- * Declaration of all non-built-in types (except for classes).
- */
-
-
-#ifndef QPOASES_TYPES_HPP
-#define QPOASES_TYPES_HPP
-
-
-
-/** Define real_t for facilitating switching between double and float. */
-// typedef double real_t;
-
-
-/** Summarises all possible logical values. */
-enum BooleanType
-{
- BT_FALSE, /**< Logical value for "false". */
- BT_TRUE /**< Logical value for "true". */
-};
-
-
-/** Summarises all possible print levels. Print levels are used to describe
- * the desired amount of output during runtime of qpOASES. */
-enum PrintLevel
-{
- PL_NONE, /**< No output. */
- PL_LOW, /**< Print error messages only. */
- PL_MEDIUM, /**< Print error and warning messages as well as concise info messages. */
- PL_HIGH /**< Print all messages with full details. */
-};
-
-
-/** Defines visibility status of a message. */
-enum VisibilityStatus
-{
- VS_VISIBLE, /**< Message visible. */
- VS_HIDDEN /**< Message not visible. */
-};
-
-
-/** Summarises all possible states of the (S)QProblem(B) object during the
-solution process of a QP sequence. */
-enum QProblemStatus
-{
- QPS_NOTINITIALISED, /**< QProblem object is freshly instantiated or reset. */
- QPS_PREPARINGAUXILIARYQP, /**< An auxiliary problem is currently setup, either at the very beginning
- * via an initial homotopy or after changing the QP matrices. */
- QPS_AUXILIARYQPSOLVED, /**< An auxilary problem was solved, either at the very beginning
- * via an initial homotopy or after changing the QP matrices. */
- QPS_PERFORMINGHOMOTOPY, /**< A homotopy according to the main idea of the online active
- * set strategy is performed. */
- QPS_HOMOTOPYQPSOLVED, /**< An intermediate QP along the homotopy path was solved. */
- QPS_SOLVED /**< The solution of the actual QP was found. */
-};
-
-
-/** Summarises all possible types of bounds and constraints. */
-enum SubjectToType
-{
- ST_UNBOUNDED, /**< Bound/constraint is unbounded. */
- ST_BOUNDED, /**< Bound/constraint is bounded but not fixed. */
- ST_EQUALITY, /**< Bound/constraint is fixed (implicit equality bound/constraint). */
- ST_UNKNOWN /**< Type of bound/constraint unknown. */
-};
-
-
-/** Summarises all possible states of bounds and constraints. */
-enum SubjectToStatus
-{
- ST_INACTIVE, /**< Bound/constraint is inactive. */
- ST_LOWER, /**< Bound/constraint is at its lower bound. */
- ST_UPPER, /**< Bound/constraint is at its upper bound. */
- ST_UNDEFINED /**< Status of bound/constraint undefined. */
-};
-
-
-/** Summarises all possible cycling states of bounds and constraints. */
-enum CyclingStatus
-{
- CYC_NOT_INVOLVED, /**< Bound/constraint is not involved in current cycling. */
- CYC_PREV_ADDED, /**< Bound/constraint has previously been added during the current cycling. */
- CYC_PREV_REMOVED /**< Bound/constraint has previously been removed during the current cycling. */
-};
-
-
-/** Summarises all possible types of the QP's Hessian matrix. */
-enum HessianType
-{
- HST_SEMIDEF, /**< Hessian is positive semi-definite. */
- HST_POSDEF_NULLSPACE, /**< Hessian is positive definite on null space of active bounds/constraints. */
- HST_POSDEF, /**< Hessian is (strictly) positive definite. */
- HST_IDENTITY /**< Hessian is identity matrix. */
-};
-
-
-
-#endif /* QPOASES_TYPES_HPP */
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file INCLUDE/Types.hpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2008
+ *
+ * Declaration of all non-built-in types (except for classes).
+ */
+
+
+#ifndef QPOASES_TYPES_HPP
+#define QPOASES_TYPES_HPP
+
+
+
+/** Define real_t for facilitating switching between double and float. */
+// typedef double real_t;
+
+
+/** Summarises all possible logical values. */
+enum BooleanType
+{
+ BT_FALSE, /**< Logical value for "false". */
+ BT_TRUE /**< Logical value for "true". */
+};
+
+
+/** Summarises all possible print levels. Print levels are used to describe
+ * the desired amount of output during runtime of qpOASES. */
+enum PrintLevel
+{
+ PL_NONE, /**< No output. */
+ PL_LOW, /**< Print error messages only. */
+ PL_MEDIUM, /**< Print error and warning messages as well as concise info messages. */
+ PL_HIGH /**< Print all messages with full details. */
+};
+
+
+/** Defines visibility status of a message. */
+enum VisibilityStatus
+{
+ VS_VISIBLE, /**< Message visible. */
+ VS_HIDDEN /**< Message not visible. */
+};
+
+
+/** Summarises all possible states of the (S)QProblem(B) object during the
+solution process of a QP sequence. */
+enum QProblemStatus
+{
+ QPS_NOTINITIALISED, /**< QProblem object is freshly instantiated or reset. */
+ QPS_PREPARINGAUXILIARYQP, /**< An auxiliary problem is currently setup, either at the very beginning
+ * via an initial homotopy or after changing the QP matrices. */
+ QPS_AUXILIARYQPSOLVED, /**< An auxilary problem was solved, either at the very beginning
+ * via an initial homotopy or after changing the QP matrices. */
+ QPS_PERFORMINGHOMOTOPY, /**< A homotopy according to the main idea of the online active
+ * set strategy is performed. */
+ QPS_HOMOTOPYQPSOLVED, /**< An intermediate QP along the homotopy path was solved. */
+ QPS_SOLVED /**< The solution of the actual QP was found. */
+};
+
+
+/** Summarises all possible types of bounds and constraints. */
+enum SubjectToType
+{
+ ST_UNBOUNDED, /**< Bound/constraint is unbounded. */
+ ST_BOUNDED, /**< Bound/constraint is bounded but not fixed. */
+ ST_EQUALITY, /**< Bound/constraint is fixed (implicit equality bound/constraint). */
+ ST_UNKNOWN /**< Type of bound/constraint unknown. */
+};
+
+
+/** Summarises all possible states of bounds and constraints. */
+enum SubjectToStatus
+{
+ ST_INACTIVE, /**< Bound/constraint is inactive. */
+ ST_LOWER, /**< Bound/constraint is at its lower bound. */
+ ST_UPPER, /**< Bound/constraint is at its upper bound. */
+ ST_UNDEFINED /**< Status of bound/constraint undefined. */
+};
+
+
+/** Summarises all possible cycling states of bounds and constraints. */
+enum CyclingStatus
+{
+ CYC_NOT_INVOLVED, /**< Bound/constraint is not involved in current cycling. */
+ CYC_PREV_ADDED, /**< Bound/constraint has previously been added during the current cycling. */
+ CYC_PREV_REMOVED /**< Bound/constraint has previously been removed during the current cycling. */
+};
+
+
+/** Summarises all possible types of the QP's Hessian matrix. */
+enum HessianType
+{
+ HST_SEMIDEF, /**< Hessian is positive semi-definite. */
+ HST_POSDEF_NULLSPACE, /**< Hessian is positive definite on null space of active bounds/constraints. */
+ HST_POSDEF, /**< Hessian is (strictly) positive definite. */
+ HST_IDENTITY /**< Hessian is identity matrix. */
+};
+
+
+
+#endif /* QPOASES_TYPES_HPP */
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/INCLUDE/Utils.hpp b/phonelibs/qpoases/INCLUDE/Utils.hpp
index 16546a991..a91ee78cc 100644
--- a/phonelibs/qpoases/INCLUDE/Utils.hpp
+++ b/phonelibs/qpoases/INCLUDE/Utils.hpp
@@ -1,197 +1,197 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file INCLUDE/Utils.hpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Declaration of global utility functions for working with qpOASES.
- */
-
-
-#ifndef QPOASES_UTILS_HPP
-#define QPOASES_UTILS_HPP
-
-
-#include
-
-
-#ifdef PC_DEBUG /* Define print functions only for debugging! */
-
-/** Prints a vector.
- * \return SUCCESSFUL_RETURN */
-returnValue print( const real_t* const v, /**< Vector to be printed. */
- int n /**< Length of vector. */
- );
-
-/** Prints a permuted vector.
- * \return SUCCESSFUL_RETURN */
-returnValue print( const real_t* const v, /**< Vector to be printed. */
- int n, /**< Length of vector. */
- const int* const V_idx /**< Pemutation vector. */
- );
-
-/** Prints a named vector.
- * \return SUCCESSFUL_RETURN */
-returnValue print( const real_t* const v, /**< Vector to be printed. */
- int n, /**< Length of vector. */
- const char* name /** Name of vector. */
- );
-
-/** Prints a matrix.
- * \return SUCCESSFUL_RETURN */
-returnValue print( const real_t* const M, /**< Matrix to be printed. */
- int nrow, /**< Row number of matrix. */
- int ncol /**< Column number of matrix. */
- );
-
-/** Prints a permuted matrix.
- * \return SUCCESSFUL_RETURN */
-returnValue print( const real_t* const M, /**< Matrix to be printed. */
- int nrow, /**< Row number of matrix. */
- int ncol , /**< Column number of matrix. */
- const int* const ROW_idx, /**< Row pemutation vector. */
- const int* const COL_idx /**< Column pemutation vector. */
- );
-
-/** Prints a named matrix.
- * \return SUCCESSFUL_RETURN */
-returnValue print( const real_t* const M, /**< Matrix to be printed. */
- int nrow, /**< Row number of matrix. */
- int ncol, /**< Column number of matrix. */
- const char* name /** Name of matrix. */
- );
-
-/** Prints an index array.
- * \return SUCCESSFUL_RETURN */
-returnValue print( const int* const index, /**< Index array to be printed. */
- int n /**< Length of index array. */
- );
-
-/** Prints a named index array.
- * \return SUCCESSFUL_RETURN */
-returnValue print( const int* const index, /**< Index array to be printed. */
- int n, /**< Length of index array. */
- const char* name /**< Name of index array. */
- );
-
-
-/** Prints a string to desired output target (useful also for MATLAB output!).
- * \return SUCCESSFUL_RETURN */
-returnValue myPrintf( const char* s /**< String to be written. */
- );
-
-
-/** Prints qpOASES copyright notice.
- * \return SUCCESSFUL_RETURN */
-returnValue printCopyrightNotice( );
-
-
-/** Reads a real_t matrix from file.
- * \return SUCCESSFUL_RETURN \n
- RET_UNABLE_TO_OPEN_FILE \n
- RET_UNABLE_TO_READ_FILE */
-returnValue readFromFile( real_t* data, /**< Matrix to be read from file. */
- int nrow, /**< Row number of matrix. */
- int ncol, /**< Column number of matrix. */
- const char* datafilename /**< Data file name. */
- );
-
-/** Reads a real_t vector from file.
- * \return SUCCESSFUL_RETURN \n
- RET_UNABLE_TO_OPEN_FILE \n
- RET_UNABLE_TO_READ_FILE */
-returnValue readFromFile( real_t* data, /**< Vector to be read from file. */
- int n, /**< Length of vector. */
- const char* datafilename /**< Data file name. */
- );
-
-/** Reads an integer (column) vector from file.
- * \return SUCCESSFUL_RETURN \n
- RET_UNABLE_TO_OPEN_FILE \n
- RET_UNABLE_TO_READ_FILE */
-returnValue readFromFile( int* data, /**< Vector to be read from file. */
- int n, /**< Length of vector. */
- const char* datafilename /**< Data file name. */
- );
-
-
-/** Writes a real_t matrix into a file.
- * \return SUCCESSFUL_RETURN \n
- RET_UNABLE_TO_OPEN_FILE */
-returnValue writeIntoFile( const real_t* const data, /**< Matrix to be written into file. */
- int nrow, /**< Row number of matrix. */
- int ncol, /**< Column number of matrix. */
- const char* datafilename, /**< Data file name. */
- BooleanType append /**< Indicates if data shall be appended if the file already exists (otherwise it is overwritten). */
- );
-
-/** Writes a real_t vector into a file.
- * \return SUCCESSFUL_RETURN \n
- RET_UNABLE_TO_OPEN_FILE */
-returnValue writeIntoFile( const real_t* const data, /**< Vector to be written into file. */
- int n, /**< Length of vector. */
- const char* datafilename, /**< Data file name. */
- BooleanType append /**< Indicates if data shall be appended if the file already exists (otherwise it is overwritten). */
- );
-
-/** Writes an integer (column) vector into a file.
- * \return SUCCESSFUL_RETURN \n
- RET_UNABLE_TO_OPEN_FILE */
-returnValue writeIntoFile( const int* const integer, /**< Integer vector to be written into file. */
- int n, /**< Length of vector. */
- const char* datafilename, /**< Data file name. */
- BooleanType append /**< Indicates if integer shall be appended if the file already exists (otherwise it is overwritten). */
- );
-
-#endif /* PC_DEBUG */
-
-
-/** Returns the current system time.
- * \return current system time */
-real_t getCPUtime( );
-
-
-/** Returns the Euclidean norm of a vector.
- * \return 0: successful */
-real_t getNorm( const real_t* const v, /**< Vector. */
- int n /**< Vector's dimension. */
- );
-
-/** Returns the absolute value of a real_t.
- * \return Absolute value of a real_t */
-inline real_t getAbs( real_t x /**< Input argument. */
- );
-
-
-
-#include
-
-#endif /* QPOASES_UTILS_HPP */
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file INCLUDE/Utils.hpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Declaration of global utility functions for working with qpOASES.
+ */
+
+
+#ifndef QPOASES_UTILS_HPP
+#define QPOASES_UTILS_HPP
+
+
+#include
+
+
+#ifdef PC_DEBUG /* Define print functions only for debugging! */
+
+/** Prints a vector.
+ * \return SUCCESSFUL_RETURN */
+returnValue print( const real_t* const v, /**< Vector to be printed. */
+ int n /**< Length of vector. */
+ );
+
+/** Prints a permuted vector.
+ * \return SUCCESSFUL_RETURN */
+returnValue print( const real_t* const v, /**< Vector to be printed. */
+ int n, /**< Length of vector. */
+ const int* const V_idx /**< Pemutation vector. */
+ );
+
+/** Prints a named vector.
+ * \return SUCCESSFUL_RETURN */
+returnValue print( const real_t* const v, /**< Vector to be printed. */
+ int n, /**< Length of vector. */
+ const char* name /** Name of vector. */
+ );
+
+/** Prints a matrix.
+ * \return SUCCESSFUL_RETURN */
+returnValue print( const real_t* const M, /**< Matrix to be printed. */
+ int nrow, /**< Row number of matrix. */
+ int ncol /**< Column number of matrix. */
+ );
+
+/** Prints a permuted matrix.
+ * \return SUCCESSFUL_RETURN */
+returnValue print( const real_t* const M, /**< Matrix to be printed. */
+ int nrow, /**< Row number of matrix. */
+ int ncol , /**< Column number of matrix. */
+ const int* const ROW_idx, /**< Row pemutation vector. */
+ const int* const COL_idx /**< Column pemutation vector. */
+ );
+
+/** Prints a named matrix.
+ * \return SUCCESSFUL_RETURN */
+returnValue print( const real_t* const M, /**< Matrix to be printed. */
+ int nrow, /**< Row number of matrix. */
+ int ncol, /**< Column number of matrix. */
+ const char* name /** Name of matrix. */
+ );
+
+/** Prints an index array.
+ * \return SUCCESSFUL_RETURN */
+returnValue print( const int* const index, /**< Index array to be printed. */
+ int n /**< Length of index array. */
+ );
+
+/** Prints a named index array.
+ * \return SUCCESSFUL_RETURN */
+returnValue print( const int* const index, /**< Index array to be printed. */
+ int n, /**< Length of index array. */
+ const char* name /**< Name of index array. */
+ );
+
+
+/** Prints a string to desired output target (useful also for MATLAB output!).
+ * \return SUCCESSFUL_RETURN */
+returnValue myPrintf( const char* s /**< String to be written. */
+ );
+
+
+/** Prints qpOASES copyright notice.
+ * \return SUCCESSFUL_RETURN */
+returnValue printCopyrightNotice( );
+
+
+/** Reads a real_t matrix from file.
+ * \return SUCCESSFUL_RETURN \n
+ RET_UNABLE_TO_OPEN_FILE \n
+ RET_UNABLE_TO_READ_FILE */
+returnValue readFromFile( real_t* data, /**< Matrix to be read from file. */
+ int nrow, /**< Row number of matrix. */
+ int ncol, /**< Column number of matrix. */
+ const char* datafilename /**< Data file name. */
+ );
+
+/** Reads a real_t vector from file.
+ * \return SUCCESSFUL_RETURN \n
+ RET_UNABLE_TO_OPEN_FILE \n
+ RET_UNABLE_TO_READ_FILE */
+returnValue readFromFile( real_t* data, /**< Vector to be read from file. */
+ int n, /**< Length of vector. */
+ const char* datafilename /**< Data file name. */
+ );
+
+/** Reads an integer (column) vector from file.
+ * \return SUCCESSFUL_RETURN \n
+ RET_UNABLE_TO_OPEN_FILE \n
+ RET_UNABLE_TO_READ_FILE */
+returnValue readFromFile( int* data, /**< Vector to be read from file. */
+ int n, /**< Length of vector. */
+ const char* datafilename /**< Data file name. */
+ );
+
+
+/** Writes a real_t matrix into a file.
+ * \return SUCCESSFUL_RETURN \n
+ RET_UNABLE_TO_OPEN_FILE */
+returnValue writeIntoFile( const real_t* const data, /**< Matrix to be written into file. */
+ int nrow, /**< Row number of matrix. */
+ int ncol, /**< Column number of matrix. */
+ const char* datafilename, /**< Data file name. */
+ BooleanType append /**< Indicates if data shall be appended if the file already exists (otherwise it is overwritten). */
+ );
+
+/** Writes a real_t vector into a file.
+ * \return SUCCESSFUL_RETURN \n
+ RET_UNABLE_TO_OPEN_FILE */
+returnValue writeIntoFile( const real_t* const data, /**< Vector to be written into file. */
+ int n, /**< Length of vector. */
+ const char* datafilename, /**< Data file name. */
+ BooleanType append /**< Indicates if data shall be appended if the file already exists (otherwise it is overwritten). */
+ );
+
+/** Writes an integer (column) vector into a file.
+ * \return SUCCESSFUL_RETURN \n
+ RET_UNABLE_TO_OPEN_FILE */
+returnValue writeIntoFile( const int* const integer, /**< Integer vector to be written into file. */
+ int n, /**< Length of vector. */
+ const char* datafilename, /**< Data file name. */
+ BooleanType append /**< Indicates if integer shall be appended if the file already exists (otherwise it is overwritten). */
+ );
+
+#endif /* PC_DEBUG */
+
+
+/** Returns the current system time.
+ * \return current system time */
+real_t getCPUtime( );
+
+
+/** Returns the Euclidean norm of a vector.
+ * \return 0: successful */
+real_t getNorm( const real_t* const v, /**< Vector. */
+ int n /**< Vector's dimension. */
+ );
+
+/** Returns the absolute value of a real_t.
+ * \return Absolute value of a real_t */
+inline real_t getAbs( real_t x /**< Input argument. */
+ );
+
+
+
+#include
+
+#endif /* QPOASES_UTILS_HPP */
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/LICENSE.txt b/phonelibs/qpoases/LICENSE.txt
index 5faba9d48..5ab7695ab 100644
--- a/phonelibs/qpoases/LICENSE.txt
+++ b/phonelibs/qpoases/LICENSE.txt
@@ -1,504 +1,504 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Libraries
-
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
-
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Also add information on how to contact you by electronic and paper mail.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
-
- , 1 April 1990
- Ty Coon, President of Vice
-
-That's all there is to it!
-
-
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ , 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/phonelibs/qpoases/README.txt b/phonelibs/qpoases/README.txt
index 37175d919..53fc2ab4f 100644
--- a/phonelibs/qpoases/README.txt
+++ b/phonelibs/qpoases/README.txt
@@ -1,92 +1,92 @@
-##
-## qpOASES -- An Implementation of the Online Active Set Strategy.
-## Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
-##
-## qpOASES is free software; you can redistribute it and/or
-## modify it under the terms of the GNU Lesser General Public
-## License as published by the Free Software Foundation; either
-## version 2.1 of the License, or (at your option) any later version.
-##
-## qpOASES is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-## Lesser General Public License for more details.
-##
-## You should have received a copy of the GNU Lesser General Public
-## License along with qpOASES; if not, write to the Free Software
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-##
-
-
-
-INTRODUCTION
-=============
-
-qpOASES is an open-source C++ implementation of the recently proposed
-online active set strategy (see [1], [2]), which was inspired by important
-observations from the field of parametric quadratic programming. It has
-several theoretical features that make it particularly suited for model
-predictive control (MPC) applications.
-
-The software package qpOASES implements these ideas and has already been
-successfully used for closed-loop control of a real-world Diesel engine [3].
-
-
-References:
-
-[1] H.J. Ferreau. An Online Active Set Strategy for Fast Solution of
-Parametric Quadratic Programs with Applications to Predictive Engine Control.
-Diplom thesis, University of Heidelberg, 2006.
-
-[2] H.J. Ferreau, H.G. Bock, M. Diehl. An online active set strategy to
-overcome the limitations of explicit MPC. International Journal of Robust
-and Nonlinear Control, 18 (8), pp. 816-830, 2008.
-
-[3] H.J. Ferreau, P. Ortner, P. Langthaler, L. del Re, M. Diehl. Predictive
-Control of a Real-World Diesel Engine using an Extended Online Active Set
-Strategy. Annual Reviews in Control, 31 (2), pp. 293-301, 2007.
-
-
-
-GETTING STARTED
-================
-
-1. For installation, usage and additional information on this software package
- see the qpOASES User's Manual located at ./DOC/manual.pdf!
-
-
-2. The file ./LICENSE.txt contains a copy of the GNU Lesser General Public
- License. Please read it carefully before using qpOASES!
-
-
-3. The whole software package can be downloaded from
-
- http://homes.esat.kuleuven.be/~optec/software/qpOASES/
-
- On this webpage you will also find a list of frequently asked questions.
-
-
-
-CONTACT THE AUTHORS
-====================
-
-If you have got questions, remarks or comments on qpOASES
-please contact the main author:
-
- Hans Joachim Ferreau
- Katholieke Universiteit Leuven
- Department of Electrical Engineering (ESAT)
- Kasteelpark Arenberg 10, bus 2446
- B-3001 Leuven-Heverlee, Belgium
-
- Phone: +32 16 32 03 63
- E-mail: joachim.ferreau@esat.kuleuven.be
- qpOASES@esat.kuleuven.be
-
-Also bug reports and source code extensions are most welcome!
-
-
-
-##
-## end of file
-##
+##
+## qpOASES -- An Implementation of the Online Active Set Strategy.
+## Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+##
+## qpOASES is free software; you can redistribute it and/or
+## modify it under the terms of the GNU Lesser General Public
+## License as published by the Free Software Foundation; either
+## version 2.1 of the License, or (at your option) any later version.
+##
+## qpOASES is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+## Lesser General Public License for more details.
+##
+## You should have received a copy of the GNU Lesser General Public
+## License along with qpOASES; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+##
+
+
+
+INTRODUCTION
+=============
+
+qpOASES is an open-source C++ implementation of the recently proposed
+online active set strategy (see [1], [2]), which was inspired by important
+observations from the field of parametric quadratic programming. It has
+several theoretical features that make it particularly suited for model
+predictive control (MPC) applications.
+
+The software package qpOASES implements these ideas and has already been
+successfully used for closed-loop control of a real-world Diesel engine [3].
+
+
+References:
+
+[1] H.J. Ferreau. An Online Active Set Strategy for Fast Solution of
+Parametric Quadratic Programs with Applications to Predictive Engine Control.
+Diplom thesis, University of Heidelberg, 2006.
+
+[2] H.J. Ferreau, H.G. Bock, M. Diehl. An online active set strategy to
+overcome the limitations of explicit MPC. International Journal of Robust
+and Nonlinear Control, 18 (8), pp. 816-830, 2008.
+
+[3] H.J. Ferreau, P. Ortner, P. Langthaler, L. del Re, M. Diehl. Predictive
+Control of a Real-World Diesel Engine using an Extended Online Active Set
+Strategy. Annual Reviews in Control, 31 (2), pp. 293-301, 2007.
+
+
+
+GETTING STARTED
+================
+
+1. For installation, usage and additional information on this software package
+ see the qpOASES User's Manual located at ./DOC/manual.pdf!
+
+
+2. The file ./LICENSE.txt contains a copy of the GNU Lesser General Public
+ License. Please read it carefully before using qpOASES!
+
+
+3. The whole software package can be downloaded from
+
+ http://homes.esat.kuleuven.be/~optec/software/qpOASES/
+
+ On this webpage you will also find a list of frequently asked questions.
+
+
+
+CONTACT THE AUTHORS
+====================
+
+If you have got questions, remarks or comments on qpOASES
+please contact the main author:
+
+ Hans Joachim Ferreau
+ Katholieke Universiteit Leuven
+ Department of Electrical Engineering (ESAT)
+ Kasteelpark Arenberg 10, bus 2446
+ B-3001 Leuven-Heverlee, Belgium
+
+ Phone: +32 16 32 03 63
+ E-mail: joachim.ferreau@esat.kuleuven.be
+ qpOASES@esat.kuleuven.be
+
+Also bug reports and source code extensions are most welcome!
+
+
+
+##
+## end of file
+##
diff --git a/phonelibs/qpoases/SRC/Bounds.cpp b/phonelibs/qpoases/SRC/Bounds.cpp
index 236ab2f62..cf8ed6989 100644
--- a/phonelibs/qpoases/SRC/Bounds.cpp
+++ b/phonelibs/qpoases/SRC/Bounds.cpp
@@ -1,252 +1,252 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file SRC/Bounds.cpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Implementation of the Bounds class designed to manage working sets of
- * bounds within a QProblem.
- */
-
-
-#include
-
-
-
-/*****************************************************************************
- * P U B L I C *
- *****************************************************************************/
-
-
-/*
- * B o u n d s
- */
-Bounds::Bounds( ) : SubjectTo( ),
- nV( 0 ),
- nFV( 0 ),
- nBV( 0 ),
- nUV( 0 )
-{
-}
-
-
-/*
- * B o u n d s
- */
-Bounds::Bounds( const Bounds& rhs ) : SubjectTo( rhs ),
- nV( rhs.nV ),
- nFV( rhs.nFV ),
- nBV( rhs.nBV ),
- nUV( rhs.nUV )
-{
- free = rhs.free;
- fixed = rhs.fixed;
-}
-
-
-/*
- * ~ B o u n d s
- */
-Bounds::~Bounds( )
-{
-}
-
-
-/*
- * o p e r a t o r =
- */
-Bounds& Bounds::operator=( const Bounds& rhs )
-{
- if ( this != &rhs )
- {
- SubjectTo::operator=( rhs );
-
- nV = rhs.nV;
- nFV = rhs.nFV;
- nBV = rhs.nBV;
- nUV = rhs.nUV;
-
- free = rhs.free;
- fixed = rhs.fixed;
- }
-
- return *this;
-}
-
-
-/*
- * i n i t
- */
-returnValue Bounds::init( int n )
-{
- nV = n;
- nFV = 0;
- nBV = 0;
- nUV = 0;
-
- free.init( );
- fixed.init( );
-
- return SubjectTo::init( n );
-}
-
-
-/*
- * s e t u p B o u n d
- */
-returnValue Bounds::setupBound( int _number, SubjectToStatus _status
- )
-{
- /* consistency check */
- if ( ( _number < 0 ) || ( _number >= getNV( ) ) )
- return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
-
- /* Add bound index to respective index list. */
- switch ( _status )
- {
- case ST_INACTIVE:
- if ( this->addIndex( this->getFree( ),_number,_status ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_SETUP_BOUND_FAILED );
- break;
-
- case ST_LOWER:
- if ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_SETUP_BOUND_FAILED );
- break;
-
- case ST_UPPER:
- if ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_SETUP_BOUND_FAILED );
- break;
-
- default:
- return THROWERROR( RET_INVALID_ARGUMENTS );
- }
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * s e t u p A l l F r e e
- */
-returnValue Bounds::setupAllFree( )
-{
- int i;
-
- /* 1) Place unbounded variables at the beginning of the index list of free variables. */
- for( i=0; i= getNV( ) ) )
- return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
-
- /* Move index from indexlist of fixed variables to that of free ones. */
- if ( this->removeIndex( this->getFixed( ),_number ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_MOVING_BOUND_FAILED );
-
- if ( this->addIndex( this->getFree( ),_number,ST_INACTIVE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_MOVING_BOUND_FAILED );
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * m o v e F r e e T o F i x e d
- */
-returnValue Bounds::moveFreeToFixed( int _number, SubjectToStatus _status
- )
-{
- /* consistency check */
- if ( ( _number < 0 ) || ( _number >= getNV( ) ) )
- return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
-
- /* Move index from indexlist of free variables to that of fixed ones. */
- if ( this->removeIndex( this->getFree( ),_number ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_MOVING_BOUND_FAILED );
-
- if ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_MOVING_BOUND_FAILED );
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * s w a p F r e e
- */
-returnValue Bounds::swapFree( int number1, int number2
- )
-{
- /* consistency check */
- if ( ( number1 < 0 ) || ( number1 >= getNV( ) ) || ( number2 < 0 ) || ( number2 >= getNV( ) ) )
- return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
-
- /* Swap index within indexlist of free variables. */
- return this->swapIndex( this->getFree( ),number1,number2 );
-}
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file SRC/Bounds.cpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Implementation of the Bounds class designed to manage working sets of
+ * bounds within a QProblem.
+ */
+
+
+#include
+
+
+
+/*****************************************************************************
+ * P U B L I C *
+ *****************************************************************************/
+
+
+/*
+ * B o u n d s
+ */
+Bounds::Bounds( ) : SubjectTo( ),
+ nV( 0 ),
+ nFV( 0 ),
+ nBV( 0 ),
+ nUV( 0 )
+{
+}
+
+
+/*
+ * B o u n d s
+ */
+Bounds::Bounds( const Bounds& rhs ) : SubjectTo( rhs ),
+ nV( rhs.nV ),
+ nFV( rhs.nFV ),
+ nBV( rhs.nBV ),
+ nUV( rhs.nUV )
+{
+ free = rhs.free;
+ fixed = rhs.fixed;
+}
+
+
+/*
+ * ~ B o u n d s
+ */
+Bounds::~Bounds( )
+{
+}
+
+
+/*
+ * o p e r a t o r =
+ */
+Bounds& Bounds::operator=( const Bounds& rhs )
+{
+ if ( this != &rhs )
+ {
+ SubjectTo::operator=( rhs );
+
+ nV = rhs.nV;
+ nFV = rhs.nFV;
+ nBV = rhs.nBV;
+ nUV = rhs.nUV;
+
+ free = rhs.free;
+ fixed = rhs.fixed;
+ }
+
+ return *this;
+}
+
+
+/*
+ * i n i t
+ */
+returnValue Bounds::init( int n )
+{
+ nV = n;
+ nFV = 0;
+ nBV = 0;
+ nUV = 0;
+
+ free.init( );
+ fixed.init( );
+
+ return SubjectTo::init( n );
+}
+
+
+/*
+ * s e t u p B o u n d
+ */
+returnValue Bounds::setupBound( int _number, SubjectToStatus _status
+ )
+{
+ /* consistency check */
+ if ( ( _number < 0 ) || ( _number >= getNV( ) ) )
+ return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
+
+ /* Add bound index to respective index list. */
+ switch ( _status )
+ {
+ case ST_INACTIVE:
+ if ( this->addIndex( this->getFree( ),_number,_status ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_SETUP_BOUND_FAILED );
+ break;
+
+ case ST_LOWER:
+ if ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_SETUP_BOUND_FAILED );
+ break;
+
+ case ST_UPPER:
+ if ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_SETUP_BOUND_FAILED );
+ break;
+
+ default:
+ return THROWERROR( RET_INVALID_ARGUMENTS );
+ }
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * s e t u p A l l F r e e
+ */
+returnValue Bounds::setupAllFree( )
+{
+ int i;
+
+ /* 1) Place unbounded variables at the beginning of the index list of free variables. */
+ for( i=0; i= getNV( ) ) )
+ return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
+
+ /* Move index from indexlist of fixed variables to that of free ones. */
+ if ( this->removeIndex( this->getFixed( ),_number ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_MOVING_BOUND_FAILED );
+
+ if ( this->addIndex( this->getFree( ),_number,ST_INACTIVE ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_MOVING_BOUND_FAILED );
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * m o v e F r e e T o F i x e d
+ */
+returnValue Bounds::moveFreeToFixed( int _number, SubjectToStatus _status
+ )
+{
+ /* consistency check */
+ if ( ( _number < 0 ) || ( _number >= getNV( ) ) )
+ return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
+
+ /* Move index from indexlist of free variables to that of fixed ones. */
+ if ( this->removeIndex( this->getFree( ),_number ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_MOVING_BOUND_FAILED );
+
+ if ( this->addIndex( this->getFixed( ),_number,_status ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_MOVING_BOUND_FAILED );
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * s w a p F r e e
+ */
+returnValue Bounds::swapFree( int number1, int number2
+ )
+{
+ /* consistency check */
+ if ( ( number1 < 0 ) || ( number1 >= getNV( ) ) || ( number2 < 0 ) || ( number2 >= getNV( ) ) )
+ return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
+
+ /* Swap index within indexlist of free variables. */
+ return this->swapIndex( this->getFree( ),number1,number2 );
+}
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/SRC/Bounds.ipp b/phonelibs/qpoases/SRC/Bounds.ipp
index d0e7dbbf0..d2ab1ba2d 100644
--- a/phonelibs/qpoases/SRC/Bounds.ipp
+++ b/phonelibs/qpoases/SRC/Bounds.ipp
@@ -1,144 +1,144 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file SRC/Bounds.ipp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Implementation of inlined member functions of the Bounds class designed
- * to manage working sets of bounds within a QProblem.
- */
-
-
-/*****************************************************************************
- * P U B L I C *
- *****************************************************************************/
-
-/*
- * g e t N V
- */
-inline int Bounds::getNV( ) const
-{
- return nV;
-}
-
-
-/*
- * g e t N F X
- */
-inline int Bounds::getNFV( ) const
-{
- return nFV;
-}
-
-
-/*
- * g e t N B V
- */
-inline int Bounds::getNBV( ) const
-{
- return nBV;
-}
-
-
-/*
- * g e t N U V
- */
-inline int Bounds::getNUV( ) const
-{
- return nUV;
-}
-
-
-
-/*
- * s e t N F X
- */
-inline returnValue Bounds::setNFV( int n )
-{
- nFV = n;
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * s e t N B V
- */
-inline returnValue Bounds::setNBV( int n )
-{
- nBV = n;
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * s e t N U V
- */
-inline returnValue Bounds::setNUV( int n )
-{
- nUV = n;
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * g e t N F R
- */
-inline int Bounds::getNFR( )
-{
- return free.getLength( );
-}
-
-
-/*
- * g e t N F X
- */
-inline int Bounds::getNFX( )
-{
- return fixed.getLength( );
-}
-
-
-/*
- * g e t F r e e
- */
-inline Indexlist* Bounds::getFree( )
-{
- return &free;
-}
-
-
-/*
- * g e t F i x e d
- */
-inline Indexlist* Bounds::getFixed( )
-{
- return &fixed;
-}
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file SRC/Bounds.ipp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Implementation of inlined member functions of the Bounds class designed
+ * to manage working sets of bounds within a QProblem.
+ */
+
+
+/*****************************************************************************
+ * P U B L I C *
+ *****************************************************************************/
+
+/*
+ * g e t N V
+ */
+inline int Bounds::getNV( ) const
+{
+ return nV;
+}
+
+
+/*
+ * g e t N F X
+ */
+inline int Bounds::getNFV( ) const
+{
+ return nFV;
+}
+
+
+/*
+ * g e t N B V
+ */
+inline int Bounds::getNBV( ) const
+{
+ return nBV;
+}
+
+
+/*
+ * g e t N U V
+ */
+inline int Bounds::getNUV( ) const
+{
+ return nUV;
+}
+
+
+
+/*
+ * s e t N F X
+ */
+inline returnValue Bounds::setNFV( int n )
+{
+ nFV = n;
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * s e t N B V
+ */
+inline returnValue Bounds::setNBV( int n )
+{
+ nBV = n;
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * s e t N U V
+ */
+inline returnValue Bounds::setNUV( int n )
+{
+ nUV = n;
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * g e t N F R
+ */
+inline int Bounds::getNFR( )
+{
+ return free.getLength( );
+}
+
+
+/*
+ * g e t N F X
+ */
+inline int Bounds::getNFX( )
+{
+ return fixed.getLength( );
+}
+
+
+/*
+ * g e t F r e e
+ */
+inline Indexlist* Bounds::getFree( )
+{
+ return &free;
+}
+
+
+/*
+ * g e t F i x e d
+ */
+inline Indexlist* Bounds::getFixed( )
+{
+ return &fixed;
+}
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/SRC/Constraints.cpp b/phonelibs/qpoases/SRC/Constraints.cpp
index 81fc6ce86..b2ad5bd11 100644
--- a/phonelibs/qpoases/SRC/Constraints.cpp
+++ b/phonelibs/qpoases/SRC/Constraints.cpp
@@ -1,248 +1,248 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file SRC/Constraints.cpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Implementation of the Constraints class designed to manage working sets of
- * constraints within a QProblem.
- */
-
-
-#include
-
-
-/*****************************************************************************
- * P U B L I C *
- *****************************************************************************/
-
-
-/*
- * C o n s t r a i n t s
- */
-Constraints::Constraints( ) : SubjectTo( ),
- nC( 0 ),
- nEC( 0 ),
- nIC( 0 ),
- nUC( 0 )
-{
-}
-
-
-/*
- * C o n s t r a i n t s
- */
-Constraints::Constraints( const Constraints& rhs ) : SubjectTo( rhs ),
- nC( rhs.nC ),
- nEC( rhs.nEC ),
- nIC( rhs.nIC ),
- nUC( rhs.nUC )
-{
- active = rhs.active;
- inactive = rhs.inactive;
-}
-
-
-/*
- * ~ C o n s t r a i n t s
- */
-Constraints::~Constraints( )
-{
-}
-
-
-/*
- * o p e r a t o r =
- */
-Constraints& Constraints::operator=( const Constraints& rhs )
-{
- if ( this != &rhs )
- {
- SubjectTo::operator=( rhs );
-
- nC = rhs.nC;
- nEC = rhs.nEC;
- nIC = rhs.nIC;
- nUC = rhs.nUC;
-
- active = rhs.active;
- inactive = rhs.inactive;
- }
-
- return *this;
-}
-
-
-/*
- * i n i t
- */
-returnValue Constraints::init( int n )
-{
- nC = n;
- nEC = 0;
- nIC = 0;
- nUC = 0;
-
- active.init( );
- inactive.init( );
-
- return SubjectTo::init( n );
-}
-
-
-/*
- * s e t u p C o n s t r a i n t
- */
-returnValue Constraints::setupConstraint( int _number, SubjectToStatus _status
- )
-{
- /* consistency check */
- if ( ( _number < 0 ) || ( _number >= getNC( ) ) )
- return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
-
- /* Add constraint index to respective index list. */
- switch ( _status )
- {
- case ST_INACTIVE:
- if ( this->addIndex( this->getInactive( ),_number,_status ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
- break;
-
- case ST_LOWER:
- if ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
- break;
-
- case ST_UPPER:
- if ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
- break;
-
- default:
- return THROWERROR( RET_INVALID_ARGUMENTS );
- }
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * s e t u p A l l I n a c t i v e
- */
-returnValue Constraints::setupAllInactive( )
-{
- int i;
-
-
- /* 1) Place unbounded constraints at the beginning of the index list of inactive constraints. */
- for( i=0; i= getNC( ) ) )
- return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
-
- /* Move index from indexlist of active constraints to that of inactive ones. */
- if ( this->removeIndex( this->getActive( ),_number ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_MOVING_BOUND_FAILED );
-
- if ( this->addIndex( this->getInactive( ),_number,ST_INACTIVE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_MOVING_BOUND_FAILED );
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * m o v e I n a c t i v e T o A c t i v e
- */
-returnValue Constraints::moveInactiveToActive( int _number, SubjectToStatus _status
- )
-{
- /* consistency check */
- if ( ( _number < 0 ) || ( _number >= getNC( ) ) )
- return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
-
- /* Move index from indexlist of inactive constraints to that of active ones. */
- if ( this->removeIndex( this->getInactive( ),_number ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_MOVING_BOUND_FAILED );
-
- if ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_MOVING_BOUND_FAILED );
-
- return SUCCESSFUL_RETURN;
-}
-
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file SRC/Constraints.cpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Implementation of the Constraints class designed to manage working sets of
+ * constraints within a QProblem.
+ */
+
+
+#include
+
+
+/*****************************************************************************
+ * P U B L I C *
+ *****************************************************************************/
+
+
+/*
+ * C o n s t r a i n t s
+ */
+Constraints::Constraints( ) : SubjectTo( ),
+ nC( 0 ),
+ nEC( 0 ),
+ nIC( 0 ),
+ nUC( 0 )
+{
+}
+
+
+/*
+ * C o n s t r a i n t s
+ */
+Constraints::Constraints( const Constraints& rhs ) : SubjectTo( rhs ),
+ nC( rhs.nC ),
+ nEC( rhs.nEC ),
+ nIC( rhs.nIC ),
+ nUC( rhs.nUC )
+{
+ active = rhs.active;
+ inactive = rhs.inactive;
+}
+
+
+/*
+ * ~ C o n s t r a i n t s
+ */
+Constraints::~Constraints( )
+{
+}
+
+
+/*
+ * o p e r a t o r =
+ */
+Constraints& Constraints::operator=( const Constraints& rhs )
+{
+ if ( this != &rhs )
+ {
+ SubjectTo::operator=( rhs );
+
+ nC = rhs.nC;
+ nEC = rhs.nEC;
+ nIC = rhs.nIC;
+ nUC = rhs.nUC;
+
+ active = rhs.active;
+ inactive = rhs.inactive;
+ }
+
+ return *this;
+}
+
+
+/*
+ * i n i t
+ */
+returnValue Constraints::init( int n )
+{
+ nC = n;
+ nEC = 0;
+ nIC = 0;
+ nUC = 0;
+
+ active.init( );
+ inactive.init( );
+
+ return SubjectTo::init( n );
+}
+
+
+/*
+ * s e t u p C o n s t r a i n t
+ */
+returnValue Constraints::setupConstraint( int _number, SubjectToStatus _status
+ )
+{
+ /* consistency check */
+ if ( ( _number < 0 ) || ( _number >= getNC( ) ) )
+ return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
+
+ /* Add constraint index to respective index list. */
+ switch ( _status )
+ {
+ case ST_INACTIVE:
+ if ( this->addIndex( this->getInactive( ),_number,_status ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
+ break;
+
+ case ST_LOWER:
+ if ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
+ break;
+
+ case ST_UPPER:
+ if ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_SETUP_CONSTRAINT_FAILED );
+ break;
+
+ default:
+ return THROWERROR( RET_INVALID_ARGUMENTS );
+ }
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * s e t u p A l l I n a c t i v e
+ */
+returnValue Constraints::setupAllInactive( )
+{
+ int i;
+
+
+ /* 1) Place unbounded constraints at the beginning of the index list of inactive constraints. */
+ for( i=0; i= getNC( ) ) )
+ return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
+
+ /* Move index from indexlist of active constraints to that of inactive ones. */
+ if ( this->removeIndex( this->getActive( ),_number ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_MOVING_BOUND_FAILED );
+
+ if ( this->addIndex( this->getInactive( ),_number,ST_INACTIVE ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_MOVING_BOUND_FAILED );
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * m o v e I n a c t i v e T o A c t i v e
+ */
+returnValue Constraints::moveInactiveToActive( int _number, SubjectToStatus _status
+ )
+{
+ /* consistency check */
+ if ( ( _number < 0 ) || ( _number >= getNC( ) ) )
+ return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
+
+ /* Move index from indexlist of inactive constraints to that of active ones. */
+ if ( this->removeIndex( this->getInactive( ),_number ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_MOVING_BOUND_FAILED );
+
+ if ( this->addIndex( this->getActive( ),_number,_status ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_MOVING_BOUND_FAILED );
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/SRC/Constraints.ipp b/phonelibs/qpoases/SRC/Constraints.ipp
index 67add2043..1b874ef3c 100644
--- a/phonelibs/qpoases/SRC/Constraints.ipp
+++ b/phonelibs/qpoases/SRC/Constraints.ipp
@@ -1,144 +1,144 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file SRC/Constraints.ipp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Declaration of inlined member functions of the Constraints class designed
- * to manage working sets of constraints within a QProblem.
- */
-
-
-
-/*****************************************************************************
- * P U B L I C *
- *****************************************************************************/
-
-/*
- * g e t N C
- */
-inline int Constraints::getNC( ) const
-{
- return nC;
-}
-
-
-/*
- * g e t N E C
- */
-inline int Constraints::getNEC( ) const
-{
- return nEC;
-}
-
-
-/*
- * g e t N I C
- */
-inline int Constraints::getNIC( ) const
-{
- return nIC;
-}
-
-
-/*
- * g e t N U C
- */
-inline int Constraints::getNUC( ) const
-{
- return nUC;
-}
-
-
-/*
- * s e t N E C
- */
-inline returnValue Constraints::setNEC( int n )
-{
- nEC = n;
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * s e t N I C
- */
-inline returnValue Constraints::setNIC( int n )
-{
- nIC = n;
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * s e t N U C
- */
-inline returnValue Constraints::setNUC( int n )
-{
- nUC = n;
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * g e t N A C
- */
-inline int Constraints::getNAC( )
-{
- return active.getLength( );
-}
-
-
-/*
- * g e t N I A C
- */
-inline int Constraints::getNIAC( )
-{
- return inactive.getLength( );
-}
-
-
-/*
- * g e t A c t i v e
- */
-inline Indexlist* Constraints::getActive( )
-{
- return &active;
-}
-
-
-/*
- * g e t I n a c t i v e
- */
-inline Indexlist* Constraints::getInactive( )
-{
- return &inactive;
-}
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file SRC/Constraints.ipp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Declaration of inlined member functions of the Constraints class designed
+ * to manage working sets of constraints within a QProblem.
+ */
+
+
+
+/*****************************************************************************
+ * P U B L I C *
+ *****************************************************************************/
+
+/*
+ * g e t N C
+ */
+inline int Constraints::getNC( ) const
+{
+ return nC;
+}
+
+
+/*
+ * g e t N E C
+ */
+inline int Constraints::getNEC( ) const
+{
+ return nEC;
+}
+
+
+/*
+ * g e t N I C
+ */
+inline int Constraints::getNIC( ) const
+{
+ return nIC;
+}
+
+
+/*
+ * g e t N U C
+ */
+inline int Constraints::getNUC( ) const
+{
+ return nUC;
+}
+
+
+/*
+ * s e t N E C
+ */
+inline returnValue Constraints::setNEC( int n )
+{
+ nEC = n;
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * s e t N I C
+ */
+inline returnValue Constraints::setNIC( int n )
+{
+ nIC = n;
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * s e t N U C
+ */
+inline returnValue Constraints::setNUC( int n )
+{
+ nUC = n;
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * g e t N A C
+ */
+inline int Constraints::getNAC( )
+{
+ return active.getLength( );
+}
+
+
+/*
+ * g e t N I A C
+ */
+inline int Constraints::getNIAC( )
+{
+ return inactive.getLength( );
+}
+
+
+/*
+ * g e t A c t i v e
+ */
+inline Indexlist* Constraints::getActive( )
+{
+ return &active;
+}
+
+
+/*
+ * g e t I n a c t i v e
+ */
+inline Indexlist* Constraints::getInactive( )
+{
+ return &inactive;
+}
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/SRC/CyclingManager.cpp b/phonelibs/qpoases/SRC/CyclingManager.cpp
index 7bbccdac2..27c2996ef 100644
--- a/phonelibs/qpoases/SRC/CyclingManager.cpp
+++ b/phonelibs/qpoases/SRC/CyclingManager.cpp
@@ -1,188 +1,188 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file SRC/CyclingManager.cpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Implementation of the CyclingManager class designed to detect
- * and handle possible cycling during QP iterations.
- *
- */
-
-
-#include
-
-
-/*****************************************************************************
- * P U B L I C *
- *****************************************************************************/
-
-
-/*
- * C y c l i n g M a n a g e r
- */
-CyclingManager::CyclingManager( ) : nV( 0 ),
- nC( 0 )
-{
- cyclingDetected = BT_FALSE;
-}
-
-
-/*
- * C y c l i n g M a n a g e r
- */
-CyclingManager::CyclingManager( const CyclingManager& rhs ) : nV( rhs.nV ),
- nC( rhs.nC ),
- cyclingDetected( rhs.cyclingDetected )
-{
- int i;
-
- for( i=0; i= 0 ) && ( number < nV ) )
- {
- status[number] = _status;
- return SUCCESSFUL_RETURN;
- }
- else
- return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
- }
- else
- {
- /* Set cycling status of a constraint. */
- if ( ( number >= 0 ) && ( number < nC ) )
- {
- status[nV+number] = _status;
- return SUCCESSFUL_RETURN;
- }
- else
- return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
- }
-}
-
-
-/*
- * g e t C y c l i n g S t a t u s
- */
-CyclingStatus CyclingManager::getCyclingStatus( int number, BooleanType isBound ) const
-{
- if ( isBound == BT_TRUE )
- {
- /* Return cycling status of a bound. */
- if ( ( number >= 0 ) && ( number < nV ) )
- return status[number];
- }
- else
- {
- /* Return cycling status of a constraint. */
- if ( ( number >= 0 ) && ( number < nC ) )
- return status[nV+number];
- }
-
- return CYC_NOT_INVOLVED;
-}
-
-
-/*
- * c l e a r C y c l i n g D a t a
- */
-returnValue CyclingManager::clearCyclingData( )
-{
- int i;
-
- /* Reset all status values ... */
- for( i=0; i
+
+
+/*****************************************************************************
+ * P U B L I C *
+ *****************************************************************************/
+
+
+/*
+ * C y c l i n g M a n a g e r
+ */
+CyclingManager::CyclingManager( ) : nV( 0 ),
+ nC( 0 )
+{
+ cyclingDetected = BT_FALSE;
+}
+
+
+/*
+ * C y c l i n g M a n a g e r
+ */
+CyclingManager::CyclingManager( const CyclingManager& rhs ) : nV( rhs.nV ),
+ nC( rhs.nC ),
+ cyclingDetected( rhs.cyclingDetected )
+{
+ int i;
+
+ for( i=0; i= 0 ) && ( number < nV ) )
+ {
+ status[number] = _status;
+ return SUCCESSFUL_RETURN;
+ }
+ else
+ return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
+ }
+ else
+ {
+ /* Set cycling status of a constraint. */
+ if ( ( number >= 0 ) && ( number < nC ) )
+ {
+ status[nV+number] = _status;
+ return SUCCESSFUL_RETURN;
+ }
+ else
+ return THROWERROR( RET_INDEX_OUT_OF_BOUNDS );
+ }
+}
+
+
+/*
+ * g e t C y c l i n g S t a t u s
+ */
+CyclingStatus CyclingManager::getCyclingStatus( int number, BooleanType isBound ) const
+{
+ if ( isBound == BT_TRUE )
+ {
+ /* Return cycling status of a bound. */
+ if ( ( number >= 0 ) && ( number < nV ) )
+ return status[number];
+ }
+ else
+ {
+ /* Return cycling status of a constraint. */
+ if ( ( number >= 0 ) && ( number < nC ) )
+ return status[nV+number];
+ }
+
+ return CYC_NOT_INVOLVED;
+}
+
+
+/*
+ * c l e a r C y c l i n g D a t a
+ */
+returnValue CyclingManager::clearCyclingData( )
+{
+ int i;
+
+ /* Reset all status values ... */
+ for( i=0; i
-
-
-/*****************************************************************************
- * P U B L I C *
- *****************************************************************************/
-
-
-/*
- * I n d e x l i s t
- */
-Indexlist::Indexlist( ) : length( 0 ),
- first( -1 ),
- last( -1 ),
- lastusedindex( -1 ),
- physicallength( INDEXLISTFACTOR*(NVMAX+NCMAX) )
-{
- int i;
-
- for( i=0; i= 0 ) && ( number[n] >= 0 ) )
- numberarray[i] = number[n];
- else
- return THROWERROR( RET_INDEXLIST_CORRUPTED );
-
- n = next[n];
- }
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * g e t I n d e x
- */
-int Indexlist::getIndex( int givennumber ) const
-{
- int i;
- int n = first;
- int index = -1; /* return -1 by default */
-
- /* Run trough indexlist until number is found, if so return it index. */
- for ( i=0; i
+
+
+/*****************************************************************************
+ * P U B L I C *
+ *****************************************************************************/
+
+
+/*
+ * I n d e x l i s t
+ */
+Indexlist::Indexlist( ) : length( 0 ),
+ first( -1 ),
+ last( -1 ),
+ lastusedindex( -1 ),
+ physicallength( INDEXLISTFACTOR*(NVMAX+NCMAX) )
+{
+ int i;
+
+ for( i=0; i= 0 ) && ( number[n] >= 0 ) )
+ numberarray[i] = number[n];
+ else
+ return THROWERROR( RET_INDEXLIST_CORRUPTED );
+
+ n = next[n];
+ }
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * g e t I n d e x
+ */
+int Indexlist::getIndex( int givennumber ) const
+{
+ int i;
+ int n = first;
+ int index = -1; /* return -1 by default */
+
+ /* Run trough indexlist until number is found, if so return it index. */
+ for ( i=0; i length ) )
- return -RET_INDEXLIST_OUTOFBOUNDS;
-
- return number[physicalindex];
-}
-
-
-/*
- * g e t L e n g t h
- */
-inline int Indexlist::getLength( )
-{
- return length;
-}
-
-
-/*
- * g e t L a s t N u m b e r
- */
-inline int Indexlist::getLastNumber( ) const
-{
- return number[last];
-}
-
-
-/*
- * g e t L a s t N u m b e r
- */
-inline BooleanType Indexlist::isMember( int _number ) const
-{
- if ( getIndex( _number ) >= 0 )
- return BT_TRUE;
- else
- return BT_FALSE;
-}
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file SRC/Indexlist.ipp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Implementation of inlined member functions of the Indexlist class designed
+ * to manage index lists of constraints and bounds within a QProblem_SubjectTo.
+ */
+
+
+
+/*****************************************************************************
+ * P U B L I C *
+ *****************************************************************************/
+
+/*
+ * g e t N u m b e r
+ */
+inline int Indexlist::getNumber( int physicalindex ) const
+{
+ /* consistency check */
+ if ( ( physicalindex < 0 ) || ( physicalindex > length ) )
+ return -RET_INDEXLIST_OUTOFBOUNDS;
+
+ return number[physicalindex];
+}
+
+
+/*
+ * g e t L e n g t h
+ */
+inline int Indexlist::getLength( )
+{
+ return length;
+}
+
+
+/*
+ * g e t L a s t N u m b e r
+ */
+inline int Indexlist::getLastNumber( ) const
+{
+ return number[last];
+}
+
+
+/*
+ * g e t L a s t N u m b e r
+ */
+inline BooleanType Indexlist::isMember( int _number ) const
+{
+ if ( getIndex( _number ) >= 0 )
+ return BT_TRUE;
+ else
+ return BT_FALSE;
+}
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/SRC/MessageHandling.cpp b/phonelibs/qpoases/SRC/MessageHandling.cpp
index 6e68cd855..18a7654a1 100644
--- a/phonelibs/qpoases/SRC/MessageHandling.cpp
+++ b/phonelibs/qpoases/SRC/MessageHandling.cpp
@@ -1,529 +1,529 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file SRC/MessageHandling.cpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Implementation of the MessageHandling class including global return values.
- *
- */
-
-
-
-#include
-#include
-
-
-
-
-/** Defines pairs of global return values and messages. */
-MessageHandling::ReturnValueList returnValueList[] =
-{
-/* miscellaneous */
-{ SUCCESSFUL_RETURN, "Successful return", VS_VISIBLE },
-{ RET_DIV_BY_ZERO, "Division by zero", VS_VISIBLE },
-{ RET_INDEX_OUT_OF_BOUNDS, "Index out of bounds", VS_VISIBLE },
-{ RET_INVALID_ARGUMENTS, "At least one of the arguments is invalid", VS_VISIBLE },
-{ RET_ERROR_UNDEFINED, "Error number undefined", VS_VISIBLE },
-{ RET_WARNING_UNDEFINED, "Warning number undefined", VS_VISIBLE },
-{ RET_INFO_UNDEFINED, "Info number undefined", VS_VISIBLE },
-{ RET_EWI_UNDEFINED, "Error/warning/info number undefined", VS_VISIBLE },
-{ RET_AVAILABLE_WITH_LINUX_ONLY, "This function is available under Linux only", VS_HIDDEN },
-{ RET_UNKNOWN_BUG, "The error occured is not yet known", VS_VISIBLE },
-{ RET_PRINTLEVEL_CHANGED, "Print level changed", VS_VISIBLE },
-{ RET_NOT_YET_IMPLEMENTED, "Requested function is not yet implemented.", VS_VISIBLE },
-/* Indexlist */
-{ RET_INDEXLIST_MUST_BE_REORDERD, "Index list has to be reordered", VS_VISIBLE },
-{ RET_INDEXLIST_EXCEEDS_MAX_LENGTH, "Index list exceeds its maximal physical length", VS_VISIBLE },
-{ RET_INDEXLIST_CORRUPTED, "Index list corrupted", VS_VISIBLE },
-{ RET_INDEXLIST_OUTOFBOUNDS, "Physical index is out of bounds", VS_VISIBLE },
-{ RET_INDEXLIST_ADD_FAILED, "Adding indices from another index set failed", VS_VISIBLE },
-{ RET_INDEXLIST_INTERSECT_FAILED, "Intersection with another index set failed", VS_VISIBLE },
-/* SubjectTo / Bounds / Constraints */
-{ RET_INDEX_ALREADY_OF_DESIRED_STATUS, "Index is already of desired status", VS_VISIBLE },
-{ RET_SWAPINDEX_FAILED, "Cannot swap between different indexsets", VS_VISIBLE },
-{ RET_ADDINDEX_FAILED, "Adding index to index set failed", VS_VISIBLE },
-{ RET_NOTHING_TO_DO, "Nothing to do", VS_VISIBLE },
-{ RET_SETUP_BOUND_FAILED, "Setting up bound index failed", VS_VISIBLE },
-{ RET_SETUP_CONSTRAINT_FAILED, "Setting up constraint index failed", VS_VISIBLE },
-{ RET_MOVING_BOUND_FAILED, "Moving bound between index sets failed", VS_VISIBLE },
-{ RET_MOVING_CONSTRAINT_FAILED, "Moving constraint between index sets failed", VS_VISIBLE },
-/* QProblem */
-{ RET_QP_ALREADY_INITIALISED, "QProblem has already been initialised", VS_VISIBLE },
-{ RET_NO_INIT_WITH_STANDARD_SOLVER, "Initialisation via extern QP solver is not yet implemented", VS_VISIBLE },
-{ RET_RESET_FAILED, "Reset failed", VS_VISIBLE },
-{ RET_INIT_FAILED, "Initialisation failed", VS_VISIBLE },
-{ RET_INIT_FAILED_TQ, "Initialisation failed due to TQ factorisation", VS_VISIBLE },
-{ RET_INIT_FAILED_CHOLESKY, "Initialisation failed due to Cholesky decomposition", VS_VISIBLE },
-{ RET_INIT_FAILED_HOTSTART, "Initialisation failed! QP could not be solved!", VS_VISIBLE },
-{ RET_INIT_FAILED_INFEASIBILITY, "Initial QP could not be solved due to infeasibility!", VS_VISIBLE },
-{ RET_INIT_FAILED_UNBOUNDEDNESS, "Initial QP could not be solved due to unboundedness!", VS_VISIBLE },
-{ RET_INIT_SUCCESSFUL, "Initialisation done", VS_VISIBLE },
-{ RET_OBTAINING_WORKINGSET_FAILED, "Failed to obtain working set for auxiliary QP", VS_VISIBLE },
-{ RET_SETUP_WORKINGSET_FAILED, "Failed to setup working set for auxiliary QP", VS_VISIBLE },
-{ RET_SETUP_AUXILIARYQP_FAILED, "Failed to setup auxiliary QP for initialised homotopy", VS_VISIBLE },
-{ RET_NO_EXTERN_SOLVER, "No extern QP solver available", VS_VISIBLE },
-{ RET_QP_UNBOUNDED, "QP is unbounded", VS_VISIBLE },
-{ RET_QP_INFEASIBLE, "QP is infeasible", VS_VISIBLE },
-{ RET_QP_NOT_SOLVED, "Problems occured while solving QP with standard solver", VS_VISIBLE },
-{ RET_QP_SOLVED, "QP successfully solved", VS_VISIBLE },
-{ RET_UNABLE_TO_SOLVE_QP, "Problems occured while solving QP", VS_VISIBLE },
-{ RET_INITIALISATION_STARTED, "Starting problem initialisation...", VS_VISIBLE },
-{ RET_HOTSTART_FAILED, "Unable to perform homotopy due to internal error", VS_VISIBLE },
-{ RET_HOTSTART_FAILED_TO_INIT, "Unable to initialise problem", VS_VISIBLE },
-{ RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED, "Unable to perform homotopy as previous QP is not solved", VS_VISIBLE },
-{ RET_ITERATION_STARTED, "Iteration", VS_VISIBLE },
-{ RET_SHIFT_DETERMINATION_FAILED, "Determination of shift of the QP data failed", VS_VISIBLE },
-{ RET_STEPDIRECTION_DETERMINATION_FAILED, "Determination of step direction failed", VS_VISIBLE },
-{ RET_STEPLENGTH_DETERMINATION_FAILED, "Determination of step direction failed", VS_VISIBLE },
-{ RET_OPTIMAL_SOLUTION_FOUND, "Optimal solution of neighbouring QP found", VS_VISIBLE },
-{ RET_HOMOTOPY_STEP_FAILED, "Unable to perform homotopy step", VS_VISIBLE },
-{ RET_HOTSTART_STOPPED_INFEASIBILITY, "Premature homotopy termination because QP is infeasible", VS_VISIBLE },
-{ RET_HOTSTART_STOPPED_UNBOUNDEDNESS, "Premature homotopy termination because QP is unbounded", VS_VISIBLE },
-{ RET_WORKINGSET_UPDATE_FAILED, "Unable to update working sets according to initial guesses", VS_VISIBLE },
-{ RET_MAX_NWSR_REACHED, "Maximum number of working set recalculations performed", VS_VISIBLE },
-{ RET_CONSTRAINTS_NOT_SPECIFIED, "Problem does comprise constraints! You have to specify new constraints' bounds", VS_VISIBLE },
-{ RET_INVALID_FACTORISATION_FLAG, "Invalid factorisation flag", VS_VISIBLE },
-{ RET_UNABLE_TO_SAVE_QPDATA, "Unable to save QP data", VS_VISIBLE },
-{ RET_STEPDIRECTION_FAILED_TQ, "Abnormal termination due to TQ factorisation", VS_VISIBLE },
-{ RET_STEPDIRECTION_FAILED_CHOLESKY, "Abnormal termination due to Cholesky factorisation", VS_VISIBLE },
-{ RET_CYCLING_DETECTED, "Cycling detected", VS_VISIBLE },
-{ RET_CYCLING_NOT_RESOLVED, "Cycling cannot be resolved, QP is probably infeasible", VS_VISIBLE },
-{ RET_CYCLING_RESOLVED, "Cycling probably resolved", VS_VISIBLE },
-{ RET_STEPSIZE, "", VS_VISIBLE },
-{ RET_STEPSIZE_NONPOSITIVE, "", VS_VISIBLE },
-{ RET_SETUPSUBJECTTOTYPE_FAILED, "Setup of SubjectToTypes failed", VS_VISIBLE },
-{ RET_ADDCONSTRAINT_FAILED, "Addition of constraint to working set failed", VS_VISIBLE },
-{ RET_ADDCONSTRAINT_FAILED_INFEASIBILITY, "Addition of constraint to working set failed", VS_VISIBLE },
-{ RET_ADDBOUND_FAILED, "Addition of bound to working set failed", VS_VISIBLE },
-{ RET_ADDBOUND_FAILED_INFEASIBILITY, "Addition of bound to working set failed", VS_VISIBLE },
-{ RET_REMOVECONSTRAINT_FAILED, "Removal of constraint from working set failed", VS_VISIBLE },
-{ RET_REMOVEBOUND_FAILED, "Removal of bound from working set failed", VS_VISIBLE },
-{ RET_REMOVE_FROM_ACTIVESET, "Removing from active set:", VS_VISIBLE },
-{ RET_ADD_TO_ACTIVESET, "Adding to active set:", VS_VISIBLE },
-{ RET_REMOVE_FROM_ACTIVESET_FAILED, "Removing from active set failed", VS_VISIBLE },
-{ RET_ADD_TO_ACTIVESET_FAILED, "Adding to active set failed", VS_VISIBLE },
-{ RET_CONSTRAINT_ALREADY_ACTIVE, "Constraint is already active", VS_VISIBLE },
-{ RET_ALL_CONSTRAINTS_ACTIVE, "All constraints are active, no further constraint can be added", VS_VISIBLE },
-{ RET_LINEARLY_DEPENDENT, "New bound/constraint is linearly dependent", VS_VISIBLE },
-{ RET_LINEARLY_INDEPENDENT, "New bound/constraint is linearly independent", VS_VISIBLE },
-{ RET_LI_RESOLVED, "Linear independence of active contraint matrix successfully resolved", VS_VISIBLE },
-{ RET_ENSURELI_FAILED, "Failed to ensure linear indepence of active contraint matrix", VS_VISIBLE },
-{ RET_ENSURELI_FAILED_TQ, "Abnormal termination due to TQ factorisation", VS_VISIBLE },
-{ RET_ENSURELI_FAILED_NOINDEX, "No index found, QP is probably infeasible", VS_VISIBLE },
-{ RET_ENSURELI_FAILED_CYCLING, "Cycling detected, QP is probably infeasible", VS_VISIBLE },
-{ RET_BOUND_ALREADY_ACTIVE, "Bound is already active", VS_VISIBLE },
-{ RET_ALL_BOUNDS_ACTIVE, "All bounds are active, no further bound can be added", VS_VISIBLE },
-{ RET_CONSTRAINT_NOT_ACTIVE, "Constraint is not active", VS_VISIBLE },
-{ RET_BOUND_NOT_ACTIVE, "Bound is not active", VS_VISIBLE },
-{ RET_HESSIAN_NOT_SPD, "Projected Hessian matrix not positive definite", VS_VISIBLE },
-{ RET_MATRIX_SHIFT_FAILED, "Unable to update matrices or to transform vectors", VS_VISIBLE },
-{ RET_MATRIX_FACTORISATION_FAILED, "Unable to calculate new matrix factorisations", VS_VISIBLE },
-{ RET_PRINT_ITERATION_FAILED, "Unable to print information on current iteration", VS_VISIBLE },
-{ RET_NO_GLOBAL_MESSAGE_OUTPUTFILE, "No global message output file initialised", VS_VISIBLE },
-/* Utils */
-{ RET_UNABLE_TO_OPEN_FILE, "Unable to open file", VS_VISIBLE },
-{ RET_UNABLE_TO_WRITE_FILE, "Unable to write into file", VS_VISIBLE },
-{ RET_UNABLE_TO_READ_FILE, "Unable to read from file", VS_VISIBLE },
-{ RET_FILEDATA_INCONSISTENT, "File contains inconsistent data", VS_VISIBLE },
-/* SolutionAnalysis */
-{ RET_NO_SOLUTION, "QP solution does not satisfy KKT optimality conditions", VS_VISIBLE },
-{ RET_INACCURATE_SOLUTION, "KKT optimality conditions not satisfied to sufficient accuracy", VS_VISIBLE },
-{ TERMINAL_LIST_ELEMENT, "", VS_HIDDEN } /* IMPORTANT: Terminal list element! */
-};
-
-
-
-/*****************************************************************************
- * P U B L I C *
- *****************************************************************************/
-
-
-/*
- * M e s s a g e H a n d l i n g
- */
-MessageHandling::MessageHandling( ) : errorVisibility( VS_VISIBLE ),
- warningVisibility( VS_VISIBLE ),
- infoVisibility( VS_VISIBLE ),
- outputFile( myStdout ),
- errorCount( 0 )
-{
-}
-
-/*
- * M e s s a g e H a n d l i n g
- */
-MessageHandling::MessageHandling( myFILE* _outputFile ) :
- errorVisibility( VS_VISIBLE ),
- warningVisibility( VS_VISIBLE ),
- infoVisibility( VS_VISIBLE ),
- outputFile( _outputFile ),
- errorCount( 0 )
-{
-}
-
-/*
- * M e s s a g e H a n d l i n g
- */
-MessageHandling::MessageHandling( VisibilityStatus _errorVisibility,
- VisibilityStatus _warningVisibility,
- VisibilityStatus _infoVisibility
- ) :
- errorVisibility( _errorVisibility ),
- warningVisibility( _warningVisibility ),
- infoVisibility( _infoVisibility ),
- outputFile( myStderr ),
- errorCount( 0 )
-{
-}
-
-/*
- * M e s s a g e H a n d l i n g
- */
-MessageHandling::MessageHandling( myFILE* _outputFile,
- VisibilityStatus _errorVisibility,
- VisibilityStatus _warningVisibility,
- VisibilityStatus _infoVisibility
- ) :
- errorVisibility( _errorVisibility ),
- warningVisibility( _warningVisibility ),
- infoVisibility( _infoVisibility ),
- outputFile( _outputFile ),
- errorCount( 0 )
-{
-}
-
-
-
-/*
- * M e s s a g e H a n d l i n g
- */
-MessageHandling::MessageHandling( const MessageHandling& rhs ) :
- errorVisibility( rhs.errorVisibility ),
- warningVisibility( rhs.warningVisibility ),
- infoVisibility( rhs.infoVisibility ),
- outputFile( rhs.outputFile ),
- errorCount( rhs.errorCount )
-{
-}
-
-
-/*
- * ~ M e s s a g e H a n d l i n g
- */
-MessageHandling::~MessageHandling( )
-{
- #ifdef PC_DEBUG
- if ( outputFile != 0 )
- fclose( outputFile );
- #endif
-}
-
-
-/*
- * o p e r a t o r =
- */
-MessageHandling& MessageHandling::operator=( const MessageHandling& rhs )
-{
- if ( this != &rhs )
- {
- errorVisibility = rhs.errorVisibility;
- warningVisibility = rhs.warningVisibility;
- infoVisibility = rhs.infoVisibility;
- outputFile = rhs.outputFile;
- errorCount = rhs.errorCount;
- }
-
- return *this;
-}
-
-
-/*
- * t h r o w E r r o r
- */
-returnValue MessageHandling::throwError(
- returnValue Enumber,
- const char* additionaltext,
- const char* functionname,
- const char* filename,
- const unsigned long linenumber,
- VisibilityStatus localVisibilityStatus
- )
-{
- /* consistency check */
- if ( Enumber <= SUCCESSFUL_RETURN )
- return throwError( RET_ERROR_UNDEFINED,0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
-
- /* Call to common throwMessage function if error shall be displayed. */
- if ( errorVisibility == VS_VISIBLE )
- return throwMessage( Enumber,additionaltext,functionname,filename,linenumber,localVisibilityStatus,"ERROR" );
- else
- return Enumber;
-}
-
-
-/*
- * t h r o w W a r n i n g
- */
-returnValue MessageHandling::throwWarning(
- returnValue Wnumber,
- const char* additionaltext,
- const char* functionname,
- const char* filename,
- const unsigned long linenumber,
- VisibilityStatus localVisibilityStatus
- )
-{
- /* consistency check */
- if ( Wnumber <= SUCCESSFUL_RETURN )
- return throwError( RET_WARNING_UNDEFINED,0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
-
- /* Call to common throwMessage function if warning shall be displayed. */
- if ( warningVisibility == VS_VISIBLE )
- return throwMessage( Wnumber,additionaltext,functionname,filename,linenumber,localVisibilityStatus,"WARNING" );
- else
- return Wnumber;
-}
-
-
-/*
- * t h r o w I n f o
- */
-returnValue MessageHandling::throwInfo(
- returnValue Inumber,
- const char* additionaltext,
- const char* functionname,
- const char* filename,
- const unsigned long linenumber,
- VisibilityStatus localVisibilityStatus
- )
-{
- /* consistency check */
- if ( Inumber < SUCCESSFUL_RETURN )
- return throwError( RET_INFO_UNDEFINED,0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
-
- /* Call to common throwMessage function if info shall be displayed. */
- if ( infoVisibility == VS_VISIBLE )
- return throwMessage( Inumber,additionaltext,functionname,filename,linenumber,localVisibilityStatus,"INFO" );
- else
- return Inumber;
-}
-
-
-/*
- * r e s e t
- */
-returnValue MessageHandling::reset( )
-{
- setErrorVisibilityStatus( VS_VISIBLE );
- setWarningVisibilityStatus( VS_VISIBLE );
- setInfoVisibilityStatus( VS_VISIBLE );
-
- setOutputFile( myStderr );
- setErrorCount( 0 );
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * l i s t A l l M e s s a g e s
- */
-returnValue MessageHandling::listAllMessages( )
-{
- #ifdef PC_DEBUG
- int keypos = 0;
- char myPrintfString[160];
-
- /* Run through whole returnValueList and print each item. */
- while ( returnValueList[keypos].key != TERMINAL_LIST_ELEMENT )
- {
- sprintf( myPrintfString," %d - %s \n",keypos,returnValueList[keypos].data );
- myPrintf( myPrintfString );
-
- ++keypos;
- }
- #endif
-
- return SUCCESSFUL_RETURN;
-}
-
-
-
-/*****************************************************************************
- * P R O T E C T E D *
- *****************************************************************************/
-
-
-#ifdef PC_DEBUG /* Re-define throwMessage function for embedded code! */
-
-/*
- * t h r o w M e s s a g e
- */
-returnValue MessageHandling::throwMessage(
- returnValue RETnumber,
- const char* additionaltext,
- const char* functionname,
- const char* filename,
- const unsigned long linenumber,
- VisibilityStatus localVisibilityStatus,
- const char* RETstring
- )
-{
- int i;
-
- int keypos = 0;
- char myPrintfString[160];
-
- /* 1) Determine number of whitespace for output. */
- char whitespaces[41];
- int numberOfWhitespaces = (errorCount-1)*2;
-
- if ( numberOfWhitespaces < 0 )
- numberOfWhitespaces = 0;
-
- if ( numberOfWhitespaces > 40 )
- numberOfWhitespaces = 40;
-
- for( i=0; i 0 )
- {
- sprintf( myPrintfString,"%s->", whitespaces );
- myPrintf( myPrintfString );
- }
-
- if ( additionaltext == 0 )
- {
- sprintf( myPrintfString,"%s (%s, %s:%d): \t%s\n",
- RETstring,functionname,filename,(int)linenumber,returnValueList[keypos].data
- );
- myPrintf( myPrintfString );
- }
- else
- {
- sprintf( myPrintfString,"%s (%s, %s:%d): \t%s %s\n",
- RETstring,functionname,filename,(int)linenumber,returnValueList[keypos].data,additionaltext
- );
- myPrintf( myPrintfString );
- }
-
- /* take care of proper indention for subsequent error messages */
- if ( RETstring[0] == 'E' )
- {
- ++errorCount;
- }
- else
- {
- if ( errorCount > 0 )
- myPrintf( "\n" );
- errorCount = 0;
- }
- }
-
- return RETnumber;
-}
-
-#else /* = PC_DEBUG not defined */
-
-/*
- * t h r o w M e s s a g e
- */
-returnValue MessageHandling::throwMessage(
- returnValue RETnumber,
- const char* additionaltext,
- const char* functionname,
- const char* filename,
- const unsigned long linenumber,
- VisibilityStatus localVisibilityStatus,
- const char* RETstring
- )
-{
- /* DUMMY CODE FOR PRETENDING USE OF ARGUMENTS
- * FOR SUPPRESSING COMPILER WARNINGS! */
- int i = 0;
- if ( additionaltext == 0 ) i++;
- if ( functionname == 0 ) i++;
- if ( filename == 0 ) i++;
- if ( linenumber == 0 ) i++;
- if ( localVisibilityStatus == VS_VISIBLE ) i++;
- if ( RETstring == 0 ) i++;
- /* END OF DUMMY CODE */
-
- return RETnumber;
-}
-
-#endif /* PC_DEBUG */
-
-
-
-/*****************************************************************************
- * G L O B A L M E S S A G E H A N D L E R *
- *****************************************************************************/
-
-
-/** Global message handler for all qpOASES modules.*/
-MessageHandling globalMessageHandler( myStderr,VS_VISIBLE,VS_VISIBLE,VS_VISIBLE );
-
-
-/*
- * g e t G l o b a l M e s s a g e H a n d l e r
- */
-MessageHandling* getGlobalMessageHandler( )
-{
- return &globalMessageHandler;
-}
-
-const char* MessageHandling::getErrorString(int error)
-{
- return returnValueList[ error ].data;
-}
-
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file SRC/MessageHandling.cpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Implementation of the MessageHandling class including global return values.
+ *
+ */
+
+
+
+#include
+#include
+
+
+
+
+/** Defines pairs of global return values and messages. */
+MessageHandling::ReturnValueList returnValueList[] =
+{
+/* miscellaneous */
+{ SUCCESSFUL_RETURN, "Successful return", VS_VISIBLE },
+{ RET_DIV_BY_ZERO, "Division by zero", VS_VISIBLE },
+{ RET_INDEX_OUT_OF_BOUNDS, "Index out of bounds", VS_VISIBLE },
+{ RET_INVALID_ARGUMENTS, "At least one of the arguments is invalid", VS_VISIBLE },
+{ RET_ERROR_UNDEFINED, "Error number undefined", VS_VISIBLE },
+{ RET_WARNING_UNDEFINED, "Warning number undefined", VS_VISIBLE },
+{ RET_INFO_UNDEFINED, "Info number undefined", VS_VISIBLE },
+{ RET_EWI_UNDEFINED, "Error/warning/info number undefined", VS_VISIBLE },
+{ RET_AVAILABLE_WITH_LINUX_ONLY, "This function is available under Linux only", VS_HIDDEN },
+{ RET_UNKNOWN_BUG, "The error occured is not yet known", VS_VISIBLE },
+{ RET_PRINTLEVEL_CHANGED, "Print level changed", VS_VISIBLE },
+{ RET_NOT_YET_IMPLEMENTED, "Requested function is not yet implemented.", VS_VISIBLE },
+/* Indexlist */
+{ RET_INDEXLIST_MUST_BE_REORDERD, "Index list has to be reordered", VS_VISIBLE },
+{ RET_INDEXLIST_EXCEEDS_MAX_LENGTH, "Index list exceeds its maximal physical length", VS_VISIBLE },
+{ RET_INDEXLIST_CORRUPTED, "Index list corrupted", VS_VISIBLE },
+{ RET_INDEXLIST_OUTOFBOUNDS, "Physical index is out of bounds", VS_VISIBLE },
+{ RET_INDEXLIST_ADD_FAILED, "Adding indices from another index set failed", VS_VISIBLE },
+{ RET_INDEXLIST_INTERSECT_FAILED, "Intersection with another index set failed", VS_VISIBLE },
+/* SubjectTo / Bounds / Constraints */
+{ RET_INDEX_ALREADY_OF_DESIRED_STATUS, "Index is already of desired status", VS_VISIBLE },
+{ RET_SWAPINDEX_FAILED, "Cannot swap between different indexsets", VS_VISIBLE },
+{ RET_ADDINDEX_FAILED, "Adding index to index set failed", VS_VISIBLE },
+{ RET_NOTHING_TO_DO, "Nothing to do", VS_VISIBLE },
+{ RET_SETUP_BOUND_FAILED, "Setting up bound index failed", VS_VISIBLE },
+{ RET_SETUP_CONSTRAINT_FAILED, "Setting up constraint index failed", VS_VISIBLE },
+{ RET_MOVING_BOUND_FAILED, "Moving bound between index sets failed", VS_VISIBLE },
+{ RET_MOVING_CONSTRAINT_FAILED, "Moving constraint between index sets failed", VS_VISIBLE },
+/* QProblem */
+{ RET_QP_ALREADY_INITIALISED, "QProblem has already been initialised", VS_VISIBLE },
+{ RET_NO_INIT_WITH_STANDARD_SOLVER, "Initialisation via extern QP solver is not yet implemented", VS_VISIBLE },
+{ RET_RESET_FAILED, "Reset failed", VS_VISIBLE },
+{ RET_INIT_FAILED, "Initialisation failed", VS_VISIBLE },
+{ RET_INIT_FAILED_TQ, "Initialisation failed due to TQ factorisation", VS_VISIBLE },
+{ RET_INIT_FAILED_CHOLESKY, "Initialisation failed due to Cholesky decomposition", VS_VISIBLE },
+{ RET_INIT_FAILED_HOTSTART, "Initialisation failed! QP could not be solved!", VS_VISIBLE },
+{ RET_INIT_FAILED_INFEASIBILITY, "Initial QP could not be solved due to infeasibility!", VS_VISIBLE },
+{ RET_INIT_FAILED_UNBOUNDEDNESS, "Initial QP could not be solved due to unboundedness!", VS_VISIBLE },
+{ RET_INIT_SUCCESSFUL, "Initialisation done", VS_VISIBLE },
+{ RET_OBTAINING_WORKINGSET_FAILED, "Failed to obtain working set for auxiliary QP", VS_VISIBLE },
+{ RET_SETUP_WORKINGSET_FAILED, "Failed to setup working set for auxiliary QP", VS_VISIBLE },
+{ RET_SETUP_AUXILIARYQP_FAILED, "Failed to setup auxiliary QP for initialised homotopy", VS_VISIBLE },
+{ RET_NO_EXTERN_SOLVER, "No extern QP solver available", VS_VISIBLE },
+{ RET_QP_UNBOUNDED, "QP is unbounded", VS_VISIBLE },
+{ RET_QP_INFEASIBLE, "QP is infeasible", VS_VISIBLE },
+{ RET_QP_NOT_SOLVED, "Problems occured while solving QP with standard solver", VS_VISIBLE },
+{ RET_QP_SOLVED, "QP successfully solved", VS_VISIBLE },
+{ RET_UNABLE_TO_SOLVE_QP, "Problems occured while solving QP", VS_VISIBLE },
+{ RET_INITIALISATION_STARTED, "Starting problem initialisation...", VS_VISIBLE },
+{ RET_HOTSTART_FAILED, "Unable to perform homotopy due to internal error", VS_VISIBLE },
+{ RET_HOTSTART_FAILED_TO_INIT, "Unable to initialise problem", VS_VISIBLE },
+{ RET_HOTSTART_FAILED_AS_QP_NOT_INITIALISED, "Unable to perform homotopy as previous QP is not solved", VS_VISIBLE },
+{ RET_ITERATION_STARTED, "Iteration", VS_VISIBLE },
+{ RET_SHIFT_DETERMINATION_FAILED, "Determination of shift of the QP data failed", VS_VISIBLE },
+{ RET_STEPDIRECTION_DETERMINATION_FAILED, "Determination of step direction failed", VS_VISIBLE },
+{ RET_STEPLENGTH_DETERMINATION_FAILED, "Determination of step direction failed", VS_VISIBLE },
+{ RET_OPTIMAL_SOLUTION_FOUND, "Optimal solution of neighbouring QP found", VS_VISIBLE },
+{ RET_HOMOTOPY_STEP_FAILED, "Unable to perform homotopy step", VS_VISIBLE },
+{ RET_HOTSTART_STOPPED_INFEASIBILITY, "Premature homotopy termination because QP is infeasible", VS_VISIBLE },
+{ RET_HOTSTART_STOPPED_UNBOUNDEDNESS, "Premature homotopy termination because QP is unbounded", VS_VISIBLE },
+{ RET_WORKINGSET_UPDATE_FAILED, "Unable to update working sets according to initial guesses", VS_VISIBLE },
+{ RET_MAX_NWSR_REACHED, "Maximum number of working set recalculations performed", VS_VISIBLE },
+{ RET_CONSTRAINTS_NOT_SPECIFIED, "Problem does comprise constraints! You have to specify new constraints' bounds", VS_VISIBLE },
+{ RET_INVALID_FACTORISATION_FLAG, "Invalid factorisation flag", VS_VISIBLE },
+{ RET_UNABLE_TO_SAVE_QPDATA, "Unable to save QP data", VS_VISIBLE },
+{ RET_STEPDIRECTION_FAILED_TQ, "Abnormal termination due to TQ factorisation", VS_VISIBLE },
+{ RET_STEPDIRECTION_FAILED_CHOLESKY, "Abnormal termination due to Cholesky factorisation", VS_VISIBLE },
+{ RET_CYCLING_DETECTED, "Cycling detected", VS_VISIBLE },
+{ RET_CYCLING_NOT_RESOLVED, "Cycling cannot be resolved, QP is probably infeasible", VS_VISIBLE },
+{ RET_CYCLING_RESOLVED, "Cycling probably resolved", VS_VISIBLE },
+{ RET_STEPSIZE, "", VS_VISIBLE },
+{ RET_STEPSIZE_NONPOSITIVE, "", VS_VISIBLE },
+{ RET_SETUPSUBJECTTOTYPE_FAILED, "Setup of SubjectToTypes failed", VS_VISIBLE },
+{ RET_ADDCONSTRAINT_FAILED, "Addition of constraint to working set failed", VS_VISIBLE },
+{ RET_ADDCONSTRAINT_FAILED_INFEASIBILITY, "Addition of constraint to working set failed", VS_VISIBLE },
+{ RET_ADDBOUND_FAILED, "Addition of bound to working set failed", VS_VISIBLE },
+{ RET_ADDBOUND_FAILED_INFEASIBILITY, "Addition of bound to working set failed", VS_VISIBLE },
+{ RET_REMOVECONSTRAINT_FAILED, "Removal of constraint from working set failed", VS_VISIBLE },
+{ RET_REMOVEBOUND_FAILED, "Removal of bound from working set failed", VS_VISIBLE },
+{ RET_REMOVE_FROM_ACTIVESET, "Removing from active set:", VS_VISIBLE },
+{ RET_ADD_TO_ACTIVESET, "Adding to active set:", VS_VISIBLE },
+{ RET_REMOVE_FROM_ACTIVESET_FAILED, "Removing from active set failed", VS_VISIBLE },
+{ RET_ADD_TO_ACTIVESET_FAILED, "Adding to active set failed", VS_VISIBLE },
+{ RET_CONSTRAINT_ALREADY_ACTIVE, "Constraint is already active", VS_VISIBLE },
+{ RET_ALL_CONSTRAINTS_ACTIVE, "All constraints are active, no further constraint can be added", VS_VISIBLE },
+{ RET_LINEARLY_DEPENDENT, "New bound/constraint is linearly dependent", VS_VISIBLE },
+{ RET_LINEARLY_INDEPENDENT, "New bound/constraint is linearly independent", VS_VISIBLE },
+{ RET_LI_RESOLVED, "Linear independence of active contraint matrix successfully resolved", VS_VISIBLE },
+{ RET_ENSURELI_FAILED, "Failed to ensure linear indepence of active contraint matrix", VS_VISIBLE },
+{ RET_ENSURELI_FAILED_TQ, "Abnormal termination due to TQ factorisation", VS_VISIBLE },
+{ RET_ENSURELI_FAILED_NOINDEX, "No index found, QP is probably infeasible", VS_VISIBLE },
+{ RET_ENSURELI_FAILED_CYCLING, "Cycling detected, QP is probably infeasible", VS_VISIBLE },
+{ RET_BOUND_ALREADY_ACTIVE, "Bound is already active", VS_VISIBLE },
+{ RET_ALL_BOUNDS_ACTIVE, "All bounds are active, no further bound can be added", VS_VISIBLE },
+{ RET_CONSTRAINT_NOT_ACTIVE, "Constraint is not active", VS_VISIBLE },
+{ RET_BOUND_NOT_ACTIVE, "Bound is not active", VS_VISIBLE },
+{ RET_HESSIAN_NOT_SPD, "Projected Hessian matrix not positive definite", VS_VISIBLE },
+{ RET_MATRIX_SHIFT_FAILED, "Unable to update matrices or to transform vectors", VS_VISIBLE },
+{ RET_MATRIX_FACTORISATION_FAILED, "Unable to calculate new matrix factorisations", VS_VISIBLE },
+{ RET_PRINT_ITERATION_FAILED, "Unable to print information on current iteration", VS_VISIBLE },
+{ RET_NO_GLOBAL_MESSAGE_OUTPUTFILE, "No global message output file initialised", VS_VISIBLE },
+/* Utils */
+{ RET_UNABLE_TO_OPEN_FILE, "Unable to open file", VS_VISIBLE },
+{ RET_UNABLE_TO_WRITE_FILE, "Unable to write into file", VS_VISIBLE },
+{ RET_UNABLE_TO_READ_FILE, "Unable to read from file", VS_VISIBLE },
+{ RET_FILEDATA_INCONSISTENT, "File contains inconsistent data", VS_VISIBLE },
+/* SolutionAnalysis */
+{ RET_NO_SOLUTION, "QP solution does not satisfy KKT optimality conditions", VS_VISIBLE },
+{ RET_INACCURATE_SOLUTION, "KKT optimality conditions not satisfied to sufficient accuracy", VS_VISIBLE },
+{ TERMINAL_LIST_ELEMENT, "", VS_HIDDEN } /* IMPORTANT: Terminal list element! */
+};
+
+
+
+/*****************************************************************************
+ * P U B L I C *
+ *****************************************************************************/
+
+
+/*
+ * M e s s a g e H a n d l i n g
+ */
+MessageHandling::MessageHandling( ) : errorVisibility( VS_VISIBLE ),
+ warningVisibility( VS_VISIBLE ),
+ infoVisibility( VS_VISIBLE ),
+ outputFile( myStdout ),
+ errorCount( 0 )
+{
+}
+
+/*
+ * M e s s a g e H a n d l i n g
+ */
+MessageHandling::MessageHandling( myFILE* _outputFile ) :
+ errorVisibility( VS_VISIBLE ),
+ warningVisibility( VS_VISIBLE ),
+ infoVisibility( VS_VISIBLE ),
+ outputFile( _outputFile ),
+ errorCount( 0 )
+{
+}
+
+/*
+ * M e s s a g e H a n d l i n g
+ */
+MessageHandling::MessageHandling( VisibilityStatus _errorVisibility,
+ VisibilityStatus _warningVisibility,
+ VisibilityStatus _infoVisibility
+ ) :
+ errorVisibility( _errorVisibility ),
+ warningVisibility( _warningVisibility ),
+ infoVisibility( _infoVisibility ),
+ outputFile( myStderr ),
+ errorCount( 0 )
+{
+}
+
+/*
+ * M e s s a g e H a n d l i n g
+ */
+MessageHandling::MessageHandling( myFILE* _outputFile,
+ VisibilityStatus _errorVisibility,
+ VisibilityStatus _warningVisibility,
+ VisibilityStatus _infoVisibility
+ ) :
+ errorVisibility( _errorVisibility ),
+ warningVisibility( _warningVisibility ),
+ infoVisibility( _infoVisibility ),
+ outputFile( _outputFile ),
+ errorCount( 0 )
+{
+}
+
+
+
+/*
+ * M e s s a g e H a n d l i n g
+ */
+MessageHandling::MessageHandling( const MessageHandling& rhs ) :
+ errorVisibility( rhs.errorVisibility ),
+ warningVisibility( rhs.warningVisibility ),
+ infoVisibility( rhs.infoVisibility ),
+ outputFile( rhs.outputFile ),
+ errorCount( rhs.errorCount )
+{
+}
+
+
+/*
+ * ~ M e s s a g e H a n d l i n g
+ */
+MessageHandling::~MessageHandling( )
+{
+ #ifdef PC_DEBUG
+ if ( outputFile != 0 )
+ fclose( outputFile );
+ #endif
+}
+
+
+/*
+ * o p e r a t o r =
+ */
+MessageHandling& MessageHandling::operator=( const MessageHandling& rhs )
+{
+ if ( this != &rhs )
+ {
+ errorVisibility = rhs.errorVisibility;
+ warningVisibility = rhs.warningVisibility;
+ infoVisibility = rhs.infoVisibility;
+ outputFile = rhs.outputFile;
+ errorCount = rhs.errorCount;
+ }
+
+ return *this;
+}
+
+
+/*
+ * t h r o w E r r o r
+ */
+returnValue MessageHandling::throwError(
+ returnValue Enumber,
+ const char* additionaltext,
+ const char* functionname,
+ const char* filename,
+ const unsigned long linenumber,
+ VisibilityStatus localVisibilityStatus
+ )
+{
+ /* consistency check */
+ if ( Enumber <= SUCCESSFUL_RETURN )
+ return throwError( RET_ERROR_UNDEFINED,0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
+
+ /* Call to common throwMessage function if error shall be displayed. */
+ if ( errorVisibility == VS_VISIBLE )
+ return throwMessage( Enumber,additionaltext,functionname,filename,linenumber,localVisibilityStatus,"ERROR" );
+ else
+ return Enumber;
+}
+
+
+/*
+ * t h r o w W a r n i n g
+ */
+returnValue MessageHandling::throwWarning(
+ returnValue Wnumber,
+ const char* additionaltext,
+ const char* functionname,
+ const char* filename,
+ const unsigned long linenumber,
+ VisibilityStatus localVisibilityStatus
+ )
+{
+ /* consistency check */
+ if ( Wnumber <= SUCCESSFUL_RETURN )
+ return throwError( RET_WARNING_UNDEFINED,0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
+
+ /* Call to common throwMessage function if warning shall be displayed. */
+ if ( warningVisibility == VS_VISIBLE )
+ return throwMessage( Wnumber,additionaltext,functionname,filename,linenumber,localVisibilityStatus,"WARNING" );
+ else
+ return Wnumber;
+}
+
+
+/*
+ * t h r o w I n f o
+ */
+returnValue MessageHandling::throwInfo(
+ returnValue Inumber,
+ const char* additionaltext,
+ const char* functionname,
+ const char* filename,
+ const unsigned long linenumber,
+ VisibilityStatus localVisibilityStatus
+ )
+{
+ /* consistency check */
+ if ( Inumber < SUCCESSFUL_RETURN )
+ return throwError( RET_INFO_UNDEFINED,0,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
+
+ /* Call to common throwMessage function if info shall be displayed. */
+ if ( infoVisibility == VS_VISIBLE )
+ return throwMessage( Inumber,additionaltext,functionname,filename,linenumber,localVisibilityStatus,"INFO" );
+ else
+ return Inumber;
+}
+
+
+/*
+ * r e s e t
+ */
+returnValue MessageHandling::reset( )
+{
+ setErrorVisibilityStatus( VS_VISIBLE );
+ setWarningVisibilityStatus( VS_VISIBLE );
+ setInfoVisibilityStatus( VS_VISIBLE );
+
+ setOutputFile( myStderr );
+ setErrorCount( 0 );
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * l i s t A l l M e s s a g e s
+ */
+returnValue MessageHandling::listAllMessages( )
+{
+ #ifdef PC_DEBUG
+ int keypos = 0;
+ char myPrintfString[160];
+
+ /* Run through whole returnValueList and print each item. */
+ while ( returnValueList[keypos].key != TERMINAL_LIST_ELEMENT )
+ {
+ sprintf( myPrintfString," %d - %s \n",keypos,returnValueList[keypos].data );
+ myPrintf( myPrintfString );
+
+ ++keypos;
+ }
+ #endif
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+
+/*****************************************************************************
+ * P R O T E C T E D *
+ *****************************************************************************/
+
+
+#ifdef PC_DEBUG /* Re-define throwMessage function for embedded code! */
+
+/*
+ * t h r o w M e s s a g e
+ */
+returnValue MessageHandling::throwMessage(
+ returnValue RETnumber,
+ const char* additionaltext,
+ const char* functionname,
+ const char* filename,
+ const unsigned long linenumber,
+ VisibilityStatus localVisibilityStatus,
+ const char* RETstring
+ )
+{
+ int i;
+
+ int keypos = 0;
+ char myPrintfString[160];
+
+ /* 1) Determine number of whitespace for output. */
+ char whitespaces[41];
+ int numberOfWhitespaces = (errorCount-1)*2;
+
+ if ( numberOfWhitespaces < 0 )
+ numberOfWhitespaces = 0;
+
+ if ( numberOfWhitespaces > 40 )
+ numberOfWhitespaces = 40;
+
+ for( i=0; i 0 )
+ {
+ sprintf( myPrintfString,"%s->", whitespaces );
+ myPrintf( myPrintfString );
+ }
+
+ if ( additionaltext == 0 )
+ {
+ sprintf( myPrintfString,"%s (%s, %s:%d): \t%s\n",
+ RETstring,functionname,filename,(int)linenumber,returnValueList[keypos].data
+ );
+ myPrintf( myPrintfString );
+ }
+ else
+ {
+ sprintf( myPrintfString,"%s (%s, %s:%d): \t%s %s\n",
+ RETstring,functionname,filename,(int)linenumber,returnValueList[keypos].data,additionaltext
+ );
+ myPrintf( myPrintfString );
+ }
+
+ /* take care of proper indention for subsequent error messages */
+ if ( RETstring[0] == 'E' )
+ {
+ ++errorCount;
+ }
+ else
+ {
+ if ( errorCount > 0 )
+ myPrintf( "\n" );
+ errorCount = 0;
+ }
+ }
+
+ return RETnumber;
+}
+
+#else /* = PC_DEBUG not defined */
+
+/*
+ * t h r o w M e s s a g e
+ */
+returnValue MessageHandling::throwMessage(
+ returnValue RETnumber,
+ const char* additionaltext,
+ const char* functionname,
+ const char* filename,
+ const unsigned long linenumber,
+ VisibilityStatus localVisibilityStatus,
+ const char* RETstring
+ )
+{
+ /* DUMMY CODE FOR PRETENDING USE OF ARGUMENTS
+ * FOR SUPPRESSING COMPILER WARNINGS! */
+ int i = 0;
+ if ( additionaltext == 0 ) i++;
+ if ( functionname == 0 ) i++;
+ if ( filename == 0 ) i++;
+ if ( linenumber == 0 ) i++;
+ if ( localVisibilityStatus == VS_VISIBLE ) i++;
+ if ( RETstring == 0 ) i++;
+ /* END OF DUMMY CODE */
+
+ return RETnumber;
+}
+
+#endif /* PC_DEBUG */
+
+
+
+/*****************************************************************************
+ * G L O B A L M E S S A G E H A N D L E R *
+ *****************************************************************************/
+
+
+/** Global message handler for all qpOASES modules.*/
+MessageHandling globalMessageHandler( myStderr,VS_VISIBLE,VS_VISIBLE,VS_VISIBLE );
+
+
+/*
+ * g e t G l o b a l M e s s a g e H a n d l e r
+ */
+MessageHandling* getGlobalMessageHandler( )
+{
+ return &globalMessageHandler;
+}
+
+const char* MessageHandling::getErrorString(int error)
+{
+ return returnValueList[ error ].data;
+}
+
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/SRC/MessageHandling.ipp b/phonelibs/qpoases/SRC/MessageHandling.ipp
index ad9624b3d..033957b28 100644
--- a/phonelibs/qpoases/SRC/MessageHandling.ipp
+++ b/phonelibs/qpoases/SRC/MessageHandling.ipp
@@ -1,137 +1,137 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file SRC/MessageHandling.ipp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Implementation of inlined member functions of the MessageHandling class.
- */
-
-
-
-/*****************************************************************************
- * P U B L I C *
- *****************************************************************************/
-
-/*
- * g e t E r r o r V i s i b i l i t y S t a t u s
- */
-inline VisibilityStatus MessageHandling::getErrorVisibilityStatus( ) const
-{
- return errorVisibility;
-}
-
-
-/*
- * g e t W a r n i n g V i s i b i l i t y S t a t u s
- */
-inline VisibilityStatus MessageHandling::getWarningVisibilityStatus( ) const
-{
- return warningVisibility;
-}
-
-
-/*
- * g e t I n f o V i s i b i l i t y S t a t u s
- */
-inline VisibilityStatus MessageHandling::getInfoVisibilityStatus( ) const
-{
- return infoVisibility;
-}
-
-
-/*
- * g e t O u t p u t F i l e
- */
-inline myFILE* MessageHandling::getOutputFile( ) const
-{
- return outputFile;
-}
-
-
-/*
- * g e t E r r o r C o u n t
- */
-inline int MessageHandling::getErrorCount( ) const
-{
- return errorCount;
-}
-
-
-/*
- * s e t E r r o r V i s i b i l i t y S t a t u s
- */
-inline void MessageHandling::setErrorVisibilityStatus( VisibilityStatus _errorVisibility )
-{
- errorVisibility = _errorVisibility;
-}
-
-
-/*
- * s e t W a r n i n g V i s i b i l i t y S t a t u s
- */
-inline void MessageHandling::setWarningVisibilityStatus( VisibilityStatus _warningVisibility )
-{
- warningVisibility = _warningVisibility;
-}
-
-
-/*
- * s e t I n f o V i s i b i l i t y S t a t u s
- */
-inline void MessageHandling::setInfoVisibilityStatus( VisibilityStatus _infoVisibility )
-{
- infoVisibility = _infoVisibility;
-}
-
-
-/*
- * s e t O u t p u t F i l e
- */
-inline void MessageHandling::setOutputFile( myFILE* _outputFile )
-{
- outputFile = _outputFile;
-}
-
-
-/*
- * s e t E r r o r C o u n t
- */
-inline returnValue MessageHandling::setErrorCount( int _errorCount )
-{
- if ( _errorCount >= 0 )
- {
- errorCount = _errorCount;
- return SUCCESSFUL_RETURN;
- }
- else
- return RET_INVALID_ARGUMENTS;
-}
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file SRC/MessageHandling.ipp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Implementation of inlined member functions of the MessageHandling class.
+ */
+
+
+
+/*****************************************************************************
+ * P U B L I C *
+ *****************************************************************************/
+
+/*
+ * g e t E r r o r V i s i b i l i t y S t a t u s
+ */
+inline VisibilityStatus MessageHandling::getErrorVisibilityStatus( ) const
+{
+ return errorVisibility;
+}
+
+
+/*
+ * g e t W a r n i n g V i s i b i l i t y S t a t u s
+ */
+inline VisibilityStatus MessageHandling::getWarningVisibilityStatus( ) const
+{
+ return warningVisibility;
+}
+
+
+/*
+ * g e t I n f o V i s i b i l i t y S t a t u s
+ */
+inline VisibilityStatus MessageHandling::getInfoVisibilityStatus( ) const
+{
+ return infoVisibility;
+}
+
+
+/*
+ * g e t O u t p u t F i l e
+ */
+inline myFILE* MessageHandling::getOutputFile( ) const
+{
+ return outputFile;
+}
+
+
+/*
+ * g e t E r r o r C o u n t
+ */
+inline int MessageHandling::getErrorCount( ) const
+{
+ return errorCount;
+}
+
+
+/*
+ * s e t E r r o r V i s i b i l i t y S t a t u s
+ */
+inline void MessageHandling::setErrorVisibilityStatus( VisibilityStatus _errorVisibility )
+{
+ errorVisibility = _errorVisibility;
+}
+
+
+/*
+ * s e t W a r n i n g V i s i b i l i t y S t a t u s
+ */
+inline void MessageHandling::setWarningVisibilityStatus( VisibilityStatus _warningVisibility )
+{
+ warningVisibility = _warningVisibility;
+}
+
+
+/*
+ * s e t I n f o V i s i b i l i t y S t a t u s
+ */
+inline void MessageHandling::setInfoVisibilityStatus( VisibilityStatus _infoVisibility )
+{
+ infoVisibility = _infoVisibility;
+}
+
+
+/*
+ * s e t O u t p u t F i l e
+ */
+inline void MessageHandling::setOutputFile( myFILE* _outputFile )
+{
+ outputFile = _outputFile;
+}
+
+
+/*
+ * s e t E r r o r C o u n t
+ */
+inline returnValue MessageHandling::setErrorCount( int _errorCount )
+{
+ if ( _errorCount >= 0 )
+ {
+ errorCount = _errorCount;
+ return SUCCESSFUL_RETURN;
+ }
+ else
+ return RET_INVALID_ARGUMENTS;
+}
+
+
+/*
+ * end of file
+ */
diff --git a/phonelibs/qpoases/SRC/QProblem.cpp b/phonelibs/qpoases/SRC/QProblem.cpp
index 68a6a79e5..75e2f324d 100644
--- a/phonelibs/qpoases/SRC/QProblem.cpp
+++ b/phonelibs/qpoases/SRC/QProblem.cpp
@@ -1,3867 +1,3867 @@
-/*
- * This file is part of qpOASES.
- *
- * qpOASES -- An Implementation of the Online Active Set Strategy.
- * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
- *
- * qpOASES is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * qpOASES is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with qpOASES; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-
-/**
- * \file SRC/QProblem.cpp
- * \author Hans Joachim Ferreau
- * \version 1.3embedded
- * \date 2007-2008
- *
- * Implementation of the QProblem class which is able to use the newly
- * developed online active set strategy for parametric quadratic programming.
- */
-
-
-#include
-
-#include
-
-void printmatrix2(char *name, double *A, int m, int n) {
- int i, j;
-
- printf("%s = [...\n", name);
- for (i = 0; i < m; i++) {
- for (j = 0; j < n; j++)
- printf(" % 9.4f", A[i*n+j]);
- printf(",\n");
- }
- printf("];\n");
-}
-
-//#define __PERFORM_KKT_TEST__
-
-
-/*****************************************************************************
- * P U B L I C *
- *****************************************************************************/
-
-
-/*
- * Q P r o b l e m
- */
-QProblem::QProblem( ) : QProblemB( )
-{
- constraints.init( 0 );
-
- sizeT = 0;
-
- cyclingManager.init( 0,0 );
-}
-
-
-/*
- * Q P r o b l e m
- */
-QProblem::QProblem( int _nV, int _nC ) : QProblemB( _nV )
-{
- /* consistency checks */
- if ( _nV <= 0 )
- _nV = 1;
-
- if ( _nC < 0 )
- {
- _nC = 0;
- THROWERROR( RET_INVALID_ARGUMENTS );
- }
-
- constraints.init( _nC );
-
-
- sizeT = _nC;
- if ( _nC > _nV )
- sizeT = _nV;
-
- cyclingManager.init( _nV,_nC );
-}
-
-
-/*
- * Q P r o b l e m
- */
-QProblem::QProblem( const QProblem& rhs ) : QProblemB( rhs )
-{
- int i, j;
-
- int _nV = rhs.bounds.getNV( );
- int _nC = rhs.constraints.getNC( );
-
- for( i=0; i<_nC; ++i )
- for( j=0; j<_nV; ++j )
- A[i*NVMAX + j] = rhs.A[i*NVMAX + j];
-
- for( i=0; i<_nC; ++i )
- lbA[i] = rhs.lbA[i];
-
- for( i=0; i<_nC; ++i )
- ubA[i] = rhs.ubA[i];
-
- constraints = rhs.constraints;
-
- for( i=0; i<(_nV+_nC); ++i )
- y[i] = rhs.y[i];
-
-
- sizeT = rhs.sizeT;
-
- for( i=0; ithrowInfo( RET_ITERATION_STARTED,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
- #endif
- }
-
- /* 1) Setup index arrays. */
- if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_HOTSTART_FAILED );
-
- if ( bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_HOTSTART_FAILED );
-
- if ( constraints.getActive( )->getNumberArray( AC_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_HOTSTART_FAILED );
-
- if ( constraints.getInactive( )->getNumberArray( IAC_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_HOTSTART_FAILED );
-
- /* 2) Detemination of shift direction of the gradient and the (constraints') bounds. */
- returnvalue = hotstart_determineDataShift( FX_idx, AC_idx,
- g_new,lbA_new,ubA_new,lb_new,ub_new,
- delta_g,delta_lbA,delta_ubA,delta_lb,delta_ub,
- Delta_bC_isZero, Delta_bB_isZero );
- if ( returnvalue != SUCCESSFUL_RETURN )
- {
- nWSR = l;
- THROWERROR( RET_SHIFT_DETERMINATION_FAILED );
- return returnvalue;
- }
-
- /* 3) Determination of step direction of X and Y. */
- returnvalue = hotstart_determineStepDirection( FR_idx,FX_idx,AC_idx,
- delta_g,delta_lbA,delta_ubA,delta_lb,delta_ub,
- Delta_bC_isZero, Delta_bB_isZero,
- delta_xFX,delta_xFR,delta_yAC,delta_yFX
- );
- if ( returnvalue != SUCCESSFUL_RETURN )
- {
- nWSR = l;
- THROWERROR( RET_STEPDIRECTION_DETERMINATION_FAILED );
- return returnvalue;
- }
-
- /* 4) Determination of step length TAU. */
- returnvalue = hotstart_determineStepLength( FR_idx,FX_idx,AC_idx,IAC_idx,
- delta_lbA,delta_ubA,delta_lb,delta_ub,
- delta_xFX,delta_xFR,delta_yAC,delta_yFX,delta_Ax,
- BC_idx,BC_status,BC_isBound
- );
- if ( returnvalue != SUCCESSFUL_RETURN )
- {
- nWSR = l;
- THROWERROR( RET_STEPLENGTH_DETERMINATION_FAILED );
- return returnvalue;
- }
-
- /* 5) Realisation of the homotopy step. */
- returnvalue = hotstart_performStep( FR_idx,FX_idx,AC_idx,IAC_idx,
- delta_g,delta_lbA,delta_ubA,delta_lb,delta_ub,
- delta_xFX,delta_xFR,delta_yAC,delta_yFX,delta_Ax,
- BC_idx,BC_status,BC_isBound
- );
-
- if ( returnvalue != SUCCESSFUL_RETURN )
- {
- nWSR = l;
-
- /* stop runtime measurement */
- if ( cputime != 0 )
- *cputime = getCPUtime( ) - starttime;
-
- /* optimal solution found? */
- if ( returnvalue == RET_OPTIMAL_SOLUTION_FOUND )
- {
- status = QPS_SOLVED;
-
- if ( printlevel == PL_HIGH )
- THROWINFO( RET_OPTIMAL_SOLUTION_FOUND );
-
- #ifdef PC_DEBUG
- if ( printIteration( l,BC_idx,BC_status,BC_isBound ) != SUCCESSFUL_RETURN )
- THROWERROR( RET_PRINT_ITERATION_FAILED ); /* do not pass this as return value! */
- #endif
-
- /* check KKT optimality conditions */
- return checkKKTconditions( );
- }
- else
- {
- /* checks for infeasibility... */
- if ( isInfeasible( ) == BT_TRUE )
- {
- status = QPS_HOMOTOPYQPSOLVED;
- return THROWERROR( RET_HOTSTART_STOPPED_INFEASIBILITY );
- }
-
- /* ...unboundedness... */
- if ( unbounded == BT_TRUE ) /* not necessary since objective function convex! */
- return THROWERROR( RET_HOTSTART_STOPPED_UNBOUNDEDNESS );
-
- /* ... and throw unspecific error otherwise */
- THROWERROR( RET_HOMOTOPY_STEP_FAILED );
- return returnvalue;
- }
- }
-
- /* 6) Output information of successful QP iteration. */
- status = QPS_HOMOTOPYQPSOLVED;
-
- #ifdef PC_DEBUG
- if ( printIteration( l,BC_idx,BC_status,BC_isBound ) != SUCCESSFUL_RETURN )
- THROWERROR( RET_PRINT_ITERATION_FAILED ); /* do not pass this as return value! */
- #endif
- }
-
-
- /* stop runtime measurement */
- if ( cputime != 0 )
- *cputime = getCPUtime( ) - starttime;
-
-
- /* if programm gets to here, output information that QP could not be solved
- * within the given maximum numbers of working set changes */
- if ( printlevel == PL_HIGH )
- {
- #ifdef PC_DEBUG
- sprintf( messageString,"(nWSR = %d)",nWSR );
- return getGlobalMessageHandler( )->throwWarning( RET_MAX_NWSR_REACHED,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
- #endif
- }
-
- /* Finally check KKT optimality conditions. */
- returnValue returnvalueKKTcheck = checkKKTconditions( );
-
- if ( returnvalueKKTcheck != SUCCESSFUL_RETURN )
- return returnvalueKKTcheck;
- else
- return RET_MAX_NWSR_REACHED;
-}
-
-
-/*
- * g e t N Z
- */
-int QProblem::getNZ( )
-{
- /* nZ = nFR - nAC */
- return bounds.getFree( )->getLength( ) - constraints.getActive( )->getLength( );
-}
-
-
-/*
- * g e t D u a l S o l u t i o n
- */
-returnValue QProblem::getDualSolution( real_t* const yOpt ) const
-{
- int i;
-
- /* return optimal dual solution vector
- * only if current QP has been solved */
- if ( ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||
- ( getStatus( ) == QPS_HOMOTOPYQPSOLVED ) ||
- ( getStatus( ) == QPS_SOLVED ) )
- {
- for( i=0; i -INFTY )
- {
- constraints.setNoLower( BT_FALSE );
- break;
- }
- }
-
- /* 2) Check if upper constraints' bounds are present. */
- constraints.setNoUpper( BT_TRUE );
- for( i=0; i INFTY - BOUNDTOL ) )
- {
- constraints.setType( i,ST_UNBOUNDED );
- ++nUC;
- }
- else
- {
- if ( lbA[i] > ubA[i] - BOUNDTOL )
- {
- constraints.setType( i,ST_EQUALITY );
- ++nEC;
- }
- else
- {
- constraints.setType( i,ST_BOUNDED );
- }
- }
- }
-
- /* 4) Set dimensions of constraints structure. */
- constraints.setNEC( nEC );
- constraints.setNUC( nUC );
- constraints.setNIC( nC - nEC - nUC );
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * c h o l e s k y D e c o m p o s i t i o n P r o j e c t e d
- */
-returnValue QProblem::setupCholeskyDecompositionProjected( )
-{
- int i, j, k, ii, kk;
- int nV = getNV( );
- int nFR = getNFR( );
- int nZ = getNZ( );
-
- /* 1) Initialises R with all zeros. */
- for( i=0; i 0 )
- {
- int FR_idx[NVMAX];
- if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_INDEXLIST_CORRUPTED );
-
-#if 0
- real_t HZ[NVMAX*NVMAX];
- real_t ZHZ[NVMAX*NVMAX];
-
- /* calculate H*Z */
- for ( i=0; i=0; --k )
- sum -= R[k*NVMAX + i] * R[k*NVMAX + i];
-
- if ( sum > 0.0 )
- {
- R[i*NVMAX + i] = sqrt( sum );
- inv = 1.0 / R[i * NVMAX + i];
- }
- else
- {
- hessianType = HST_SEMIDEF;
- return THROWERROR( RET_HESSIAN_NOT_SPD );
- }
-
- for( j=(i+1); j=0; --k )
- sum -= R[k*NVMAX + i] * R[k*NVMAX + j];
-
- R[i*NVMAX + j] = sum * inv;
- }
- }
-#else
- real_t HZ[NVMAX];
- real_t ZHZ[NVMAX];
-
- real_t sum, inv;
- for (j = 0; j < nZ; ++j)
- {
- /* Cache one column of Z. */
- for (i = 0; i < NVMAX; ++i)
- ZHZ[i] = Q[i * NVMAX + j];
-
- /* Create one column of the product H * Z. */
- for (i = 0; i < nFR; ++i)
- {
- ii = FR_idx[i];
-
- sum = 0.0;
- for (k = 0; k < nFR; ++k)
- {
- kk = FR_idx[k];
- sum += H[ii * NVMAX + kk] * ZHZ[kk];
- }
- HZ[ii] = sum;
- }
-
- /* Create one column of the product Z^T * H * Z. */
- for (i = j; i < nZ; ++i)
- ZHZ[ i ] = 0.0;
-
- for (k = 0; k < nFR; ++k)
- {
- kk = FR_idx[k];
- real_t q = HZ[kk];
- for (i = j; i < nZ; ++i)
- {
- ZHZ[i] += Q[kk * NVMAX + i] * q;
- }
- }
-
- /* Use the computed column to update the factorization. */
- /* j == i */
- sum = ZHZ[j];
-
- for (k = (j - 1); k >= 0; --k)
- sum -= R[k * NVMAX + j] * R[k * NVMAX + j];
-
- if (sum > 0.0)
- {
- R[j * NVMAX + j] = sqrt(sum);
- inv = 1.0 / R[j * NVMAX + j];
- }
- else
- {
- hessianType = HST_SEMIDEF;
- return THROWERROR( RET_HESSIAN_NOT_SPD );
- }
-
- for (i = (j + 1); i < nZ; ++i)
- {
- sum = ZHZ[i];
-
- for (k = (j - 1); k >= 0; --k)
- sum -= R[k * NVMAX + j] * R[k * NVMAX + i];
-
- R[j * NVMAX + i] = sum * inv;
- }
- }
-#endif
- }
- }
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * s e t u p T Q f a c t o r i s a t i o n
- */
-returnValue QProblem::setupTQfactorisation( )
-{
- int i, j, ii;
- int nV = getNV( );
- int nFR = getNFR( );
-
- int FR_idx[NVMAX];
- if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_INDEXLIST_CORRUPTED );
-
- /* 1) Set Q to unity matrix. */
- for( i=0; igetStatus( i );
-
- if ( constraints.getType( i ) == ST_EQUALITY )
- {
- if ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
- }
- else
- {
- if ( auxiliaryConstraints->setupConstraint( i,guessedStatus ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
- }
- }
- }
- else /* No initial working set specified. */
- {
- /* Obtain initial working set by "clipping". */
- if ( ( xOpt != 0 ) && ( yOpt == 0 ) )
- {
- for( i=0; isetupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
- continue;
- }
-
- if ( Ax[i] >= ubA[i] - BOUNDTOL )
- {
- if ( auxiliaryConstraints->setupConstraint( i,ST_UPPER ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
- continue;
- }
-
- /* Moreover, add all equality constraints if specified. */
- if ( constraints.getType( i ) == ST_EQUALITY )
- {
- if ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
- }
- else
- {
- if ( auxiliaryConstraints->setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
- }
- }
- }
-
- /* Obtain initial working set in accordance to sign of dual solution vector. */
- if ( ( xOpt == 0 ) && ( yOpt != 0 ) )
- {
- for( i=0; i ZERO )
- {
- if ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
- continue;
- }
-
- if ( yOpt[nV+i] < -ZERO )
- {
- if ( auxiliaryConstraints->setupConstraint( i,ST_UPPER ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
- continue;
- }
-
- /* Moreover, add all equality constraints if specified. */
- if ( constraints.getType( i ) == ST_EQUALITY )
- {
- if ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
- }
- else
- {
- if ( auxiliaryConstraints->setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
- }
- }
- }
-
- /* If xOpt and yOpt are null pointer and no initial working is specified,
- * start with empty working set (or implicitly fixed bounds and equality constraints only)
- * for auxiliary QP. */
- if ( ( xOpt == 0 ) && ( yOpt == 0 ) )
- {
- for( i=0; isetupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
- }
- else
- {
- if ( auxiliaryConstraints->setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
- }
- }
- }
- }
-
- return SUCCESSFUL_RETURN;
-}
-
-
-
-/*
- * s e t u p A u x i l i a r y W o r k i n g S e t
- */
-returnValue QProblem::setupAuxiliaryWorkingSet( const Bounds* const auxiliaryBounds,
- const Constraints* const auxiliaryConstraints,
- BooleanType setupAfresh
- )
-{
- int i;
- int nV = getNV( );
- int nC = getNC( );
-
- /* consistency checks */
- if ( auxiliaryBounds != 0 )
- {
- for( i=0; igetStatus( i ) == ST_UNDEFINED ) )
- return THROWERROR( RET_UNKNOWN_BUG );
- }
- else
- {
- return THROWERROR( RET_INVALID_ARGUMENTS );
- }
-
- if ( auxiliaryConstraints != 0 )
- {
- for( i=0; igetStatus( i ) == ST_UNDEFINED ) )
- return THROWERROR( RET_UNKNOWN_BUG );
- }
- else
- {
- return THROWERROR( RET_INVALID_ARGUMENTS );
- }
-
-
- /* I) SETUP CHOLESKY FLAG:
- * Cholesky decomposition shall only be updated if working set
- * shall be updated (i.e. NOT setup afresh!) */
- BooleanType updateCholesky;
- if ( setupAfresh == BT_TRUE )
- updateCholesky = BT_FALSE;
- else
- updateCholesky = BT_TRUE;
-
-
- /* II) REMOVE FORMERLY ACTIVE (CONSTRAINTS') BOUNDS (IF NECESSARY): */
- if ( setupAfresh == BT_FALSE )
- {
- /* 1) Remove all active constraints that shall be inactive AND
- * all active constraints that are active at the wrong bound. */
- for( i=0; igetStatus( i ) != ST_LOWER ) )
- if ( removeConstraint( i,updateCholesky ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_SETUP_WORKINGSET_FAILED );
-
- if ( ( constraints.getStatus( i ) == ST_UPPER ) && ( auxiliaryConstraints->getStatus( i ) != ST_UPPER ) )
- if ( removeConstraint( i,updateCholesky ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_SETUP_WORKINGSET_FAILED );
- }
-
- /* 2) Remove all active bounds that shall be inactive AND
- * all active bounds that are active at the wrong bound. */
- for( i=0; igetStatus( i ) != ST_LOWER ) )
- if ( removeBound( i,updateCholesky ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_SETUP_WORKINGSET_FAILED );
-
- if ( ( bounds.getStatus( i ) == ST_UPPER ) && ( auxiliaryBounds->getStatus( i ) != ST_UPPER ) )
- if ( removeBound( i,updateCholesky ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_SETUP_WORKINGSET_FAILED );
- }
- }
-
-
- /* III) ADD NEWLY ACTIVE (CONSTRAINTS') BOUNDS: */
- /* 1) Add all inactive bounds that shall be active AND
- * all formerly active bounds that have been active at the wrong bound. */
- for( i=0; igetStatus( i ) != ST_INACTIVE ) )
- {
- /* Add bound only if it is linearly independent from the current working set. */
- if ( addBound_checkLI( i ) == RET_LINEARLY_INDEPENDENT )
- {
- if ( addBound( i,auxiliaryBounds->getStatus( i ),updateCholesky ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_SETUP_WORKINGSET_FAILED );
- }
- }
- }
-
- /* 2) Add all inactive constraints that shall be active AND
- * all formerly active constraints that have been active at the wrong bound. */
- for( i=0; igetStatus( i ) == ST_LOWER ) || ( auxiliaryConstraints->getStatus( i ) == ST_UPPER ) )
- {
- /* formerly inactive */
- if ( constraints.getStatus( i ) == ST_INACTIVE )
- {
- /* Add constraint only if it is linearly independent from the current working set. */
- if ( addConstraint_checkLI( i ) == RET_LINEARLY_INDEPENDENT )
- {
- if ( addConstraint( i,auxiliaryConstraints->getStatus( i ),updateCholesky ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_SETUP_WORKINGSET_FAILED );
- }
- }
- }
- }
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * s e t u p A u x i l i a r y Q P s o l u t i o n
- */
-returnValue QProblem::setupAuxiliaryQPsolution( const real_t* const xOpt, const real_t* const yOpt
- )
-{
- int i, j;
- int nV = getNV( );
- int nC = getNC( );
-
-
- /* Setup primal/dual solution vector for auxiliary initial QP:
- * if a null pointer is passed, a zero vector is assigned;
- * old solution vector is kept if pointer to internal solution vevtor is passed. */
- if ( xOpt != 0 )
- {
- if ( xOpt != x )
- for( i=0; igetStatus( i ) == ST_LOWER )
- lb[i] = x[i];
- else
- lb[i] = x[i] - BOUNDRELAXATION;
-
- if ( auxiliaryBounds->getStatus( i ) == ST_UPPER )
- ub[i] = x[i];
- else
- ub[i] = x[i] + BOUNDRELAXATION;
- }
- }
- break;
-
- case ST_LOWER:
- lb[i] = x[i];
- if ( bounds.getType( i ) == ST_EQUALITY )
- {
- ub[i] = x[i];
- }
- else
- {
- if ( useRelaxation == BT_TRUE )
- ub[i] = x[i] + BOUNDRELAXATION;
- }
- break;
-
- case ST_UPPER:
- ub[i] = x[i];
- if ( bounds.getType( i ) == ST_EQUALITY )
- {
- lb[i] = x[i];
- }
- else
- {
- if ( useRelaxation == BT_TRUE )
- lb[i] = x[i] - BOUNDRELAXATION;
- }
- break;
-
- default:
- return THROWERROR( RET_UNKNOWN_BUG );
- }
- }
-
- /* 2) Setup constraints vectors. */
- for ( i=0; igetStatus( i ) == ST_LOWER )
- lbA[i] = Ax[i];
- else
- lbA[i] = Ax[i] - BOUNDRELAXATION;
-
- if ( auxiliaryConstraints->getStatus( i ) == ST_UPPER )
- ubA[i] = Ax[i];
- else
- ubA[i] = Ax[i] + BOUNDRELAXATION;
- }
- }
- break;
-
- case ST_LOWER:
- lbA[i] = Ax[i];
- if ( constraints.getType( i ) == ST_EQUALITY )
- {
- ubA[i] = Ax[i];
- }
- else
- {
- if ( useRelaxation == BT_TRUE )
- ubA[i] = Ax[i] + BOUNDRELAXATION;
- }
- break;
-
- case ST_UPPER:
- ubA[i] = Ax[i];
- if ( constraints.getType( i ) == ST_EQUALITY )
- {
- lbA[i] = Ax[i];
- }
- else
- {
- if ( useRelaxation == BT_TRUE )
- lbA[i] = Ax[i] - BOUNDRELAXATION;
- }
- break;
-
- default:
- return THROWERROR( RET_UNKNOWN_BUG );
- }
- }
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * a d d C o n s t r a i n t
- */
-returnValue QProblem::addConstraint( int number, SubjectToStatus C_status,
- BooleanType updateCholesky
- )
-{
- int i, j, ii;
-
- /* consistency checks */
- if ( constraints.getStatus( number ) != ST_INACTIVE )
- return THROWERROR( RET_CONSTRAINT_ALREADY_ACTIVE );
-
- if ( ( constraints.getNC( ) - getNAC( ) ) == constraints.getNUC( ) )
- return THROWERROR( RET_ALL_CONSTRAINTS_ACTIVE );
-
- if ( ( getStatus( ) == QPS_NOTINITIALISED ) ||
- ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||
- ( getStatus( ) == QPS_HOMOTOPYQPSOLVED ) ||
- ( getStatus( ) == QPS_SOLVED ) )
- {
- return THROWERROR( RET_UNKNOWN_BUG );
- }
-
-
- /* I) ENSURE LINEAR INDEPENDENCE OF THE WORKING SET,
- * i.e. remove a constraint or bound if linear dependence occurs. */
- /* check for LI only if Cholesky decomposition shall be updated! */
- if ( updateCholesky == BT_TRUE )
- {
- returnValue ensureLIreturnvalue = addConstraint_ensureLI( number,C_status );
-
- switch ( ensureLIreturnvalue )
- {
- case SUCCESSFUL_RETURN:
- break;
-
- case RET_LI_RESOLVED:
- break;
-
- case RET_ENSURELI_FAILED_NOINDEX:
- return THROWERROR( RET_ADDCONSTRAINT_FAILED_INFEASIBILITY );
-
- case RET_ENSURELI_FAILED_CYCLING:
- return THROWERROR( RET_ADDCONSTRAINT_FAILED_INFEASIBILITY );
-
- default:
- return THROWERROR( RET_ENSURELI_FAILED );
- }
- }
-
- /* some definitions */
- int nFR = getNFR( );
- int nAC = getNAC( );
- int nZ = getNZ( );
-
- int tcol = sizeT - nAC;
-
-
- int FR_idx[NVMAX];
- if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_ADDCONSTRAINT_FAILED );
-
- real_t aFR[NVMAX];
- real_t wZ[NVMAX];
- for( i=0; i 0 )
- {
- for( j=0; j 0 )
- {
- /* II) RESTORE TRIANGULAR FORM OF T: */
- /* Use column-wise Givens rotations to restore reverse triangular form
- * of T, simultanenous change of Q (i.e. Z) and R. */
- for( j=0; jgetNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_INDEXLIST_CORRUPTED );
-
- /* Check if constraint is linearly independent from the
- the active ones (<=> is element of null space of Afr). */
- real_t sum;
-
- for( i=0; i 10.0*EPS )
- return RET_LINEARLY_INDEPENDENT;
- }
-
- return RET_LINEARLY_DEPENDENT;
-}
-
-
-/*
- * a d d C o n s t r a i n t _ e n s u r e L I
- */
-returnValue QProblem::addConstraint_ensureLI( int number, SubjectToStatus C_status )
-{
- int i, j, ii, jj;
- int nV = getNV( );
- int nFR = getNFR( );
- int nFX = getNFX( );
- int nAC = getNAC( );
- int nZ = getNZ( );
-
-
- /* I) Check if new constraint is linearly independent from the active ones. */
- returnValue returnvalueCheckLI = addConstraint_checkLI( number );
-
- if ( returnvalueCheckLI == RET_INDEXLIST_CORRUPTED )
- return THROWERROR( RET_ENSURELI_FAILED );
-
- if ( returnvalueCheckLI == RET_LINEARLY_INDEPENDENT )
- return SUCCESSFUL_RETURN;
-
-
- /* II) NEW CONSTRAINT IS LINEARLY DEPENDENT: */
- /* 1) Determine coefficients of linear combination,
- * cf. M.J. Best. Applied Mathematics and Parallel Computing, chapter:
- * An Algorithm for the Solution of the Parametric Quadratic Programming
- * Problem, pages 57-76. Physica-Verlag, Heidelberg, 1996. */
- int FR_idx[NVMAX];
- if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_ENSURELI_FAILED );
-
- int FX_idx[NVMAX];
- if ( bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_ENSURELI_FAILED );
-
- real_t xiC[NCMAX_ALLOC];
- real_t xiC_TMP[NCMAX_ALLOC];
- real_t xiB[NVMAX];
-
- /* 2) Calculate xiC */
- if ( nAC > 0 )
- {
- if ( C_status == ST_LOWER )
- {
- for( i=0; igetNumberArray( AC_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_ENSURELI_FAILED );
-
- if ( C_status == ST_LOWER )
- {
- for( i=0; i ZERO ) && ( y[nV+ii] >= 0.0 ) )
- {
- if ( y[nV+ii]/xiC[i] < y_min )
- {
- y_min = y[nV+ii]/xiC[i];
- y_min_number = ii;
- }
- }
- }
- else
- {
- if ( ( xiC[i] < -ZERO ) && ( y[nV+ii] <= 0.0 ) )
- {
- if ( y[nV+ii]/xiC[i] < y_min )
- {
- y_min = y[nV+ii]/xiC[i];
- y_min_number = ii;
- }
- }
- }
- }
-
- /* 2) Bounds. */
- for( i=0; i ZERO ) && ( y[ii] >= 0.0 ) )
- {
- if ( y[ii]/xiB[i] < y_min )
- {
- y_min = y[ii]/xiB[i];
- y_min_number = ii;
- y_min_isBound = BT_TRUE;
- }
- }
- }
- else
- {
- if ( ( xiB[i] < -ZERO ) && ( y[ii] <= 0.0 ) )
- {
- if ( y[ii]/xiB[i] < y_min )
- {
- y_min = y[ii]/xiB[i];
- y_min_number = ii;
- y_min_isBound = BT_TRUE;
- }
- }
- }
- }
-
- /* setup output preferences */
- #ifdef PC_DEBUG
- char messageString[80];
- VisibilityStatus visibilityStatus;
-
- if ( printlevel == PL_HIGH )
- visibilityStatus = VS_VISIBLE;
- else
- visibilityStatus = VS_HIDDEN;
- #endif
-
-
- /* IV) REMOVE CONSTRAINT/BOUND FOR RESOLVING LINEAR DEPENDENCE: */
- if ( y_min_number >= 0 )
- {
- /* 1) Check for cycling due to infeasibility. */
- if ( ( cyclingManager.getCyclingStatus( number,BT_FALSE ) == CYC_PREV_REMOVED ) &&
- ( cyclingManager.getCyclingStatus( y_min_number,y_min_isBound ) == CYC_PREV_ADDED ) )
- {
- infeasible = BT_TRUE;
-
- return THROWERROR( RET_ENSURELI_FAILED_CYCLING );
- }
- else
- {
- /* set cycling data */
- cyclingManager.clearCyclingData( );
- cyclingManager.setCyclingStatus( number,BT_FALSE, CYC_PREV_ADDED );
- cyclingManager.setCyclingStatus( y_min_number,y_min_isBound, CYC_PREV_REMOVED );
- }
-
- /* 2) Update Lagrange multiplier... */
- for( i=0; ithrowInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );
- #endif
-
- if ( removeBound( y_min_number,BT_TRUE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );
-
- y[y_min_number] = 0.0;
- }
- else
- {
- #ifdef PC_DEBUG
- sprintf( messageString,"constraint no. %d.",y_min_number );
- getGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );
- #endif
-
- if ( removeConstraint( y_min_number,BT_TRUE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );
-
- y[nV+y_min_number] = 0.0;
- }
- }
- else
- {
- /* no constraint/bound can be removed => QP is infeasible! */
- infeasible = BT_TRUE;
-
- return THROWERROR( RET_ENSURELI_FAILED_NOINDEX );
- }
-
- return getGlobalMessageHandler( )->throwInfo( RET_LI_RESOLVED,0,__FUNCTION__,__FILE__,__LINE__,VS_HIDDEN );
-}
-
-
-
-/*
- * a d d B o u n d
- */
-returnValue QProblem::addBound( int number, SubjectToStatus B_status,
- BooleanType updateCholesky
- )
-{
- int i, j, ii;
-
- /* consistency checks */
- if ( bounds.getStatus( number ) != ST_INACTIVE )
- return THROWERROR( RET_BOUND_ALREADY_ACTIVE );
-
- if ( getNFR( ) == bounds.getNUV( ) )
- return THROWERROR( RET_ALL_BOUNDS_ACTIVE );
-
- if ( ( getStatus( ) == QPS_NOTINITIALISED ) ||
- ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||
- ( getStatus( ) == QPS_HOMOTOPYQPSOLVED ) ||
- ( getStatus( ) == QPS_SOLVED ) )
- {
- return THROWERROR( RET_UNKNOWN_BUG );
- }
-
-
- /* I) ENSURE LINEAR INDEPENDENCE OF THE WORKING SET,
- * i.e. remove a constraint or bound if linear dependence occurs. */
- /* check for LI only if Cholesky decomposition shall be updated! */
- if ( updateCholesky == BT_TRUE )
- {
- returnValue ensureLIreturnvalue = addBound_ensureLI( number,B_status );
-
- switch ( ensureLIreturnvalue )
- {
- case SUCCESSFUL_RETURN:
- break;
-
- case RET_LI_RESOLVED:
- break;
-
- case RET_ENSURELI_FAILED_NOINDEX:
- return THROWERROR( RET_ADDBOUND_FAILED_INFEASIBILITY );
-
- case RET_ENSURELI_FAILED_CYCLING:
- return THROWERROR( RET_ADDBOUND_FAILED_INFEASIBILITY );
-
- default:
- return THROWERROR( RET_ENSURELI_FAILED );
- }
- }
-
-
- /* some definitions */
- int nFR = getNFR( );
- int nAC = getNAC( );
- int nZ = getNZ( );
-
- int tcol = sizeT - nAC;
-
-
- /* I) SWAP INDEXLIST OF FREE VARIABLES:
- * move the variable to be fixed to the end of the list of free variables. */
- int lastfreenumber = bounds.getFree( )->getLastNumber( );
- if ( lastfreenumber != number )
- if ( bounds.swapFree( number,lastfreenumber ) != SUCCESSFUL_RETURN )
- THROWERROR( RET_ADDBOUND_FAILED );
-
-
- int FR_idx[NVMAX];
- if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_ADDBOUND_FAILED );
-
- real_t w[NVMAX];
-
-
- /* II) ADD NEW ACTIVE BOUND TO TOP OF MATRIX T: */
- /* 1) add row [wZ wY] = [Z Y](number) at the top of T: assign w */
- for( i=0; i 0 ) /* ( nAC == 0 ) <=> ( nZ == nFR ) <=> Y and T are empty => nothing to do */
- {
- /* store new column a in a temporary vector instead of shifting T one column to the left */
- real_t tmp[NCMAX_ALLOC];
- for( i=0; i is linearly independent from the
- the active ones (<=> is element of null space of Afr). */
- for( i=0; i EPS )
- return RET_LINEARLY_INDEPENDENT;
- }
-
- return RET_LINEARLY_DEPENDENT;
-}
-
-
-/*
- * a d d B o u n d _ e n s u r e L I
- */
-returnValue QProblem::addBound_ensureLI( int number, SubjectToStatus B_status )
-{
- int i, j, ii, jj;
- int nV = getNV( );
- int nFX = getNFX( );
- int nAC = getNAC( );
- int nZ = getNZ( );
-
-
- /* I) Check if new constraint is linearly independent from the active ones. */
- returnValue returnvalueCheckLI = addBound_checkLI( number );
-
- if ( returnvalueCheckLI == RET_LINEARLY_INDEPENDENT )
- return SUCCESSFUL_RETURN;
-
-
- /* II) NEW BOUND IS LINEARLY DEPENDENT: */
- /* 1) Determine coefficients of linear combination,
- * cf. M.J. Best. Applied Mathematics and Parallel Computing, chapter:
- * An Algorithm for the Solution of the Parametric Quadratic Programming
- * Problem, pages 57-76. Physica-Verlag, Heidelberg, 1996. */
- int FR_idx[NVMAX];
- if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_ENSURELI_FAILED );
-
- int FX_idx[NVMAX];
- if ( bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_ENSURELI_FAILED );
-
- int AC_idx[NCMAX_ALLOC];
- if ( constraints.getActive( )->getNumberArray( AC_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_ENSURELI_FAILED );
-
- real_t xiC[NCMAX_ALLOC];
- real_t xiC_TMP[NCMAX_ALLOC];
- real_t xiB[NVMAX];
-
- /* 2) Calculate xiC. */
- if ( nAC > 0 )
- {
- if ( B_status == ST_LOWER )
- {
- for( i=0; i ZERO ) && ( y[nV+ii] >= 0.0 ) )
- {
- if ( y[nV+ii]/xiC[i] < y_min )
- {
- y_min = y[nV+ii]/xiC[i];
- y_min_number = ii;
- }
- }
- }
- else
- {
- if ( ( xiC[i] < -ZERO ) && ( y[nV+ii] <= 0.0 ) )
- {
- if ( y[nV+ii]/xiC[i] < y_min )
- {
- y_min = y[nV+ii]/xiC[i];
- y_min_number = ii;
- }
- }
- }
- }
-
- /* 2) Bounds. */
- for( i=0; i ZERO ) && ( y[ii] >= 0.0 ) )
- {
- if ( y[ii]/xiB[i] < y_min )
- {
- y_min = y[ii]/xiB[i];
- y_min_number = ii;
- y_min_isBound = BT_TRUE;
- }
- }
- }
- else
- {
- if ( ( xiB[i] < -ZERO ) && ( y[ii] <= 0.0 ) )
- {
- if ( y[ii]/xiB[i] < y_min )
- {
- y_min = y[ii]/xiB[i];
- y_min_number = ii;
- y_min_isBound = BT_TRUE;
- }
- }
- }
- }
-
- /* setup output preferences */
- #ifdef PC_DEBUG
- char messageString[80];
- VisibilityStatus visibilityStatus;
-
- if ( printlevel == PL_HIGH )
- visibilityStatus = VS_VISIBLE;
- else
- visibilityStatus = VS_HIDDEN;
- #endif
-
-
- /* IV) REMOVE CONSTRAINT/BOUND FOR RESOLVING LINEAR DEPENDENCE: */
- if ( y_min_number >= 0 )
- {
- /* 1) Check for cycling due to infeasibility. */
- if ( ( cyclingManager.getCyclingStatus( number,BT_TRUE ) == CYC_PREV_REMOVED ) &&
- ( cyclingManager.getCyclingStatus( y_min_number,y_min_isBound ) == CYC_PREV_ADDED ) )
- {
- infeasible = BT_TRUE;
-
- return THROWERROR( RET_ENSURELI_FAILED_CYCLING );
- }
- else
- {
- /* set cycling data */
- cyclingManager.clearCyclingData( );
- cyclingManager.setCyclingStatus( number,BT_TRUE, CYC_PREV_ADDED );
- cyclingManager.setCyclingStatus( y_min_number,y_min_isBound, CYC_PREV_REMOVED );
- }
-
-
- /* 2) Update Lagrange multiplier... */
- for( i=0; ithrowInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );
- #endif
-
- if ( removeBound( y_min_number,BT_TRUE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );
-
- y[y_min_number] = 0.0;
- }
- else
- {
- #ifdef PC_DEBUG
- sprintf( messageString,"constraint no. %d.",y_min_number );
- getGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );
- #endif
-
- if ( removeConstraint( y_min_number,BT_TRUE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );
-
- y[nV+y_min_number] = 0.0;
- }
- }
- else
- {
- /* no constraint/bound can be removed => QP is infeasible! */
- infeasible = BT_TRUE;
-
- return THROWERROR( RET_ENSURELI_FAILED_NOINDEX );
- }
-
- return getGlobalMessageHandler( )->throwInfo( RET_LI_RESOLVED,0,__FUNCTION__,__FILE__,__LINE__,VS_HIDDEN );
-}
-
-
-
-/*
- * r e m o v e C o n s t r a i n t
- */
-returnValue QProblem::removeConstraint( int number,
- BooleanType updateCholesky
- )
-{
- int i, j, ii, jj;
-
- /* consistency check */
- if ( ( getStatus( ) == QPS_NOTINITIALISED ) ||
- ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||
- ( getStatus( ) == QPS_HOMOTOPYQPSOLVED ) ||
- ( getStatus( ) == QPS_SOLVED ) )
- {
- return THROWERROR( RET_UNKNOWN_BUG );
- }
-
- /* some definitions */
- int nFR = getNFR( );
- int nAC = getNAC( );
- int nZ = getNZ( );
-
- int tcol = sizeT - nAC;
- int number_idx = constraints.getActive( )->getIndex( number );
-
-
- /* consistency checks */
- if ( constraints.getStatus( number ) == ST_INACTIVE )
- return THROWERROR( RET_CONSTRAINT_NOT_ACTIVE );
-
- if ( ( number_idx < 0 ) || ( number_idx >= nAC ) )
- return THROWERROR( RET_CONSTRAINT_NOT_ACTIVE );
-
-
- int FR_idx[NVMAX];
- if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_REMOVECONSTRAINT_FAILED );
-
-
- /* I) REMOVE th ROW FROM T,
- * i.e. shift rows number+1 through nAC upwards (instead of the actual
- * constraint number its corresponding index within matrix A is used). */
- if ( number_idx < nAC-1 )
- {
- for( i=(number_idx+1); i=0; --j )
- {
- computeGivens( T[(nAC-2-j)*NVMAX + tcol+1+j],T[(nAC-2-j)*NVMAX + tcol+j], T[(nAC-2-j)*NVMAX + tcol+1+j],T[(nAC-2-j)*NVMAX + tcol+j],c,s );
-
- for( i=(nAC-j-1); i<(nAC-1); ++i )
- applyGivens( c,s,T[i*NVMAX + tcol+1+j],T[i*NVMAX + tcol+j], T[i*NVMAX + tcol+1+j],T[i*NVMAX + tcol+j] );
-
- for( i=0; i 0 )
- {
- real_t ZHz[NVMAX];
- for ( i=0; i 0.0 )
- R[nZ*NVMAX + nZ] = sqrt( rho2 );
- else
- {
- hessianType = HST_SEMIDEF;
- return THROWERROR( RET_HESSIAN_NOT_SPD );
- }
- }
-
- /* IV) UPDATE INDICES */
- if ( constraints.moveActiveToInactive( number ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_REMOVECONSTRAINT_FAILED );
-
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * r e m o v e B o u n d
- */
-returnValue QProblem::removeBound( int number,
- BooleanType updateCholesky
- )
-{
- int i, j, ii, jj;
-
- /* consistency checks */
- if ( bounds.getStatus( number ) == ST_INACTIVE )
- return THROWERROR( RET_BOUND_NOT_ACTIVE );
-
- if ( ( getStatus( ) == QPS_NOTINITIALISED ) ||
- ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||
- ( getStatus( ) == QPS_HOMOTOPYQPSOLVED ) ||
- ( getStatus( ) == QPS_SOLVED ) )
- {
- return THROWERROR( RET_UNKNOWN_BUG );
- }
-
- /* some definitions */
- int nFR = getNFR( );
- int nAC = getNAC( );
- int nZ = getNZ( );
-
- int tcol = sizeT - nAC;
-
-
- /* I) UPDATE INDICES */
- if ( bounds.moveFixedToFree( number ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_REMOVEBOUND_FAILED );
-
-
- int FR_idx[NVMAX];
- if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_REMOVEBOUND_FAILED );
-
- /* I) APPEND th UNITY VECOTR TO Q. */
- int nnFRp1 = FR_idx[nFR];
- for( i=0; i 0 )
- {
- /* store new column a in a temporary vector instead of shifting T one column to the left and appending a */
- int AC_idx[NCMAX_ALLOC];
- if ( constraints.getActive( )->getNumberArray( AC_idx ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_REMOVEBOUND_FAILED );
-
- real_t tmp[NCMAX_ALLOC];
- for( i=0; i=0; --j )
- {
- computeGivens( tmp[nAC-1-j],T[(nAC-1-j)*NVMAX + tcol+j],T[(nAC-1-j)*NVMAX + tcol+j],tmp[nAC-1-j],c,s );
-
- for( i=(nAC-j); i 0 )
- {
- real_t Hz[NVMAX];
- for( i=0; i 0 )
- {
- real_t r[NVMAX];
- real_t rhs[NVMAX];
- for( i=0; i 0.0 )
- R[nZ*NVMAX + nZ] = sqrt( rho2 );
- else
- {
- hessianType = HST_SEMIDEF;
- return THROWERROR( RET_HESSIAN_NOT_SPD );
- }
- }
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * b a c k s o l v e R (CODE DUPLICATE OF QProblemB CLASS!!!)
- */
-returnValue QProblem::backsolveR( const real_t* const b, BooleanType transposed,
- real_t* const a
- )
-{
- /* Call standard backsolve procedure (i.e. removingBound == BT_FALSE). */
- return backsolveR( b,transposed,BT_FALSE,a );
-}
-
-
-/*
- * b a c k s o l v e R (CODE DUPLICATE OF QProblemB CLASS!!!)
- */
-returnValue QProblem::backsolveR( const real_t* const b, BooleanType transposed,
- BooleanType removingBound,
- real_t* const a
- )
-{
- int i, j;
- int nR = getNZ( );
-
- real_t sum;
-
- /* if backsolve is called while removing a bound, reduce nZ by one. */
- if ( removingBound == BT_TRUE )
- --nR;
-
- /* nothing to do */
- if ( nR <= 0 )
- return SUCCESSFUL_RETURN;
-
-
- /* Solve Ra = b, where R might be transposed. */
- if ( transposed == BT_FALSE )
- {
- /* solve Ra = b */
- for( i=(nR-1); i>=0; --i )
- {
- sum = b[i];
- for( j=(i+1); j ZERO )
- a[i] = sum / R[i*NVMAX + i];
- else
- return THROWERROR( RET_DIV_BY_ZERO );
- }
- }
- else
- {
- /* solve R^T*a = b */
- for( i=0; i ZERO )
- a[i] = sum / R[i*NVMAX + i];
- else
- return THROWERROR( RET_DIV_BY_ZERO );
- }
- }
-
- return SUCCESSFUL_RETURN;
-}
-
-
-
-/*
- * b a c k s o l v e T
- */
-returnValue QProblem::backsolveT( const real_t* const b, BooleanType transposed, real_t* const a )
-{
- int i, j;
- int nT = getNAC( );
- int tcol = sizeT - nT;
-
- real_t sum;
-
- /* nothing to do */
- if ( nT <= 0 )
- return SUCCESSFUL_RETURN;
-
-
- /* Solve Ta = b, where T might be transposed. */
- if ( transposed == BT_FALSE )
- {
- /* solve Ta = b */
- for( i=0; i ZERO )
- a[nT-1-i] = sum / T[i*NVMAX + sizeT-1-i];
- else
- return THROWERROR( RET_DIV_BY_ZERO );
- }
- }
- else
- {
- /* solve T^T*a = b */
- for( i=0; i ZERO )
- a[nT-1-i] = sum / T[(nT-1-i)*NVMAX + tcol+i];
- else
- return THROWERROR( RET_DIV_BY_ZERO );
- }
- }
-
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * h o t s t a r t _ d e t e r m i n e D a t a S h i f t
- */
-returnValue QProblem::hotstart_determineDataShift( const int* const FX_idx, const int* const AC_idx,
- const real_t* const g_new, const real_t* const lbA_new, const real_t* const ubA_new,
- const real_t* const lb_new, const real_t* const ub_new,
- real_t* const delta_g, real_t* const delta_lbA, real_t* const delta_ubA,
- real_t* const delta_lb, real_t* const delta_ub,
- BooleanType& Delta_bC_isZero, BooleanType& Delta_bB_isZero
- )
-{
- int i, ii;
- int nC = getNC( );
- int nAC = getNAC( );
-
-
- /* I) DETERMINE DATA SHIFT FOR BOUNDS */
- QProblemB::hotstart_determineDataShift( FX_idx,g_new,lb_new,ub_new, delta_g,delta_lb,delta_ub, Delta_bB_isZero );
-
-
- /* II) DETERMINE DATA SHIFT FOR CONSTRAINTS */
- /* 1) Calculate shift directions. */
- for( i=0; i EPS ) || ( getAbs( delta_ubA[ii] ) > EPS ) )
- {
- Delta_bC_isZero = BT_FALSE;
- break;
- }
- }
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * h o t s t a r t _ d e t e r m i n e S t e p D i r e c t i o n
- */
-returnValue QProblem::hotstart_determineStepDirection( const int* const FR_idx, const int* const FX_idx, const int* const AC_idx,
- const real_t* const delta_g, const real_t* const delta_lbA, const real_t* const delta_ubA,
- const real_t* const delta_lb, const real_t* const delta_ub,
- BooleanType Delta_bC_isZero, BooleanType Delta_bB_isZero,
- real_t* const delta_xFX, real_t* const delta_xFR,
- real_t* const delta_yAC, real_t* const delta_yFX
- )
-{
- int i, j, ii, jj;
- int nFR = getNFR( );
- int nFX = getNFX( );
- int nAC = getNAC( );
- int nZ = getNZ( );
-
- /* initialise auxiliary vectors */
- real_t HMX_delta_xFX[NVMAX];
- real_t YFR_delta_xFRy[NVMAX];
- real_t ZFR_delta_xFRz[NVMAX];
- real_t HFR_YFR_delta_xFRy[NVMAX];
- for( i=0; i 0 )
- {
- for( i=0; i 0 )
- {
- /* 1) Determine delta_xFRy. */
- if ( nAC > 0 )
- {
- if ( ( Delta_bC_isZero == BT_TRUE ) && ( Delta_bB_isZero == BT_TRUE ) )
- {
- for( i=0; i 0 )
- {
- for( i=0; i 0 )
- {
- if ( ( Delta_bC_isZero == BT_FALSE ) || ( Delta_bB_isZero == BT_FALSE ) )
- {
- for( i=0; i 0 )
- {
- /* auxiliary variable */
- real_t delta_xFRz_TMP[NVMAX];
- real_t delta_xFRz_RHS[NVMAX];
-
-
- if ( ( nAC > 0 ) && ( nFX > 0 ) && ( Delta_bB_isZero == BT_FALSE ) )
- {
- for( j=0; j 0 ) /* => Delta_bB_isZero == BT_TRUE, as BT_FALSE would imply nFX>0 */
- {
- for( j=0; j 0 ) /* => ( nFR = nZ + nAC > 0 ) */
- {
- /* auxiliary variables */
- real_t delta_yAC_TMP[NCMAX_ALLOC];
- for( i=0; i 0 )
- {
- for( i=0; i 0 )
- {
- if ( Delta_bB_isZero == BT_FALSE )
- {
- for( i=0; i 0 )
- {
- for( i=0; i 0.0 )
- maxStepLength[nV+ii] = y[nV+ii] / ( -delta_yAC[i] );
- else
- maxStepLength[nV+ii] = 0.0;
- }
- }
- else
- {
- /* active upper constraints' bounds */
- if ( delta_yAC[i] > ZERO )
- {
- if ( y[nV+ii] < 0.0 )
- maxStepLength[nV+ii] = y[nV+ii] / ( -delta_yAC[i] );
- else
- maxStepLength[nV+ii] = 0.0;
- }
- }
- }
- }
-
- /* 2) Ensure that active dual bounds remain valid
- * (ignoring implicitly fixed variables). */
- for( i=0; i 0.0 )
- maxStepLength[ii] = y[ii] / ( -delta_yFX[i] );
- else
- maxStepLength[ii] = 0.0;
- }
- }
- else
- {
- /* active upper bounds */
- if ( delta_yFX[i] > ZERO )
- {
- if ( y[ii] < 0.0 )
- maxStepLength[ii] = y[ii] / ( -delta_yFX[i] );
- else
- maxStepLength[ii] = 0.0;
- }
- }
- }
- }
-
-
- /* II) DETERMINE MAXIMUM PRIMAL STEPLENGTH */
- /* 1) Ensure that inactive constraints' bounds remain valid
- * (ignoring unbounded constraints). */
- real_t delta_x[NVMAX];
- for( j=0; j delta_Ax[ii] )
- {
- if ( Ax[ii] > lbA[ii] )
- maxStepLength[nV+ii] = ( Ax[ii] - lbA[ii] ) / ( delta_lbA[ii] - delta_Ax[ii] );
- else
- maxStepLength[nV+ii] = 0.0;
- }
- }
-
- /* inactive upper constraints' bounds */
- if ( constraints.isNoUpper( ) == BT_FALSE )
- {
- if ( delta_ubA[ii] < delta_Ax[ii] )
- {
- if ( Ax[ii] < ubA[ii] )
- maxStepLength[nV+nC+nV+ii] = ( Ax[ii] - ubA[ii] ) / ( delta_ubA[ii] - delta_Ax[ii] );
- else
- maxStepLength[nV+nC+nV+ii] = 0.0;
- }
- }
- }
- }
-
-
- /* 2) Ensure that inactive bounds remain valid
- * (ignoring unbounded variables). */
- /* inactive lower bounds */
- if ( bounds.isNoLower( ) == BT_FALSE )
- {
- for( i=0; i delta_xFR[i] )
- {
- if ( x[ii] > lb[ii] )
- maxStepLength[ii] = ( x[ii] - lb[ii] ) / ( delta_lb[ii] - delta_xFR[i] );
- else
- maxStepLength[ii] = 0.0;
- }
- }
- }
-
- /* inactive upper bounds */
- if ( bounds.isNoUpper( ) == BT_FALSE )
- {
- for( i=0; i EPS )
- cyclingManager.clearCyclingData( );
-
-
- /* V) SET MAXIMUM HOMOTOPY STEPLENGTH */
- tau = tau_new;
-
- #ifdef PC_DEBUG
- if ( printlevel == PL_HIGH )
- {
-
- char messageString[80];
-
- if ( BC_status == ST_UNDEFINED )
- sprintf( messageString,"Stepsize is %.6e!",tau );
- else
- sprintf( messageString,"Stepsize is %.6e! (BC_idx = %d, BC_isBound = %d, BC_status = %d)",tau,BC_idx,BC_isBound,BC_status );
-
- getGlobalMessageHandler( )->throwInfo( RET_STEPSIZE_NONPOSITIVE,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
- }
- #endif
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * h o t s t a r t _ p e r f o r m S t e p
- */
-returnValue QProblem::hotstart_performStep( const int* const FR_idx, const int* const FX_idx, const int* const AC_idx, const int* const IAC_idx,
- const real_t* const delta_g, const real_t* const delta_lbA, const real_t* const delta_ubA,
- const real_t* const delta_lb, const real_t* const delta_ub,
- const real_t* const delta_xFX, const real_t* const delta_xFR,
- const real_t* const delta_yAC, const real_t* const delta_yFX,
- const real_t* const delta_Ax, int BC_idx, SubjectToStatus BC_status, BooleanType BC_isBound
- )
-{
- int i, j, ii;
- int nV = getNV( );
- int nC = getNC( );
- int nFR = getNFR( );
- int nFX = getNFX( );
- int nAC = getNAC( );
- int nIAC = getNIAC( );
-
-
- /* I) CHECK (CONSTRAINTS') BOUNDS' CONSISTENCY */
- if ( areBoundsConsistent( delta_lb,delta_ub,delta_lbA,delta_ubA ) == BT_FALSE )
- {
- infeasible = BT_TRUE;
- tau = 0.0;
-
- return THROWERROR( RET_QP_INFEASIBLE );
- }
-
-
- /* II) GO TO ACTIVE SET CHANGE */
- if ( tau > ZERO )
- {
- /* 1) Perform step in primal und dual space... */
- for( i=0; ithrowWarning( RET_STEPSIZE,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
- #endif
- }
-
-
- /* setup output preferences */
- #ifdef PC_DEBUG
- char messageString[80];
- VisibilityStatus visibilityStatus;
-
- if ( printlevel == PL_HIGH )
- visibilityStatus = VS_VISIBLE;
- else
- visibilityStatus = VS_HIDDEN;
- #endif
-
-
- /* III) UPDATE ACTIVE SET */
- switch ( BC_status )
- {
- /* Optimal solution found as no working set change detected. */
- case ST_UNDEFINED:
- return RET_OPTIMAL_SOLUTION_FOUND;
-
-
- /* Remove one variable from active set. */
- case ST_INACTIVE:
- if ( BC_isBound == BT_TRUE )
- {
- #ifdef PC_DEBUG
- sprintf( messageString,"bound no. %d.", BC_idx );
- getGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );
- #endif
-
- if ( removeBound( BC_idx,BT_TRUE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );
-
- y[BC_idx] = 0.0;
- }
- else
- {
- #ifdef PC_DEBUG
- sprintf( messageString,"constraint no. %d.", BC_idx );
- getGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );
- #endif
-
- if ( removeConstraint( BC_idx,BT_TRUE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );
-
- y[nV+BC_idx] = 0.0;
- }
- break;
-
-
- /* Add one variable to active set. */
- default:
- if ( BC_isBound == BT_TRUE )
- {
- #ifdef PC_DEBUG
- if ( BC_status == ST_LOWER )
- sprintf( messageString,"lower bound no. %d.", BC_idx );
- else
- sprintf( messageString,"upper bound no. %d.", BC_idx );
- getGlobalMessageHandler( )->throwInfo( RET_ADD_TO_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );
- #endif
-
- if ( addBound( BC_idx,BC_status,BT_TRUE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_ADD_TO_ACTIVESET_FAILED );
- }
- else
- {
- #ifdef PC_DEBUG
- if ( BC_status == ST_LOWER )
- sprintf( messageString,"lower constraint's bound no. %d.", BC_idx );
- else
- sprintf( messageString,"upper constraint's bound no. %d.", BC_idx );
- getGlobalMessageHandler( )->throwInfo( RET_ADD_TO_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );
- #endif
-
- if ( addConstraint( BC_idx,BC_status,BT_TRUE ) != SUCCESSFUL_RETURN )
- return THROWERROR( RET_ADD_TO_ACTIVESET_FAILED );
- }
- break;
- }
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * a r e B o u n d s C o n s i s t e n t
- */
-BooleanType QProblem::areBoundsConsistent( const real_t* const delta_lb, const real_t* const delta_ub,
- const real_t* const delta_lbA, const real_t* const delta_ubA
- ) const
-{
- int i;
-
- /* 1) Check bounds' consistency. */
- if ( QProblemB::areBoundsConsistent( delta_lb,delta_ub ) == BT_FALSE )
- return BT_FALSE;
-
- /* 2) Check constraints' consistency, i.e.
- * check if delta_lb[i] is greater than delta_ub[i]
- * for a component i whose bounds are already (numerically) equal. */
- for( i=0; i ubA[i] - BOUNDTOL ) && ( delta_lbA[i] > delta_ubA[i] + EPS ) )
- return BT_FALSE;
-
- return BT_TRUE;
-}
-
-
-/*
- * s e t u p Q P d a t a
- */
-returnValue QProblem::setupQPdata( const real_t* const _H, const real_t* const _R, const real_t* const _g, const real_t* const _A,
- const real_t* const _lb, const real_t* const _ub,
- const real_t* const _lbA, const real_t* const _ubA
- )
-{
- int i, j;
- int nV = getNV( );
- int nC = getNC( );
-
-
- /* 1) Load Hessian matrix as well as lower and upper bounds vectors. */
- if (QProblemB::setupQPdata(_H, _R, _g, _lb, _ub) != SUCCESSFUL_RETURN)
- return THROWERROR( RET_INVALID_ARGUMENTS );
-
- /* 2) Load constraint matrix. */
- if ( ( nC > 0 ) && ( _A == 0 ) )
- return THROWERROR( RET_INVALID_ARGUMENTS );
-
- if ( nC > 0 )
- {
- for( i=0; igetNumberArray( AC_idx );
-
- /* 1) check for Hx + g - [yFX yAC]*[Id A]' = 0. */
- for( i=0; i maxKKTviolation )
- maxKKTviolation = getAbs( tmp );
- }
-
- /* 2) Check for [lb lbA] <= [Id A]*x <= [ub ubA]. */
- /* lbA <= Ax <= ubA */
- for( i=0; i maxKKTviolation )
- maxKKTviolation = lbA[i] - Ax[i];
-
- if ( Ax[i] - ubA[i] > maxKKTviolation )
- maxKKTviolation = Ax[i] - ubA[i];
- }
-
- /* lb <= x <= ub */
- for( i=0; i maxKKTviolation )
- maxKKTviolation = lb[i] - x[i];
-
- if ( x[i] - ub[i] > maxKKTviolation )
- maxKKTviolation = x[i] - ub[i];
- }
-
- /* 3) Check for correct sign of y and for complementary slackness. */
- /* bounds */
- for( i=0; i maxKKTviolation )
- maxKKTviolation = -y[i];
- if ( getAbs( x[i] - lb[i] ) > maxKKTviolation )
- maxKKTviolation = getAbs( x[i] - lb[i] );
- break;
-
- case ST_UPPER:
- if ( y[i] > maxKKTviolation )
- maxKKTviolation = y[i];
- if ( getAbs( ub[i] - x[i] ) > maxKKTviolation )
- maxKKTviolation = getAbs( ub[i] - x[i] );
- break;
-
- default: /* inactive */
- if ( getAbs( y[i] ) > maxKKTviolation )
- maxKKTviolation = getAbs( y[i] );
- break;
- }
- }
-
- /* constraints */
- for( i=0; i maxKKTviolation )
- maxKKTviolation = -y[nV+i];
- if ( getAbs( Ax[i] - lbA[i] ) > maxKKTviolation )
- maxKKTviolation = getAbs( Ax[i] - lbA[i] );
- break;
-
- case ST_UPPER:
- if ( y[nV+i] > maxKKTviolation )
- maxKKTviolation = y[nV+i];
- if ( getAbs( ubA[i] - Ax[i] ) > maxKKTviolation )
- maxKKTviolation = getAbs( ubA[i] - Ax[i] );
- break;
-
- default: /* inactive */
- if ( getAbs( y[nV+i] ) > maxKKTviolation )
- maxKKTviolation = getAbs( y[nV+i] );
- break;
- }
- }
-
- if ( maxKKTviolation > CRITICALACCURACY )
- return RET_NO_SOLUTION;
-
- if ( maxKKTviolation > DESIREDACCURACY )
- return RET_INACCURATE_SOLUTION;
-
- #endif /* __PERFORM_KKT_TEST__ */
-
- return SUCCESSFUL_RETURN;
-}
-
-
-/*
- * end of file
- */
+/*
+ * This file is part of qpOASES.
+ *
+ * qpOASES -- An Implementation of the Online Active Set Strategy.
+ * Copyright (C) 2007-2008 by Hans Joachim Ferreau et al. All rights reserved.
+ *
+ * qpOASES is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * qpOASES is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with qpOASES; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+
+/**
+ * \file SRC/QProblem.cpp
+ * \author Hans Joachim Ferreau
+ * \version 1.3embedded
+ * \date 2007-2008
+ *
+ * Implementation of the QProblem class which is able to use the newly
+ * developed online active set strategy for parametric quadratic programming.
+ */
+
+
+#include
+
+#include
+
+void printmatrix2(char *name, double *A, int m, int n) {
+ int i, j;
+
+ printf("%s = [...\n", name);
+ for (i = 0; i < m; i++) {
+ for (j = 0; j < n; j++)
+ printf(" % 9.4f", A[i*n+j]);
+ printf(",\n");
+ }
+ printf("];\n");
+}
+
+//#define __PERFORM_KKT_TEST__
+
+
+/*****************************************************************************
+ * P U B L I C *
+ *****************************************************************************/
+
+
+/*
+ * Q P r o b l e m
+ */
+QProblem::QProblem( ) : QProblemB( )
+{
+ constraints.init( 0 );
+
+ sizeT = 0;
+
+ cyclingManager.init( 0,0 );
+}
+
+
+/*
+ * Q P r o b l e m
+ */
+QProblem::QProblem( int _nV, int _nC ) : QProblemB( _nV )
+{
+ /* consistency checks */
+ if ( _nV <= 0 )
+ _nV = 1;
+
+ if ( _nC < 0 )
+ {
+ _nC = 0;
+ THROWERROR( RET_INVALID_ARGUMENTS );
+ }
+
+ constraints.init( _nC );
+
+
+ sizeT = _nC;
+ if ( _nC > _nV )
+ sizeT = _nV;
+
+ cyclingManager.init( _nV,_nC );
+}
+
+
+/*
+ * Q P r o b l e m
+ */
+QProblem::QProblem( const QProblem& rhs ) : QProblemB( rhs )
+{
+ int i, j;
+
+ int _nV = rhs.bounds.getNV( );
+ int _nC = rhs.constraints.getNC( );
+
+ for( i=0; i<_nC; ++i )
+ for( j=0; j<_nV; ++j )
+ A[i*NVMAX + j] = rhs.A[i*NVMAX + j];
+
+ for( i=0; i<_nC; ++i )
+ lbA[i] = rhs.lbA[i];
+
+ for( i=0; i<_nC; ++i )
+ ubA[i] = rhs.ubA[i];
+
+ constraints = rhs.constraints;
+
+ for( i=0; i<(_nV+_nC); ++i )
+ y[i] = rhs.y[i];
+
+
+ sizeT = rhs.sizeT;
+
+ for( i=0; ithrowInfo( RET_ITERATION_STARTED,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
+ #endif
+ }
+
+ /* 1) Setup index arrays. */
+ if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_HOTSTART_FAILED );
+
+ if ( bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_HOTSTART_FAILED );
+
+ if ( constraints.getActive( )->getNumberArray( AC_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_HOTSTART_FAILED );
+
+ if ( constraints.getInactive( )->getNumberArray( IAC_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_HOTSTART_FAILED );
+
+ /* 2) Detemination of shift direction of the gradient and the (constraints') bounds. */
+ returnvalue = hotstart_determineDataShift( FX_idx, AC_idx,
+ g_new,lbA_new,ubA_new,lb_new,ub_new,
+ delta_g,delta_lbA,delta_ubA,delta_lb,delta_ub,
+ Delta_bC_isZero, Delta_bB_isZero );
+ if ( returnvalue != SUCCESSFUL_RETURN )
+ {
+ nWSR = l;
+ THROWERROR( RET_SHIFT_DETERMINATION_FAILED );
+ return returnvalue;
+ }
+
+ /* 3) Determination of step direction of X and Y. */
+ returnvalue = hotstart_determineStepDirection( FR_idx,FX_idx,AC_idx,
+ delta_g,delta_lbA,delta_ubA,delta_lb,delta_ub,
+ Delta_bC_isZero, Delta_bB_isZero,
+ delta_xFX,delta_xFR,delta_yAC,delta_yFX
+ );
+ if ( returnvalue != SUCCESSFUL_RETURN )
+ {
+ nWSR = l;
+ THROWERROR( RET_STEPDIRECTION_DETERMINATION_FAILED );
+ return returnvalue;
+ }
+
+ /* 4) Determination of step length TAU. */
+ returnvalue = hotstart_determineStepLength( FR_idx,FX_idx,AC_idx,IAC_idx,
+ delta_lbA,delta_ubA,delta_lb,delta_ub,
+ delta_xFX,delta_xFR,delta_yAC,delta_yFX,delta_Ax,
+ BC_idx,BC_status,BC_isBound
+ );
+ if ( returnvalue != SUCCESSFUL_RETURN )
+ {
+ nWSR = l;
+ THROWERROR( RET_STEPLENGTH_DETERMINATION_FAILED );
+ return returnvalue;
+ }
+
+ /* 5) Realisation of the homotopy step. */
+ returnvalue = hotstart_performStep( FR_idx,FX_idx,AC_idx,IAC_idx,
+ delta_g,delta_lbA,delta_ubA,delta_lb,delta_ub,
+ delta_xFX,delta_xFR,delta_yAC,delta_yFX,delta_Ax,
+ BC_idx,BC_status,BC_isBound
+ );
+
+ if ( returnvalue != SUCCESSFUL_RETURN )
+ {
+ nWSR = l;
+
+ /* stop runtime measurement */
+ if ( cputime != 0 )
+ *cputime = getCPUtime( ) - starttime;
+
+ /* optimal solution found? */
+ if ( returnvalue == RET_OPTIMAL_SOLUTION_FOUND )
+ {
+ status = QPS_SOLVED;
+
+ if ( printlevel == PL_HIGH )
+ THROWINFO( RET_OPTIMAL_SOLUTION_FOUND );
+
+ #ifdef PC_DEBUG
+ if ( printIteration( l,BC_idx,BC_status,BC_isBound ) != SUCCESSFUL_RETURN )
+ THROWERROR( RET_PRINT_ITERATION_FAILED ); /* do not pass this as return value! */
+ #endif
+
+ /* check KKT optimality conditions */
+ return checkKKTconditions( );
+ }
+ else
+ {
+ /* checks for infeasibility... */
+ if ( isInfeasible( ) == BT_TRUE )
+ {
+ status = QPS_HOMOTOPYQPSOLVED;
+ return THROWERROR( RET_HOTSTART_STOPPED_INFEASIBILITY );
+ }
+
+ /* ...unboundedness... */
+ if ( unbounded == BT_TRUE ) /* not necessary since objective function convex! */
+ return THROWERROR( RET_HOTSTART_STOPPED_UNBOUNDEDNESS );
+
+ /* ... and throw unspecific error otherwise */
+ THROWERROR( RET_HOMOTOPY_STEP_FAILED );
+ return returnvalue;
+ }
+ }
+
+ /* 6) Output information of successful QP iteration. */
+ status = QPS_HOMOTOPYQPSOLVED;
+
+ #ifdef PC_DEBUG
+ if ( printIteration( l,BC_idx,BC_status,BC_isBound ) != SUCCESSFUL_RETURN )
+ THROWERROR( RET_PRINT_ITERATION_FAILED ); /* do not pass this as return value! */
+ #endif
+ }
+
+
+ /* stop runtime measurement */
+ if ( cputime != 0 )
+ *cputime = getCPUtime( ) - starttime;
+
+
+ /* if programm gets to here, output information that QP could not be solved
+ * within the given maximum numbers of working set changes */
+ if ( printlevel == PL_HIGH )
+ {
+ #ifdef PC_DEBUG
+ sprintf( messageString,"(nWSR = %d)",nWSR );
+ return getGlobalMessageHandler( )->throwWarning( RET_MAX_NWSR_REACHED,messageString,__FUNCTION__,__FILE__,__LINE__,VS_VISIBLE );
+ #endif
+ }
+
+ /* Finally check KKT optimality conditions. */
+ returnValue returnvalueKKTcheck = checkKKTconditions( );
+
+ if ( returnvalueKKTcheck != SUCCESSFUL_RETURN )
+ return returnvalueKKTcheck;
+ else
+ return RET_MAX_NWSR_REACHED;
+}
+
+
+/*
+ * g e t N Z
+ */
+int QProblem::getNZ( )
+{
+ /* nZ = nFR - nAC */
+ return bounds.getFree( )->getLength( ) - constraints.getActive( )->getLength( );
+}
+
+
+/*
+ * g e t D u a l S o l u t i o n
+ */
+returnValue QProblem::getDualSolution( real_t* const yOpt ) const
+{
+ int i;
+
+ /* return optimal dual solution vector
+ * only if current QP has been solved */
+ if ( ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||
+ ( getStatus( ) == QPS_HOMOTOPYQPSOLVED ) ||
+ ( getStatus( ) == QPS_SOLVED ) )
+ {
+ for( i=0; i -INFTY )
+ {
+ constraints.setNoLower( BT_FALSE );
+ break;
+ }
+ }
+
+ /* 2) Check if upper constraints' bounds are present. */
+ constraints.setNoUpper( BT_TRUE );
+ for( i=0; i INFTY - BOUNDTOL ) )
+ {
+ constraints.setType( i,ST_UNBOUNDED );
+ ++nUC;
+ }
+ else
+ {
+ if ( lbA[i] > ubA[i] - BOUNDTOL )
+ {
+ constraints.setType( i,ST_EQUALITY );
+ ++nEC;
+ }
+ else
+ {
+ constraints.setType( i,ST_BOUNDED );
+ }
+ }
+ }
+
+ /* 4) Set dimensions of constraints structure. */
+ constraints.setNEC( nEC );
+ constraints.setNUC( nUC );
+ constraints.setNIC( nC - nEC - nUC );
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * c h o l e s k y D e c o m p o s i t i o n P r o j e c t e d
+ */
+returnValue QProblem::setupCholeskyDecompositionProjected( )
+{
+ int i, j, k, ii, kk;
+ int nV = getNV( );
+ int nFR = getNFR( );
+ int nZ = getNZ( );
+
+ /* 1) Initialises R with all zeros. */
+ for( i=0; i 0 )
+ {
+ int FR_idx[NVMAX];
+ if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_INDEXLIST_CORRUPTED );
+
+#if 0
+ real_t HZ[NVMAX*NVMAX];
+ real_t ZHZ[NVMAX*NVMAX];
+
+ /* calculate H*Z */
+ for ( i=0; i=0; --k )
+ sum -= R[k*NVMAX + i] * R[k*NVMAX + i];
+
+ if ( sum > 0.0 )
+ {
+ R[i*NVMAX + i] = sqrt( sum );
+ inv = 1.0 / R[i * NVMAX + i];
+ }
+ else
+ {
+ hessianType = HST_SEMIDEF;
+ return THROWERROR( RET_HESSIAN_NOT_SPD );
+ }
+
+ for( j=(i+1); j=0; --k )
+ sum -= R[k*NVMAX + i] * R[k*NVMAX + j];
+
+ R[i*NVMAX + j] = sum * inv;
+ }
+ }
+#else
+ real_t HZ[NVMAX];
+ real_t ZHZ[NVMAX];
+
+ real_t sum, inv;
+ for (j = 0; j < nZ; ++j)
+ {
+ /* Cache one column of Z. */
+ for (i = 0; i < NVMAX; ++i)
+ ZHZ[i] = Q[i * NVMAX + j];
+
+ /* Create one column of the product H * Z. */
+ for (i = 0; i < nFR; ++i)
+ {
+ ii = FR_idx[i];
+
+ sum = 0.0;
+ for (k = 0; k < nFR; ++k)
+ {
+ kk = FR_idx[k];
+ sum += H[ii * NVMAX + kk] * ZHZ[kk];
+ }
+ HZ[ii] = sum;
+ }
+
+ /* Create one column of the product Z^T * H * Z. */
+ for (i = j; i < nZ; ++i)
+ ZHZ[ i ] = 0.0;
+
+ for (k = 0; k < nFR; ++k)
+ {
+ kk = FR_idx[k];
+ real_t q = HZ[kk];
+ for (i = j; i < nZ; ++i)
+ {
+ ZHZ[i] += Q[kk * NVMAX + i] * q;
+ }
+ }
+
+ /* Use the computed column to update the factorization. */
+ /* j == i */
+ sum = ZHZ[j];
+
+ for (k = (j - 1); k >= 0; --k)
+ sum -= R[k * NVMAX + j] * R[k * NVMAX + j];
+
+ if (sum > 0.0)
+ {
+ R[j * NVMAX + j] = sqrt(sum);
+ inv = 1.0 / R[j * NVMAX + j];
+ }
+ else
+ {
+ hessianType = HST_SEMIDEF;
+ return THROWERROR( RET_HESSIAN_NOT_SPD );
+ }
+
+ for (i = (j + 1); i < nZ; ++i)
+ {
+ sum = ZHZ[i];
+
+ for (k = (j - 1); k >= 0; --k)
+ sum -= R[k * NVMAX + j] * R[k * NVMAX + i];
+
+ R[j * NVMAX + i] = sum * inv;
+ }
+ }
+#endif
+ }
+ }
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * s e t u p T Q f a c t o r i s a t i o n
+ */
+returnValue QProblem::setupTQfactorisation( )
+{
+ int i, j, ii;
+ int nV = getNV( );
+ int nFR = getNFR( );
+
+ int FR_idx[NVMAX];
+ if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_INDEXLIST_CORRUPTED );
+
+ /* 1) Set Q to unity matrix. */
+ for( i=0; igetStatus( i );
+
+ if ( constraints.getType( i ) == ST_EQUALITY )
+ {
+ if ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
+ }
+ else
+ {
+ if ( auxiliaryConstraints->setupConstraint( i,guessedStatus ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
+ }
+ }
+ }
+ else /* No initial working set specified. */
+ {
+ /* Obtain initial working set by "clipping". */
+ if ( ( xOpt != 0 ) && ( yOpt == 0 ) )
+ {
+ for( i=0; isetupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
+ continue;
+ }
+
+ if ( Ax[i] >= ubA[i] - BOUNDTOL )
+ {
+ if ( auxiliaryConstraints->setupConstraint( i,ST_UPPER ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
+ continue;
+ }
+
+ /* Moreover, add all equality constraints if specified. */
+ if ( constraints.getType( i ) == ST_EQUALITY )
+ {
+ if ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
+ }
+ else
+ {
+ if ( auxiliaryConstraints->setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
+ }
+ }
+ }
+
+ /* Obtain initial working set in accordance to sign of dual solution vector. */
+ if ( ( xOpt == 0 ) && ( yOpt != 0 ) )
+ {
+ for( i=0; i ZERO )
+ {
+ if ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
+ continue;
+ }
+
+ if ( yOpt[nV+i] < -ZERO )
+ {
+ if ( auxiliaryConstraints->setupConstraint( i,ST_UPPER ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
+ continue;
+ }
+
+ /* Moreover, add all equality constraints if specified. */
+ if ( constraints.getType( i ) == ST_EQUALITY )
+ {
+ if ( auxiliaryConstraints->setupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
+ }
+ else
+ {
+ if ( auxiliaryConstraints->setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
+ }
+ }
+ }
+
+ /* If xOpt and yOpt are null pointer and no initial working is specified,
+ * start with empty working set (or implicitly fixed bounds and equality constraints only)
+ * for auxiliary QP. */
+ if ( ( xOpt == 0 ) && ( yOpt == 0 ) )
+ {
+ for( i=0; isetupConstraint( i,ST_LOWER ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
+ }
+ else
+ {
+ if ( auxiliaryConstraints->setupConstraint( i,ST_INACTIVE ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_OBTAINING_WORKINGSET_FAILED );
+ }
+ }
+ }
+ }
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+
+/*
+ * s e t u p A u x i l i a r y W o r k i n g S e t
+ */
+returnValue QProblem::setupAuxiliaryWorkingSet( const Bounds* const auxiliaryBounds,
+ const Constraints* const auxiliaryConstraints,
+ BooleanType setupAfresh
+ )
+{
+ int i;
+ int nV = getNV( );
+ int nC = getNC( );
+
+ /* consistency checks */
+ if ( auxiliaryBounds != 0 )
+ {
+ for( i=0; igetStatus( i ) == ST_UNDEFINED ) )
+ return THROWERROR( RET_UNKNOWN_BUG );
+ }
+ else
+ {
+ return THROWERROR( RET_INVALID_ARGUMENTS );
+ }
+
+ if ( auxiliaryConstraints != 0 )
+ {
+ for( i=0; igetStatus( i ) == ST_UNDEFINED ) )
+ return THROWERROR( RET_UNKNOWN_BUG );
+ }
+ else
+ {
+ return THROWERROR( RET_INVALID_ARGUMENTS );
+ }
+
+
+ /* I) SETUP CHOLESKY FLAG:
+ * Cholesky decomposition shall only be updated if working set
+ * shall be updated (i.e. NOT setup afresh!) */
+ BooleanType updateCholesky;
+ if ( setupAfresh == BT_TRUE )
+ updateCholesky = BT_FALSE;
+ else
+ updateCholesky = BT_TRUE;
+
+
+ /* II) REMOVE FORMERLY ACTIVE (CONSTRAINTS') BOUNDS (IF NECESSARY): */
+ if ( setupAfresh == BT_FALSE )
+ {
+ /* 1) Remove all active constraints that shall be inactive AND
+ * all active constraints that are active at the wrong bound. */
+ for( i=0; igetStatus( i ) != ST_LOWER ) )
+ if ( removeConstraint( i,updateCholesky ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_SETUP_WORKINGSET_FAILED );
+
+ if ( ( constraints.getStatus( i ) == ST_UPPER ) && ( auxiliaryConstraints->getStatus( i ) != ST_UPPER ) )
+ if ( removeConstraint( i,updateCholesky ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_SETUP_WORKINGSET_FAILED );
+ }
+
+ /* 2) Remove all active bounds that shall be inactive AND
+ * all active bounds that are active at the wrong bound. */
+ for( i=0; igetStatus( i ) != ST_LOWER ) )
+ if ( removeBound( i,updateCholesky ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_SETUP_WORKINGSET_FAILED );
+
+ if ( ( bounds.getStatus( i ) == ST_UPPER ) && ( auxiliaryBounds->getStatus( i ) != ST_UPPER ) )
+ if ( removeBound( i,updateCholesky ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_SETUP_WORKINGSET_FAILED );
+ }
+ }
+
+
+ /* III) ADD NEWLY ACTIVE (CONSTRAINTS') BOUNDS: */
+ /* 1) Add all inactive bounds that shall be active AND
+ * all formerly active bounds that have been active at the wrong bound. */
+ for( i=0; igetStatus( i ) != ST_INACTIVE ) )
+ {
+ /* Add bound only if it is linearly independent from the current working set. */
+ if ( addBound_checkLI( i ) == RET_LINEARLY_INDEPENDENT )
+ {
+ if ( addBound( i,auxiliaryBounds->getStatus( i ),updateCholesky ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_SETUP_WORKINGSET_FAILED );
+ }
+ }
+ }
+
+ /* 2) Add all inactive constraints that shall be active AND
+ * all formerly active constraints that have been active at the wrong bound. */
+ for( i=0; igetStatus( i ) == ST_LOWER ) || ( auxiliaryConstraints->getStatus( i ) == ST_UPPER ) )
+ {
+ /* formerly inactive */
+ if ( constraints.getStatus( i ) == ST_INACTIVE )
+ {
+ /* Add constraint only if it is linearly independent from the current working set. */
+ if ( addConstraint_checkLI( i ) == RET_LINEARLY_INDEPENDENT )
+ {
+ if ( addConstraint( i,auxiliaryConstraints->getStatus( i ),updateCholesky ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_SETUP_WORKINGSET_FAILED );
+ }
+ }
+ }
+ }
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * s e t u p A u x i l i a r y Q P s o l u t i o n
+ */
+returnValue QProblem::setupAuxiliaryQPsolution( const real_t* const xOpt, const real_t* const yOpt
+ )
+{
+ int i, j;
+ int nV = getNV( );
+ int nC = getNC( );
+
+
+ /* Setup primal/dual solution vector for auxiliary initial QP:
+ * if a null pointer is passed, a zero vector is assigned;
+ * old solution vector is kept if pointer to internal solution vevtor is passed. */
+ if ( xOpt != 0 )
+ {
+ if ( xOpt != x )
+ for( i=0; igetStatus( i ) == ST_LOWER )
+ lb[i] = x[i];
+ else
+ lb[i] = x[i] - BOUNDRELAXATION;
+
+ if ( auxiliaryBounds->getStatus( i ) == ST_UPPER )
+ ub[i] = x[i];
+ else
+ ub[i] = x[i] + BOUNDRELAXATION;
+ }
+ }
+ break;
+
+ case ST_LOWER:
+ lb[i] = x[i];
+ if ( bounds.getType( i ) == ST_EQUALITY )
+ {
+ ub[i] = x[i];
+ }
+ else
+ {
+ if ( useRelaxation == BT_TRUE )
+ ub[i] = x[i] + BOUNDRELAXATION;
+ }
+ break;
+
+ case ST_UPPER:
+ ub[i] = x[i];
+ if ( bounds.getType( i ) == ST_EQUALITY )
+ {
+ lb[i] = x[i];
+ }
+ else
+ {
+ if ( useRelaxation == BT_TRUE )
+ lb[i] = x[i] - BOUNDRELAXATION;
+ }
+ break;
+
+ default:
+ return THROWERROR( RET_UNKNOWN_BUG );
+ }
+ }
+
+ /* 2) Setup constraints vectors. */
+ for ( i=0; igetStatus( i ) == ST_LOWER )
+ lbA[i] = Ax[i];
+ else
+ lbA[i] = Ax[i] - BOUNDRELAXATION;
+
+ if ( auxiliaryConstraints->getStatus( i ) == ST_UPPER )
+ ubA[i] = Ax[i];
+ else
+ ubA[i] = Ax[i] + BOUNDRELAXATION;
+ }
+ }
+ break;
+
+ case ST_LOWER:
+ lbA[i] = Ax[i];
+ if ( constraints.getType( i ) == ST_EQUALITY )
+ {
+ ubA[i] = Ax[i];
+ }
+ else
+ {
+ if ( useRelaxation == BT_TRUE )
+ ubA[i] = Ax[i] + BOUNDRELAXATION;
+ }
+ break;
+
+ case ST_UPPER:
+ ubA[i] = Ax[i];
+ if ( constraints.getType( i ) == ST_EQUALITY )
+ {
+ lbA[i] = Ax[i];
+ }
+ else
+ {
+ if ( useRelaxation == BT_TRUE )
+ lbA[i] = Ax[i] - BOUNDRELAXATION;
+ }
+ break;
+
+ default:
+ return THROWERROR( RET_UNKNOWN_BUG );
+ }
+ }
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * a d d C o n s t r a i n t
+ */
+returnValue QProblem::addConstraint( int number, SubjectToStatus C_status,
+ BooleanType updateCholesky
+ )
+{
+ int i, j, ii;
+
+ /* consistency checks */
+ if ( constraints.getStatus( number ) != ST_INACTIVE )
+ return THROWERROR( RET_CONSTRAINT_ALREADY_ACTIVE );
+
+ if ( ( constraints.getNC( ) - getNAC( ) ) == constraints.getNUC( ) )
+ return THROWERROR( RET_ALL_CONSTRAINTS_ACTIVE );
+
+ if ( ( getStatus( ) == QPS_NOTINITIALISED ) ||
+ ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||
+ ( getStatus( ) == QPS_HOMOTOPYQPSOLVED ) ||
+ ( getStatus( ) == QPS_SOLVED ) )
+ {
+ return THROWERROR( RET_UNKNOWN_BUG );
+ }
+
+
+ /* I) ENSURE LINEAR INDEPENDENCE OF THE WORKING SET,
+ * i.e. remove a constraint or bound if linear dependence occurs. */
+ /* check for LI only if Cholesky decomposition shall be updated! */
+ if ( updateCholesky == BT_TRUE )
+ {
+ returnValue ensureLIreturnvalue = addConstraint_ensureLI( number,C_status );
+
+ switch ( ensureLIreturnvalue )
+ {
+ case SUCCESSFUL_RETURN:
+ break;
+
+ case RET_LI_RESOLVED:
+ break;
+
+ case RET_ENSURELI_FAILED_NOINDEX:
+ return THROWERROR( RET_ADDCONSTRAINT_FAILED_INFEASIBILITY );
+
+ case RET_ENSURELI_FAILED_CYCLING:
+ return THROWERROR( RET_ADDCONSTRAINT_FAILED_INFEASIBILITY );
+
+ default:
+ return THROWERROR( RET_ENSURELI_FAILED );
+ }
+ }
+
+ /* some definitions */
+ int nFR = getNFR( );
+ int nAC = getNAC( );
+ int nZ = getNZ( );
+
+ int tcol = sizeT - nAC;
+
+
+ int FR_idx[NVMAX];
+ if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_ADDCONSTRAINT_FAILED );
+
+ real_t aFR[NVMAX];
+ real_t wZ[NVMAX];
+ for( i=0; i 0 )
+ {
+ for( j=0; j 0 )
+ {
+ /* II) RESTORE TRIANGULAR FORM OF T: */
+ /* Use column-wise Givens rotations to restore reverse triangular form
+ * of T, simultanenous change of Q (i.e. Z) and R. */
+ for( j=0; jgetNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_INDEXLIST_CORRUPTED );
+
+ /* Check if constraint is linearly independent from the
+ the active ones (<=> is element of null space of Afr). */
+ real_t sum;
+
+ for( i=0; i 10.0*EPS )
+ return RET_LINEARLY_INDEPENDENT;
+ }
+
+ return RET_LINEARLY_DEPENDENT;
+}
+
+
+/*
+ * a d d C o n s t r a i n t _ e n s u r e L I
+ */
+returnValue QProblem::addConstraint_ensureLI( int number, SubjectToStatus C_status )
+{
+ int i, j, ii, jj;
+ int nV = getNV( );
+ int nFR = getNFR( );
+ int nFX = getNFX( );
+ int nAC = getNAC( );
+ int nZ = getNZ( );
+
+
+ /* I) Check if new constraint is linearly independent from the active ones. */
+ returnValue returnvalueCheckLI = addConstraint_checkLI( number );
+
+ if ( returnvalueCheckLI == RET_INDEXLIST_CORRUPTED )
+ return THROWERROR( RET_ENSURELI_FAILED );
+
+ if ( returnvalueCheckLI == RET_LINEARLY_INDEPENDENT )
+ return SUCCESSFUL_RETURN;
+
+
+ /* II) NEW CONSTRAINT IS LINEARLY DEPENDENT: */
+ /* 1) Determine coefficients of linear combination,
+ * cf. M.J. Best. Applied Mathematics and Parallel Computing, chapter:
+ * An Algorithm for the Solution of the Parametric Quadratic Programming
+ * Problem, pages 57-76. Physica-Verlag, Heidelberg, 1996. */
+ int FR_idx[NVMAX];
+ if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_ENSURELI_FAILED );
+
+ int FX_idx[NVMAX];
+ if ( bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_ENSURELI_FAILED );
+
+ real_t xiC[NCMAX_ALLOC];
+ real_t xiC_TMP[NCMAX_ALLOC];
+ real_t xiB[NVMAX];
+
+ /* 2) Calculate xiC */
+ if ( nAC > 0 )
+ {
+ if ( C_status == ST_LOWER )
+ {
+ for( i=0; igetNumberArray( AC_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_ENSURELI_FAILED );
+
+ if ( C_status == ST_LOWER )
+ {
+ for( i=0; i ZERO ) && ( y[nV+ii] >= 0.0 ) )
+ {
+ if ( y[nV+ii]/xiC[i] < y_min )
+ {
+ y_min = y[nV+ii]/xiC[i];
+ y_min_number = ii;
+ }
+ }
+ }
+ else
+ {
+ if ( ( xiC[i] < -ZERO ) && ( y[nV+ii] <= 0.0 ) )
+ {
+ if ( y[nV+ii]/xiC[i] < y_min )
+ {
+ y_min = y[nV+ii]/xiC[i];
+ y_min_number = ii;
+ }
+ }
+ }
+ }
+
+ /* 2) Bounds. */
+ for( i=0; i ZERO ) && ( y[ii] >= 0.0 ) )
+ {
+ if ( y[ii]/xiB[i] < y_min )
+ {
+ y_min = y[ii]/xiB[i];
+ y_min_number = ii;
+ y_min_isBound = BT_TRUE;
+ }
+ }
+ }
+ else
+ {
+ if ( ( xiB[i] < -ZERO ) && ( y[ii] <= 0.0 ) )
+ {
+ if ( y[ii]/xiB[i] < y_min )
+ {
+ y_min = y[ii]/xiB[i];
+ y_min_number = ii;
+ y_min_isBound = BT_TRUE;
+ }
+ }
+ }
+ }
+
+ /* setup output preferences */
+ #ifdef PC_DEBUG
+ char messageString[80];
+ VisibilityStatus visibilityStatus;
+
+ if ( printlevel == PL_HIGH )
+ visibilityStatus = VS_VISIBLE;
+ else
+ visibilityStatus = VS_HIDDEN;
+ #endif
+
+
+ /* IV) REMOVE CONSTRAINT/BOUND FOR RESOLVING LINEAR DEPENDENCE: */
+ if ( y_min_number >= 0 )
+ {
+ /* 1) Check for cycling due to infeasibility. */
+ if ( ( cyclingManager.getCyclingStatus( number,BT_FALSE ) == CYC_PREV_REMOVED ) &&
+ ( cyclingManager.getCyclingStatus( y_min_number,y_min_isBound ) == CYC_PREV_ADDED ) )
+ {
+ infeasible = BT_TRUE;
+
+ return THROWERROR( RET_ENSURELI_FAILED_CYCLING );
+ }
+ else
+ {
+ /* set cycling data */
+ cyclingManager.clearCyclingData( );
+ cyclingManager.setCyclingStatus( number,BT_FALSE, CYC_PREV_ADDED );
+ cyclingManager.setCyclingStatus( y_min_number,y_min_isBound, CYC_PREV_REMOVED );
+ }
+
+ /* 2) Update Lagrange multiplier... */
+ for( i=0; ithrowInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );
+ #endif
+
+ if ( removeBound( y_min_number,BT_TRUE ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );
+
+ y[y_min_number] = 0.0;
+ }
+ else
+ {
+ #ifdef PC_DEBUG
+ sprintf( messageString,"constraint no. %d.",y_min_number );
+ getGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );
+ #endif
+
+ if ( removeConstraint( y_min_number,BT_TRUE ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );
+
+ y[nV+y_min_number] = 0.0;
+ }
+ }
+ else
+ {
+ /* no constraint/bound can be removed => QP is infeasible! */
+ infeasible = BT_TRUE;
+
+ return THROWERROR( RET_ENSURELI_FAILED_NOINDEX );
+ }
+
+ return getGlobalMessageHandler( )->throwInfo( RET_LI_RESOLVED,0,__FUNCTION__,__FILE__,__LINE__,VS_HIDDEN );
+}
+
+
+
+/*
+ * a d d B o u n d
+ */
+returnValue QProblem::addBound( int number, SubjectToStatus B_status,
+ BooleanType updateCholesky
+ )
+{
+ int i, j, ii;
+
+ /* consistency checks */
+ if ( bounds.getStatus( number ) != ST_INACTIVE )
+ return THROWERROR( RET_BOUND_ALREADY_ACTIVE );
+
+ if ( getNFR( ) == bounds.getNUV( ) )
+ return THROWERROR( RET_ALL_BOUNDS_ACTIVE );
+
+ if ( ( getStatus( ) == QPS_NOTINITIALISED ) ||
+ ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||
+ ( getStatus( ) == QPS_HOMOTOPYQPSOLVED ) ||
+ ( getStatus( ) == QPS_SOLVED ) )
+ {
+ return THROWERROR( RET_UNKNOWN_BUG );
+ }
+
+
+ /* I) ENSURE LINEAR INDEPENDENCE OF THE WORKING SET,
+ * i.e. remove a constraint or bound if linear dependence occurs. */
+ /* check for LI only if Cholesky decomposition shall be updated! */
+ if ( updateCholesky == BT_TRUE )
+ {
+ returnValue ensureLIreturnvalue = addBound_ensureLI( number,B_status );
+
+ switch ( ensureLIreturnvalue )
+ {
+ case SUCCESSFUL_RETURN:
+ break;
+
+ case RET_LI_RESOLVED:
+ break;
+
+ case RET_ENSURELI_FAILED_NOINDEX:
+ return THROWERROR( RET_ADDBOUND_FAILED_INFEASIBILITY );
+
+ case RET_ENSURELI_FAILED_CYCLING:
+ return THROWERROR( RET_ADDBOUND_FAILED_INFEASIBILITY );
+
+ default:
+ return THROWERROR( RET_ENSURELI_FAILED );
+ }
+ }
+
+
+ /* some definitions */
+ int nFR = getNFR( );
+ int nAC = getNAC( );
+ int nZ = getNZ( );
+
+ int tcol = sizeT - nAC;
+
+
+ /* I) SWAP INDEXLIST OF FREE VARIABLES:
+ * move the variable to be fixed to the end of the list of free variables. */
+ int lastfreenumber = bounds.getFree( )->getLastNumber( );
+ if ( lastfreenumber != number )
+ if ( bounds.swapFree( number,lastfreenumber ) != SUCCESSFUL_RETURN )
+ THROWERROR( RET_ADDBOUND_FAILED );
+
+
+ int FR_idx[NVMAX];
+ if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_ADDBOUND_FAILED );
+
+ real_t w[NVMAX];
+
+
+ /* II) ADD NEW ACTIVE BOUND TO TOP OF MATRIX T: */
+ /* 1) add row [wZ wY] = [Z Y](number) at the top of T: assign w */
+ for( i=0; i 0 ) /* ( nAC == 0 ) <=> ( nZ == nFR ) <=> Y and T are empty => nothing to do */
+ {
+ /* store new column a in a temporary vector instead of shifting T one column to the left */
+ real_t tmp[NCMAX_ALLOC];
+ for( i=0; i is linearly independent from the
+ the active ones (<=> is element of null space of Afr). */
+ for( i=0; i EPS )
+ return RET_LINEARLY_INDEPENDENT;
+ }
+
+ return RET_LINEARLY_DEPENDENT;
+}
+
+
+/*
+ * a d d B o u n d _ e n s u r e L I
+ */
+returnValue QProblem::addBound_ensureLI( int number, SubjectToStatus B_status )
+{
+ int i, j, ii, jj;
+ int nV = getNV( );
+ int nFX = getNFX( );
+ int nAC = getNAC( );
+ int nZ = getNZ( );
+
+
+ /* I) Check if new constraint is linearly independent from the active ones. */
+ returnValue returnvalueCheckLI = addBound_checkLI( number );
+
+ if ( returnvalueCheckLI == RET_LINEARLY_INDEPENDENT )
+ return SUCCESSFUL_RETURN;
+
+
+ /* II) NEW BOUND IS LINEARLY DEPENDENT: */
+ /* 1) Determine coefficients of linear combination,
+ * cf. M.J. Best. Applied Mathematics and Parallel Computing, chapter:
+ * An Algorithm for the Solution of the Parametric Quadratic Programming
+ * Problem, pages 57-76. Physica-Verlag, Heidelberg, 1996. */
+ int FR_idx[NVMAX];
+ if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_ENSURELI_FAILED );
+
+ int FX_idx[NVMAX];
+ if ( bounds.getFixed( )->getNumberArray( FX_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_ENSURELI_FAILED );
+
+ int AC_idx[NCMAX_ALLOC];
+ if ( constraints.getActive( )->getNumberArray( AC_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_ENSURELI_FAILED );
+
+ real_t xiC[NCMAX_ALLOC];
+ real_t xiC_TMP[NCMAX_ALLOC];
+ real_t xiB[NVMAX];
+
+ /* 2) Calculate xiC. */
+ if ( nAC > 0 )
+ {
+ if ( B_status == ST_LOWER )
+ {
+ for( i=0; i ZERO ) && ( y[nV+ii] >= 0.0 ) )
+ {
+ if ( y[nV+ii]/xiC[i] < y_min )
+ {
+ y_min = y[nV+ii]/xiC[i];
+ y_min_number = ii;
+ }
+ }
+ }
+ else
+ {
+ if ( ( xiC[i] < -ZERO ) && ( y[nV+ii] <= 0.0 ) )
+ {
+ if ( y[nV+ii]/xiC[i] < y_min )
+ {
+ y_min = y[nV+ii]/xiC[i];
+ y_min_number = ii;
+ }
+ }
+ }
+ }
+
+ /* 2) Bounds. */
+ for( i=0; i ZERO ) && ( y[ii] >= 0.0 ) )
+ {
+ if ( y[ii]/xiB[i] < y_min )
+ {
+ y_min = y[ii]/xiB[i];
+ y_min_number = ii;
+ y_min_isBound = BT_TRUE;
+ }
+ }
+ }
+ else
+ {
+ if ( ( xiB[i] < -ZERO ) && ( y[ii] <= 0.0 ) )
+ {
+ if ( y[ii]/xiB[i] < y_min )
+ {
+ y_min = y[ii]/xiB[i];
+ y_min_number = ii;
+ y_min_isBound = BT_TRUE;
+ }
+ }
+ }
+ }
+
+ /* setup output preferences */
+ #ifdef PC_DEBUG
+ char messageString[80];
+ VisibilityStatus visibilityStatus;
+
+ if ( printlevel == PL_HIGH )
+ visibilityStatus = VS_VISIBLE;
+ else
+ visibilityStatus = VS_HIDDEN;
+ #endif
+
+
+ /* IV) REMOVE CONSTRAINT/BOUND FOR RESOLVING LINEAR DEPENDENCE: */
+ if ( y_min_number >= 0 )
+ {
+ /* 1) Check for cycling due to infeasibility. */
+ if ( ( cyclingManager.getCyclingStatus( number,BT_TRUE ) == CYC_PREV_REMOVED ) &&
+ ( cyclingManager.getCyclingStatus( y_min_number,y_min_isBound ) == CYC_PREV_ADDED ) )
+ {
+ infeasible = BT_TRUE;
+
+ return THROWERROR( RET_ENSURELI_FAILED_CYCLING );
+ }
+ else
+ {
+ /* set cycling data */
+ cyclingManager.clearCyclingData( );
+ cyclingManager.setCyclingStatus( number,BT_TRUE, CYC_PREV_ADDED );
+ cyclingManager.setCyclingStatus( y_min_number,y_min_isBound, CYC_PREV_REMOVED );
+ }
+
+
+ /* 2) Update Lagrange multiplier... */
+ for( i=0; ithrowInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );
+ #endif
+
+ if ( removeBound( y_min_number,BT_TRUE ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );
+
+ y[y_min_number] = 0.0;
+ }
+ else
+ {
+ #ifdef PC_DEBUG
+ sprintf( messageString,"constraint no. %d.",y_min_number );
+ getGlobalMessageHandler( )->throwInfo( RET_REMOVE_FROM_ACTIVESET,messageString,__FUNCTION__,__FILE__,__LINE__,visibilityStatus );
+ #endif
+
+ if ( removeConstraint( y_min_number,BT_TRUE ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_REMOVE_FROM_ACTIVESET_FAILED );
+
+ y[nV+y_min_number] = 0.0;
+ }
+ }
+ else
+ {
+ /* no constraint/bound can be removed => QP is infeasible! */
+ infeasible = BT_TRUE;
+
+ return THROWERROR( RET_ENSURELI_FAILED_NOINDEX );
+ }
+
+ return getGlobalMessageHandler( )->throwInfo( RET_LI_RESOLVED,0,__FUNCTION__,__FILE__,__LINE__,VS_HIDDEN );
+}
+
+
+
+/*
+ * r e m o v e C o n s t r a i n t
+ */
+returnValue QProblem::removeConstraint( int number,
+ BooleanType updateCholesky
+ )
+{
+ int i, j, ii, jj;
+
+ /* consistency check */
+ if ( ( getStatus( ) == QPS_NOTINITIALISED ) ||
+ ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||
+ ( getStatus( ) == QPS_HOMOTOPYQPSOLVED ) ||
+ ( getStatus( ) == QPS_SOLVED ) )
+ {
+ return THROWERROR( RET_UNKNOWN_BUG );
+ }
+
+ /* some definitions */
+ int nFR = getNFR( );
+ int nAC = getNAC( );
+ int nZ = getNZ( );
+
+ int tcol = sizeT - nAC;
+ int number_idx = constraints.getActive( )->getIndex( number );
+
+
+ /* consistency checks */
+ if ( constraints.getStatus( number ) == ST_INACTIVE )
+ return THROWERROR( RET_CONSTRAINT_NOT_ACTIVE );
+
+ if ( ( number_idx < 0 ) || ( number_idx >= nAC ) )
+ return THROWERROR( RET_CONSTRAINT_NOT_ACTIVE );
+
+
+ int FR_idx[NVMAX];
+ if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_REMOVECONSTRAINT_FAILED );
+
+
+ /* I) REMOVE th ROW FROM T,
+ * i.e. shift rows number+1 through nAC upwards (instead of the actual
+ * constraint number its corresponding index within matrix A is used). */
+ if ( number_idx < nAC-1 )
+ {
+ for( i=(number_idx+1); i=0; --j )
+ {
+ computeGivens( T[(nAC-2-j)*NVMAX + tcol+1+j],T[(nAC-2-j)*NVMAX + tcol+j], T[(nAC-2-j)*NVMAX + tcol+1+j],T[(nAC-2-j)*NVMAX + tcol+j],c,s );
+
+ for( i=(nAC-j-1); i<(nAC-1); ++i )
+ applyGivens( c,s,T[i*NVMAX + tcol+1+j],T[i*NVMAX + tcol+j], T[i*NVMAX + tcol+1+j],T[i*NVMAX + tcol+j] );
+
+ for( i=0; i 0 )
+ {
+ real_t ZHz[NVMAX];
+ for ( i=0; i 0.0 )
+ R[nZ*NVMAX + nZ] = sqrt( rho2 );
+ else
+ {
+ hessianType = HST_SEMIDEF;
+ return THROWERROR( RET_HESSIAN_NOT_SPD );
+ }
+ }
+
+ /* IV) UPDATE INDICES */
+ if ( constraints.moveActiveToInactive( number ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_REMOVECONSTRAINT_FAILED );
+
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * r e m o v e B o u n d
+ */
+returnValue QProblem::removeBound( int number,
+ BooleanType updateCholesky
+ )
+{
+ int i, j, ii, jj;
+
+ /* consistency checks */
+ if ( bounds.getStatus( number ) == ST_INACTIVE )
+ return THROWERROR( RET_BOUND_NOT_ACTIVE );
+
+ if ( ( getStatus( ) == QPS_NOTINITIALISED ) ||
+ ( getStatus( ) == QPS_AUXILIARYQPSOLVED ) ||
+ ( getStatus( ) == QPS_HOMOTOPYQPSOLVED ) ||
+ ( getStatus( ) == QPS_SOLVED ) )
+ {
+ return THROWERROR( RET_UNKNOWN_BUG );
+ }
+
+ /* some definitions */
+ int nFR = getNFR( );
+ int nAC = getNAC( );
+ int nZ = getNZ( );
+
+ int tcol = sizeT - nAC;
+
+
+ /* I) UPDATE INDICES */
+ if ( bounds.moveFixedToFree( number ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_REMOVEBOUND_FAILED );
+
+
+ int FR_idx[NVMAX];
+ if ( bounds.getFree( )->getNumberArray( FR_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_REMOVEBOUND_FAILED );
+
+ /* I) APPEND th UNITY VECOTR TO Q. */
+ int nnFRp1 = FR_idx[nFR];
+ for( i=0; i 0 )
+ {
+ /* store new column a in a temporary vector instead of shifting T one column to the left and appending a */
+ int AC_idx[NCMAX_ALLOC];
+ if ( constraints.getActive( )->getNumberArray( AC_idx ) != SUCCESSFUL_RETURN )
+ return THROWERROR( RET_REMOVEBOUND_FAILED );
+
+ real_t tmp[NCMAX_ALLOC];
+ for( i=0; i=0; --j )
+ {
+ computeGivens( tmp[nAC-1-j],T[(nAC-1-j)*NVMAX + tcol+j],T[(nAC-1-j)*NVMAX + tcol+j],tmp[nAC-1-j],c,s );
+
+ for( i=(nAC-j); i 0 )
+ {
+ real_t Hz[NVMAX];
+ for( i=0; i 0 )
+ {
+ real_t r[NVMAX];
+ real_t rhs[NVMAX];
+ for( i=0; i 0.0 )
+ R[nZ*NVMAX + nZ] = sqrt( rho2 );
+ else
+ {
+ hessianType = HST_SEMIDEF;
+ return THROWERROR( RET_HESSIAN_NOT_SPD );
+ }
+ }
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * b a c k s o l v e R (CODE DUPLICATE OF QProblemB CLASS!!!)
+ */
+returnValue QProblem::backsolveR( const real_t* const b, BooleanType transposed,
+ real_t* const a
+ )
+{
+ /* Call standard backsolve procedure (i.e. removingBound == BT_FALSE). */
+ return backsolveR( b,transposed,BT_FALSE,a );
+}
+
+
+/*
+ * b a c k s o l v e R (CODE DUPLICATE OF QProblemB CLASS!!!)
+ */
+returnValue QProblem::backsolveR( const real_t* const b, BooleanType transposed,
+ BooleanType removingBound,
+ real_t* const a
+ )
+{
+ int i, j;
+ int nR = getNZ( );
+
+ real_t sum;
+
+ /* if backsolve is called while removing a bound, reduce nZ by one. */
+ if ( removingBound == BT_TRUE )
+ --nR;
+
+ /* nothing to do */
+ if ( nR <= 0 )
+ return SUCCESSFUL_RETURN;
+
+
+ /* Solve Ra = b, where R might be transposed. */
+ if ( transposed == BT_FALSE )
+ {
+ /* solve Ra = b */
+ for( i=(nR-1); i>=0; --i )
+ {
+ sum = b[i];
+ for( j=(i+1); j ZERO )
+ a[i] = sum / R[i*NVMAX + i];
+ else
+ return THROWERROR( RET_DIV_BY_ZERO );
+ }
+ }
+ else
+ {
+ /* solve R^T*a = b */
+ for( i=0; i ZERO )
+ a[i] = sum / R[i*NVMAX + i];
+ else
+ return THROWERROR( RET_DIV_BY_ZERO );
+ }
+ }
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+
+/*
+ * b a c k s o l v e T
+ */
+returnValue QProblem::backsolveT( const real_t* const b, BooleanType transposed, real_t* const a )
+{
+ int i, j;
+ int nT = getNAC( );
+ int tcol = sizeT - nT;
+
+ real_t sum;
+
+ /* nothing to do */
+ if ( nT <= 0 )
+ return SUCCESSFUL_RETURN;
+
+
+ /* Solve Ta = b, where T might be transposed. */
+ if ( transposed == BT_FALSE )
+ {
+ /* solve Ta = b */
+ for( i=0; i ZERO )
+ a[nT-1-i] = sum / T[i*NVMAX + sizeT-1-i];
+ else
+ return THROWERROR( RET_DIV_BY_ZERO );
+ }
+ }
+ else
+ {
+ /* solve T^T*a = b */
+ for( i=0; i ZERO )
+ a[nT-1-i] = sum / T[(nT-1-i)*NVMAX + tcol+i];
+ else
+ return THROWERROR( RET_DIV_BY_ZERO );
+ }
+ }
+
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * h o t s t a r t _ d e t e r m i n e D a t a S h i f t
+ */
+returnValue QProblem::hotstart_determineDataShift( const int* const FX_idx, const int* const AC_idx,
+ const real_t* const g_new, const real_t* const lbA_new, const real_t* const ubA_new,
+ const real_t* const lb_new, const real_t* const ub_new,
+ real_t* const delta_g, real_t* const delta_lbA, real_t* const delta_ubA,
+ real_t* const delta_lb, real_t* const delta_ub,
+ BooleanType& Delta_bC_isZero, BooleanType& Delta_bB_isZero
+ )
+{
+ int i, ii;
+ int nC = getNC( );
+ int nAC = getNAC( );
+
+
+ /* I) DETERMINE DATA SHIFT FOR BOUNDS */
+ QProblemB::hotstart_determineDataShift( FX_idx,g_new,lb_new,ub_new, delta_g,delta_lb,delta_ub, Delta_bB_isZero );
+
+
+ /* II) DETERMINE DATA SHIFT FOR CONSTRAINTS */
+ /* 1) Calculate shift directions. */
+ for( i=0; i EPS ) || ( getAbs( delta_ubA[ii] ) > EPS ) )
+ {
+ Delta_bC_isZero = BT_FALSE;
+ break;
+ }
+ }
+
+ return SUCCESSFUL_RETURN;
+}
+
+
+/*
+ * h o t s t a r t _ d e t e r m i n e S t e p D i r e c t i o n
+ */
+returnValue QProblem::hotstart_determineStepDirection( const int* const FR_idx, const int* const FX_idx, const int* const AC_idx,
+ const real_t* const delta_g, const real_t* const delta_lbA, const real_t* const delta_ubA,
+ const real_t* const delta_lb, const real_t* const delta_ub,
+ BooleanType Delta_bC_isZero, BooleanType Delta_bB_isZero,
+ real_t* const delta_xFX, real_t* const delta_xFR,
+ real_t* const delta_yAC, real_t* const delta_yFX
+ )
+{
+ int i, j, ii, jj;
+ int nFR = getNFR( );
+ int nFX = getNFX( );
+ int nAC = getNAC( );
+ int nZ = getNZ( );
+
+ /* initialise auxiliary vectors */
+ real_t HMX_delta_xFX[NVMAX];
+ real_t YFR_delta_xFRy[NVMAX];
+ real_t ZFR_delta_xFRz[NVMAX];
+ real_t HFR_YFR_delta_xFRy[NVMAX];
+ for( i=0; i 0 )
+ {
+ for( i=0; i 0 )
+ {
+ /* 1) Determine delta_xFRy. */
+ if ( nAC > 0 )
+ {
+ if ( ( Delta_bC_isZero == BT_TRUE ) && ( Delta_bB_isZero == BT_TRUE ) )
+ {
+ for( i=0; i 0 )
+ {
+ for( i=0; i 0 )
+ {
+ if ( ( Delta_bC_isZero == BT_FALSE ) || ( Delta_bB_isZero == BT_FALSE ) )
+ {
+ for( i=0; i 0 )
+ {
+ /* auxiliary variable */
+ real_t delta_xFRz_TMP[NVMAX];
+ real_t delta_xFRz_RHS[NVMAX];
+
+
+ if ( ( nAC > 0 ) && ( nFX > 0 ) && ( Delta_bB_isZero == BT_FALSE ) )
+ {
+ for( j=0; j 0 ) /* => Delta_bB_isZero == BT_TRUE, as BT_FALSE would imply nFX>0 */
+ {
+ for( j=0; j