mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-14 00:40:27 +08:00
Compare commits
502 Commits
release.be
...
v2.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d81d53bc15 | ||
|
|
d2763683e1 | ||
|
|
2167896df8 | ||
|
|
7d0943e63c | ||
|
|
b2d24adf3e | ||
|
|
12a934c9b6 | ||
|
|
d2841cb617 | ||
|
|
607c13a9c4 | ||
|
|
775ed9318e | ||
|
|
8926bfa381 | ||
|
|
63f6664338 | ||
|
|
1cef359777 | ||
|
|
8d99793318 | ||
|
|
ff1310c6fb | ||
|
|
2482fd8a7d | ||
|
|
613fea3490 | ||
|
|
d2bee539eb | ||
|
|
64632fe7fa | ||
|
|
e4facf492e | ||
|
|
9ad7f29846 | ||
|
|
f6e2856696 | ||
|
|
3bac39320a | ||
|
|
26d61a2a22 | ||
|
|
5f23fd9534 | ||
|
|
6128f5cd89 | ||
|
|
364914891a | ||
|
|
ad9dacc497 | ||
|
|
5e33d1ac3a | ||
|
|
781bef0664 | ||
|
|
d19ca7d7d8 | ||
|
|
d8f13329fc | ||
|
|
cba668c147 | ||
|
|
bd0732975b | ||
|
|
5b8258f2d9 | ||
|
|
8ac9ba0cbd | ||
|
|
3f6f01f319 | ||
|
|
5b3d387fea | ||
|
|
12540841ca | ||
|
|
d4864220c1 | ||
|
|
9f9a501be9 | ||
|
|
8340f1c903 | ||
|
|
3a01fe5c4f | ||
|
|
c70b7745ad | ||
|
|
f2edc5354d | ||
|
|
640659e40f | ||
|
|
999888bc02 | ||
|
|
04bd6b726b | ||
|
|
f501e6d8d5 | ||
|
|
5c0b2e41ee | ||
|
|
3eaaf2ff99 | ||
|
|
86938e4afe | ||
|
|
77c1481d7c | ||
|
|
380e0ad241 | ||
|
|
7183676d60 | ||
|
|
dd604a4103 | ||
|
|
bb4ce31277 | ||
|
|
97619d269f | ||
|
|
35ad87ad1a | ||
|
|
80669906be | ||
|
|
11bb579012 | ||
|
|
f806b4a090 | ||
|
|
bd590a9f54 | ||
|
|
d155a392da | ||
|
|
f02a680fe1 | ||
|
|
d0af8e0ebc | ||
|
|
c73d0b69a3 | ||
|
|
a5f3038934 | ||
|
|
936bf74a5c | ||
|
|
b55648e590 | ||
|
|
29bc0f8e72 | ||
|
|
d46f58cc07 | ||
|
|
1cc4123fbc | ||
|
|
8c9254c1fd | ||
|
|
1f3c408673 | ||
|
|
1b1233e0df | ||
|
|
9beef3a676 | ||
|
|
6c586eb81e | ||
|
|
b73c3ce5d1 | ||
|
|
7f7eeb494d | ||
|
|
e549e1ee0b | ||
|
|
050e9b0374 | ||
|
|
adb6cb857c | ||
|
|
810ffaa621 | ||
|
|
59682a962c | ||
|
|
25fa9b433b | ||
|
|
abaa4f6981 | ||
|
|
9434484680 | ||
|
|
57f64c1370 | ||
|
|
52ccd87c47 | ||
|
|
9174aedb1e | ||
|
|
c8143501c1 | ||
|
|
3c16fccca9 | ||
|
|
c79124f7c4 | ||
|
|
d434d423e3 | ||
|
|
f66c1e1c59 | ||
|
|
3b03f50a4a | ||
|
|
0ca13ae16a | ||
|
|
ae020bda5d | ||
|
|
9cf5c351f3 | ||
|
|
574ec830a0 | ||
|
|
6e8e5e80d2 | ||
|
|
27c228e355 | ||
|
|
273c2b19ad | ||
|
|
29d14f5a7b | ||
|
|
94cccfe424 | ||
|
|
ad1704df0d | ||
|
|
bf6d929e80 | ||
|
|
67036398bd | ||
|
|
4a8c20c604 | ||
|
|
b6c6d46362 | ||
|
|
c36c2c74ff | ||
|
|
ed9e017ebb | ||
|
|
762f701593 | ||
|
|
254f34a50d | ||
|
|
9f5564522d | ||
|
|
6bbc2c5615 | ||
|
|
34c50898d5 | ||
|
|
736244162c | ||
|
|
dbec3ae7ed | ||
|
|
1395ec46b6 | ||
|
|
27fc4a6bf6 | ||
|
|
33f7e677d7 | ||
|
|
716d1971c9 | ||
|
|
bbaf8cdf80 | ||
|
|
09cb5b271a | ||
|
|
7f1eff2188 | ||
|
|
70a1428fa3 | ||
|
|
0dd6524da9 | ||
|
|
92c53f4a8b | ||
|
|
51f51f4d3b | ||
|
|
5722ca6191 | ||
|
|
08d80e34b0 | ||
|
|
99f837ad7b | ||
|
|
35de8f5796 | ||
|
|
805b7d9d78 | ||
|
|
96f0d45680 | ||
|
|
32bfed1826 | ||
|
|
5b12678dcd | ||
|
|
7aec6eb49c | ||
|
|
c3fb83b241 | ||
|
|
808ae2307b | ||
|
|
1bbc1b41cb | ||
|
|
908cd9fe72 | ||
|
|
7e935aaaea | ||
|
|
c334b323aa | ||
|
|
08230c2731 | ||
|
|
8d30393596 | ||
|
|
ab62f28a15 | ||
|
|
7df3cdc8c8 | ||
|
|
929a8fb1e1 | ||
|
|
ff91fc1d70 | ||
|
|
d6d0af43b4 | ||
|
|
909d123f8f | ||
|
|
10283bf72a | ||
|
|
c8a2fe3099 | ||
|
|
5c75fc169f | ||
|
|
b7280bec75 | ||
|
|
afd79f7b53 | ||
|
|
77bad6da38 | ||
|
|
376b9f1c94 | ||
|
|
7983614e9d | ||
|
|
a24bbfe9d5 | ||
|
|
19d0c1b311 | ||
|
|
cad1876656 | ||
|
|
035554c21d | ||
|
|
f7cab0f982 | ||
|
|
157c600e14 | ||
|
|
dad58d45cb | ||
|
|
72907a09ca | ||
|
|
3d013fcd7a | ||
|
|
f005f479fc | ||
|
|
2b08fb791f | ||
|
|
41731d8ddd | ||
|
|
23e905fd20 | ||
|
|
0a4bd19887 | ||
|
|
15d92a68b5 | ||
|
|
8c59b5b735 | ||
|
|
467091d1d3 | ||
|
|
d35cbfa8e3 | ||
|
|
fdfedab771 | ||
|
|
6511aaaed8 | ||
|
|
a954f77529 | ||
|
|
69cf05b867 | ||
|
|
327c5b5f81 | ||
|
|
1f2b659abf | ||
|
|
83da170697 | ||
|
|
c36e97c44a | ||
|
|
d24ddd8278 | ||
|
|
5b88461c5f | ||
|
|
f7f8a59ca9 | ||
|
|
ba88b0a3ac | ||
|
|
40ed5ade5d | ||
|
|
5fdbb6a49a | ||
|
|
d69626aace | ||
|
|
172d68a041 | ||
|
|
bfe5ff242b | ||
|
|
56a11a245d | ||
|
|
7389d27bc3 | ||
|
|
db1f660c9b | ||
|
|
5b6aa2abb6 | ||
|
|
d4241deab2 | ||
|
|
bc0ce24572 | ||
|
|
008e977f70 | ||
|
|
9fe4d8d6d0 | ||
|
|
ab4c6e23cc | ||
|
|
3a692186b9 | ||
|
|
61ec484634 | ||
|
|
98398fa7dd | ||
|
|
c830b7b8ec | ||
|
|
3ae9f6e279 | ||
|
|
7f9d9083d5 | ||
|
|
1a54b55e79 | ||
|
|
d0221e2650 | ||
|
|
a5a1851411 | ||
|
|
450df4a0d3 | ||
|
|
e0ca599855 | ||
|
|
51517f6ef7 | ||
|
|
e30b505a23 | ||
|
|
20c0cab1e4 | ||
|
|
a6c91898da | ||
|
|
73559816c3 | ||
|
|
04c1d90a51 | ||
|
|
a20542bf15 | ||
|
|
f255556cca | ||
|
|
d2013626a1 | ||
|
|
fa7650f70d | ||
|
|
6c5202e1a0 | ||
|
|
f79c97ea89 | ||
|
|
bd6f771eca | ||
|
|
b36bde547a | ||
|
|
27b84b93b9 | ||
|
|
de3928523f | ||
|
|
c85448f0a8 | ||
|
|
3a25c0a9bf | ||
|
|
5dc98667f4 | ||
|
|
d870d21bd5 | ||
|
|
6f6e557ed2 | ||
|
|
c487bbd506 | ||
|
|
29e4d099ac | ||
|
|
8725f6d393 | ||
|
|
31e162ddde | ||
|
|
998d8fe8bc | ||
|
|
eb498150fb | ||
|
|
64f53a78cb | ||
|
|
d015af3a92 | ||
|
|
53dd52367e | ||
|
|
86c3640c0e | ||
|
|
60ebcc31a0 | ||
|
|
5b5d97cd62 | ||
|
|
f42d76c822 | ||
|
|
0631659e7b | ||
|
|
6d4c3aa82e | ||
|
|
93495226a6 | ||
|
|
aad4ca08cb | ||
|
|
06f9a534b1 | ||
|
|
6b2d1e049b | ||
|
|
1fe17559dc | ||
|
|
117d09ee09 | ||
|
|
c71d4bd838 | ||
|
|
443cb3091a | ||
|
|
c9d1a81b39 | ||
|
|
fac88d3a48 | ||
|
|
2e5452503a | ||
|
|
cc71b23d8b | ||
|
|
393da202ab | ||
|
|
d1554d43d7 | ||
|
|
6146cdf312 | ||
|
|
507bffb1a3 | ||
|
|
8f984d4855 | ||
|
|
162c523d1f | ||
|
|
fe8509d6e8 | ||
|
|
ddbc105651 | ||
|
|
df54f33f9c | ||
|
|
f64ccebd52 | ||
|
|
e4d5b4f2b2 | ||
|
|
514358f492 | ||
|
|
c35ca1cfb7 | ||
|
|
8470e95973 | ||
|
|
60b472623b | ||
|
|
2635bdcc3f | ||
|
|
5e2f421616 | ||
|
|
d60ff2bb77 | ||
|
|
2e9f5fc14f | ||
|
|
7a491b9278 | ||
|
|
b1d9bec3d8 | ||
|
|
fa48ae422d | ||
|
|
45a2222f52 | ||
|
|
d84267b164 | ||
|
|
d8963d3060 | ||
|
|
30478f325f | ||
|
|
7b1441fa6c | ||
|
|
157b814ec8 | ||
|
|
c4008ca9eb | ||
|
|
ac58c6bc42 | ||
|
|
2e57eb1618 | ||
|
|
55fadc75e6 | ||
|
|
425e4470d7 | ||
|
|
09c21363cc | ||
|
|
2950ad901f | ||
|
|
16378c5aa4 | ||
|
|
f6b4b7b50d | ||
|
|
a7d8015aff | ||
|
|
0b7d393a76 | ||
|
|
144454e043 | ||
|
|
788a9566ed | ||
|
|
578f06db3b | ||
|
|
714870590e | ||
|
|
87b3cb5c66 | ||
|
|
4293e61aa9 | ||
|
|
7f1ca6610e | ||
|
|
aef0e89de0 | ||
|
|
ae4f2bf08b | ||
|
|
62c523b6a1 | ||
|
|
0567c203ae | ||
|
|
9c163b7bd3 | ||
|
|
3a58f79f67 | ||
|
|
11ef392677 | ||
|
|
c89f2777d0 | ||
|
|
0b2c4fa410 | ||
|
|
81483cc594 | ||
|
|
ef201c9338 | ||
|
|
6fc7a9815e | ||
|
|
8e7b5baabd | ||
|
|
bf7675ad66 | ||
|
|
e2333696ed | ||
|
|
3b87ba0d59 | ||
|
|
5e10406849 | ||
|
|
edcd68274e | ||
|
|
e20b427ce8 | ||
|
|
c30f32c6b6 | ||
|
|
4dda5ae185 | ||
|
|
3016054a0a | ||
|
|
bfb4362fd2 | ||
|
|
3f2658970f | ||
|
|
3854b059f0 | ||
|
|
d3f076616d | ||
|
|
354e431054 | ||
|
|
3e9513adbd | ||
|
|
2b97fd26ac | ||
|
|
b15bc0502c | ||
|
|
ba91e81eef | ||
|
|
17bb6b4b07 | ||
|
|
3d9dad8e07 | ||
|
|
924f383dac | ||
|
|
5be7671e55 | ||
|
|
96856786e1 | ||
|
|
b6398357c7 | ||
|
|
7f49045c5a | ||
|
|
5f6be6ea5b | ||
|
|
3244511831 | ||
|
|
c40a384b84 | ||
|
|
7756917150 | ||
|
|
a9ae7a674e | ||
|
|
e759623aba | ||
|
|
4799dfd477 | ||
|
|
233b3c31c4 | ||
|
|
c6f0c9f52a | ||
|
|
fa5eb93463 | ||
|
|
d6fb554d71 | ||
|
|
bce5fa0740 | ||
|
|
9c3df883ef | ||
|
|
f2d36824f5 | ||
|
|
d27637d439 | ||
|
|
98b5fcad55 | ||
|
|
1dc5830b2e | ||
|
|
804d7d83b0 | ||
|
|
c33c86c5a7 | ||
|
|
707c32f477 | ||
|
|
0ab487d6cd | ||
|
|
2ada30fae0 | ||
|
|
a626d69d76 | ||
|
|
33f9d8d73f | ||
|
|
7d80db3c63 | ||
|
|
47df3959e4 | ||
|
|
c2d628f944 | ||
|
|
9171399ea4 | ||
|
|
776f7e316c | ||
|
|
b00b3d2077 | ||
|
|
73a82a889a | ||
|
|
2c78538955 | ||
|
|
f5cf750013 | ||
|
|
1e8f255866 | ||
|
|
c155040e01 | ||
|
|
0afda9211d | ||
|
|
1fdde9a89f | ||
|
|
a32e625826 | ||
|
|
20ed4c8ea6 | ||
|
|
309abf6916 | ||
|
|
37ae306091 | ||
|
|
bf71156d78 | ||
|
|
044392c560 | ||
|
|
b924211b00 | ||
|
|
29c622e0be | ||
|
|
d9ddff0166 | ||
|
|
40823886de | ||
|
|
89d9915dc8 | ||
|
|
6811b963d9 | ||
|
|
d844e49ded | ||
|
|
a1168f8b40 | ||
|
|
b0e378c1d0 | ||
|
|
112a733bca | ||
|
|
7dbe5933c5 | ||
|
|
05b7b5c4f0 | ||
|
|
7dbe2f99f1 | ||
|
|
f9bfe0b444 | ||
|
|
28c4d4ad37 | ||
|
|
a521088057 | ||
|
|
f8521c2183 | ||
|
|
d6edce4190 | ||
|
|
453dc3004a | ||
|
|
af8634876a | ||
|
|
343eb875ec | ||
|
|
3be4eee85b | ||
|
|
d3fa659413 | ||
|
|
4a199c1ad4 | ||
|
|
2c41ee0998 | ||
|
|
72166acda0 | ||
|
|
bf8a4f7e93 | ||
|
|
a4a8b0cfb0 | ||
|
|
d6868e9439 | ||
|
|
d2165c0454 | ||
|
|
03b3bc2fff | ||
|
|
5c47ee0d82 | ||
|
|
2af89dfed6 | ||
|
|
9d15b33b50 | ||
|
|
c9fe6ed7e8 | ||
|
|
ed64fdf9dc | ||
|
|
fb2ea08787 | ||
|
|
3e0e7e29ec | ||
|
|
c1f0feca45 | ||
|
|
5b08671fae | ||
|
|
3020ca5d55 | ||
|
|
2171b630e1 | ||
|
|
97d9d8b15e | ||
|
|
186f5c3b3f | ||
|
|
0e1a6afc89 | ||
|
|
1690532cce | ||
|
|
4042062d8b | ||
|
|
77f50194cd | ||
|
|
ea39cd7132 | ||
|
|
53c5d2fdad | ||
|
|
245f5fec32 | ||
|
|
c7986fee91 | ||
|
|
d95a04aba5 | ||
|
|
0fbf23946f | ||
|
|
39fe244308 | ||
|
|
d5824fb72a | ||
|
|
334d41ff07 | ||
|
|
d6db919239 | ||
|
|
50c85554cb | ||
|
|
cd6183a397 | ||
|
|
046b5c3ee0 | ||
|
|
52280e491f | ||
|
|
3dfdb5be73 | ||
|
|
f399144fe8 | ||
|
|
19fbe943f4 | ||
|
|
d39c2e0e91 | ||
|
|
517f574ebc | ||
|
|
d594980744 | ||
|
|
5cc0e37a09 | ||
|
|
3a223f07c6 | ||
|
|
567f3cb16c | ||
|
|
aa6aeffeb0 | ||
|
|
d3f53792c5 | ||
|
|
a7939b80da | ||
|
|
3137a25257 | ||
|
|
9a53202577 | ||
|
|
429f55e06a | ||
|
|
44ada3bde8 | ||
|
|
1006abdcb7 | ||
|
|
8bd97ece0a | ||
|
|
03f3948d7d | ||
|
|
15dc26d5ef | ||
|
|
accf8c058f | ||
|
|
85da4589c2 | ||
|
|
980746dd87 | ||
|
|
bcf1de51e2 | ||
|
|
eb0a38f478 | ||
|
|
37e50b3708 | ||
|
|
6f31f041b8 | ||
|
|
c6e0f15690 | ||
|
|
bc0a10b852 | ||
|
|
9559843519 | ||
|
|
de96c97360 | ||
|
|
dab01fbafd | ||
|
|
345bcfec21 | ||
|
|
919bf0ab53 | ||
|
|
e086a49bdb | ||
|
|
e20156294e | ||
|
|
fea0602ef3 | ||
|
|
74476a0691 | ||
|
|
ad26562f12 | ||
|
|
168e2d3f63 | ||
|
|
49adab8665 | ||
|
|
2b1444d3c6 | ||
|
|
9d43909fba | ||
|
|
ef29380dde | ||
|
|
23b7d3ae66 | ||
|
|
a0206f1d67 | ||
|
|
a312a61ae8 | ||
|
|
04e688b85c | ||
|
|
155f7bc79a |
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -1,2 +0,0 @@
|
||||
*.dll filter=lfs diff=lfs merge=lfs -text
|
||||
*.lib filter=lfs diff=lfs merge=lfs -text
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -425,3 +425,8 @@ FodyWeavers.xsd
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
screen.png
|
||||
adb_screen.png
|
||||
tools/*.png
|
||||
resource/infrast
|
||||
|
||||
0
.gitmodules
vendored
0
.gitmodules
vendored
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:32b8b36100090e37d2a892783ef9922fd890767d0546400ed737bf2d57698dfd
|
||||
size 4745216
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3efb02b69038309da6adc09ed9b4688c966cf88871d433a49687c3840aba9343
|
||||
size 55650816
|
||||
@@ -1,37 +0,0 @@
|
||||
#ifndef __OCR_ANGLENET_H__
|
||||
#define __OCR_ANGLENET_H__
|
||||
|
||||
#include "OcrStruct.h"
|
||||
#include <opencv/cv.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace ocr {
|
||||
class AngleNet {
|
||||
public:
|
||||
|
||||
~AngleNet();
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
|
||||
void setGpuIndex(int gpuIndex);
|
||||
|
||||
bool initModel(const std::string& pathStr);
|
||||
|
||||
std::vector<Angle> getAngles(std::vector<cv::Mat>& partImgs, const char* path,
|
||||
const char* imgName, bool doAngle, bool mostAngle);
|
||||
|
||||
private:
|
||||
bool isOutputAngleImg = false;
|
||||
int numThread;
|
||||
std::shared_ptr<ncnn::Net> pNet = std::make_shared<ncnn::Net>();
|
||||
const float meanValues[3] = { 127.5, 127.5, 127.5 };
|
||||
const float normValues[3] = { 1.0 / 127.5, 1.0 / 127.5, 1.0 / 127.5 };
|
||||
|
||||
const int dstWidth = 192;
|
||||
const int dstHeight = 32;
|
||||
|
||||
Angle getAngle(cv::Mat& src);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //__OCR_ANGLENET_H__
|
||||
@@ -1,39 +0,0 @@
|
||||
#ifndef __OCR_CRNNNET_H__
|
||||
#define __OCR_CRNNNET_H__
|
||||
|
||||
#include "OcrStruct.h"
|
||||
#include <opencv/cv.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace ocr {
|
||||
class CrnnNet {
|
||||
public:
|
||||
|
||||
~CrnnNet();
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
|
||||
void setGpuIndex(int gpuIndex);
|
||||
|
||||
bool initModel(const std::string& pathStr, const std::string& keysPath);
|
||||
|
||||
std::vector<TextLine> getTextLines(std::vector<cv::Mat>& partImg, const char* path, const char* imgName);
|
||||
|
||||
private:
|
||||
bool isOutputDebugImg = false;
|
||||
int numThread;
|
||||
std::shared_ptr<ncnn::Net> pNet = std::make_shared<ncnn::Net>();
|
||||
|
||||
const float meanValues[3] = { 127.5, 127.5, 127.5 };
|
||||
const float normValues[3] = { 1.0 / 127.5, 1.0 / 127.5, 1.0 / 127.5 };
|
||||
const int dstHeight = 32;
|
||||
|
||||
std::vector<std::string> keys;
|
||||
|
||||
TextLine scoreToTextLine(const std::vector<float>& outputData, int h, int w);
|
||||
|
||||
TextLine getTextLine(const cv::Mat& src);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //__OCR_CRNNNET_H__
|
||||
@@ -1,31 +0,0 @@
|
||||
#ifndef __OCR_DBNET_H__
|
||||
#define __OCR_DBNET_H__
|
||||
|
||||
#include "OcrStruct.h"
|
||||
#include <opencv/cv.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace ocr {
|
||||
class DbNet {
|
||||
public:
|
||||
~DbNet();
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
|
||||
void setGpuIndex(int gpuIndex);
|
||||
|
||||
bool initModel(const std::string& pathStr);
|
||||
|
||||
std::vector<TextBox> getTextBoxes(cv::Mat& src, ScaleParam& s, float boxScoreThresh,
|
||||
float boxThresh, float unClipRatio);
|
||||
|
||||
private:
|
||||
int numThread;
|
||||
std::shared_ptr<ncnn::Net> pNet = std::make_shared<ncnn::Net>();
|
||||
const float meanValues[3] = { 0.485 * 255, 0.456 * 255, 0.406 * 255 };
|
||||
const float normValues[3] = { 1.0 / 0.229 / 255.0, 1.0 / 0.224 / 255.0, 1.0 / 0.225 / 255.0 };
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif //__OCR_DBNET_H__
|
||||
@@ -1,75 +0,0 @@
|
||||
#ifndef __OCR_LITE_H__
|
||||
#define __OCR_LITE_H__
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include "OcrStruct.h"
|
||||
#include "DbNet.h"
|
||||
#include "AngleNet.h"
|
||||
#include "CrnnNet.h"
|
||||
|
||||
namespace ocr {
|
||||
class OCRLITE_EXPORT OcrLite {
|
||||
public:
|
||||
OcrLite();
|
||||
|
||||
~OcrLite();
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
|
||||
void initLogger(bool isConsole, bool isPartImg, bool isResultImg);
|
||||
|
||||
void enableResultTxt(const char* path, const char* imgName);
|
||||
|
||||
void setGpuIndex(int gpuIndex);
|
||||
|
||||
bool initModels(const std::string& detPath, const std::string& clsPath,
|
||||
const std::string& recPath, const std::string& keysPath);
|
||||
|
||||
void Logger(const char* format, ...);
|
||||
|
||||
/*
|
||||
* padding:图像预处理,在图片外周添加白边,用于提升识别率,文字框没有正确框住所有文字时,增加此值。
|
||||
* maxSideLen :按图片最长边的长度,此值为0代表不缩放,例:1024,如果图片长边大于1024则把图像整体缩小到1024再进行图像分割计算,如果图片长边小于1024则不缩放,如果图片长边小于32,则缩放到32。
|
||||
* boxScoreThresh:文字框置信度门限,文字框没有正确框住所有文字时,减小此值。
|
||||
* boxThresh:请自行试验。
|
||||
* unClipRatio:单个文字框大小倍率,越大时单个文字框越大。此项与图片的大小相关,越大的图片此值应该越大。
|
||||
* doAngle:启用(1)/禁用(0) 文字方向检测,只有图片倒置的情况下(旋转90~270度的图片),才需要启用文字方向检测。
|
||||
* mostAngle:启用(1)/禁用(0) 角度投票(整张图片以最大可能文字方向来识别),当禁用文字方向检测时,此项也不起作用。
|
||||
*/
|
||||
OcrResult detect(const char* path, const char* imgName,
|
||||
int padding, int maxSideLen,
|
||||
float boxScoreThresh, float boxThresh, float unClipRatio, bool doAngle, bool mostAngle);
|
||||
|
||||
/*
|
||||
* padding:图像预处理,在图片外周添加白边,用于提升识别率,文字框没有正确框住所有文字时,增加此值。
|
||||
* maxSideLen :按图片最长边的长度,此值为0代表不缩放,例:1024,如果图片长边大于1024则把图像整体缩小到1024再进行图像分割计算,如果图片长边小于1024则不缩放,如果图片长边小于32,则缩放到32。
|
||||
* boxScoreThresh:文字框置信度门限,文字框没有正确框住所有文字时,减小此值。
|
||||
* boxThresh:请自行试验。
|
||||
* unClipRatio:单个文字框大小倍率,越大时单个文字框越大。此项与图片的大小相关,越大的图片此值应该越大。
|
||||
* doAngle:启用(1)/禁用(0) 文字方向检测,只有图片倒置的情况下(旋转90~270度的图片),才需要启用文字方向检测。
|
||||
* mostAngle:启用(1)/禁用(0) 角度投票(整张图片以最大可能文字方向来识别),当禁用文字方向检测时,此项也不起作用。
|
||||
*/
|
||||
OcrResult detect(const cv::Mat& mat,
|
||||
int padding, int maxSideLen,
|
||||
float boxScoreThresh, float boxThresh, float unClipRatio, bool doAngle, bool mostAngle);
|
||||
private:
|
||||
bool isOutputConsole = false;
|
||||
bool isOutputPartImg = false;
|
||||
bool isOutputResultTxt = false;
|
||||
bool isOutputResultImg = false;
|
||||
FILE* resultTxt;
|
||||
DbNet dbNet;
|
||||
AngleNet angleNet;
|
||||
CrnnNet crnnNet;
|
||||
|
||||
std::vector<cv::Mat> getPartImages(cv::Mat& src, std::vector<TextBox>& textBoxes,
|
||||
const char* path, const char* imgName);
|
||||
|
||||
OcrResult detect(const char* path, const char* imgName,
|
||||
cv::Mat& src, cv::Rect& originRect, ScaleParam& scale,
|
||||
float boxScoreThresh = 0.6f, float boxThresh = 0.3f,
|
||||
float unClipRatio = 2.0f, bool doAngle = true, bool mostAngle = true);
|
||||
};
|
||||
}
|
||||
|
||||
#endif //__OCR_LITE_H__
|
||||
@@ -1,65 +0,0 @@
|
||||
#ifndef __OCR_STRUCT_H__
|
||||
#define __OCR_STRUCT_H__
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include <vector>
|
||||
|
||||
#ifdef __C_API__
|
||||
#define OCRLITE_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define OCRLITE_EXPORT
|
||||
#endif
|
||||
|
||||
namespace ncnn {
|
||||
class Net;
|
||||
}
|
||||
|
||||
namespace ocr {
|
||||
struct OCRLITE_EXPORT ScaleParam {
|
||||
int srcWidth;
|
||||
int srcHeight;
|
||||
int dstWidth;
|
||||
int dstHeight;
|
||||
float ratioWidth;
|
||||
float ratioHeight;
|
||||
};
|
||||
|
||||
struct OCRLITE_EXPORT TextBox {
|
||||
std::vector<cv::Point> boxPoint;
|
||||
float score;
|
||||
};
|
||||
|
||||
struct OCRLITE_EXPORT Angle {
|
||||
int index;
|
||||
float score;
|
||||
double time;
|
||||
};
|
||||
|
||||
struct OCRLITE_EXPORT TextLine {
|
||||
std::string text;
|
||||
std::vector<float> charScores;
|
||||
double time;
|
||||
};
|
||||
|
||||
struct OCRLITE_EXPORT TextBlock {
|
||||
std::vector<cv::Point> boxPoint;
|
||||
float boxScore;
|
||||
int angleIndex;
|
||||
float angleScore;
|
||||
double angleTime;
|
||||
std::string text;
|
||||
std::vector<float> charScores;
|
||||
double crnnTime;
|
||||
double blockTime;
|
||||
};
|
||||
|
||||
struct OCRLITE_EXPORT OcrResult {
|
||||
double dbNetTime;
|
||||
std::vector<TextBlock> textBlocks;
|
||||
cv::Mat boxImg;
|
||||
double detectTime;
|
||||
std::string strRes;
|
||||
};
|
||||
}
|
||||
|
||||
#endif //__OCR_STRUCT_H__
|
||||
@@ -1,66 +0,0 @@
|
||||
#ifndef __OCR_UTILS_H__
|
||||
#define __OCR_UTILS_H__
|
||||
|
||||
#include <opencv2/core.hpp>
|
||||
#include "OcrStruct.h"
|
||||
|
||||
#include <sys/stat.h>
|
||||
/*#define __ENABLE_CONSOLE__ true
|
||||
#define Logger(format, ...) {\
|
||||
if(__ENABLE_CONSOLE__) printf(format,##__VA_ARGS__); \
|
||||
}*/
|
||||
|
||||
namespace ocr {
|
||||
OCRLITE_EXPORT double getCurrentTime();
|
||||
|
||||
OCRLITE_EXPORT inline bool isFileExists(const std::string& name) {
|
||||
struct stat buffer;
|
||||
return (stat(name.c_str(), &buffer) == 0);
|
||||
}
|
||||
|
||||
OCRLITE_EXPORT std::wstring strToWstr(std::string str);
|
||||
|
||||
OCRLITE_EXPORT ScaleParam getScaleParam(cv::Mat& src, const float scale);
|
||||
|
||||
OCRLITE_EXPORT ScaleParam getScaleParam(cv::Mat& src, const int targetSize);
|
||||
|
||||
OCRLITE_EXPORT std::vector<cv::Point2f> getBox(const cv::RotatedRect& rect);
|
||||
|
||||
OCRLITE_EXPORT int getThickness(cv::Mat& boxImg);
|
||||
|
||||
OCRLITE_EXPORT void drawTextBox(cv::Mat& boxImg, cv::RotatedRect& rect, int thickness);
|
||||
|
||||
OCRLITE_EXPORT void drawTextBox(cv::Mat& boxImg, const std::vector<cv::Point>& box, int thickness);
|
||||
|
||||
OCRLITE_EXPORT void drawTextBoxes(cv::Mat& boxImg, std::vector<TextBox>& textBoxes, int thickness);
|
||||
|
||||
OCRLITE_EXPORT cv::Mat matRotateClockWise180(cv::Mat src);
|
||||
|
||||
OCRLITE_EXPORT cv::Mat matRotateClockWise90(cv::Mat src);
|
||||
|
||||
OCRLITE_EXPORT cv::Mat getRotateCropImage(const cv::Mat& src, std::vector<cv::Point> box);
|
||||
|
||||
OCRLITE_EXPORT cv::Mat adjustTargetImg(cv::Mat& src, int dstWidth, int dstHeight);
|
||||
|
||||
OCRLITE_EXPORT std::vector<cv::Point> getMinBoxes(const std::vector<cv::Point>& inVec, float& minSideLen, float& allEdgeSize);
|
||||
|
||||
OCRLITE_EXPORT float boxScoreFast(const cv::Mat& inMat, const std::vector<cv::Point>& inBox);
|
||||
|
||||
OCRLITE_EXPORT std::vector<cv::Point> unClip(const std::vector<cv::Point>& inBox, float perimeter, float unClipRatio);
|
||||
|
||||
OCRLITE_EXPORT std::vector<int> getAngleIndexes(std::vector<Angle>& angles);
|
||||
|
||||
OCRLITE_EXPORT void saveImg(cv::Mat& img, const char* imgPath);
|
||||
|
||||
OCRLITE_EXPORT std::string getSrcImgFilePath(const char* path, const char* imgName);
|
||||
|
||||
OCRLITE_EXPORT std::string getResultTxtFilePath(const char* path, const char* imgName);
|
||||
|
||||
OCRLITE_EXPORT std::string getResultImgFilePath(const char* path, const char* imgName);
|
||||
|
||||
OCRLITE_EXPORT std::string getDebugImgFilePath(const char* path, const char* imgName, int i, const char* tag);
|
||||
|
||||
OCRLITE_EXPORT void printGpuInfo();
|
||||
}
|
||||
|
||||
#endif //__OCR_UTILS_H__
|
||||
@@ -1,27 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
namespace json
|
||||
{
|
||||
class exception : public std::exception
|
||||
{
|
||||
public:
|
||||
exception() = default;
|
||||
exception(const std::string &msg);
|
||||
|
||||
exception(const exception &) = default;
|
||||
exception &operator=(const exception &) = default;
|
||||
exception(exception &&) = default;
|
||||
exception &operator=(exception &&) = default;
|
||||
|
||||
virtual ~exception() noexcept override = default;
|
||||
|
||||
virtual const char *what() const noexcept override;
|
||||
|
||||
private:
|
||||
std::string m_msg;
|
||||
};
|
||||
|
||||
} // namespace json
|
||||
@@ -1,73 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_OLD_CV_H
|
||||
#define OPENCV_OLD_CV_H
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define CV_DO_PRAGMA(x) __pragma(x)
|
||||
#define __CVSTR2__(x) #x
|
||||
#define __CVSTR1__(x) __CVSTR2__(x)
|
||||
#define __CVMSVCLOC__ __FILE__ "("__CVSTR1__(__LINE__)") : "
|
||||
#define CV_MSG_PRAGMA(_msg) CV_DO_PRAGMA(message (__CVMSVCLOC__ _msg))
|
||||
#elif defined(__GNUC__)
|
||||
#define CV_DO_PRAGMA(x) _Pragma (#x)
|
||||
#define CV_MSG_PRAGMA(_msg) CV_DO_PRAGMA(message (_msg))
|
||||
#else
|
||||
#define CV_DO_PRAGMA(x)
|
||||
#define CV_MSG_PRAGMA(_msg)
|
||||
#endif
|
||||
#define CV_WARNING(x) CV_MSG_PRAGMA("Warning: " #x)
|
||||
|
||||
//CV_WARNING("This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module")
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
#include "opencv2/imgproc/imgproc_c.h"
|
||||
#include "opencv2/photo/photo_c.h"
|
||||
#include "opencv2/video/tracking_c.h"
|
||||
#include "opencv2/objdetect/objdetect_c.h"
|
||||
|
||||
#if !defined(CV_IMPL)
|
||||
#define CV_IMPL extern "C"
|
||||
#endif //CV_IMPL
|
||||
|
||||
#endif // __OPENCV_OLD_CV_H_
|
||||
@@ -1,60 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_OLD_CV_HPP
|
||||
#define OPENCV_OLD_CV_HPP
|
||||
|
||||
//#if defined(__GNUC__)
|
||||
//#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module"
|
||||
//#endif
|
||||
|
||||
#include "cv.h"
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/photo.hpp"
|
||||
#include "opencv2/video.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include "opencv2/features2d.hpp"
|
||||
#include "opencv2/calib3d.hpp"
|
||||
#include "opencv2/objdetect.hpp"
|
||||
|
||||
#endif
|
||||
@@ -1,57 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// Intel License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000, Intel Corporation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of Intel Corporation may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_OLD_AUX_H
|
||||
#define OPENCV_OLD_AUX_H
|
||||
|
||||
//#if defined(__GNUC__)
|
||||
//#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module"
|
||||
//#endif
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
#include "opencv2/imgproc/imgproc_c.h"
|
||||
#include "opencv2/photo/photo_c.h"
|
||||
#include "opencv2/video/tracking_c.h"
|
||||
#include "opencv2/objdetect/objdetect_c.h"
|
||||
|
||||
#endif
|
||||
|
||||
/* End of file. */
|
||||
@@ -1,52 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// Intel License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000, Intel Corporation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of Intel Corporation may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_OLD_AUX_HPP
|
||||
#define OPENCV_OLD_AUX_HPP
|
||||
|
||||
//#if defined(__GNUC__)
|
||||
//#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module"
|
||||
//#endif
|
||||
|
||||
#include "cvaux.h"
|
||||
#include "opencv2/core/utility.hpp"
|
||||
|
||||
#endif
|
||||
@@ -1,46 +0,0 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to
|
||||
// this license. If you do not agree to this license, do not download,
|
||||
// install, copy or use the software.
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2008, Google, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of Intel Corporation or contributors may not 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 Intel Corporation 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.
|
||||
|
||||
|
||||
#ifndef OPENCV_OLD_WIMAGE_HPP
|
||||
#define OPENCV_OLD_WIMAGE_HPP
|
||||
|
||||
#include "opencv2/core/wimage.hpp"
|
||||
|
||||
#endif
|
||||
@@ -1,52 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_OLD_CXCORE_H
|
||||
#define OPENCV_OLD_CXCORE_H
|
||||
|
||||
//#if defined(__GNUC__)
|
||||
//#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module"
|
||||
//#endif
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
|
||||
#endif
|
||||
@@ -1,53 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_OLD_CXCORE_HPP
|
||||
#define OPENCV_OLD_CXCORE_HPP
|
||||
|
||||
//#if defined(__GNUC__)
|
||||
//#warning "This is a deprecated opencv header provided for compatibility. Please include a header from a corresponding opencv module"
|
||||
//#endif
|
||||
|
||||
#include "cxcore.h"
|
||||
#include "opencv2/core.hpp"
|
||||
|
||||
#endif
|
||||
@@ -1,48 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_OLD_EIGEN_HPP
|
||||
#define OPENCV_OLD_EIGEN_HPP
|
||||
|
||||
#include "opencv2/core/eigen.hpp"
|
||||
|
||||
#endif
|
||||
@@ -1,8 +0,0 @@
|
||||
#ifndef OPENCV_OLD_CXMISC_H
|
||||
#define OPENCV_OLD_CXMISC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
# include "opencv2/core/utility.hpp"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,48 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// Intel License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000, Intel Corporation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of Intel Corporation may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_OLD_HIGHGUI_H
|
||||
#define OPENCV_OLD_HIGHGUI_H
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
#include "opencv2/highgui/highgui_c.h"
|
||||
|
||||
#endif
|
||||
@@ -1,47 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// Intel License Agreement
|
||||
//
|
||||
// Copyright (C) 2000, Intel Corporation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of Intel Corporation may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_OLD_ML_H
|
||||
#define OPENCV_OLD_ML_H
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
#include "opencv2/ml.hpp"
|
||||
|
||||
#endif
|
||||
@@ -1,427 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_CALIB3D_C_H
|
||||
#define OPENCV_CALIB3D_C_H
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @addtogroup calib3d_c
|
||||
@{
|
||||
*/
|
||||
|
||||
/****************************************************************************************\
|
||||
* Camera Calibration, Pose Estimation and Stereo *
|
||||
\****************************************************************************************/
|
||||
|
||||
typedef struct CvPOSITObject CvPOSITObject;
|
||||
|
||||
/* Allocates and initializes CvPOSITObject structure before doing cvPOSIT */
|
||||
CVAPI(CvPOSITObject*) cvCreatePOSITObject( CvPoint3D32f* points, int point_count );
|
||||
|
||||
|
||||
/* Runs POSIT (POSe from ITeration) algorithm for determining 3d position of
|
||||
an object given its model and projection in a weak-perspective case */
|
||||
CVAPI(void) cvPOSIT( CvPOSITObject* posit_object, CvPoint2D32f* image_points,
|
||||
double focal_length, CvTermCriteria criteria,
|
||||
float* rotation_matrix, float* translation_vector);
|
||||
|
||||
/* Releases CvPOSITObject structure */
|
||||
CVAPI(void) cvReleasePOSITObject( CvPOSITObject** posit_object );
|
||||
|
||||
/* updates the number of RANSAC iterations */
|
||||
CVAPI(int) cvRANSACUpdateNumIters( double p, double err_prob,
|
||||
int model_points, int max_iters );
|
||||
|
||||
CVAPI(void) cvConvertPointsHomogeneous( const CvMat* src, CvMat* dst );
|
||||
|
||||
/* Calculates fundamental matrix given a set of corresponding points */
|
||||
#define CV_FM_7POINT 1
|
||||
#define CV_FM_8POINT 2
|
||||
|
||||
#define CV_LMEDS 4
|
||||
#define CV_RANSAC 8
|
||||
|
||||
#define CV_FM_LMEDS_ONLY CV_LMEDS
|
||||
#define CV_FM_RANSAC_ONLY CV_RANSAC
|
||||
#define CV_FM_LMEDS CV_LMEDS
|
||||
#define CV_FM_RANSAC CV_RANSAC
|
||||
|
||||
enum
|
||||
{
|
||||
CV_ITERATIVE = 0,
|
||||
CV_EPNP = 1, // F.Moreno-Noguer, V.Lepetit and P.Fua "EPnP: Efficient Perspective-n-Point Camera Pose Estimation"
|
||||
CV_P3P = 2, // X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang; "Complete Solution Classification for the Perspective-Three-Point Problem"
|
||||
CV_DLS = 3 // Joel A. Hesch and Stergios I. Roumeliotis. "A Direct Least-Squares (DLS) Method for PnP"
|
||||
};
|
||||
|
||||
CVAPI(int) cvFindFundamentalMat( const CvMat* points1, const CvMat* points2,
|
||||
CvMat* fundamental_matrix,
|
||||
int method CV_DEFAULT(CV_FM_RANSAC),
|
||||
double param1 CV_DEFAULT(3.), double param2 CV_DEFAULT(0.99),
|
||||
CvMat* status CV_DEFAULT(NULL) );
|
||||
|
||||
/* For each input point on one of images
|
||||
computes parameters of the corresponding
|
||||
epipolar line on the other image */
|
||||
CVAPI(void) cvComputeCorrespondEpilines( const CvMat* points,
|
||||
int which_image,
|
||||
const CvMat* fundamental_matrix,
|
||||
CvMat* correspondent_lines );
|
||||
|
||||
/* Triangulation functions */
|
||||
|
||||
CVAPI(void) cvTriangulatePoints(CvMat* projMatr1, CvMat* projMatr2,
|
||||
CvMat* projPoints1, CvMat* projPoints2,
|
||||
CvMat* points4D);
|
||||
|
||||
CVAPI(void) cvCorrectMatches(CvMat* F, CvMat* points1, CvMat* points2,
|
||||
CvMat* new_points1, CvMat* new_points2);
|
||||
|
||||
|
||||
/* Computes the optimal new camera matrix according to the free scaling parameter alpha:
|
||||
alpha=0 - only valid pixels will be retained in the undistorted image
|
||||
alpha=1 - all the source image pixels will be retained in the undistorted image
|
||||
*/
|
||||
CVAPI(void) cvGetOptimalNewCameraMatrix( const CvMat* camera_matrix,
|
||||
const CvMat* dist_coeffs,
|
||||
CvSize image_size, double alpha,
|
||||
CvMat* new_camera_matrix,
|
||||
CvSize new_imag_size CV_DEFAULT(cvSize(0,0)),
|
||||
CvRect* valid_pixel_ROI CV_DEFAULT(0),
|
||||
int center_principal_point CV_DEFAULT(0));
|
||||
|
||||
/* Converts rotation vector to rotation matrix or vice versa */
|
||||
CVAPI(int) cvRodrigues2( const CvMat* src, CvMat* dst,
|
||||
CvMat* jacobian CV_DEFAULT(0) );
|
||||
|
||||
/* Finds perspective transformation between the object plane and image (view) plane */
|
||||
CVAPI(int) cvFindHomography( const CvMat* src_points,
|
||||
const CvMat* dst_points,
|
||||
CvMat* homography,
|
||||
int method CV_DEFAULT(0),
|
||||
double ransacReprojThreshold CV_DEFAULT(3),
|
||||
CvMat* mask CV_DEFAULT(0),
|
||||
int maxIters CV_DEFAULT(2000),
|
||||
double confidence CV_DEFAULT(0.995));
|
||||
|
||||
/* Computes RQ decomposition for 3x3 matrices */
|
||||
CVAPI(void) cvRQDecomp3x3( const CvMat *matrixM, CvMat *matrixR, CvMat *matrixQ,
|
||||
CvMat *matrixQx CV_DEFAULT(NULL),
|
||||
CvMat *matrixQy CV_DEFAULT(NULL),
|
||||
CvMat *matrixQz CV_DEFAULT(NULL),
|
||||
CvPoint3D64f *eulerAngles CV_DEFAULT(NULL));
|
||||
|
||||
/* Computes projection matrix decomposition */
|
||||
CVAPI(void) cvDecomposeProjectionMatrix( const CvMat *projMatr, CvMat *calibMatr,
|
||||
CvMat *rotMatr, CvMat *posVect,
|
||||
CvMat *rotMatrX CV_DEFAULT(NULL),
|
||||
CvMat *rotMatrY CV_DEFAULT(NULL),
|
||||
CvMat *rotMatrZ CV_DEFAULT(NULL),
|
||||
CvPoint3D64f *eulerAngles CV_DEFAULT(NULL));
|
||||
|
||||
/* Computes d(AB)/dA and d(AB)/dB */
|
||||
CVAPI(void) cvCalcMatMulDeriv( const CvMat* A, const CvMat* B, CvMat* dABdA, CvMat* dABdB );
|
||||
|
||||
/* Computes r3 = rodrigues(rodrigues(r2)*rodrigues(r1)),
|
||||
t3 = rodrigues(r2)*t1 + t2 and the respective derivatives */
|
||||
CVAPI(void) cvComposeRT( const CvMat* _rvec1, const CvMat* _tvec1,
|
||||
const CvMat* _rvec2, const CvMat* _tvec2,
|
||||
CvMat* _rvec3, CvMat* _tvec3,
|
||||
CvMat* dr3dr1 CV_DEFAULT(0), CvMat* dr3dt1 CV_DEFAULT(0),
|
||||
CvMat* dr3dr2 CV_DEFAULT(0), CvMat* dr3dt2 CV_DEFAULT(0),
|
||||
CvMat* dt3dr1 CV_DEFAULT(0), CvMat* dt3dt1 CV_DEFAULT(0),
|
||||
CvMat* dt3dr2 CV_DEFAULT(0), CvMat* dt3dt2 CV_DEFAULT(0) );
|
||||
|
||||
/* Projects object points to the view plane using
|
||||
the specified extrinsic and intrinsic camera parameters */
|
||||
CVAPI(void) cvProjectPoints2( const CvMat* object_points, const CvMat* rotation_vector,
|
||||
const CvMat* translation_vector, const CvMat* camera_matrix,
|
||||
const CvMat* distortion_coeffs, CvMat* image_points,
|
||||
CvMat* dpdrot CV_DEFAULT(NULL), CvMat* dpdt CV_DEFAULT(NULL),
|
||||
CvMat* dpdf CV_DEFAULT(NULL), CvMat* dpdc CV_DEFAULT(NULL),
|
||||
CvMat* dpddist CV_DEFAULT(NULL),
|
||||
double aspect_ratio CV_DEFAULT(0));
|
||||
|
||||
/* Finds extrinsic camera parameters from
|
||||
a few known corresponding point pairs and intrinsic parameters */
|
||||
CVAPI(void) cvFindExtrinsicCameraParams2( const CvMat* object_points,
|
||||
const CvMat* image_points,
|
||||
const CvMat* camera_matrix,
|
||||
const CvMat* distortion_coeffs,
|
||||
CvMat* rotation_vector,
|
||||
CvMat* translation_vector,
|
||||
int use_extrinsic_guess CV_DEFAULT(0) );
|
||||
|
||||
/* Computes initial estimate of the intrinsic camera parameters
|
||||
in case of planar calibration target (e.g. chessboard) */
|
||||
CVAPI(void) cvInitIntrinsicParams2D( const CvMat* object_points,
|
||||
const CvMat* image_points,
|
||||
const CvMat* npoints, CvSize image_size,
|
||||
CvMat* camera_matrix,
|
||||
double aspect_ratio CV_DEFAULT(1.) );
|
||||
|
||||
#define CV_CALIB_CB_ADAPTIVE_THRESH 1
|
||||
#define CV_CALIB_CB_NORMALIZE_IMAGE 2
|
||||
#define CV_CALIB_CB_FILTER_QUADS 4
|
||||
#define CV_CALIB_CB_FAST_CHECK 8
|
||||
|
||||
// Performs a fast check if a chessboard is in the input image. This is a workaround to
|
||||
// a problem of cvFindChessboardCorners being slow on images with no chessboard
|
||||
// - src: input image
|
||||
// - size: chessboard size
|
||||
// Returns 1 if a chessboard can be in this image and findChessboardCorners should be called,
|
||||
// 0 if there is no chessboard, -1 in case of error
|
||||
CVAPI(int) cvCheckChessboard(IplImage* src, CvSize size);
|
||||
|
||||
/* Detects corners on a chessboard calibration pattern */
|
||||
CVAPI(int) cvFindChessboardCorners( const void* image, CvSize pattern_size,
|
||||
CvPoint2D32f* corners,
|
||||
int* corner_count CV_DEFAULT(NULL),
|
||||
int flags CV_DEFAULT(CV_CALIB_CB_ADAPTIVE_THRESH+CV_CALIB_CB_NORMALIZE_IMAGE) );
|
||||
|
||||
/* Draws individual chessboard corners or the whole chessboard detected */
|
||||
CVAPI(void) cvDrawChessboardCorners( CvArr* image, CvSize pattern_size,
|
||||
CvPoint2D32f* corners,
|
||||
int count, int pattern_was_found );
|
||||
|
||||
#define CV_CALIB_USE_INTRINSIC_GUESS 1
|
||||
#define CV_CALIB_FIX_ASPECT_RATIO 2
|
||||
#define CV_CALIB_FIX_PRINCIPAL_POINT 4
|
||||
#define CV_CALIB_ZERO_TANGENT_DIST 8
|
||||
#define CV_CALIB_FIX_FOCAL_LENGTH 16
|
||||
#define CV_CALIB_FIX_K1 32
|
||||
#define CV_CALIB_FIX_K2 64
|
||||
#define CV_CALIB_FIX_K3 128
|
||||
#define CV_CALIB_FIX_K4 2048
|
||||
#define CV_CALIB_FIX_K5 4096
|
||||
#define CV_CALIB_FIX_K6 8192
|
||||
#define CV_CALIB_RATIONAL_MODEL 16384
|
||||
#define CV_CALIB_THIN_PRISM_MODEL 32768
|
||||
#define CV_CALIB_FIX_S1_S2_S3_S4 65536
|
||||
#define CV_CALIB_TILTED_MODEL 262144
|
||||
#define CV_CALIB_FIX_TAUX_TAUY 524288
|
||||
#define CV_CALIB_FIX_TANGENT_DIST 2097152
|
||||
|
||||
#define CV_CALIB_NINTRINSIC 18
|
||||
|
||||
/* Finds intrinsic and extrinsic camera parameters
|
||||
from a few views of known calibration pattern */
|
||||
CVAPI(double) cvCalibrateCamera2( const CvMat* object_points,
|
||||
const CvMat* image_points,
|
||||
const CvMat* point_counts,
|
||||
CvSize image_size,
|
||||
CvMat* camera_matrix,
|
||||
CvMat* distortion_coeffs,
|
||||
CvMat* rotation_vectors CV_DEFAULT(NULL),
|
||||
CvMat* translation_vectors CV_DEFAULT(NULL),
|
||||
int flags CV_DEFAULT(0),
|
||||
CvTermCriteria term_crit CV_DEFAULT(cvTermCriteria(
|
||||
CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,DBL_EPSILON)) );
|
||||
|
||||
/* Computes various useful characteristics of the camera from the data computed by
|
||||
cvCalibrateCamera2 */
|
||||
CVAPI(void) cvCalibrationMatrixValues( const CvMat *camera_matrix,
|
||||
CvSize image_size,
|
||||
double aperture_width CV_DEFAULT(0),
|
||||
double aperture_height CV_DEFAULT(0),
|
||||
double *fovx CV_DEFAULT(NULL),
|
||||
double *fovy CV_DEFAULT(NULL),
|
||||
double *focal_length CV_DEFAULT(NULL),
|
||||
CvPoint2D64f *principal_point CV_DEFAULT(NULL),
|
||||
double *pixel_aspect_ratio CV_DEFAULT(NULL));
|
||||
|
||||
#define CV_CALIB_FIX_INTRINSIC 256
|
||||
#define CV_CALIB_SAME_FOCAL_LENGTH 512
|
||||
|
||||
/* Computes the transformation from one camera coordinate system to another one
|
||||
from a few correspondent views of the same calibration target. Optionally, calibrates
|
||||
both cameras */
|
||||
CVAPI(double) cvStereoCalibrate( const CvMat* object_points, const CvMat* image_points1,
|
||||
const CvMat* image_points2, const CvMat* npoints,
|
||||
CvMat* camera_matrix1, CvMat* dist_coeffs1,
|
||||
CvMat* camera_matrix2, CvMat* dist_coeffs2,
|
||||
CvSize image_size, CvMat* R, CvMat* T,
|
||||
CvMat* E CV_DEFAULT(0), CvMat* F CV_DEFAULT(0),
|
||||
int flags CV_DEFAULT(CV_CALIB_FIX_INTRINSIC),
|
||||
CvTermCriteria term_crit CV_DEFAULT(cvTermCriteria(
|
||||
CV_TERMCRIT_ITER+CV_TERMCRIT_EPS,30,1e-6)) );
|
||||
|
||||
#define CV_CALIB_ZERO_DISPARITY 1024
|
||||
|
||||
/* Computes 3D rotations (+ optional shift) for each camera coordinate system to make both
|
||||
views parallel (=> to make all the epipolar lines horizontal or vertical) */
|
||||
CVAPI(void) cvStereoRectify( const CvMat* camera_matrix1, const CvMat* camera_matrix2,
|
||||
const CvMat* dist_coeffs1, const CvMat* dist_coeffs2,
|
||||
CvSize image_size, const CvMat* R, const CvMat* T,
|
||||
CvMat* R1, CvMat* R2, CvMat* P1, CvMat* P2,
|
||||
CvMat* Q CV_DEFAULT(0),
|
||||
int flags CV_DEFAULT(CV_CALIB_ZERO_DISPARITY),
|
||||
double alpha CV_DEFAULT(-1),
|
||||
CvSize new_image_size CV_DEFAULT(cvSize(0,0)),
|
||||
CvRect* valid_pix_ROI1 CV_DEFAULT(0),
|
||||
CvRect* valid_pix_ROI2 CV_DEFAULT(0));
|
||||
|
||||
/* Computes rectification transformations for uncalibrated pair of images using a set
|
||||
of point correspondences */
|
||||
CVAPI(int) cvStereoRectifyUncalibrated( const CvMat* points1, const CvMat* points2,
|
||||
const CvMat* F, CvSize img_size,
|
||||
CvMat* H1, CvMat* H2,
|
||||
double threshold CV_DEFAULT(5));
|
||||
|
||||
|
||||
|
||||
/* stereo correspondence parameters and functions */
|
||||
|
||||
#define CV_STEREO_BM_NORMALIZED_RESPONSE 0
|
||||
#define CV_STEREO_BM_XSOBEL 1
|
||||
|
||||
/* Block matching algorithm structure */
|
||||
typedef struct CvStereoBMState
|
||||
{
|
||||
// pre-filtering (normalization of input images)
|
||||
int preFilterType; // =CV_STEREO_BM_NORMALIZED_RESPONSE now
|
||||
int preFilterSize; // averaging window size: ~5x5..21x21
|
||||
int preFilterCap; // the output of pre-filtering is clipped by [-preFilterCap,preFilterCap]
|
||||
|
||||
// correspondence using Sum of Absolute Difference (SAD)
|
||||
int SADWindowSize; // ~5x5..21x21
|
||||
int minDisparity; // minimum disparity (can be negative)
|
||||
int numberOfDisparities; // maximum disparity - minimum disparity (> 0)
|
||||
|
||||
// post-filtering
|
||||
int textureThreshold; // the disparity is only computed for pixels
|
||||
// with textured enough neighborhood
|
||||
int uniquenessRatio; // accept the computed disparity d* only if
|
||||
// SAD(d) >= SAD(d*)*(1 + uniquenessRatio/100.)
|
||||
// for any d != d*+/-1 within the search range.
|
||||
int speckleWindowSize; // disparity variation window
|
||||
int speckleRange; // acceptable range of variation in window
|
||||
|
||||
int trySmallerWindows; // if 1, the results may be more accurate,
|
||||
// at the expense of slower processing
|
||||
CvRect roi1, roi2;
|
||||
int disp12MaxDiff;
|
||||
|
||||
// temporary buffers
|
||||
CvMat* preFilteredImg0;
|
||||
CvMat* preFilteredImg1;
|
||||
CvMat* slidingSumBuf;
|
||||
CvMat* cost;
|
||||
CvMat* disp;
|
||||
} CvStereoBMState;
|
||||
|
||||
#define CV_STEREO_BM_BASIC 0
|
||||
#define CV_STEREO_BM_FISH_EYE 1
|
||||
#define CV_STEREO_BM_NARROW 2
|
||||
|
||||
CVAPI(CvStereoBMState*) cvCreateStereoBMState(int preset CV_DEFAULT(CV_STEREO_BM_BASIC),
|
||||
int numberOfDisparities CV_DEFAULT(0));
|
||||
|
||||
CVAPI(void) cvReleaseStereoBMState( CvStereoBMState** state );
|
||||
|
||||
CVAPI(void) cvFindStereoCorrespondenceBM( const CvArr* left, const CvArr* right,
|
||||
CvArr* disparity, CvStereoBMState* state );
|
||||
|
||||
CVAPI(CvRect) cvGetValidDisparityROI( CvRect roi1, CvRect roi2, int minDisparity,
|
||||
int numberOfDisparities, int SADWindowSize );
|
||||
|
||||
CVAPI(void) cvValidateDisparity( CvArr* disparity, const CvArr* cost,
|
||||
int minDisparity, int numberOfDisparities,
|
||||
int disp12MaxDiff CV_DEFAULT(1) );
|
||||
|
||||
/* Reprojects the computed disparity image to the 3D space using the specified 4x4 matrix */
|
||||
CVAPI(void) cvReprojectImageTo3D( const CvArr* disparityImage,
|
||||
CvArr* _3dImage, const CvMat* Q,
|
||||
int handleMissingValues CV_DEFAULT(0) );
|
||||
|
||||
/** @} calib3d_c */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
class CV_EXPORTS CvLevMarq
|
||||
{
|
||||
public:
|
||||
CvLevMarq();
|
||||
CvLevMarq( int nparams, int nerrs, CvTermCriteria criteria=
|
||||
cvTermCriteria(CV_TERMCRIT_EPS+CV_TERMCRIT_ITER,30,DBL_EPSILON),
|
||||
bool completeSymmFlag=false );
|
||||
~CvLevMarq();
|
||||
void init( int nparams, int nerrs, CvTermCriteria criteria=
|
||||
cvTermCriteria(CV_TERMCRIT_EPS+CV_TERMCRIT_ITER,30,DBL_EPSILON),
|
||||
bool completeSymmFlag=false );
|
||||
bool update( const CvMat*& param, CvMat*& J, CvMat*& err );
|
||||
bool updateAlt( const CvMat*& param, CvMat*& JtJ, CvMat*& JtErr, double*& errNorm );
|
||||
|
||||
void clear();
|
||||
void step();
|
||||
enum { DONE=0, STARTED=1, CALC_J=2, CHECK_ERR=3 };
|
||||
|
||||
cv::Ptr<CvMat> mask;
|
||||
cv::Ptr<CvMat> prevParam;
|
||||
cv::Ptr<CvMat> param;
|
||||
cv::Ptr<CvMat> J;
|
||||
cv::Ptr<CvMat> err;
|
||||
cv::Ptr<CvMat> JtJ;
|
||||
cv::Ptr<CvMat> JtJN;
|
||||
cv::Ptr<CvMat> JtErr;
|
||||
cv::Ptr<CvMat> JtJV;
|
||||
cv::Ptr<CvMat> JtJW;
|
||||
double prevErrNorm, errNorm;
|
||||
int lambdaLg10;
|
||||
CvTermCriteria criteria;
|
||||
int state;
|
||||
int iters;
|
||||
bool completeSymmFlag;
|
||||
int solveMethod;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* OPENCV_CALIB3D_C_H */
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,195 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2015, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
|
||||
// Copyright (C) 2015, Itseez Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_CORE_IPPASYNC_HPP
|
||||
#define OPENCV_CORE_IPPASYNC_HPP
|
||||
|
||||
#ifdef HAVE_IPP_A // this file will be removed in OpenCV 4.0
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include <ipp_async_op.h>
|
||||
#include <ipp_async_accel.h>
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
namespace hpp
|
||||
{
|
||||
|
||||
/** @addtogroup core_ipp
|
||||
This section describes conversion between OpenCV and [Intel® IPP Asynchronous
|
||||
C/C++](http://software.intel.com/en-us/intel-ipp-preview) library. [Getting Started
|
||||
Guide](http://registrationcenter.intel.com/irc_nas/3727/ipp_async_get_started.htm) help you to
|
||||
install the library, configure header and library build paths.
|
||||
*/
|
||||
//! @{
|
||||
|
||||
//! convert OpenCV data type to hppDataType
|
||||
inline int toHppType(const int cvType)
|
||||
{
|
||||
int depth = CV_MAT_DEPTH(cvType);
|
||||
int hppType = depth == CV_8U ? HPP_DATA_TYPE_8U :
|
||||
depth == CV_16U ? HPP_DATA_TYPE_16U :
|
||||
depth == CV_16S ? HPP_DATA_TYPE_16S :
|
||||
depth == CV_32S ? HPP_DATA_TYPE_32S :
|
||||
depth == CV_32F ? HPP_DATA_TYPE_32F :
|
||||
depth == CV_64F ? HPP_DATA_TYPE_64F : -1;
|
||||
CV_Assert( hppType >= 0 );
|
||||
return hppType;
|
||||
}
|
||||
|
||||
//! convert hppDataType to OpenCV data type
|
||||
inline int toCvType(const int hppType)
|
||||
{
|
||||
int cvType = hppType == HPP_DATA_TYPE_8U ? CV_8U :
|
||||
hppType == HPP_DATA_TYPE_16U ? CV_16U :
|
||||
hppType == HPP_DATA_TYPE_16S ? CV_16S :
|
||||
hppType == HPP_DATA_TYPE_32S ? CV_32S :
|
||||
hppType == HPP_DATA_TYPE_32F ? CV_32F :
|
||||
hppType == HPP_DATA_TYPE_64F ? CV_64F : -1;
|
||||
CV_Assert( cvType >= 0 );
|
||||
return cvType;
|
||||
}
|
||||
|
||||
/** @brief Convert hppiMatrix to Mat.
|
||||
|
||||
This function allocates and initializes new matrix (if needed) that has the same size and type as
|
||||
input matrix. Supports CV_8U, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F.
|
||||
@param src input hppiMatrix.
|
||||
@param dst output matrix.
|
||||
@param accel accelerator instance (see hpp::getHpp for the list of acceleration framework types).
|
||||
@param cn number of channels.
|
||||
*/
|
||||
inline void copyHppToMat(hppiMatrix* src, Mat& dst, hppAccel accel, int cn)
|
||||
{
|
||||
hppDataType type;
|
||||
hpp32u width, height;
|
||||
hppStatus sts;
|
||||
|
||||
if (src == NULL)
|
||||
return dst.release();
|
||||
|
||||
sts = hppiInquireMatrix(src, &type, &width, &height);
|
||||
|
||||
CV_Assert( sts == HPP_STATUS_NO_ERROR);
|
||||
|
||||
int matType = CV_MAKETYPE(toCvType(type), cn);
|
||||
|
||||
CV_Assert(width%cn == 0);
|
||||
|
||||
width /= cn;
|
||||
|
||||
dst.create((int)height, (int)width, (int)matType);
|
||||
|
||||
size_t newSize = (size_t)(height*(hpp32u)(dst.step));
|
||||
|
||||
sts = hppiGetMatrixData(accel,src,(hpp32u)(dst.step),dst.data,&newSize);
|
||||
|
||||
CV_Assert( sts == HPP_STATUS_NO_ERROR);
|
||||
}
|
||||
|
||||
/** @brief Create Mat from hppiMatrix.
|
||||
|
||||
This function allocates and initializes the Mat that has the same size and type as input matrix.
|
||||
Supports CV_8U, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F.
|
||||
@param src input hppiMatrix.
|
||||
@param accel accelerator instance (see hpp::getHpp for the list of acceleration framework types).
|
||||
@param cn number of channels.
|
||||
@sa howToUseIPPAconversion, hpp::copyHppToMat, hpp::getHpp.
|
||||
*/
|
||||
inline Mat getMat(hppiMatrix* src, hppAccel accel, int cn)
|
||||
{
|
||||
Mat dst;
|
||||
copyHppToMat(src, dst, accel, cn);
|
||||
return dst;
|
||||
}
|
||||
|
||||
/** @brief Create hppiMatrix from Mat.
|
||||
|
||||
This function allocates and initializes the hppiMatrix that has the same size and type as input
|
||||
matrix, returns the hppiMatrix*.
|
||||
|
||||
If you want to use zero-copy for GPU you should to have 4KB aligned matrix data. See details
|
||||
[hppiCreateSharedMatrix](http://software.intel.com/ru-ru/node/501697).
|
||||
|
||||
Supports CV_8U, CV_16U, CV_16S, CV_32S, CV_32F, CV_64F.
|
||||
|
||||
@note The hppiMatrix pointer to the image buffer in system memory refers to the src.data. Control
|
||||
the lifetime of the matrix and don't change its data, if there is no special need.
|
||||
@param src input matrix.
|
||||
@param accel accelerator instance. Supports type:
|
||||
- **HPP_ACCEL_TYPE_CPU** - accelerated by optimized CPU instructions.
|
||||
- **HPP_ACCEL_TYPE_GPU** - accelerated by GPU programmable units or fixed-function
|
||||
accelerators.
|
||||
- **HPP_ACCEL_TYPE_ANY** - any acceleration or no acceleration available.
|
||||
@sa howToUseIPPAconversion, hpp::getMat
|
||||
*/
|
||||
inline hppiMatrix* getHpp(const Mat& src, hppAccel accel)
|
||||
{
|
||||
int htype = toHppType(src.type());
|
||||
int cn = src.channels();
|
||||
|
||||
CV_Assert(src.data);
|
||||
hppAccelType accelType = hppQueryAccelType(accel);
|
||||
|
||||
if (accelType!=HPP_ACCEL_TYPE_CPU)
|
||||
{
|
||||
hpp32u pitch, size;
|
||||
hppQueryMatrixAllocParams(accel, src.cols*cn, src.rows, htype, &pitch, &size);
|
||||
if (pitch!=0 && size!=0)
|
||||
if ((int)(src.data)%4096==0 && pitch==(hpp32u)(src.step))
|
||||
{
|
||||
return hppiCreateSharedMatrix(htype, src.cols*cn, src.rows, src.data, pitch, size);
|
||||
}
|
||||
}
|
||||
|
||||
return hppiCreateMatrix(htype, src.cols*cn, src.rows, src.data, (hpp32s)(src.step));;
|
||||
}
|
||||
|
||||
//! @}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -1,714 +0,0 @@
|
||||
//
|
||||
// AUTOGENERATED, DO NOT EDIT
|
||||
//
|
||||
#ifndef OPENCV_CORE_OCL_RUNTIME_CLAMDBLAS_HPP
|
||||
#error "Invalid usage"
|
||||
#endif
|
||||
|
||||
// generated by parser_clamdblas.py
|
||||
#define clAmdBlasAddScratchImage clAmdBlasAddScratchImage_
|
||||
#define clAmdBlasCaxpy clAmdBlasCaxpy_
|
||||
#define clAmdBlasCcopy clAmdBlasCcopy_
|
||||
#define clAmdBlasCdotc clAmdBlasCdotc_
|
||||
#define clAmdBlasCdotu clAmdBlasCdotu_
|
||||
#define clAmdBlasCgbmv clAmdBlasCgbmv_
|
||||
#define clAmdBlasCgemm clAmdBlasCgemm_
|
||||
#define clAmdBlasCgemmEx clAmdBlasCgemmEx_
|
||||
#define clAmdBlasCgemv clAmdBlasCgemv_
|
||||
#define clAmdBlasCgemvEx clAmdBlasCgemvEx_
|
||||
#define clAmdBlasCgerc clAmdBlasCgerc_
|
||||
#define clAmdBlasCgeru clAmdBlasCgeru_
|
||||
#define clAmdBlasChbmv clAmdBlasChbmv_
|
||||
#define clAmdBlasChemm clAmdBlasChemm_
|
||||
#define clAmdBlasChemv clAmdBlasChemv_
|
||||
#define clAmdBlasCher clAmdBlasCher_
|
||||
#define clAmdBlasCher2 clAmdBlasCher2_
|
||||
#define clAmdBlasCher2k clAmdBlasCher2k_
|
||||
#define clAmdBlasCherk clAmdBlasCherk_
|
||||
#define clAmdBlasChpmv clAmdBlasChpmv_
|
||||
#define clAmdBlasChpr clAmdBlasChpr_
|
||||
#define clAmdBlasChpr2 clAmdBlasChpr2_
|
||||
#define clAmdBlasCrotg clAmdBlasCrotg_
|
||||
#define clAmdBlasCscal clAmdBlasCscal_
|
||||
#define clAmdBlasCsrot clAmdBlasCsrot_
|
||||
#define clAmdBlasCsscal clAmdBlasCsscal_
|
||||
#define clAmdBlasCswap clAmdBlasCswap_
|
||||
#define clAmdBlasCsymm clAmdBlasCsymm_
|
||||
#define clAmdBlasCsyr2k clAmdBlasCsyr2k_
|
||||
#define clAmdBlasCsyr2kEx clAmdBlasCsyr2kEx_
|
||||
#define clAmdBlasCsyrk clAmdBlasCsyrk_
|
||||
#define clAmdBlasCsyrkEx clAmdBlasCsyrkEx_
|
||||
#define clAmdBlasCtbmv clAmdBlasCtbmv_
|
||||
#define clAmdBlasCtbsv clAmdBlasCtbsv_
|
||||
#define clAmdBlasCtpmv clAmdBlasCtpmv_
|
||||
#define clAmdBlasCtpsv clAmdBlasCtpsv_
|
||||
#define clAmdBlasCtrmm clAmdBlasCtrmm_
|
||||
#define clAmdBlasCtrmmEx clAmdBlasCtrmmEx_
|
||||
#define clAmdBlasCtrmv clAmdBlasCtrmv_
|
||||
#define clAmdBlasCtrsm clAmdBlasCtrsm_
|
||||
#define clAmdBlasCtrsmEx clAmdBlasCtrsmEx_
|
||||
#define clAmdBlasCtrsv clAmdBlasCtrsv_
|
||||
#define clAmdBlasDasum clAmdBlasDasum_
|
||||
#define clAmdBlasDaxpy clAmdBlasDaxpy_
|
||||
#define clAmdBlasDcopy clAmdBlasDcopy_
|
||||
#define clAmdBlasDdot clAmdBlasDdot_
|
||||
#define clAmdBlasDgbmv clAmdBlasDgbmv_
|
||||
#define clAmdBlasDgemm clAmdBlasDgemm_
|
||||
#define clAmdBlasDgemmEx clAmdBlasDgemmEx_
|
||||
#define clAmdBlasDgemv clAmdBlasDgemv_
|
||||
#define clAmdBlasDgemvEx clAmdBlasDgemvEx_
|
||||
#define clAmdBlasDger clAmdBlasDger_
|
||||
#define clAmdBlasDnrm2 clAmdBlasDnrm2_
|
||||
#define clAmdBlasDrot clAmdBlasDrot_
|
||||
#define clAmdBlasDrotg clAmdBlasDrotg_
|
||||
#define clAmdBlasDrotm clAmdBlasDrotm_
|
||||
#define clAmdBlasDrotmg clAmdBlasDrotmg_
|
||||
#define clAmdBlasDsbmv clAmdBlasDsbmv_
|
||||
#define clAmdBlasDscal clAmdBlasDscal_
|
||||
#define clAmdBlasDspmv clAmdBlasDspmv_
|
||||
#define clAmdBlasDspr clAmdBlasDspr_
|
||||
#define clAmdBlasDspr2 clAmdBlasDspr2_
|
||||
#define clAmdBlasDswap clAmdBlasDswap_
|
||||
#define clAmdBlasDsymm clAmdBlasDsymm_
|
||||
#define clAmdBlasDsymv clAmdBlasDsymv_
|
||||
#define clAmdBlasDsymvEx clAmdBlasDsymvEx_
|
||||
#define clAmdBlasDsyr clAmdBlasDsyr_
|
||||
#define clAmdBlasDsyr2 clAmdBlasDsyr2_
|
||||
#define clAmdBlasDsyr2k clAmdBlasDsyr2k_
|
||||
#define clAmdBlasDsyr2kEx clAmdBlasDsyr2kEx_
|
||||
#define clAmdBlasDsyrk clAmdBlasDsyrk_
|
||||
#define clAmdBlasDsyrkEx clAmdBlasDsyrkEx_
|
||||
#define clAmdBlasDtbmv clAmdBlasDtbmv_
|
||||
#define clAmdBlasDtbsv clAmdBlasDtbsv_
|
||||
#define clAmdBlasDtpmv clAmdBlasDtpmv_
|
||||
#define clAmdBlasDtpsv clAmdBlasDtpsv_
|
||||
#define clAmdBlasDtrmm clAmdBlasDtrmm_
|
||||
#define clAmdBlasDtrmmEx clAmdBlasDtrmmEx_
|
||||
#define clAmdBlasDtrmv clAmdBlasDtrmv_
|
||||
#define clAmdBlasDtrsm clAmdBlasDtrsm_
|
||||
#define clAmdBlasDtrsmEx clAmdBlasDtrsmEx_
|
||||
#define clAmdBlasDtrsv clAmdBlasDtrsv_
|
||||
#define clAmdBlasDzasum clAmdBlasDzasum_
|
||||
#define clAmdBlasDznrm2 clAmdBlasDznrm2_
|
||||
#define clAmdBlasGetVersion clAmdBlasGetVersion_
|
||||
#define clAmdBlasRemoveScratchImage clAmdBlasRemoveScratchImage_
|
||||
#define clAmdBlasSasum clAmdBlasSasum_
|
||||
#define clAmdBlasSaxpy clAmdBlasSaxpy_
|
||||
#define clAmdBlasScasum clAmdBlasScasum_
|
||||
#define clAmdBlasScnrm2 clAmdBlasScnrm2_
|
||||
#define clAmdBlasScopy clAmdBlasScopy_
|
||||
#define clAmdBlasSdot clAmdBlasSdot_
|
||||
#define clAmdBlasSetup clAmdBlasSetup_
|
||||
#define clAmdBlasSgbmv clAmdBlasSgbmv_
|
||||
#define clAmdBlasSgemm clAmdBlasSgemm_
|
||||
#define clAmdBlasSgemmEx clAmdBlasSgemmEx_
|
||||
#define clAmdBlasSgemv clAmdBlasSgemv_
|
||||
#define clAmdBlasSgemvEx clAmdBlasSgemvEx_
|
||||
#define clAmdBlasSger clAmdBlasSger_
|
||||
#define clAmdBlasSnrm2 clAmdBlasSnrm2_
|
||||
#define clAmdBlasSrot clAmdBlasSrot_
|
||||
#define clAmdBlasSrotg clAmdBlasSrotg_
|
||||
#define clAmdBlasSrotm clAmdBlasSrotm_
|
||||
#define clAmdBlasSrotmg clAmdBlasSrotmg_
|
||||
#define clAmdBlasSsbmv clAmdBlasSsbmv_
|
||||
#define clAmdBlasSscal clAmdBlasSscal_
|
||||
#define clAmdBlasSspmv clAmdBlasSspmv_
|
||||
#define clAmdBlasSspr clAmdBlasSspr_
|
||||
#define clAmdBlasSspr2 clAmdBlasSspr2_
|
||||
#define clAmdBlasSswap clAmdBlasSswap_
|
||||
#define clAmdBlasSsymm clAmdBlasSsymm_
|
||||
#define clAmdBlasSsymv clAmdBlasSsymv_
|
||||
#define clAmdBlasSsymvEx clAmdBlasSsymvEx_
|
||||
#define clAmdBlasSsyr clAmdBlasSsyr_
|
||||
#define clAmdBlasSsyr2 clAmdBlasSsyr2_
|
||||
#define clAmdBlasSsyr2k clAmdBlasSsyr2k_
|
||||
#define clAmdBlasSsyr2kEx clAmdBlasSsyr2kEx_
|
||||
#define clAmdBlasSsyrk clAmdBlasSsyrk_
|
||||
#define clAmdBlasSsyrkEx clAmdBlasSsyrkEx_
|
||||
#define clAmdBlasStbmv clAmdBlasStbmv_
|
||||
#define clAmdBlasStbsv clAmdBlasStbsv_
|
||||
#define clAmdBlasStpmv clAmdBlasStpmv_
|
||||
#define clAmdBlasStpsv clAmdBlasStpsv_
|
||||
#define clAmdBlasStrmm clAmdBlasStrmm_
|
||||
#define clAmdBlasStrmmEx clAmdBlasStrmmEx_
|
||||
#define clAmdBlasStrmv clAmdBlasStrmv_
|
||||
#define clAmdBlasStrsm clAmdBlasStrsm_
|
||||
#define clAmdBlasStrsmEx clAmdBlasStrsmEx_
|
||||
#define clAmdBlasStrsv clAmdBlasStrsv_
|
||||
#define clAmdBlasTeardown clAmdBlasTeardown_
|
||||
#define clAmdBlasZaxpy clAmdBlasZaxpy_
|
||||
#define clAmdBlasZcopy clAmdBlasZcopy_
|
||||
#define clAmdBlasZdotc clAmdBlasZdotc_
|
||||
#define clAmdBlasZdotu clAmdBlasZdotu_
|
||||
#define clAmdBlasZdrot clAmdBlasZdrot_
|
||||
#define clAmdBlasZdscal clAmdBlasZdscal_
|
||||
#define clAmdBlasZgbmv clAmdBlasZgbmv_
|
||||
#define clAmdBlasZgemm clAmdBlasZgemm_
|
||||
#define clAmdBlasZgemmEx clAmdBlasZgemmEx_
|
||||
#define clAmdBlasZgemv clAmdBlasZgemv_
|
||||
#define clAmdBlasZgemvEx clAmdBlasZgemvEx_
|
||||
#define clAmdBlasZgerc clAmdBlasZgerc_
|
||||
#define clAmdBlasZgeru clAmdBlasZgeru_
|
||||
#define clAmdBlasZhbmv clAmdBlasZhbmv_
|
||||
#define clAmdBlasZhemm clAmdBlasZhemm_
|
||||
#define clAmdBlasZhemv clAmdBlasZhemv_
|
||||
#define clAmdBlasZher clAmdBlasZher_
|
||||
#define clAmdBlasZher2 clAmdBlasZher2_
|
||||
#define clAmdBlasZher2k clAmdBlasZher2k_
|
||||
#define clAmdBlasZherk clAmdBlasZherk_
|
||||
#define clAmdBlasZhpmv clAmdBlasZhpmv_
|
||||
#define clAmdBlasZhpr clAmdBlasZhpr_
|
||||
#define clAmdBlasZhpr2 clAmdBlasZhpr2_
|
||||
#define clAmdBlasZrotg clAmdBlasZrotg_
|
||||
#define clAmdBlasZscal clAmdBlasZscal_
|
||||
#define clAmdBlasZswap clAmdBlasZswap_
|
||||
#define clAmdBlasZsymm clAmdBlasZsymm_
|
||||
#define clAmdBlasZsyr2k clAmdBlasZsyr2k_
|
||||
#define clAmdBlasZsyr2kEx clAmdBlasZsyr2kEx_
|
||||
#define clAmdBlasZsyrk clAmdBlasZsyrk_
|
||||
#define clAmdBlasZsyrkEx clAmdBlasZsyrkEx_
|
||||
#define clAmdBlasZtbmv clAmdBlasZtbmv_
|
||||
#define clAmdBlasZtbsv clAmdBlasZtbsv_
|
||||
#define clAmdBlasZtpmv clAmdBlasZtpmv_
|
||||
#define clAmdBlasZtpsv clAmdBlasZtpsv_
|
||||
#define clAmdBlasZtrmm clAmdBlasZtrmm_
|
||||
#define clAmdBlasZtrmmEx clAmdBlasZtrmmEx_
|
||||
#define clAmdBlasZtrmv clAmdBlasZtrmv_
|
||||
#define clAmdBlasZtrsm clAmdBlasZtrsm_
|
||||
#define clAmdBlasZtrsmEx clAmdBlasZtrsmEx_
|
||||
#define clAmdBlasZtrsv clAmdBlasZtrsv_
|
||||
#define clAmdBlasiCamax clAmdBlasiCamax_
|
||||
#define clAmdBlasiDamax clAmdBlasiDamax_
|
||||
#define clAmdBlasiSamax clAmdBlasiSamax_
|
||||
#define clAmdBlasiZamax clAmdBlasiZamax_
|
||||
|
||||
#include <clAmdBlas.h>
|
||||
|
||||
// generated by parser_clamdblas.py
|
||||
#undef clAmdBlasAddScratchImage
|
||||
//#define clAmdBlasAddScratchImage clAmdBlasAddScratchImage_pfn
|
||||
#undef clAmdBlasCaxpy
|
||||
//#define clAmdBlasCaxpy clAmdBlasCaxpy_pfn
|
||||
#undef clAmdBlasCcopy
|
||||
//#define clAmdBlasCcopy clAmdBlasCcopy_pfn
|
||||
#undef clAmdBlasCdotc
|
||||
//#define clAmdBlasCdotc clAmdBlasCdotc_pfn
|
||||
#undef clAmdBlasCdotu
|
||||
//#define clAmdBlasCdotu clAmdBlasCdotu_pfn
|
||||
#undef clAmdBlasCgbmv
|
||||
//#define clAmdBlasCgbmv clAmdBlasCgbmv_pfn
|
||||
#undef clAmdBlasCgemm
|
||||
//#define clAmdBlasCgemm clAmdBlasCgemm_pfn
|
||||
#undef clAmdBlasCgemmEx
|
||||
#define clAmdBlasCgemmEx clAmdBlasCgemmEx_pfn
|
||||
#undef clAmdBlasCgemv
|
||||
//#define clAmdBlasCgemv clAmdBlasCgemv_pfn
|
||||
#undef clAmdBlasCgemvEx
|
||||
//#define clAmdBlasCgemvEx clAmdBlasCgemvEx_pfn
|
||||
#undef clAmdBlasCgerc
|
||||
//#define clAmdBlasCgerc clAmdBlasCgerc_pfn
|
||||
#undef clAmdBlasCgeru
|
||||
//#define clAmdBlasCgeru clAmdBlasCgeru_pfn
|
||||
#undef clAmdBlasChbmv
|
||||
//#define clAmdBlasChbmv clAmdBlasChbmv_pfn
|
||||
#undef clAmdBlasChemm
|
||||
//#define clAmdBlasChemm clAmdBlasChemm_pfn
|
||||
#undef clAmdBlasChemv
|
||||
//#define clAmdBlasChemv clAmdBlasChemv_pfn
|
||||
#undef clAmdBlasCher
|
||||
//#define clAmdBlasCher clAmdBlasCher_pfn
|
||||
#undef clAmdBlasCher2
|
||||
//#define clAmdBlasCher2 clAmdBlasCher2_pfn
|
||||
#undef clAmdBlasCher2k
|
||||
//#define clAmdBlasCher2k clAmdBlasCher2k_pfn
|
||||
#undef clAmdBlasCherk
|
||||
//#define clAmdBlasCherk clAmdBlasCherk_pfn
|
||||
#undef clAmdBlasChpmv
|
||||
//#define clAmdBlasChpmv clAmdBlasChpmv_pfn
|
||||
#undef clAmdBlasChpr
|
||||
//#define clAmdBlasChpr clAmdBlasChpr_pfn
|
||||
#undef clAmdBlasChpr2
|
||||
//#define clAmdBlasChpr2 clAmdBlasChpr2_pfn
|
||||
#undef clAmdBlasCrotg
|
||||
//#define clAmdBlasCrotg clAmdBlasCrotg_pfn
|
||||
#undef clAmdBlasCscal
|
||||
//#define clAmdBlasCscal clAmdBlasCscal_pfn
|
||||
#undef clAmdBlasCsrot
|
||||
//#define clAmdBlasCsrot clAmdBlasCsrot_pfn
|
||||
#undef clAmdBlasCsscal
|
||||
//#define clAmdBlasCsscal clAmdBlasCsscal_pfn
|
||||
#undef clAmdBlasCswap
|
||||
//#define clAmdBlasCswap clAmdBlasCswap_pfn
|
||||
#undef clAmdBlasCsymm
|
||||
//#define clAmdBlasCsymm clAmdBlasCsymm_pfn
|
||||
#undef clAmdBlasCsyr2k
|
||||
//#define clAmdBlasCsyr2k clAmdBlasCsyr2k_pfn
|
||||
#undef clAmdBlasCsyr2kEx
|
||||
//#define clAmdBlasCsyr2kEx clAmdBlasCsyr2kEx_pfn
|
||||
#undef clAmdBlasCsyrk
|
||||
//#define clAmdBlasCsyrk clAmdBlasCsyrk_pfn
|
||||
#undef clAmdBlasCsyrkEx
|
||||
//#define clAmdBlasCsyrkEx clAmdBlasCsyrkEx_pfn
|
||||
#undef clAmdBlasCtbmv
|
||||
//#define clAmdBlasCtbmv clAmdBlasCtbmv_pfn
|
||||
#undef clAmdBlasCtbsv
|
||||
//#define clAmdBlasCtbsv clAmdBlasCtbsv_pfn
|
||||
#undef clAmdBlasCtpmv
|
||||
//#define clAmdBlasCtpmv clAmdBlasCtpmv_pfn
|
||||
#undef clAmdBlasCtpsv
|
||||
//#define clAmdBlasCtpsv clAmdBlasCtpsv_pfn
|
||||
#undef clAmdBlasCtrmm
|
||||
//#define clAmdBlasCtrmm clAmdBlasCtrmm_pfn
|
||||
#undef clAmdBlasCtrmmEx
|
||||
//#define clAmdBlasCtrmmEx clAmdBlasCtrmmEx_pfn
|
||||
#undef clAmdBlasCtrmv
|
||||
//#define clAmdBlasCtrmv clAmdBlasCtrmv_pfn
|
||||
#undef clAmdBlasCtrsm
|
||||
//#define clAmdBlasCtrsm clAmdBlasCtrsm_pfn
|
||||
#undef clAmdBlasCtrsmEx
|
||||
//#define clAmdBlasCtrsmEx clAmdBlasCtrsmEx_pfn
|
||||
#undef clAmdBlasCtrsv
|
||||
//#define clAmdBlasCtrsv clAmdBlasCtrsv_pfn
|
||||
#undef clAmdBlasDasum
|
||||
//#define clAmdBlasDasum clAmdBlasDasum_pfn
|
||||
#undef clAmdBlasDaxpy
|
||||
//#define clAmdBlasDaxpy clAmdBlasDaxpy_pfn
|
||||
#undef clAmdBlasDcopy
|
||||
//#define clAmdBlasDcopy clAmdBlasDcopy_pfn
|
||||
#undef clAmdBlasDdot
|
||||
//#define clAmdBlasDdot clAmdBlasDdot_pfn
|
||||
#undef clAmdBlasDgbmv
|
||||
//#define clAmdBlasDgbmv clAmdBlasDgbmv_pfn
|
||||
#undef clAmdBlasDgemm
|
||||
//#define clAmdBlasDgemm clAmdBlasDgemm_pfn
|
||||
#undef clAmdBlasDgemmEx
|
||||
#define clAmdBlasDgemmEx clAmdBlasDgemmEx_pfn
|
||||
#undef clAmdBlasDgemv
|
||||
//#define clAmdBlasDgemv clAmdBlasDgemv_pfn
|
||||
#undef clAmdBlasDgemvEx
|
||||
//#define clAmdBlasDgemvEx clAmdBlasDgemvEx_pfn
|
||||
#undef clAmdBlasDger
|
||||
//#define clAmdBlasDger clAmdBlasDger_pfn
|
||||
#undef clAmdBlasDnrm2
|
||||
//#define clAmdBlasDnrm2 clAmdBlasDnrm2_pfn
|
||||
#undef clAmdBlasDrot
|
||||
//#define clAmdBlasDrot clAmdBlasDrot_pfn
|
||||
#undef clAmdBlasDrotg
|
||||
//#define clAmdBlasDrotg clAmdBlasDrotg_pfn
|
||||
#undef clAmdBlasDrotm
|
||||
//#define clAmdBlasDrotm clAmdBlasDrotm_pfn
|
||||
#undef clAmdBlasDrotmg
|
||||
//#define clAmdBlasDrotmg clAmdBlasDrotmg_pfn
|
||||
#undef clAmdBlasDsbmv
|
||||
//#define clAmdBlasDsbmv clAmdBlasDsbmv_pfn
|
||||
#undef clAmdBlasDscal
|
||||
//#define clAmdBlasDscal clAmdBlasDscal_pfn
|
||||
#undef clAmdBlasDspmv
|
||||
//#define clAmdBlasDspmv clAmdBlasDspmv_pfn
|
||||
#undef clAmdBlasDspr
|
||||
//#define clAmdBlasDspr clAmdBlasDspr_pfn
|
||||
#undef clAmdBlasDspr2
|
||||
//#define clAmdBlasDspr2 clAmdBlasDspr2_pfn
|
||||
#undef clAmdBlasDswap
|
||||
//#define clAmdBlasDswap clAmdBlasDswap_pfn
|
||||
#undef clAmdBlasDsymm
|
||||
//#define clAmdBlasDsymm clAmdBlasDsymm_pfn
|
||||
#undef clAmdBlasDsymv
|
||||
//#define clAmdBlasDsymv clAmdBlasDsymv_pfn
|
||||
#undef clAmdBlasDsymvEx
|
||||
//#define clAmdBlasDsymvEx clAmdBlasDsymvEx_pfn
|
||||
#undef clAmdBlasDsyr
|
||||
//#define clAmdBlasDsyr clAmdBlasDsyr_pfn
|
||||
#undef clAmdBlasDsyr2
|
||||
//#define clAmdBlasDsyr2 clAmdBlasDsyr2_pfn
|
||||
#undef clAmdBlasDsyr2k
|
||||
//#define clAmdBlasDsyr2k clAmdBlasDsyr2k_pfn
|
||||
#undef clAmdBlasDsyr2kEx
|
||||
//#define clAmdBlasDsyr2kEx clAmdBlasDsyr2kEx_pfn
|
||||
#undef clAmdBlasDsyrk
|
||||
//#define clAmdBlasDsyrk clAmdBlasDsyrk_pfn
|
||||
#undef clAmdBlasDsyrkEx
|
||||
//#define clAmdBlasDsyrkEx clAmdBlasDsyrkEx_pfn
|
||||
#undef clAmdBlasDtbmv
|
||||
//#define clAmdBlasDtbmv clAmdBlasDtbmv_pfn
|
||||
#undef clAmdBlasDtbsv
|
||||
//#define clAmdBlasDtbsv clAmdBlasDtbsv_pfn
|
||||
#undef clAmdBlasDtpmv
|
||||
//#define clAmdBlasDtpmv clAmdBlasDtpmv_pfn
|
||||
#undef clAmdBlasDtpsv
|
||||
//#define clAmdBlasDtpsv clAmdBlasDtpsv_pfn
|
||||
#undef clAmdBlasDtrmm
|
||||
//#define clAmdBlasDtrmm clAmdBlasDtrmm_pfn
|
||||
#undef clAmdBlasDtrmmEx
|
||||
//#define clAmdBlasDtrmmEx clAmdBlasDtrmmEx_pfn
|
||||
#undef clAmdBlasDtrmv
|
||||
//#define clAmdBlasDtrmv clAmdBlasDtrmv_pfn
|
||||
#undef clAmdBlasDtrsm
|
||||
//#define clAmdBlasDtrsm clAmdBlasDtrsm_pfn
|
||||
#undef clAmdBlasDtrsmEx
|
||||
//#define clAmdBlasDtrsmEx clAmdBlasDtrsmEx_pfn
|
||||
#undef clAmdBlasDtrsv
|
||||
//#define clAmdBlasDtrsv clAmdBlasDtrsv_pfn
|
||||
#undef clAmdBlasDzasum
|
||||
//#define clAmdBlasDzasum clAmdBlasDzasum_pfn
|
||||
#undef clAmdBlasDznrm2
|
||||
//#define clAmdBlasDznrm2 clAmdBlasDznrm2_pfn
|
||||
#undef clAmdBlasGetVersion
|
||||
//#define clAmdBlasGetVersion clAmdBlasGetVersion_pfn
|
||||
#undef clAmdBlasRemoveScratchImage
|
||||
//#define clAmdBlasRemoveScratchImage clAmdBlasRemoveScratchImage_pfn
|
||||
#undef clAmdBlasSasum
|
||||
//#define clAmdBlasSasum clAmdBlasSasum_pfn
|
||||
#undef clAmdBlasSaxpy
|
||||
//#define clAmdBlasSaxpy clAmdBlasSaxpy_pfn
|
||||
#undef clAmdBlasScasum
|
||||
//#define clAmdBlasScasum clAmdBlasScasum_pfn
|
||||
#undef clAmdBlasScnrm2
|
||||
//#define clAmdBlasScnrm2 clAmdBlasScnrm2_pfn
|
||||
#undef clAmdBlasScopy
|
||||
//#define clAmdBlasScopy clAmdBlasScopy_pfn
|
||||
#undef clAmdBlasSdot
|
||||
//#define clAmdBlasSdot clAmdBlasSdot_pfn
|
||||
#undef clAmdBlasSetup
|
||||
#define clAmdBlasSetup clAmdBlasSetup_pfn
|
||||
#undef clAmdBlasSgbmv
|
||||
//#define clAmdBlasSgbmv clAmdBlasSgbmv_pfn
|
||||
#undef clAmdBlasSgemm
|
||||
//#define clAmdBlasSgemm clAmdBlasSgemm_pfn
|
||||
#undef clAmdBlasSgemmEx
|
||||
#define clAmdBlasSgemmEx clAmdBlasSgemmEx_pfn
|
||||
#undef clAmdBlasSgemv
|
||||
//#define clAmdBlasSgemv clAmdBlasSgemv_pfn
|
||||
#undef clAmdBlasSgemvEx
|
||||
//#define clAmdBlasSgemvEx clAmdBlasSgemvEx_pfn
|
||||
#undef clAmdBlasSger
|
||||
//#define clAmdBlasSger clAmdBlasSger_pfn
|
||||
#undef clAmdBlasSnrm2
|
||||
//#define clAmdBlasSnrm2 clAmdBlasSnrm2_pfn
|
||||
#undef clAmdBlasSrot
|
||||
//#define clAmdBlasSrot clAmdBlasSrot_pfn
|
||||
#undef clAmdBlasSrotg
|
||||
//#define clAmdBlasSrotg clAmdBlasSrotg_pfn
|
||||
#undef clAmdBlasSrotm
|
||||
//#define clAmdBlasSrotm clAmdBlasSrotm_pfn
|
||||
#undef clAmdBlasSrotmg
|
||||
//#define clAmdBlasSrotmg clAmdBlasSrotmg_pfn
|
||||
#undef clAmdBlasSsbmv
|
||||
//#define clAmdBlasSsbmv clAmdBlasSsbmv_pfn
|
||||
#undef clAmdBlasSscal
|
||||
//#define clAmdBlasSscal clAmdBlasSscal_pfn
|
||||
#undef clAmdBlasSspmv
|
||||
//#define clAmdBlasSspmv clAmdBlasSspmv_pfn
|
||||
#undef clAmdBlasSspr
|
||||
//#define clAmdBlasSspr clAmdBlasSspr_pfn
|
||||
#undef clAmdBlasSspr2
|
||||
//#define clAmdBlasSspr2 clAmdBlasSspr2_pfn
|
||||
#undef clAmdBlasSswap
|
||||
//#define clAmdBlasSswap clAmdBlasSswap_pfn
|
||||
#undef clAmdBlasSsymm
|
||||
//#define clAmdBlasSsymm clAmdBlasSsymm_pfn
|
||||
#undef clAmdBlasSsymv
|
||||
//#define clAmdBlasSsymv clAmdBlasSsymv_pfn
|
||||
#undef clAmdBlasSsymvEx
|
||||
//#define clAmdBlasSsymvEx clAmdBlasSsymvEx_pfn
|
||||
#undef clAmdBlasSsyr
|
||||
//#define clAmdBlasSsyr clAmdBlasSsyr_pfn
|
||||
#undef clAmdBlasSsyr2
|
||||
//#define clAmdBlasSsyr2 clAmdBlasSsyr2_pfn
|
||||
#undef clAmdBlasSsyr2k
|
||||
//#define clAmdBlasSsyr2k clAmdBlasSsyr2k_pfn
|
||||
#undef clAmdBlasSsyr2kEx
|
||||
//#define clAmdBlasSsyr2kEx clAmdBlasSsyr2kEx_pfn
|
||||
#undef clAmdBlasSsyrk
|
||||
//#define clAmdBlasSsyrk clAmdBlasSsyrk_pfn
|
||||
#undef clAmdBlasSsyrkEx
|
||||
//#define clAmdBlasSsyrkEx clAmdBlasSsyrkEx_pfn
|
||||
#undef clAmdBlasStbmv
|
||||
//#define clAmdBlasStbmv clAmdBlasStbmv_pfn
|
||||
#undef clAmdBlasStbsv
|
||||
//#define clAmdBlasStbsv clAmdBlasStbsv_pfn
|
||||
#undef clAmdBlasStpmv
|
||||
//#define clAmdBlasStpmv clAmdBlasStpmv_pfn
|
||||
#undef clAmdBlasStpsv
|
||||
//#define clAmdBlasStpsv clAmdBlasStpsv_pfn
|
||||
#undef clAmdBlasStrmm
|
||||
//#define clAmdBlasStrmm clAmdBlasStrmm_pfn
|
||||
#undef clAmdBlasStrmmEx
|
||||
//#define clAmdBlasStrmmEx clAmdBlasStrmmEx_pfn
|
||||
#undef clAmdBlasStrmv
|
||||
//#define clAmdBlasStrmv clAmdBlasStrmv_pfn
|
||||
#undef clAmdBlasStrsm
|
||||
//#define clAmdBlasStrsm clAmdBlasStrsm_pfn
|
||||
#undef clAmdBlasStrsmEx
|
||||
//#define clAmdBlasStrsmEx clAmdBlasStrsmEx_pfn
|
||||
#undef clAmdBlasStrsv
|
||||
//#define clAmdBlasStrsv clAmdBlasStrsv_pfn
|
||||
#undef clAmdBlasTeardown
|
||||
#define clAmdBlasTeardown clAmdBlasTeardown_pfn
|
||||
#undef clAmdBlasZaxpy
|
||||
//#define clAmdBlasZaxpy clAmdBlasZaxpy_pfn
|
||||
#undef clAmdBlasZcopy
|
||||
//#define clAmdBlasZcopy clAmdBlasZcopy_pfn
|
||||
#undef clAmdBlasZdotc
|
||||
//#define clAmdBlasZdotc clAmdBlasZdotc_pfn
|
||||
#undef clAmdBlasZdotu
|
||||
//#define clAmdBlasZdotu clAmdBlasZdotu_pfn
|
||||
#undef clAmdBlasZdrot
|
||||
//#define clAmdBlasZdrot clAmdBlasZdrot_pfn
|
||||
#undef clAmdBlasZdscal
|
||||
//#define clAmdBlasZdscal clAmdBlasZdscal_pfn
|
||||
#undef clAmdBlasZgbmv
|
||||
//#define clAmdBlasZgbmv clAmdBlasZgbmv_pfn
|
||||
#undef clAmdBlasZgemm
|
||||
//#define clAmdBlasZgemm clAmdBlasZgemm_pfn
|
||||
#undef clAmdBlasZgemmEx
|
||||
#define clAmdBlasZgemmEx clAmdBlasZgemmEx_pfn
|
||||
#undef clAmdBlasZgemv
|
||||
//#define clAmdBlasZgemv clAmdBlasZgemv_pfn
|
||||
#undef clAmdBlasZgemvEx
|
||||
//#define clAmdBlasZgemvEx clAmdBlasZgemvEx_pfn
|
||||
#undef clAmdBlasZgerc
|
||||
//#define clAmdBlasZgerc clAmdBlasZgerc_pfn
|
||||
#undef clAmdBlasZgeru
|
||||
//#define clAmdBlasZgeru clAmdBlasZgeru_pfn
|
||||
#undef clAmdBlasZhbmv
|
||||
//#define clAmdBlasZhbmv clAmdBlasZhbmv_pfn
|
||||
#undef clAmdBlasZhemm
|
||||
//#define clAmdBlasZhemm clAmdBlasZhemm_pfn
|
||||
#undef clAmdBlasZhemv
|
||||
//#define clAmdBlasZhemv clAmdBlasZhemv_pfn
|
||||
#undef clAmdBlasZher
|
||||
//#define clAmdBlasZher clAmdBlasZher_pfn
|
||||
#undef clAmdBlasZher2
|
||||
//#define clAmdBlasZher2 clAmdBlasZher2_pfn
|
||||
#undef clAmdBlasZher2k
|
||||
//#define clAmdBlasZher2k clAmdBlasZher2k_pfn
|
||||
#undef clAmdBlasZherk
|
||||
//#define clAmdBlasZherk clAmdBlasZherk_pfn
|
||||
#undef clAmdBlasZhpmv
|
||||
//#define clAmdBlasZhpmv clAmdBlasZhpmv_pfn
|
||||
#undef clAmdBlasZhpr
|
||||
//#define clAmdBlasZhpr clAmdBlasZhpr_pfn
|
||||
#undef clAmdBlasZhpr2
|
||||
//#define clAmdBlasZhpr2 clAmdBlasZhpr2_pfn
|
||||
#undef clAmdBlasZrotg
|
||||
//#define clAmdBlasZrotg clAmdBlasZrotg_pfn
|
||||
#undef clAmdBlasZscal
|
||||
//#define clAmdBlasZscal clAmdBlasZscal_pfn
|
||||
#undef clAmdBlasZswap
|
||||
//#define clAmdBlasZswap clAmdBlasZswap_pfn
|
||||
#undef clAmdBlasZsymm
|
||||
//#define clAmdBlasZsymm clAmdBlasZsymm_pfn
|
||||
#undef clAmdBlasZsyr2k
|
||||
//#define clAmdBlasZsyr2k clAmdBlasZsyr2k_pfn
|
||||
#undef clAmdBlasZsyr2kEx
|
||||
//#define clAmdBlasZsyr2kEx clAmdBlasZsyr2kEx_pfn
|
||||
#undef clAmdBlasZsyrk
|
||||
//#define clAmdBlasZsyrk clAmdBlasZsyrk_pfn
|
||||
#undef clAmdBlasZsyrkEx
|
||||
//#define clAmdBlasZsyrkEx clAmdBlasZsyrkEx_pfn
|
||||
#undef clAmdBlasZtbmv
|
||||
//#define clAmdBlasZtbmv clAmdBlasZtbmv_pfn
|
||||
#undef clAmdBlasZtbsv
|
||||
//#define clAmdBlasZtbsv clAmdBlasZtbsv_pfn
|
||||
#undef clAmdBlasZtpmv
|
||||
//#define clAmdBlasZtpmv clAmdBlasZtpmv_pfn
|
||||
#undef clAmdBlasZtpsv
|
||||
//#define clAmdBlasZtpsv clAmdBlasZtpsv_pfn
|
||||
#undef clAmdBlasZtrmm
|
||||
//#define clAmdBlasZtrmm clAmdBlasZtrmm_pfn
|
||||
#undef clAmdBlasZtrmmEx
|
||||
//#define clAmdBlasZtrmmEx clAmdBlasZtrmmEx_pfn
|
||||
#undef clAmdBlasZtrmv
|
||||
//#define clAmdBlasZtrmv clAmdBlasZtrmv_pfn
|
||||
#undef clAmdBlasZtrsm
|
||||
//#define clAmdBlasZtrsm clAmdBlasZtrsm_pfn
|
||||
#undef clAmdBlasZtrsmEx
|
||||
//#define clAmdBlasZtrsmEx clAmdBlasZtrsmEx_pfn
|
||||
#undef clAmdBlasZtrsv
|
||||
//#define clAmdBlasZtrsv clAmdBlasZtrsv_pfn
|
||||
#undef clAmdBlasiCamax
|
||||
//#define clAmdBlasiCamax clAmdBlasiCamax_pfn
|
||||
#undef clAmdBlasiDamax
|
||||
//#define clAmdBlasiDamax clAmdBlasiDamax_pfn
|
||||
#undef clAmdBlasiSamax
|
||||
//#define clAmdBlasiSamax clAmdBlasiSamax_pfn
|
||||
#undef clAmdBlasiZamax
|
||||
//#define clAmdBlasiZamax clAmdBlasiZamax_pfn
|
||||
|
||||
// generated by parser_clamdblas.py
|
||||
//extern CL_RUNTIME_EXPORT cl_ulong (*clAmdBlasAddScratchImage)(cl_context context, size_t width, size_t height, clAmdBlasStatus* status);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCaxpy)(size_t N, cl_float2 alpha, const cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCcopy)(size_t N, const cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCdotc)(size_t N, cl_mem dotProduct, size_t offDP, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCdotu)(size_t N, cl_mem dotProduct, size_t offDP, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCgbmv)(clAmdBlasOrder order, clAmdBlasTranspose trans, size_t M, size_t N, size_t KL, size_t KU, cl_float2 alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem X, size_t offx, int incx, cl_float2 beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCgemm)(clAmdBlasOrder order, clAmdBlasTranspose transA, clAmdBlasTranspose transB, size_t M, size_t N, size_t K, FloatComplex alpha, const cl_mem A, size_t lda, const cl_mem B, size_t ldb, FloatComplex beta, cl_mem C, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCgemmEx)(clAmdBlasOrder order, clAmdBlasTranspose transA, clAmdBlasTranspose transB, size_t M, size_t N, size_t K, FloatComplex alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem B, size_t offB, size_t ldb, FloatComplex beta, cl_mem C, size_t offC, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCgemv)(clAmdBlasOrder order, clAmdBlasTranspose transA, size_t M, size_t N, FloatComplex alpha, const cl_mem A, size_t lda, const cl_mem x, size_t offx, int incx, FloatComplex beta, cl_mem y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCgemvEx)(clAmdBlasOrder order, clAmdBlasTranspose transA, size_t M, size_t N, FloatComplex alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem x, size_t offx, int incx, FloatComplex beta, cl_mem y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCgerc)(clAmdBlasOrder order, size_t M, size_t N, cl_float2 alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCgeru)(clAmdBlasOrder order, size_t M, size_t N, cl_float2 alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasChbmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, size_t K, cl_float2 alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem X, size_t offx, int incx, cl_float2 beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasChemm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, size_t M, size_t N, cl_float2 alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem B, size_t offb, size_t ldb, cl_float2 beta, cl_mem C, size_t offc, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasChemv)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, FloatComplex alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem X, size_t offx, int incx, FloatComplex beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCher)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_float alpha, const cl_mem X, size_t offx, int incx, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCher2)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_float2 alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCher2k)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, size_t N, size_t K, FloatComplex alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem B, size_t offb, size_t ldb, cl_float beta, cl_mem C, size_t offc, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCherk)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transA, size_t N, size_t K, float alpha, const cl_mem A, size_t offa, size_t lda, float beta, cl_mem C, size_t offc, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasChpmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_float2 alpha, const cl_mem AP, size_t offa, const cl_mem X, size_t offx, int incx, cl_float2 beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasChpr)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_float alpha, const cl_mem X, size_t offx, int incx, cl_mem AP, size_t offa, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasChpr2)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_float2 alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem AP, size_t offa, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCrotg)(cl_mem CA, size_t offCA, cl_mem CB, size_t offCB, cl_mem C, size_t offC, cl_mem S, size_t offS, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCscal)(size_t N, cl_float2 alpha, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCsrot)(size_t N, cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_float C, cl_float S, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCsscal)(size_t N, cl_float alpha, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCswap)(size_t N, cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCsymm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, size_t M, size_t N, cl_float2 alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem B, size_t offb, size_t ldb, cl_float2 beta, cl_mem C, size_t offc, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCsyr2k)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transAB, size_t N, size_t K, FloatComplex alpha, const cl_mem A, size_t lda, const cl_mem B, size_t ldb, FloatComplex beta, cl_mem C, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCsyr2kEx)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transAB, size_t N, size_t K, FloatComplex alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem B, size_t offB, size_t ldb, FloatComplex beta, cl_mem C, size_t offC, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCsyrk)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transA, size_t N, size_t K, FloatComplex alpha, const cl_mem A, size_t lda, FloatComplex beta, cl_mem C, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCsyrkEx)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transA, size_t N, size_t K, FloatComplex alpha, const cl_mem A, size_t offA, size_t lda, FloatComplex beta, cl_mem C, size_t offC, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCtbmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, size_t K, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCtbsv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, size_t K, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCtpmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem AP, size_t offa, cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCtpsv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem A, size_t offa, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCtrmm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, FloatComplex alpha, const cl_mem A, size_t lda, cl_mem B, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCtrmmEx)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, FloatComplex alpha, const cl_mem A, size_t offA, size_t lda, cl_mem B, size_t offB, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCtrmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCtrsm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, FloatComplex alpha, const cl_mem A, size_t lda, cl_mem B, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCtrsmEx)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, FloatComplex alpha, const cl_mem A, size_t offA, size_t lda, cl_mem B, size_t offB, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasCtrsv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDasum)(size_t N, cl_mem asum, size_t offAsum, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDaxpy)(size_t N, cl_double alpha, const cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDcopy)(size_t N, const cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDdot)(size_t N, cl_mem dotProduct, size_t offDP, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDgbmv)(clAmdBlasOrder order, clAmdBlasTranspose trans, size_t M, size_t N, size_t KL, size_t KU, cl_double alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem X, size_t offx, int incx, cl_double beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDgemm)(clAmdBlasOrder order, clAmdBlasTranspose transA, clAmdBlasTranspose transB, size_t M, size_t N, size_t K, cl_double alpha, const cl_mem A, size_t lda, const cl_mem B, size_t ldb, cl_double beta, cl_mem C, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDgemmEx)(clAmdBlasOrder order, clAmdBlasTranspose transA, clAmdBlasTranspose transB, size_t M, size_t N, size_t K, cl_double alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem B, size_t offB, size_t ldb, cl_double beta, cl_mem C, size_t offC, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDgemv)(clAmdBlasOrder order, clAmdBlasTranspose transA, size_t M, size_t N, cl_double alpha, const cl_mem A, size_t lda, const cl_mem x, size_t offx, int incx, cl_double beta, cl_mem y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDgemvEx)(clAmdBlasOrder order, clAmdBlasTranspose transA, size_t M, size_t N, cl_double alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem x, size_t offx, int incx, cl_double beta, cl_mem y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDger)(clAmdBlasOrder order, size_t M, size_t N, cl_double alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDnrm2)(size_t N, cl_mem NRM2, size_t offNRM2, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDrot)(size_t N, cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_double C, cl_double S, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDrotg)(cl_mem DA, size_t offDA, cl_mem DB, size_t offDB, cl_mem C, size_t offC, cl_mem S, size_t offS, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDrotm)(size_t N, cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, const cl_mem DPARAM, size_t offDparam, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDrotmg)(cl_mem DD1, size_t offDD1, cl_mem DD2, size_t offDD2, cl_mem DX1, size_t offDX1, const cl_mem DY1, size_t offDY1, cl_mem DPARAM, size_t offDparam, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDsbmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, size_t K, cl_double alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem X, size_t offx, int incx, cl_double beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDscal)(size_t N, cl_double alpha, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDspmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_double alpha, const cl_mem AP, size_t offa, const cl_mem X, size_t offx, int incx, cl_double beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDspr)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_double alpha, const cl_mem X, size_t offx, int incx, cl_mem AP, size_t offa, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDspr2)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_double alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem AP, size_t offa, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDswap)(size_t N, cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDsymm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, size_t M, size_t N, cl_double alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem B, size_t offb, size_t ldb, cl_double beta, cl_mem C, size_t offc, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDsymv)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_double alpha, const cl_mem A, size_t lda, const cl_mem x, size_t offx, int incx, cl_double beta, cl_mem y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDsymvEx)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_double alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem x, size_t offx, int incx, cl_double beta, cl_mem y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDsyr)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_double alpha, const cl_mem X, size_t offx, int incx, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDsyr2)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_double alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDsyr2k)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transAB, size_t N, size_t K, cl_double alpha, const cl_mem A, size_t lda, const cl_mem B, size_t ldb, cl_double beta, cl_mem C, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDsyr2kEx)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transAB, size_t N, size_t K, cl_double alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem B, size_t offB, size_t ldb, cl_double beta, cl_mem C, size_t offC, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDsyrk)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transA, size_t N, size_t K, cl_double alpha, const cl_mem A, size_t lda, cl_double beta, cl_mem C, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDsyrkEx)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transA, size_t N, size_t K, cl_double alpha, const cl_mem A, size_t offA, size_t lda, cl_double beta, cl_mem C, size_t offC, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDtbmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, size_t K, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDtbsv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, size_t K, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDtpmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem AP, size_t offa, cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDtpsv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem A, size_t offa, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDtrmm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, cl_double alpha, const cl_mem A, size_t lda, cl_mem B, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDtrmmEx)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, cl_double alpha, const cl_mem A, size_t offA, size_t lda, cl_mem B, size_t offB, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDtrmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDtrsm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, cl_double alpha, const cl_mem A, size_t lda, cl_mem B, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDtrsmEx)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, cl_double alpha, const cl_mem A, size_t offA, size_t lda, cl_mem B, size_t offB, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDtrsv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDzasum)(size_t N, cl_mem asum, size_t offAsum, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasDznrm2)(size_t N, cl_mem NRM2, size_t offNRM2, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasGetVersion)(cl_uint* major, cl_uint* minor, cl_uint* patch);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasRemoveScratchImage)(cl_ulong imageID);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSasum)(size_t N, cl_mem asum, size_t offAsum, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSaxpy)(size_t N, cl_float alpha, const cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasScasum)(size_t N, cl_mem asum, size_t offAsum, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasScnrm2)(size_t N, cl_mem NRM2, size_t offNRM2, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasScopy)(size_t N, const cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSdot)(size_t N, cl_mem dotProduct, size_t offDP, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSetup)();
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSgbmv)(clAmdBlasOrder order, clAmdBlasTranspose trans, size_t M, size_t N, size_t KL, size_t KU, cl_float alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem X, size_t offx, int incx, cl_float beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSgemm)(clAmdBlasOrder order, clAmdBlasTranspose transA, clAmdBlasTranspose transB, size_t M, size_t N, size_t K, cl_float alpha, const cl_mem A, size_t lda, const cl_mem B, size_t ldb, cl_float beta, cl_mem C, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSgemmEx)(clAmdBlasOrder order, clAmdBlasTranspose transA, clAmdBlasTranspose transB, size_t M, size_t N, size_t K, cl_float alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem B, size_t offB, size_t ldb, cl_float beta, cl_mem C, size_t offC, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSgemv)(clAmdBlasOrder order, clAmdBlasTranspose transA, size_t M, size_t N, cl_float alpha, const cl_mem A, size_t lda, const cl_mem x, size_t offx, int incx, cl_float beta, cl_mem y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSgemvEx)(clAmdBlasOrder order, clAmdBlasTranspose transA, size_t M, size_t N, cl_float alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem x, size_t offx, int incx, cl_float beta, cl_mem y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSger)(clAmdBlasOrder order, size_t M, size_t N, cl_float alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSnrm2)(size_t N, cl_mem NRM2, size_t offNRM2, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSrot)(size_t N, cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_float C, cl_float S, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSrotg)(cl_mem SA, size_t offSA, cl_mem SB, size_t offSB, cl_mem C, size_t offC, cl_mem S, size_t offS, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSrotm)(size_t N, cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, const cl_mem SPARAM, size_t offSparam, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSrotmg)(cl_mem SD1, size_t offSD1, cl_mem SD2, size_t offSD2, cl_mem SX1, size_t offSX1, const cl_mem SY1, size_t offSY1, cl_mem SPARAM, size_t offSparam, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSsbmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, size_t K, cl_float alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem X, size_t offx, int incx, cl_float beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSscal)(size_t N, cl_float alpha, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSspmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_float alpha, const cl_mem AP, size_t offa, const cl_mem X, size_t offx, int incx, cl_float beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSspr)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_float alpha, const cl_mem X, size_t offx, int incx, cl_mem AP, size_t offa, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSspr2)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_float alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem AP, size_t offa, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSswap)(size_t N, cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSsymm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, size_t M, size_t N, cl_float alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem B, size_t offb, size_t ldb, cl_float beta, cl_mem C, size_t offc, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSsymv)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_float alpha, const cl_mem A, size_t lda, const cl_mem x, size_t offx, int incx, cl_float beta, cl_mem y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSsymvEx)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_float alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem x, size_t offx, int incx, cl_float beta, cl_mem y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSsyr)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_float alpha, const cl_mem X, size_t offx, int incx, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSsyr2)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_float alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSsyr2k)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transAB, size_t N, size_t K, cl_float alpha, const cl_mem A, size_t lda, const cl_mem B, size_t ldb, cl_float beta, cl_mem C, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSsyr2kEx)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transAB, size_t N, size_t K, cl_float alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem B, size_t offB, size_t ldb, cl_float beta, cl_mem C, size_t offC, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSsyrk)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transA, size_t N, size_t K, cl_float alpha, const cl_mem A, size_t lda, cl_float beta, cl_mem C, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasSsyrkEx)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transA, size_t N, size_t K, cl_float alpha, const cl_mem A, size_t offA, size_t lda, cl_float beta, cl_mem C, size_t offC, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasStbmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, size_t K, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasStbsv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, size_t K, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasStpmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem AP, size_t offa, cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasStpsv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem A, size_t offa, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasStrmm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, cl_float alpha, const cl_mem A, size_t lda, cl_mem B, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasStrmmEx)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, cl_float alpha, const cl_mem A, size_t offA, size_t lda, cl_mem B, size_t offB, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasStrmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasStrsm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, cl_float alpha, const cl_mem A, size_t lda, cl_mem B, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasStrsmEx)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, cl_float alpha, const cl_mem A, size_t offA, size_t lda, cl_mem B, size_t offB, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasStrsv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
extern CL_RUNTIME_EXPORT void (*clAmdBlasTeardown)();
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZaxpy)(size_t N, cl_double2 alpha, const cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZcopy)(size_t N, const cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZdotc)(size_t N, cl_mem dotProduct, size_t offDP, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZdotu)(size_t N, cl_mem dotProduct, size_t offDP, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZdrot)(size_t N, cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_double C, cl_double S, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZdscal)(size_t N, cl_double alpha, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZgbmv)(clAmdBlasOrder order, clAmdBlasTranspose trans, size_t M, size_t N, size_t KL, size_t KU, cl_double2 alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem X, size_t offx, int incx, cl_double2 beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZgemm)(clAmdBlasOrder order, clAmdBlasTranspose transA, clAmdBlasTranspose transB, size_t M, size_t N, size_t K, DoubleComplex alpha, const cl_mem A, size_t lda, const cl_mem B, size_t ldb, DoubleComplex beta, cl_mem C, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZgemmEx)(clAmdBlasOrder order, clAmdBlasTranspose transA, clAmdBlasTranspose transB, size_t M, size_t N, size_t K, DoubleComplex alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem B, size_t offB, size_t ldb, DoubleComplex beta, cl_mem C, size_t offC, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZgemv)(clAmdBlasOrder order, clAmdBlasTranspose transA, size_t M, size_t N, DoubleComplex alpha, const cl_mem A, size_t lda, const cl_mem x, size_t offx, int incx, DoubleComplex beta, cl_mem y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZgemvEx)(clAmdBlasOrder order, clAmdBlasTranspose transA, size_t M, size_t N, DoubleComplex alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem x, size_t offx, int incx, DoubleComplex beta, cl_mem y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZgerc)(clAmdBlasOrder order, size_t M, size_t N, cl_double2 alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZgeru)(clAmdBlasOrder order, size_t M, size_t N, cl_double2 alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZhbmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, size_t K, cl_double2 alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem X, size_t offx, int incx, cl_double2 beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZhemm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, size_t M, size_t N, cl_double2 alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem B, size_t offb, size_t ldb, cl_double2 beta, cl_mem C, size_t offc, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZhemv)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, DoubleComplex alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem X, size_t offx, int incx, DoubleComplex beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZher)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_double alpha, const cl_mem X, size_t offx, int incx, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZher2)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_double2 alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem A, size_t offa, size_t lda, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZher2k)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, size_t N, size_t K, DoubleComplex alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem B, size_t offb, size_t ldb, cl_double beta, cl_mem C, size_t offc, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZherk)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transA, size_t N, size_t K, double alpha, const cl_mem A, size_t offa, size_t lda, double beta, cl_mem C, size_t offc, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZhpmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_double2 alpha, const cl_mem AP, size_t offa, const cl_mem X, size_t offx, int incx, cl_double2 beta, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZhpr)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_double alpha, const cl_mem X, size_t offx, int incx, cl_mem AP, size_t offa, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZhpr2)(clAmdBlasOrder order, clAmdBlasUplo uplo, size_t N, cl_double2 alpha, const cl_mem X, size_t offx, int incx, const cl_mem Y, size_t offy, int incy, cl_mem AP, size_t offa, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZrotg)(cl_mem CA, size_t offCA, cl_mem CB, size_t offCB, cl_mem C, size_t offC, cl_mem S, size_t offS, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZscal)(size_t N, cl_double2 alpha, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZswap)(size_t N, cl_mem X, size_t offx, int incx, cl_mem Y, size_t offy, int incy, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZsymm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, size_t M, size_t N, cl_double2 alpha, const cl_mem A, size_t offa, size_t lda, const cl_mem B, size_t offb, size_t ldb, cl_double2 beta, cl_mem C, size_t offc, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZsyr2k)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transAB, size_t N, size_t K, DoubleComplex alpha, const cl_mem A, size_t lda, const cl_mem B, size_t ldb, DoubleComplex beta, cl_mem C, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZsyr2kEx)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transAB, size_t N, size_t K, DoubleComplex alpha, const cl_mem A, size_t offA, size_t lda, const cl_mem B, size_t offB, size_t ldb, DoubleComplex beta, cl_mem C, size_t offC, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZsyrk)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transA, size_t N, size_t K, DoubleComplex alpha, const cl_mem A, size_t lda, DoubleComplex beta, cl_mem C, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZsyrkEx)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose transA, size_t N, size_t K, DoubleComplex alpha, const cl_mem A, size_t offA, size_t lda, DoubleComplex beta, cl_mem C, size_t offC, size_t ldc, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZtbmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, size_t K, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZtbsv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, size_t K, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZtpmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem AP, size_t offa, cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZtpsv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem A, size_t offa, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZtrmm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, DoubleComplex alpha, const cl_mem A, size_t lda, cl_mem B, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZtrmmEx)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, DoubleComplex alpha, const cl_mem A, size_t offA, size_t lda, cl_mem B, size_t offB, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZtrmv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZtrsm)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, DoubleComplex alpha, const cl_mem A, size_t lda, cl_mem B, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZtrsmEx)(clAmdBlasOrder order, clAmdBlasSide side, clAmdBlasUplo uplo, clAmdBlasTranspose transA, clAmdBlasDiag diag, size_t M, size_t N, DoubleComplex alpha, const cl_mem A, size_t offA, size_t lda, cl_mem B, size_t offB, size_t ldb, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasZtrsv)(clAmdBlasOrder order, clAmdBlasUplo uplo, clAmdBlasTranspose trans, clAmdBlasDiag diag, size_t N, const cl_mem A, size_t offa, size_t lda, cl_mem X, size_t offx, int incx, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasiCamax)(size_t N, cl_mem iMax, size_t offiMax, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasiDamax)(size_t N, cl_mem iMax, size_t offiMax, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasiSamax)(size_t N, cl_mem iMax, size_t offiMax, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
//extern CL_RUNTIME_EXPORT clAmdBlasStatus (*clAmdBlasiZamax)(size_t N, cl_mem iMax, size_t offiMax, const cl_mem X, size_t offx, int incx, cl_mem scratchBuff, cl_uint numCommandQueues, cl_command_queue* commandQueues, cl_uint numEventsInWaitList, const cl_event* eventWaitList, cl_event* events);
|
||||
@@ -1,142 +0,0 @@
|
||||
//
|
||||
// AUTOGENERATED, DO NOT EDIT
|
||||
//
|
||||
#ifndef OPENCV_CORE_OCL_RUNTIME_CLAMDFFT_HPP
|
||||
#error "Invalid usage"
|
||||
#endif
|
||||
|
||||
// generated by parser_clamdfft.py
|
||||
#define clAmdFftBakePlan clAmdFftBakePlan_
|
||||
#define clAmdFftCopyPlan clAmdFftCopyPlan_
|
||||
#define clAmdFftCreateDefaultPlan clAmdFftCreateDefaultPlan_
|
||||
#define clAmdFftDestroyPlan clAmdFftDestroyPlan_
|
||||
#define clAmdFftEnqueueTransform clAmdFftEnqueueTransform_
|
||||
#define clAmdFftGetLayout clAmdFftGetLayout_
|
||||
#define clAmdFftGetPlanBatchSize clAmdFftGetPlanBatchSize_
|
||||
#define clAmdFftGetPlanContext clAmdFftGetPlanContext_
|
||||
#define clAmdFftGetPlanDim clAmdFftGetPlanDim_
|
||||
#define clAmdFftGetPlanDistance clAmdFftGetPlanDistance_
|
||||
#define clAmdFftGetPlanInStride clAmdFftGetPlanInStride_
|
||||
#define clAmdFftGetPlanLength clAmdFftGetPlanLength_
|
||||
#define clAmdFftGetPlanOutStride clAmdFftGetPlanOutStride_
|
||||
#define clAmdFftGetPlanPrecision clAmdFftGetPlanPrecision_
|
||||
#define clAmdFftGetPlanScale clAmdFftGetPlanScale_
|
||||
#define clAmdFftGetPlanTransposeResult clAmdFftGetPlanTransposeResult_
|
||||
#define clAmdFftGetResultLocation clAmdFftGetResultLocation_
|
||||
#define clAmdFftGetTmpBufSize clAmdFftGetTmpBufSize_
|
||||
#define clAmdFftGetVersion clAmdFftGetVersion_
|
||||
#define clAmdFftSetLayout clAmdFftSetLayout_
|
||||
#define clAmdFftSetPlanBatchSize clAmdFftSetPlanBatchSize_
|
||||
#define clAmdFftSetPlanDim clAmdFftSetPlanDim_
|
||||
#define clAmdFftSetPlanDistance clAmdFftSetPlanDistance_
|
||||
#define clAmdFftSetPlanInStride clAmdFftSetPlanInStride_
|
||||
#define clAmdFftSetPlanLength clAmdFftSetPlanLength_
|
||||
#define clAmdFftSetPlanOutStride clAmdFftSetPlanOutStride_
|
||||
#define clAmdFftSetPlanPrecision clAmdFftSetPlanPrecision_
|
||||
#define clAmdFftSetPlanScale clAmdFftSetPlanScale_
|
||||
#define clAmdFftSetPlanTransposeResult clAmdFftSetPlanTransposeResult_
|
||||
#define clAmdFftSetResultLocation clAmdFftSetResultLocation_
|
||||
#define clAmdFftSetup clAmdFftSetup_
|
||||
#define clAmdFftTeardown clAmdFftTeardown_
|
||||
|
||||
#include <clAmdFft.h>
|
||||
|
||||
// generated by parser_clamdfft.py
|
||||
#undef clAmdFftBakePlan
|
||||
#define clAmdFftBakePlan clAmdFftBakePlan_pfn
|
||||
#undef clAmdFftCopyPlan
|
||||
//#define clAmdFftCopyPlan clAmdFftCopyPlan_pfn
|
||||
#undef clAmdFftCreateDefaultPlan
|
||||
#define clAmdFftCreateDefaultPlan clAmdFftCreateDefaultPlan_pfn
|
||||
#undef clAmdFftDestroyPlan
|
||||
#define clAmdFftDestroyPlan clAmdFftDestroyPlan_pfn
|
||||
#undef clAmdFftEnqueueTransform
|
||||
#define clAmdFftEnqueueTransform clAmdFftEnqueueTransform_pfn
|
||||
#undef clAmdFftGetLayout
|
||||
//#define clAmdFftGetLayout clAmdFftGetLayout_pfn
|
||||
#undef clAmdFftGetPlanBatchSize
|
||||
//#define clAmdFftGetPlanBatchSize clAmdFftGetPlanBatchSize_pfn
|
||||
#undef clAmdFftGetPlanContext
|
||||
//#define clAmdFftGetPlanContext clAmdFftGetPlanContext_pfn
|
||||
#undef clAmdFftGetPlanDim
|
||||
//#define clAmdFftGetPlanDim clAmdFftGetPlanDim_pfn
|
||||
#undef clAmdFftGetPlanDistance
|
||||
//#define clAmdFftGetPlanDistance clAmdFftGetPlanDistance_pfn
|
||||
#undef clAmdFftGetPlanInStride
|
||||
//#define clAmdFftGetPlanInStride clAmdFftGetPlanInStride_pfn
|
||||
#undef clAmdFftGetPlanLength
|
||||
//#define clAmdFftGetPlanLength clAmdFftGetPlanLength_pfn
|
||||
#undef clAmdFftGetPlanOutStride
|
||||
//#define clAmdFftGetPlanOutStride clAmdFftGetPlanOutStride_pfn
|
||||
#undef clAmdFftGetPlanPrecision
|
||||
//#define clAmdFftGetPlanPrecision clAmdFftGetPlanPrecision_pfn
|
||||
#undef clAmdFftGetPlanScale
|
||||
//#define clAmdFftGetPlanScale clAmdFftGetPlanScale_pfn
|
||||
#undef clAmdFftGetPlanTransposeResult
|
||||
//#define clAmdFftGetPlanTransposeResult clAmdFftGetPlanTransposeResult_pfn
|
||||
#undef clAmdFftGetResultLocation
|
||||
//#define clAmdFftGetResultLocation clAmdFftGetResultLocation_pfn
|
||||
#undef clAmdFftGetTmpBufSize
|
||||
#define clAmdFftGetTmpBufSize clAmdFftGetTmpBufSize_pfn
|
||||
#undef clAmdFftGetVersion
|
||||
#define clAmdFftGetVersion clAmdFftGetVersion_pfn
|
||||
#undef clAmdFftSetLayout
|
||||
#define clAmdFftSetLayout clAmdFftSetLayout_pfn
|
||||
#undef clAmdFftSetPlanBatchSize
|
||||
#define clAmdFftSetPlanBatchSize clAmdFftSetPlanBatchSize_pfn
|
||||
#undef clAmdFftSetPlanDim
|
||||
//#define clAmdFftSetPlanDim clAmdFftSetPlanDim_pfn
|
||||
#undef clAmdFftSetPlanDistance
|
||||
#define clAmdFftSetPlanDistance clAmdFftSetPlanDistance_pfn
|
||||
#undef clAmdFftSetPlanInStride
|
||||
#define clAmdFftSetPlanInStride clAmdFftSetPlanInStride_pfn
|
||||
#undef clAmdFftSetPlanLength
|
||||
//#define clAmdFftSetPlanLength clAmdFftSetPlanLength_pfn
|
||||
#undef clAmdFftSetPlanOutStride
|
||||
#define clAmdFftSetPlanOutStride clAmdFftSetPlanOutStride_pfn
|
||||
#undef clAmdFftSetPlanPrecision
|
||||
#define clAmdFftSetPlanPrecision clAmdFftSetPlanPrecision_pfn
|
||||
#undef clAmdFftSetPlanScale
|
||||
#define clAmdFftSetPlanScale clAmdFftSetPlanScale_pfn
|
||||
#undef clAmdFftSetPlanTransposeResult
|
||||
//#define clAmdFftSetPlanTransposeResult clAmdFftSetPlanTransposeResult_pfn
|
||||
#undef clAmdFftSetResultLocation
|
||||
#define clAmdFftSetResultLocation clAmdFftSetResultLocation_pfn
|
||||
#undef clAmdFftSetup
|
||||
#define clAmdFftSetup clAmdFftSetup_pfn
|
||||
#undef clAmdFftTeardown
|
||||
#define clAmdFftTeardown clAmdFftTeardown_pfn
|
||||
|
||||
// generated by parser_clamdfft.py
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftBakePlan)(clAmdFftPlanHandle plHandle, cl_uint numQueues, cl_command_queue* commQueueFFT, void (CL_CALLBACK* pfn_notify) (clAmdFftPlanHandle plHandle, void* user_data), void* user_data);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftCopyPlan)(clAmdFftPlanHandle* out_plHandle, cl_context new_context, clAmdFftPlanHandle in_plHandle);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftCreateDefaultPlan)(clAmdFftPlanHandle* plHandle, cl_context context, const clAmdFftDim dim, const size_t* clLengths);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftDestroyPlan)(clAmdFftPlanHandle* plHandle);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftEnqueueTransform)(clAmdFftPlanHandle plHandle, clAmdFftDirection dir, cl_uint numQueuesAndEvents, cl_command_queue* commQueues, cl_uint numWaitEvents, const cl_event* waitEvents, cl_event* outEvents, cl_mem* inputBuffers, cl_mem* outputBuffers, cl_mem tmpBuffer);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetLayout)(const clAmdFftPlanHandle plHandle, clAmdFftLayout* iLayout, clAmdFftLayout* oLayout);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanBatchSize)(const clAmdFftPlanHandle plHandle, size_t* batchSize);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanContext)(const clAmdFftPlanHandle plHandle, cl_context* context);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanDim)(const clAmdFftPlanHandle plHandle, clAmdFftDim* dim, cl_uint* size);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanDistance)(const clAmdFftPlanHandle plHandle, size_t* iDist, size_t* oDist);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanInStride)(const clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanLength)(const clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clLengths);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanOutStride)(const clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanPrecision)(const clAmdFftPlanHandle plHandle, clAmdFftPrecision* precision);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanScale)(const clAmdFftPlanHandle plHandle, clAmdFftDirection dir, cl_float* scale);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetPlanTransposeResult)(const clAmdFftPlanHandle plHandle, clAmdFftResultTransposed* transposed);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetResultLocation)(const clAmdFftPlanHandle plHandle, clAmdFftResultLocation* placeness);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetTmpBufSize)(const clAmdFftPlanHandle plHandle, size_t* buffersize);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftGetVersion)(cl_uint* major, cl_uint* minor, cl_uint* patch);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetLayout)(clAmdFftPlanHandle plHandle, clAmdFftLayout iLayout, clAmdFftLayout oLayout);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanBatchSize)(clAmdFftPlanHandle plHandle, size_t batchSize);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanDim)(clAmdFftPlanHandle plHandle, const clAmdFftDim dim);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanDistance)(clAmdFftPlanHandle plHandle, size_t iDist, size_t oDist);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanInStride)(clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanLength)(clAmdFftPlanHandle plHandle, const clAmdFftDim dim, const size_t* clLengths);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanOutStride)(clAmdFftPlanHandle plHandle, const clAmdFftDim dim, size_t* clStrides);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanPrecision)(clAmdFftPlanHandle plHandle, clAmdFftPrecision precision);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanScale)(clAmdFftPlanHandle plHandle, clAmdFftDirection dir, cl_float scale);
|
||||
//extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetPlanTransposeResult)(clAmdFftPlanHandle plHandle, clAmdFftResultTransposed transposed);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetResultLocation)(clAmdFftPlanHandle plHandle, clAmdFftResultLocation placeness);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftSetup)(const clAmdFftSetupData* setupData);
|
||||
extern CL_RUNTIME_EXPORT clAmdFftStatus (*clAmdFftTeardown)();
|
||||
@@ -1,379 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2013, NVIDIA Corporation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 holders 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_CORE_PTR_INL_HPP
|
||||
#define OPENCV_CORE_PTR_INL_HPP
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
//! @cond IGNORED
|
||||
|
||||
namespace cv {
|
||||
|
||||
template<typename Y>
|
||||
void DefaultDeleter<Y>::operator () (Y* p) const
|
||||
{
|
||||
delete p;
|
||||
}
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
struct PtrOwner
|
||||
{
|
||||
PtrOwner() : refCount(1)
|
||||
{}
|
||||
|
||||
void incRef()
|
||||
{
|
||||
CV_XADD(&refCount, 1);
|
||||
}
|
||||
|
||||
void decRef()
|
||||
{
|
||||
if (CV_XADD(&refCount, -1) == 1) deleteSelf();
|
||||
}
|
||||
|
||||
protected:
|
||||
/* This doesn't really need to be virtual, since PtrOwner is never deleted
|
||||
directly, but it doesn't hurt and it helps avoid warnings. */
|
||||
virtual ~PtrOwner()
|
||||
{}
|
||||
|
||||
virtual void deleteSelf() = 0;
|
||||
|
||||
private:
|
||||
unsigned int refCount;
|
||||
|
||||
// noncopyable
|
||||
PtrOwner(const PtrOwner&);
|
||||
PtrOwner& operator = (const PtrOwner&);
|
||||
};
|
||||
|
||||
template<typename Y, typename D>
|
||||
struct PtrOwnerImpl CV_FINAL : PtrOwner
|
||||
{
|
||||
PtrOwnerImpl(Y* p, D d) : owned(p), deleter(d)
|
||||
{}
|
||||
|
||||
void deleteSelf() CV_OVERRIDE
|
||||
{
|
||||
deleter(owned);
|
||||
delete this;
|
||||
}
|
||||
|
||||
private:
|
||||
Y* owned;
|
||||
D deleter;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Ptr<T>::Ptr() : owner(NULL), stored(NULL)
|
||||
{}
|
||||
|
||||
template<typename T>
|
||||
template<typename Y>
|
||||
Ptr<T>::Ptr(Y* p)
|
||||
: owner(p
|
||||
? new detail::PtrOwnerImpl<Y, DefaultDeleter<Y> >(p, DefaultDeleter<Y>())
|
||||
: NULL),
|
||||
stored(p)
|
||||
{}
|
||||
|
||||
template<typename T>
|
||||
template<typename Y, typename D>
|
||||
Ptr<T>::Ptr(Y* p, D d)
|
||||
: owner(p
|
||||
? new detail::PtrOwnerImpl<Y, D>(p, d)
|
||||
: NULL),
|
||||
stored(p)
|
||||
{}
|
||||
|
||||
template<typename T>
|
||||
Ptr<T>::Ptr(const Ptr& o) : owner(o.owner), stored(o.stored)
|
||||
{
|
||||
if (owner) owner->incRef();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template<typename Y>
|
||||
Ptr<T>::Ptr(const Ptr<Y>& o) : owner(o.owner), stored(o.stored)
|
||||
{
|
||||
if (owner) owner->incRef();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template<typename Y>
|
||||
Ptr<T>::Ptr(const Ptr<Y>& o, T* p) : owner(o.owner), stored(p)
|
||||
{
|
||||
if (owner) owner->incRef();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Ptr<T>::~Ptr()
|
||||
{
|
||||
release();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Ptr<T>& Ptr<T>::operator = (const Ptr<T>& o)
|
||||
{
|
||||
Ptr(o).swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template<typename Y>
|
||||
Ptr<T>& Ptr<T>::operator = (const Ptr<Y>& o)
|
||||
{
|
||||
Ptr(o).swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void Ptr<T>::release()
|
||||
{
|
||||
if (owner) owner->decRef();
|
||||
owner = NULL;
|
||||
stored = NULL;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template<typename Y>
|
||||
void Ptr<T>::reset(Y* p)
|
||||
{
|
||||
Ptr(p).swap(*this);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template<typename Y, typename D>
|
||||
void Ptr<T>::reset(Y* p, D d)
|
||||
{
|
||||
Ptr(p, d).swap(*this);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void Ptr<T>::swap(Ptr<T>& o)
|
||||
{
|
||||
std::swap(owner, o.owner);
|
||||
std::swap(stored, o.stored);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T* Ptr<T>::get() const
|
||||
{
|
||||
return stored;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
typename detail::RefOrVoid<T>::type Ptr<T>::operator * () const
|
||||
{
|
||||
return *stored;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T* Ptr<T>::operator -> () const
|
||||
{
|
||||
return stored;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Ptr<T>::operator T* () const
|
||||
{
|
||||
return stored;
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
bool Ptr<T>::empty() const
|
||||
{
|
||||
return !stored;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template<typename Y>
|
||||
Ptr<Y> Ptr<T>::staticCast() const
|
||||
{
|
||||
return Ptr<Y>(*this, static_cast<Y*>(stored));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template<typename Y>
|
||||
Ptr<Y> Ptr<T>::constCast() const
|
||||
{
|
||||
return Ptr<Y>(*this, const_cast<Y*>(stored));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template<typename Y>
|
||||
Ptr<Y> Ptr<T>::dynamicCast() const
|
||||
{
|
||||
return Ptr<Y>(*this, dynamic_cast<Y*>(stored));
|
||||
}
|
||||
|
||||
#ifdef CV_CXX_MOVE_SEMANTICS
|
||||
|
||||
template<typename T>
|
||||
Ptr<T>::Ptr(Ptr&& o) : owner(o.owner), stored(o.stored)
|
||||
{
|
||||
o.owner = NULL;
|
||||
o.stored = NULL;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Ptr<T>& Ptr<T>::operator = (Ptr<T>&& o)
|
||||
{
|
||||
if (this == &o)
|
||||
return *this;
|
||||
|
||||
release();
|
||||
owner = o.owner;
|
||||
stored = o.stored;
|
||||
o.owner = NULL;
|
||||
o.stored = NULL;
|
||||
return *this;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
template<typename T>
|
||||
void swap(Ptr<T>& ptr1, Ptr<T>& ptr2){
|
||||
ptr1.swap(ptr2);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool operator == (const Ptr<T>& ptr1, const Ptr<T>& ptr2)
|
||||
{
|
||||
return ptr1.get() == ptr2.get();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
bool operator != (const Ptr<T>& ptr1, const Ptr<T>& ptr2)
|
||||
{
|
||||
return ptr1.get() != ptr2.get();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
Ptr<T> makePtr()
|
||||
{
|
||||
return Ptr<T>(new T());
|
||||
}
|
||||
|
||||
template<typename T, typename A1>
|
||||
Ptr<T> makePtr(const A1& a1)
|
||||
{
|
||||
return Ptr<T>(new T(a1));
|
||||
}
|
||||
|
||||
template<typename T, typename A1, typename A2>
|
||||
Ptr<T> makePtr(const A1& a1, const A2& a2)
|
||||
{
|
||||
return Ptr<T>(new T(a1, a2));
|
||||
}
|
||||
|
||||
template<typename T, typename A1, typename A2, typename A3>
|
||||
Ptr<T> makePtr(const A1& a1, const A2& a2, const A3& a3)
|
||||
{
|
||||
return Ptr<T>(new T(a1, a2, a3));
|
||||
}
|
||||
|
||||
template<typename T, typename A1, typename A2, typename A3, typename A4>
|
||||
Ptr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4)
|
||||
{
|
||||
return Ptr<T>(new T(a1, a2, a3, a4));
|
||||
}
|
||||
|
||||
template<typename T, typename A1, typename A2, typename A3, typename A4, typename A5>
|
||||
Ptr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5)
|
||||
{
|
||||
return Ptr<T>(new T(a1, a2, a3, a4, a5));
|
||||
}
|
||||
|
||||
template<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
|
||||
Ptr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6)
|
||||
{
|
||||
return Ptr<T>(new T(a1, a2, a3, a4, a5, a6));
|
||||
}
|
||||
|
||||
template<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7>
|
||||
Ptr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7)
|
||||
{
|
||||
return Ptr<T>(new T(a1, a2, a3, a4, a5, a6, a7));
|
||||
}
|
||||
|
||||
template<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8>
|
||||
Ptr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8)
|
||||
{
|
||||
return Ptr<T>(new T(a1, a2, a3, a4, a5, a6, a7, a8));
|
||||
}
|
||||
|
||||
template<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9>
|
||||
Ptr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9)
|
||||
{
|
||||
return Ptr<T>(new T(a1, a2, a3, a4, a5, a6, a7, a8, a9));
|
||||
}
|
||||
|
||||
template<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9, typename A10>
|
||||
Ptr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10)
|
||||
{
|
||||
return Ptr<T>(new T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10));
|
||||
}
|
||||
|
||||
template<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9, typename A10, typename A11>
|
||||
Ptr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10, const A11& a11)
|
||||
{
|
||||
return Ptr<T>(new T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11));
|
||||
}
|
||||
|
||||
template<typename T, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6, typename A7, typename A8, typename A9, typename A10, typename A11, typename A12>
|
||||
Ptr<T> makePtr(const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6, const A7& a7, const A8& a8, const A9& a9, const A10& a10, const A11& a11, const A12& a12)
|
||||
{
|
||||
return Ptr<T>(new T(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12));
|
||||
}
|
||||
} // namespace cv
|
||||
|
||||
//! @endcond
|
||||
|
||||
#endif // OPENCV_CORE_PTR_INL_HPP
|
||||
@@ -1,159 +0,0 @@
|
||||
// This file is part of OpenCV project.
|
||||
// It is subject to the license terms in the LICENSE file found in the top-level directory
|
||||
// of this distribution and at http://opencv.org/license.html.
|
||||
|
||||
#ifndef OPENCV_LOGGER_HPP
|
||||
#define OPENCV_LOGGER_HPP
|
||||
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <limits.h> // INT_MAX
|
||||
|
||||
#include "logger.defines.hpp"
|
||||
|
||||
namespace cv {
|
||||
namespace utils {
|
||||
namespace logging {
|
||||
|
||||
//! @addtogroup core_logging
|
||||
//! @{
|
||||
|
||||
//! Supported logging levels and their semantic
|
||||
enum LogLevel {
|
||||
LOG_LEVEL_SILENT = 0, //!< for using in setLogVevel() call
|
||||
LOG_LEVEL_FATAL = 1, //!< Fatal (critical) error (unrecoverable internal error)
|
||||
LOG_LEVEL_ERROR = 2, //!< Error message
|
||||
LOG_LEVEL_WARNING = 3, //!< Warning message
|
||||
LOG_LEVEL_INFO = 4, //!< Info message
|
||||
LOG_LEVEL_DEBUG = 5, //!< Debug message. Disabled in the "Release" build.
|
||||
LOG_LEVEL_VERBOSE = 6, //!< Verbose (trace) messages. Requires verbosity level. Disabled in the "Release" build.
|
||||
#ifndef CV_DOXYGEN
|
||||
ENUM_LOG_LEVEL_FORCE_INT = INT_MAX
|
||||
#endif
|
||||
};
|
||||
|
||||
/** Set global logging level
|
||||
@return previous logging level
|
||||
*/
|
||||
CV_EXPORTS LogLevel setLogLevel(LogLevel logLevel);
|
||||
/** Get global logging level */
|
||||
CV_EXPORTS LogLevel getLogLevel();
|
||||
|
||||
namespace internal {
|
||||
/** Write log message */
|
||||
CV_EXPORTS void writeLogMessage(LogLevel logLevel, const char* message);
|
||||
} // namespace
|
||||
|
||||
/**
|
||||
* \def CV_LOG_STRIP_LEVEL
|
||||
*
|
||||
* Define CV_LOG_STRIP_LEVEL=CV_LOG_LEVEL_[DEBUG|INFO|WARN|ERROR|FATAL|DISABLED] to compile out anything at that and before that logging level
|
||||
*/
|
||||
#ifndef CV_LOG_STRIP_LEVEL
|
||||
# if defined NDEBUG
|
||||
# define CV_LOG_STRIP_LEVEL CV_LOG_LEVEL_DEBUG
|
||||
# else
|
||||
# define CV_LOG_STRIP_LEVEL CV_LOG_LEVEL_VERBOSE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#define CV_LOG_WITH_TAG(tag, msgLevel, extra_check0, extra_check1, msg_prefix, ...) \
|
||||
for(;;) { \
|
||||
extra_check0; \
|
||||
if (cv::utils::logging::getLogLevel() < msgLevel) break; \
|
||||
extra_check1; \
|
||||
std::stringstream ss; ss msg_prefix << __VA_ARGS__; \
|
||||
cv::utils::logging::internal::writeLogMessage(msgLevel, ss.str().c_str()); \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define CV_LOG_FATAL(tag, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_FATAL, , , , __VA_ARGS__)
|
||||
#define CV_LOG_ERROR(tag, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_ERROR, , , , __VA_ARGS__)
|
||||
#define CV_LOG_WARNING(tag, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_WARNING, , , , __VA_ARGS__)
|
||||
#define CV_LOG_INFO(tag, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_INFO, , , , __VA_ARGS__)
|
||||
#define CV_LOG_DEBUG(tag, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_DEBUG, , , , __VA_ARGS__)
|
||||
#define CV_LOG_VERBOSE(tag, v, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_VERBOSE, , , << "[VERB" << v << ":" << cv::utils::getThreadID() << "] ", __VA_ARGS__)
|
||||
|
||||
#if CV_LOG_STRIP_LEVEL <= CV_LOG_LEVEL_INFO
|
||||
#undef CV_LOG_INFO
|
||||
#define CV_LOG_INFO(tag, ...)
|
||||
#endif
|
||||
|
||||
#if CV_LOG_STRIP_LEVEL <= CV_LOG_LEVEL_DEBUG
|
||||
#undef CV_LOG_DEBUG
|
||||
#define CV_LOG_DEBUG(tag, ...)
|
||||
#endif
|
||||
|
||||
#if CV_LOG_STRIP_LEVEL <= CV_LOG_LEVEL_VERBOSE
|
||||
#undef CV_LOG_VERBOSE
|
||||
#define CV_LOG_VERBOSE(tag, v, ...)
|
||||
#endif
|
||||
|
||||
//! @cond IGNORED
|
||||
#define CV__LOG_ONCE_CHECK_PRE \
|
||||
static bool _cv_log_once_ ## __LINE__ = false; \
|
||||
if (_cv_log_once_ ## __LINE__) break;
|
||||
|
||||
#define CV__LOG_ONCE_CHECK_POST \
|
||||
_cv_log_once_ ## __LINE__ = true;
|
||||
|
||||
#define CV__LOG_IF_CHECK(logging_cond) \
|
||||
if (!(logging_cond)) break;
|
||||
|
||||
//! @endcond
|
||||
|
||||
|
||||
// CV_LOG_ONCE_XXX macros
|
||||
|
||||
#define CV_LOG_ONCE_ERROR(tag, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_ERROR, CV__LOG_ONCE_CHECK_PRE, CV__LOG_ONCE_CHECK_POST, , __VA_ARGS__)
|
||||
#define CV_LOG_ONCE_WARNING(tag, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_WARNING, CV__LOG_ONCE_CHECK_PRE, CV__LOG_ONCE_CHECK_POST, , __VA_ARGS__)
|
||||
#define CV_LOG_ONCE_INFO(tag, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_INFO, CV__LOG_ONCE_CHECK_PRE, CV__LOG_ONCE_CHECK_POST, , __VA_ARGS__)
|
||||
#define CV_LOG_ONCE_DEBUG(tag, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_DEBUG, CV__LOG_ONCE_CHECK_PRE, CV__LOG_ONCE_CHECK_POST, , __VA_ARGS__)
|
||||
#define CV_LOG_ONCE_VERBOSE(tag, v, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_VERBOSE, CV__LOG_ONCE_CHECK_PRE, CV__LOG_ONCE_CHECK_POST, << "[VERB" << v << ":" << cv::utils::getThreadID() << "] ", __VA_ARGS__)
|
||||
|
||||
#if CV_LOG_STRIP_LEVEL <= CV_LOG_LEVEL_INFO
|
||||
#undef CV_LOG_ONCE_INFO
|
||||
#define CV_LOG_ONCE_INFO(tag, ...)
|
||||
#endif
|
||||
|
||||
#if CV_LOG_STRIP_LEVEL <= CV_LOG_LEVEL_DEBUG
|
||||
#undef CV_LOG_ONCE_DEBUG
|
||||
#define CV_LOG_ONCE_DEBUG(tag, ...)
|
||||
#endif
|
||||
|
||||
#if CV_LOG_STRIP_LEVEL <= CV_LOG_LEVEL_VERBOSE
|
||||
#undef CV_LOG_ONCE_VERBOSE
|
||||
#define CV_LOG_ONCE_VERBOSE(tag, v, ...)
|
||||
#endif
|
||||
|
||||
|
||||
// CV_LOG_IF_XXX macros
|
||||
|
||||
#define CV_LOG_IF_FATAL(tag, logging_cond, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_FATAL, , CV__LOG_IF_CHECK(logging_cond), , __VA_ARGS__)
|
||||
#define CV_LOG_IF_ERROR(tag, logging_cond, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_ERROR, , CV__LOG_IF_CHECK(logging_cond), , __VA_ARGS__)
|
||||
#define CV_LOG_IF_WARNING(tag, logging_cond, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_WARNING, , CV__LOG_IF_CHECK(logging_cond), , __VA_ARGS__)
|
||||
#define CV_LOG_IF_INFO(tag, logging_cond, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_INFO, , CV__LOG_IF_CHECK(logging_cond), , __VA_ARGS__)
|
||||
#define CV_LOG_IF_DEBUG(tag, logging_cond, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_DEBUG, , CV__LOG_IF_CHECK(logging_cond), , __VA_ARGS__)
|
||||
#define CV_LOG_IF_VERBOSE(tag, v, logging_cond, ...) CV_LOG_WITH_TAG(tag, cv::utils::logging::LOG_LEVEL_VERBOSE, , CV__LOG_IF_CHECK(logging_cond), << "[VERB" << v << ":" << cv::utils::getThreadID() << "] ", __VA_ARGS__)
|
||||
|
||||
#if CV_LOG_STRIP_LEVEL <= CV_LOG_LEVEL_INFO
|
||||
#undef CV_LOG_IF_INFO
|
||||
#define CV_LOG_IF_INFO(tag, logging_cond, ...)
|
||||
#endif
|
||||
|
||||
#if CV_LOG_STRIP_LEVEL <= CV_LOG_LEVEL_DEBUG
|
||||
#undef CV_LOG_IF_DEBUG
|
||||
#define CV_LOG_IF_DEBUG(tag, logging_cond, ...)
|
||||
#endif
|
||||
|
||||
#if CV_LOG_STRIP_LEVEL <= CV_LOG_LEVEL_VERBOSE
|
||||
#undef CV_LOG_IF_VERBOSE
|
||||
#define CV_LOG_IF_VERBOSE(tag, v, logging_cond, ...)
|
||||
#endif
|
||||
|
||||
|
||||
//! @}
|
||||
|
||||
}}} // namespace
|
||||
|
||||
#endif // OPENCV_LOGGER_HPP
|
||||
@@ -1,603 +0,0 @@
|
||||
/*M//////////////////////////////////////////////////////////////////////////////
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to
|
||||
// this license. If you do not agree to this license, do not download,
|
||||
// install, copy or use the software.
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2008, Google, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of Intel Corporation or contributors may not 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 Intel Corporation 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.
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_CORE_WIMAGE_HPP
|
||||
#define OPENCV_CORE_WIMAGE_HPP
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace cv {
|
||||
|
||||
//! @addtogroup core
|
||||
//! @{
|
||||
|
||||
template <typename T> class WImage;
|
||||
template <typename T> class WImageBuffer;
|
||||
template <typename T> class WImageView;
|
||||
|
||||
template<typename T, int C> class WImageC;
|
||||
template<typename T, int C> class WImageBufferC;
|
||||
template<typename T, int C> class WImageViewC;
|
||||
|
||||
// Commonly used typedefs.
|
||||
typedef WImage<uchar> WImage_b;
|
||||
typedef WImageView<uchar> WImageView_b;
|
||||
typedef WImageBuffer<uchar> WImageBuffer_b;
|
||||
|
||||
typedef WImageC<uchar, 1> WImage1_b;
|
||||
typedef WImageViewC<uchar, 1> WImageView1_b;
|
||||
typedef WImageBufferC<uchar, 1> WImageBuffer1_b;
|
||||
|
||||
typedef WImageC<uchar, 3> WImage3_b;
|
||||
typedef WImageViewC<uchar, 3> WImageView3_b;
|
||||
typedef WImageBufferC<uchar, 3> WImageBuffer3_b;
|
||||
|
||||
typedef WImage<float> WImage_f;
|
||||
typedef WImageView<float> WImageView_f;
|
||||
typedef WImageBuffer<float> WImageBuffer_f;
|
||||
|
||||
typedef WImageC<float, 1> WImage1_f;
|
||||
typedef WImageViewC<float, 1> WImageView1_f;
|
||||
typedef WImageBufferC<float, 1> WImageBuffer1_f;
|
||||
|
||||
typedef WImageC<float, 3> WImage3_f;
|
||||
typedef WImageViewC<float, 3> WImageView3_f;
|
||||
typedef WImageBufferC<float, 3> WImageBuffer3_f;
|
||||
|
||||
// There isn't a standard for signed and unsigned short so be more
|
||||
// explicit in the typename for these cases.
|
||||
typedef WImage<short> WImage_16s;
|
||||
typedef WImageView<short> WImageView_16s;
|
||||
typedef WImageBuffer<short> WImageBuffer_16s;
|
||||
|
||||
typedef WImageC<short, 1> WImage1_16s;
|
||||
typedef WImageViewC<short, 1> WImageView1_16s;
|
||||
typedef WImageBufferC<short, 1> WImageBuffer1_16s;
|
||||
|
||||
typedef WImageC<short, 3> WImage3_16s;
|
||||
typedef WImageViewC<short, 3> WImageView3_16s;
|
||||
typedef WImageBufferC<short, 3> WImageBuffer3_16s;
|
||||
|
||||
typedef WImage<ushort> WImage_16u;
|
||||
typedef WImageView<ushort> WImageView_16u;
|
||||
typedef WImageBuffer<ushort> WImageBuffer_16u;
|
||||
|
||||
typedef WImageC<ushort, 1> WImage1_16u;
|
||||
typedef WImageViewC<ushort, 1> WImageView1_16u;
|
||||
typedef WImageBufferC<ushort, 1> WImageBuffer1_16u;
|
||||
|
||||
typedef WImageC<ushort, 3> WImage3_16u;
|
||||
typedef WImageViewC<ushort, 3> WImageView3_16u;
|
||||
typedef WImageBufferC<ushort, 3> WImageBuffer3_16u;
|
||||
|
||||
/** @brief Image class which provides a thin layer around an IplImage.
|
||||
|
||||
The goals of the class design are:
|
||||
|
||||
-# All the data has explicit ownership to avoid memory leaks
|
||||
-# No hidden allocations or copies for performance.
|
||||
-# Easy access to OpenCV methods (which will access IPP if available)
|
||||
-# Can easily treat external data as an image
|
||||
-# Easy to create images which are subsets of other images
|
||||
-# Fast pixel access which can take advantage of number of channels if known at compile time.
|
||||
|
||||
The WImage class is the image class which provides the data accessors. The 'W' comes from the fact
|
||||
that it is also a wrapper around the popular but inconvenient IplImage class. A WImage can be
|
||||
constructed either using a WImageBuffer class which allocates and frees the data, or using a
|
||||
WImageView class which constructs a subimage or a view into external data. The view class does no
|
||||
memory management. Each class actually has two versions, one when the number of channels is known
|
||||
at compile time and one when it isn't. Using the one with the number of channels specified can
|
||||
provide some compile time optimizations by using the fact that the number of channels is a
|
||||
constant.
|
||||
|
||||
We use the convention (c,r) to refer to column c and row r with (0,0) being the upper left corner.
|
||||
This is similar to standard Euclidean coordinates with the first coordinate varying in the
|
||||
horizontal direction and the second coordinate varying in the vertical direction. Thus (c,r) is
|
||||
usually in the domain [0, width) X [0, height)
|
||||
|
||||
Example usage:
|
||||
@code
|
||||
WImageBuffer3_b im(5,7); // Make a 5X7 3 channel image of type uchar
|
||||
WImageView3_b sub_im(im, 2,2, 3,3); // 3X3 submatrix
|
||||
vector<float> vec(10, 3.0f);
|
||||
WImageView1_f user_im(&vec[0], 2, 5); // 2X5 image w/ supplied data
|
||||
|
||||
im.SetZero(); // same as cvSetZero(im.Ipl())
|
||||
*im(2, 3) = 15; // Modify the element at column 2, row 3
|
||||
MySetRand(&sub_im);
|
||||
|
||||
// Copy the second row into the first. This can be done with no memory
|
||||
// allocation and will use SSE if IPP is available.
|
||||
int w = im.Width();
|
||||
im.View(0,0, w,1).CopyFrom(im.View(0,1, w,1));
|
||||
|
||||
// Doesn't care about source of data since using WImage
|
||||
void MySetRand(WImage_b* im) { // Works with any number of channels
|
||||
for (int r = 0; r < im->Height(); ++r) {
|
||||
float* row = im->Row(r);
|
||||
for (int c = 0; c < im->Width(); ++c) {
|
||||
for (int ch = 0; ch < im->Channels(); ++ch, ++row) {
|
||||
*row = uchar(rand() & 255);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@endcode
|
||||
|
||||
Functions that are not part of the basic image allocation, viewing, and access should come from
|
||||
OpenCV, except some useful functions that are not part of OpenCV can be found in wimage_util.h
|
||||
*/
|
||||
template<typename T>
|
||||
class WImage
|
||||
{
|
||||
public:
|
||||
typedef T BaseType;
|
||||
|
||||
// WImage is an abstract class with no other virtual methods so make the
|
||||
// destructor virtual.
|
||||
virtual ~WImage() = 0;
|
||||
|
||||
// Accessors
|
||||
IplImage* Ipl() {return image_; }
|
||||
const IplImage* Ipl() const {return image_; }
|
||||
T* ImageData() { return reinterpret_cast<T*>(image_->imageData); }
|
||||
const T* ImageData() const {
|
||||
return reinterpret_cast<const T*>(image_->imageData);
|
||||
}
|
||||
|
||||
int Width() const {return image_->width; }
|
||||
int Height() const {return image_->height; }
|
||||
|
||||
// WidthStep is the number of bytes to go to the pixel with the next y coord
|
||||
int WidthStep() const {return image_->widthStep; }
|
||||
|
||||
int Channels() const {return image_->nChannels; }
|
||||
int ChannelSize() const {return sizeof(T); } // number of bytes per channel
|
||||
|
||||
// Number of bytes per pixel
|
||||
int PixelSize() const {return Channels() * ChannelSize(); }
|
||||
|
||||
// Return depth type (e.g. IPL_DEPTH_8U, IPL_DEPTH_32F) which is the number
|
||||
// of bits per channel and with the signed bit set.
|
||||
// This is known at compile time using specializations.
|
||||
int Depth() const;
|
||||
|
||||
inline const T* Row(int r) const {
|
||||
return reinterpret_cast<T*>(image_->imageData + r*image_->widthStep);
|
||||
}
|
||||
|
||||
inline T* Row(int r) {
|
||||
return reinterpret_cast<T*>(image_->imageData + r*image_->widthStep);
|
||||
}
|
||||
|
||||
// Pixel accessors which returns a pointer to the start of the channel
|
||||
inline T* operator() (int c, int r) {
|
||||
return reinterpret_cast<T*>(image_->imageData + r*image_->widthStep) +
|
||||
c*Channels();
|
||||
}
|
||||
|
||||
inline const T* operator() (int c, int r) const {
|
||||
return reinterpret_cast<T*>(image_->imageData + r*image_->widthStep) +
|
||||
c*Channels();
|
||||
}
|
||||
|
||||
// Copy the contents from another image which is just a convenience to cvCopy
|
||||
void CopyFrom(const WImage<T>& src) { cvCopy(src.Ipl(), image_); }
|
||||
|
||||
// Set contents to zero which is just a convenient to cvSetZero
|
||||
void SetZero() { cvSetZero(image_); }
|
||||
|
||||
// Construct a view into a region of this image
|
||||
WImageView<T> View(int c, int r, int width, int height);
|
||||
|
||||
protected:
|
||||
// Disallow copy and assignment
|
||||
WImage(const WImage&);
|
||||
void operator=(const WImage&);
|
||||
|
||||
explicit WImage(IplImage* img) : image_(img) {
|
||||
assert(!img || img->depth == Depth());
|
||||
}
|
||||
|
||||
void SetIpl(IplImage* image) {
|
||||
assert(!image || image->depth == Depth());
|
||||
image_ = image;
|
||||
}
|
||||
|
||||
IplImage* image_;
|
||||
};
|
||||
|
||||
|
||||
/** Image class when both the pixel type and number of channels
|
||||
are known at compile time. This wrapper will speed up some of the operations
|
||||
like accessing individual pixels using the () operator.
|
||||
*/
|
||||
template<typename T, int C>
|
||||
class WImageC : public WImage<T>
|
||||
{
|
||||
public:
|
||||
typedef typename WImage<T>::BaseType BaseType;
|
||||
enum { kChannels = C };
|
||||
|
||||
explicit WImageC(IplImage* img) : WImage<T>(img) {
|
||||
assert(!img || img->nChannels == Channels());
|
||||
}
|
||||
|
||||
// Construct a view into a region of this image
|
||||
WImageViewC<T, C> View(int c, int r, int width, int height);
|
||||
|
||||
// Copy the contents from another image which is just a convenience to cvCopy
|
||||
void CopyFrom(const WImageC<T, C>& src) {
|
||||
cvCopy(src.Ipl(), WImage<T>::image_);
|
||||
}
|
||||
|
||||
// WImageC is an abstract class with no other virtual methods so make the
|
||||
// destructor virtual.
|
||||
virtual ~WImageC() = 0;
|
||||
|
||||
int Channels() const {return C; }
|
||||
|
||||
protected:
|
||||
// Disallow copy and assignment
|
||||
WImageC(const WImageC&);
|
||||
void operator=(const WImageC&);
|
||||
|
||||
void SetIpl(IplImage* image) {
|
||||
assert(!image || image->depth == WImage<T>::Depth());
|
||||
WImage<T>::SetIpl(image);
|
||||
}
|
||||
};
|
||||
|
||||
/** Image class which owns the data, so it can be allocated and is always
|
||||
freed. It cannot be copied but can be explicitly cloned.
|
||||
*/
|
||||
template<typename T>
|
||||
class WImageBuffer : public WImage<T>
|
||||
{
|
||||
public:
|
||||
typedef typename WImage<T>::BaseType BaseType;
|
||||
|
||||
// Default constructor which creates an object that can be
|
||||
WImageBuffer() : WImage<T>(0) {}
|
||||
|
||||
WImageBuffer(int width, int height, int nchannels) : WImage<T>(0) {
|
||||
Allocate(width, height, nchannels);
|
||||
}
|
||||
|
||||
// Constructor which takes ownership of a given IplImage so releases
|
||||
// the image on destruction.
|
||||
explicit WImageBuffer(IplImage* img) : WImage<T>(img) {}
|
||||
|
||||
// Allocate an image. Does nothing if current size is the same as
|
||||
// the new size.
|
||||
void Allocate(int width, int height, int nchannels);
|
||||
|
||||
// Set the data to point to an image, releasing the old data
|
||||
void SetIpl(IplImage* img) {
|
||||
ReleaseImage();
|
||||
WImage<T>::SetIpl(img);
|
||||
}
|
||||
|
||||
// Clone an image which reallocates the image if of a different dimension.
|
||||
void CloneFrom(const WImage<T>& src) {
|
||||
Allocate(src.Width(), src.Height(), src.Channels());
|
||||
CopyFrom(src);
|
||||
}
|
||||
|
||||
~WImageBuffer() {
|
||||
ReleaseImage();
|
||||
}
|
||||
|
||||
// Release the image if it isn't null.
|
||||
void ReleaseImage() {
|
||||
if (WImage<T>::image_) {
|
||||
IplImage* image = WImage<T>::image_;
|
||||
cvReleaseImage(&image);
|
||||
WImage<T>::SetIpl(0);
|
||||
}
|
||||
}
|
||||
|
||||
bool IsNull() const {return WImage<T>::image_ == NULL; }
|
||||
|
||||
private:
|
||||
// Disallow copy and assignment
|
||||
WImageBuffer(const WImageBuffer&);
|
||||
void operator=(const WImageBuffer&);
|
||||
};
|
||||
|
||||
/** Like a WImageBuffer class but when the number of channels is known at compile time.
|
||||
*/
|
||||
template<typename T, int C>
|
||||
class WImageBufferC : public WImageC<T, C>
|
||||
{
|
||||
public:
|
||||
typedef typename WImage<T>::BaseType BaseType;
|
||||
enum { kChannels = C };
|
||||
|
||||
// Default constructor which creates an object that can be
|
||||
WImageBufferC() : WImageC<T, C>(0) {}
|
||||
|
||||
WImageBufferC(int width, int height) : WImageC<T, C>(0) {
|
||||
Allocate(width, height);
|
||||
}
|
||||
|
||||
// Constructor which takes ownership of a given IplImage so releases
|
||||
// the image on destruction.
|
||||
explicit WImageBufferC(IplImage* img) : WImageC<T, C>(img) {}
|
||||
|
||||
// Allocate an image. Does nothing if current size is the same as
|
||||
// the new size.
|
||||
void Allocate(int width, int height);
|
||||
|
||||
// Set the data to point to an image, releasing the old data
|
||||
void SetIpl(IplImage* img) {
|
||||
ReleaseImage();
|
||||
WImageC<T, C>::SetIpl(img);
|
||||
}
|
||||
|
||||
// Clone an image which reallocates the image if of a different dimension.
|
||||
void CloneFrom(const WImageC<T, C>& src) {
|
||||
Allocate(src.Width(), src.Height());
|
||||
CopyFrom(src);
|
||||
}
|
||||
|
||||
~WImageBufferC() {
|
||||
ReleaseImage();
|
||||
}
|
||||
|
||||
// Release the image if it isn't null.
|
||||
void ReleaseImage() {
|
||||
if (WImage<T>::image_) {
|
||||
IplImage* image = WImage<T>::image_;
|
||||
cvReleaseImage(&image);
|
||||
WImageC<T, C>::SetIpl(0);
|
||||
}
|
||||
}
|
||||
|
||||
bool IsNull() const {return WImage<T>::image_ == NULL; }
|
||||
|
||||
private:
|
||||
// Disallow copy and assignment
|
||||
WImageBufferC(const WImageBufferC&);
|
||||
void operator=(const WImageBufferC&);
|
||||
};
|
||||
|
||||
/** View into an image class which allows treating a subimage as an image or treating external data
|
||||
as an image
|
||||
*/
|
||||
template<typename T> class WImageView : public WImage<T>
|
||||
{
|
||||
public:
|
||||
typedef typename WImage<T>::BaseType BaseType;
|
||||
|
||||
// Construct a subimage. No checks are done that the subimage lies
|
||||
// completely inside the original image.
|
||||
WImageView(WImage<T>* img, int c, int r, int width, int height);
|
||||
|
||||
// Refer to external data.
|
||||
// If not given width_step assumed to be same as width.
|
||||
WImageView(T* data, int width, int height, int channels, int width_step = -1);
|
||||
|
||||
// Refer to external data. This does NOT take ownership
|
||||
// of the supplied IplImage.
|
||||
WImageView(IplImage* img) : WImage<T>(img) {}
|
||||
|
||||
// Copy constructor
|
||||
WImageView(const WImage<T>& img) : WImage<T>(0) {
|
||||
header_ = *(img.Ipl());
|
||||
WImage<T>::SetIpl(&header_);
|
||||
}
|
||||
|
||||
WImageView& operator=(const WImage<T>& img) {
|
||||
header_ = *(img.Ipl());
|
||||
WImage<T>::SetIpl(&header_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
IplImage header_;
|
||||
};
|
||||
|
||||
|
||||
template<typename T, int C>
|
||||
class WImageViewC : public WImageC<T, C>
|
||||
{
|
||||
public:
|
||||
typedef typename WImage<T>::BaseType BaseType;
|
||||
enum { kChannels = C };
|
||||
|
||||
// Default constructor needed for vectors of views.
|
||||
WImageViewC();
|
||||
|
||||
virtual ~WImageViewC() {}
|
||||
|
||||
// Construct a subimage. No checks are done that the subimage lies
|
||||
// completely inside the original image.
|
||||
WImageViewC(WImageC<T, C>* img,
|
||||
int c, int r, int width, int height);
|
||||
|
||||
// Refer to external data
|
||||
WImageViewC(T* data, int width, int height, int width_step = -1);
|
||||
|
||||
// Refer to external data. This does NOT take ownership
|
||||
// of the supplied IplImage.
|
||||
WImageViewC(IplImage* img) : WImageC<T, C>(img) {}
|
||||
|
||||
// Copy constructor which does a shallow copy to allow multiple views
|
||||
// of same data. gcc-4.1.1 gets confused if both versions of
|
||||
// the constructor and assignment operator are not provided.
|
||||
WImageViewC(const WImageC<T, C>& img) : WImageC<T, C>(0) {
|
||||
header_ = *(img.Ipl());
|
||||
WImageC<T, C>::SetIpl(&header_);
|
||||
}
|
||||
WImageViewC(const WImageViewC<T, C>& img) : WImageC<T, C>(0) {
|
||||
header_ = *(img.Ipl());
|
||||
WImageC<T, C>::SetIpl(&header_);
|
||||
}
|
||||
|
||||
WImageViewC& operator=(const WImageC<T, C>& img) {
|
||||
header_ = *(img.Ipl());
|
||||
WImageC<T, C>::SetIpl(&header_);
|
||||
return *this;
|
||||
}
|
||||
WImageViewC& operator=(const WImageViewC<T, C>& img) {
|
||||
header_ = *(img.Ipl());
|
||||
WImageC<T, C>::SetIpl(&header_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
protected:
|
||||
IplImage header_;
|
||||
};
|
||||
|
||||
|
||||
// Specializations for depth
|
||||
template<>
|
||||
inline int WImage<uchar>::Depth() const {return IPL_DEPTH_8U; }
|
||||
template<>
|
||||
inline int WImage<signed char>::Depth() const {return IPL_DEPTH_8S; }
|
||||
template<>
|
||||
inline int WImage<short>::Depth() const {return IPL_DEPTH_16S; }
|
||||
template<>
|
||||
inline int WImage<ushort>::Depth() const {return IPL_DEPTH_16U; }
|
||||
template<>
|
||||
inline int WImage<int>::Depth() const {return IPL_DEPTH_32S; }
|
||||
template<>
|
||||
inline int WImage<float>::Depth() const {return IPL_DEPTH_32F; }
|
||||
template<>
|
||||
inline int WImage<double>::Depth() const {return IPL_DEPTH_64F; }
|
||||
|
||||
template<typename T> inline WImage<T>::~WImage() {}
|
||||
template<typename T, int C> inline WImageC<T, C>::~WImageC() {}
|
||||
|
||||
template<typename T>
|
||||
inline void WImageBuffer<T>::Allocate(int width, int height, int nchannels)
|
||||
{
|
||||
if (IsNull() || WImage<T>::Width() != width ||
|
||||
WImage<T>::Height() != height || WImage<T>::Channels() != nchannels) {
|
||||
ReleaseImage();
|
||||
WImage<T>::image_ = cvCreateImage(cvSize(width, height),
|
||||
WImage<T>::Depth(), nchannels);
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T, int C>
|
||||
inline void WImageBufferC<T, C>::Allocate(int width, int height)
|
||||
{
|
||||
if (IsNull() || WImage<T>::Width() != width || WImage<T>::Height() != height) {
|
||||
ReleaseImage();
|
||||
WImageC<T, C>::SetIpl(cvCreateImage(cvSize(width, height),WImage<T>::Depth(), C));
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
WImageView<T>::WImageView(WImage<T>* img, int c, int r, int width, int height)
|
||||
: WImage<T>(0)
|
||||
{
|
||||
header_ = *(img->Ipl());
|
||||
header_.imageData = reinterpret_cast<char*>((*img)(c, r));
|
||||
header_.width = width;
|
||||
header_.height = height;
|
||||
WImage<T>::SetIpl(&header_);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
WImageView<T>::WImageView(T* data, int width, int height, int nchannels, int width_step)
|
||||
: WImage<T>(0)
|
||||
{
|
||||
cvInitImageHeader(&header_, cvSize(width, height), WImage<T>::Depth(), nchannels);
|
||||
header_.imageData = reinterpret_cast<char*>(data);
|
||||
if (width_step > 0) {
|
||||
header_.widthStep = width_step;
|
||||
}
|
||||
WImage<T>::SetIpl(&header_);
|
||||
}
|
||||
|
||||
template<typename T, int C>
|
||||
WImageViewC<T, C>::WImageViewC(WImageC<T, C>* img, int c, int r, int width, int height)
|
||||
: WImageC<T, C>(0)
|
||||
{
|
||||
header_ = *(img->Ipl());
|
||||
header_.imageData = reinterpret_cast<char*>((*img)(c, r));
|
||||
header_.width = width;
|
||||
header_.height = height;
|
||||
WImageC<T, C>::SetIpl(&header_);
|
||||
}
|
||||
|
||||
template<typename T, int C>
|
||||
WImageViewC<T, C>::WImageViewC() : WImageC<T, C>(0) {
|
||||
cvInitImageHeader(&header_, cvSize(0, 0), WImage<T>::Depth(), C);
|
||||
header_.imageData = reinterpret_cast<char*>(0);
|
||||
WImageC<T, C>::SetIpl(&header_);
|
||||
}
|
||||
|
||||
template<typename T, int C>
|
||||
WImageViewC<T, C>::WImageViewC(T* data, int width, int height, int width_step)
|
||||
: WImageC<T, C>(0)
|
||||
{
|
||||
cvInitImageHeader(&header_, cvSize(width, height), WImage<T>::Depth(), C);
|
||||
header_.imageData = reinterpret_cast<char*>(data);
|
||||
if (width_step > 0) {
|
||||
header_.widthStep = width_step;
|
||||
}
|
||||
WImageC<T, C>::SetIpl(&header_);
|
||||
}
|
||||
|
||||
// Construct a view into a region of an image
|
||||
template<typename T>
|
||||
WImageView<T> WImage<T>::View(int c, int r, int width, int height) {
|
||||
return WImageView<T>(this, c, r, width, height);
|
||||
}
|
||||
|
||||
template<typename T, int C>
|
||||
WImageViewC<T, C> WImageC<T, C>::View(int c, int r, int width, int height) {
|
||||
return WImageViewC<T, C>(this, c, r, width, height);
|
||||
}
|
||||
|
||||
//! @} core
|
||||
|
||||
} // end of namespace
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif
|
||||
@@ -1,149 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// Intel License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000, Intel Corporation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of Intel Corporation may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_IMGCODECS_H
|
||||
#define OPENCV_IMGCODECS_H
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/** @addtogroup imgcodecs_c
|
||||
@{
|
||||
*/
|
||||
|
||||
enum
|
||||
{
|
||||
/* 8bit, color or not */
|
||||
CV_LOAD_IMAGE_UNCHANGED =-1,
|
||||
/* 8bit, gray */
|
||||
CV_LOAD_IMAGE_GRAYSCALE =0,
|
||||
/* ?, color */
|
||||
CV_LOAD_IMAGE_COLOR =1,
|
||||
/* any depth, ? */
|
||||
CV_LOAD_IMAGE_ANYDEPTH =2,
|
||||
/* ?, any color */
|
||||
CV_LOAD_IMAGE_ANYCOLOR =4,
|
||||
/* ?, no rotate */
|
||||
CV_LOAD_IMAGE_IGNORE_ORIENTATION =128
|
||||
};
|
||||
|
||||
/* load image from file
|
||||
iscolor can be a combination of above flags where CV_LOAD_IMAGE_UNCHANGED
|
||||
overrides the other flags
|
||||
using CV_LOAD_IMAGE_ANYCOLOR alone is equivalent to CV_LOAD_IMAGE_UNCHANGED
|
||||
unless CV_LOAD_IMAGE_ANYDEPTH is specified images are converted to 8bit
|
||||
*/
|
||||
CVAPI(IplImage*) cvLoadImage( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
|
||||
CVAPI(CvMat*) cvLoadImageM( const char* filename, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
|
||||
|
||||
enum
|
||||
{
|
||||
CV_IMWRITE_JPEG_QUALITY =1,
|
||||
CV_IMWRITE_JPEG_PROGRESSIVE =2,
|
||||
CV_IMWRITE_JPEG_OPTIMIZE =3,
|
||||
CV_IMWRITE_JPEG_RST_INTERVAL =4,
|
||||
CV_IMWRITE_JPEG_LUMA_QUALITY =5,
|
||||
CV_IMWRITE_JPEG_CHROMA_QUALITY =6,
|
||||
CV_IMWRITE_PNG_COMPRESSION =16,
|
||||
CV_IMWRITE_PNG_STRATEGY =17,
|
||||
CV_IMWRITE_PNG_BILEVEL =18,
|
||||
CV_IMWRITE_PNG_STRATEGY_DEFAULT =0,
|
||||
CV_IMWRITE_PNG_STRATEGY_FILTERED =1,
|
||||
CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY =2,
|
||||
CV_IMWRITE_PNG_STRATEGY_RLE =3,
|
||||
CV_IMWRITE_PNG_STRATEGY_FIXED =4,
|
||||
CV_IMWRITE_PXM_BINARY =32,
|
||||
CV_IMWRITE_EXR_TYPE = 48,
|
||||
CV_IMWRITE_WEBP_QUALITY =64,
|
||||
CV_IMWRITE_PAM_TUPLETYPE = 128,
|
||||
CV_IMWRITE_PAM_FORMAT_NULL = 0,
|
||||
CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE = 1,
|
||||
CV_IMWRITE_PAM_FORMAT_GRAYSCALE = 2,
|
||||
CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA = 3,
|
||||
CV_IMWRITE_PAM_FORMAT_RGB = 4,
|
||||
CV_IMWRITE_PAM_FORMAT_RGB_ALPHA = 5,
|
||||
};
|
||||
|
||||
|
||||
|
||||
/* save image to file */
|
||||
CVAPI(int) cvSaveImage( const char* filename, const CvArr* image,
|
||||
const int* params CV_DEFAULT(0) );
|
||||
|
||||
/* decode image stored in the buffer */
|
||||
CVAPI(IplImage*) cvDecodeImage( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
|
||||
CVAPI(CvMat*) cvDecodeImageM( const CvMat* buf, int iscolor CV_DEFAULT(CV_LOAD_IMAGE_COLOR));
|
||||
|
||||
/* encode image and store the result as a byte vector (single-row 8uC1 matrix) */
|
||||
CVAPI(CvMat*) cvEncodeImage( const char* ext, const CvArr* image,
|
||||
const int* params CV_DEFAULT(0) );
|
||||
|
||||
enum
|
||||
{
|
||||
CV_CVTIMG_FLIP =1,
|
||||
CV_CVTIMG_SWAP_RB =2
|
||||
};
|
||||
|
||||
/* utility function: convert one image to another with optional vertical flip */
|
||||
CVAPI(void) cvConvertImage( const CvArr* src, CvArr* dst, int flags CV_DEFAULT(0));
|
||||
|
||||
CVAPI(int) cvHaveImageReader(const char* filename);
|
||||
CVAPI(int) cvHaveImageWriter(const char* filename);
|
||||
|
||||
|
||||
/****************************************************************************************\
|
||||
* Obsolete functions/synonyms *
|
||||
\****************************************************************************************/
|
||||
|
||||
#define cvvLoadImage(name) cvLoadImage((name),1)
|
||||
#define cvvSaveImage cvSaveImage
|
||||
#define cvvConvertImage cvConvertImage
|
||||
|
||||
/** @} imgcodecs_c */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // OPENCV_IMGCODECS_H
|
||||
@@ -1,123 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_IMGPROC_DETAIL_DISTORTION_MODEL_HPP
|
||||
#define OPENCV_IMGPROC_DETAIL_DISTORTION_MODEL_HPP
|
||||
|
||||
//! @cond IGNORED
|
||||
|
||||
namespace cv { namespace detail {
|
||||
/**
|
||||
Computes the matrix for the projection onto a tilted image sensor
|
||||
\param tauX angular parameter rotation around x-axis
|
||||
\param tauY angular parameter rotation around y-axis
|
||||
\param matTilt if not NULL returns the matrix
|
||||
\f[
|
||||
\vecthreethree{R_{33}(\tau_x, \tau_y)}{0}{-R_{13}((\tau_x, \tau_y)}
|
||||
{0}{R_{33}(\tau_x, \tau_y)}{-R_{23}(\tau_x, \tau_y)}
|
||||
{0}{0}{1} R(\tau_x, \tau_y)
|
||||
\f]
|
||||
where
|
||||
\f[
|
||||
R(\tau_x, \tau_y) =
|
||||
\vecthreethree{\cos(\tau_y)}{0}{-\sin(\tau_y)}{0}{1}{0}{\sin(\tau_y)}{0}{\cos(\tau_y)}
|
||||
\vecthreethree{1}{0}{0}{0}{\cos(\tau_x)}{\sin(\tau_x)}{0}{-\sin(\tau_x)}{\cos(\tau_x)} =
|
||||
\vecthreethree{\cos(\tau_y)}{\sin(\tau_y)\sin(\tau_x)}{-\sin(\tau_y)\cos(\tau_x)}
|
||||
{0}{\cos(\tau_x)}{\sin(\tau_x)}
|
||||
{\sin(\tau_y)}{-\cos(\tau_y)\sin(\tau_x)}{\cos(\tau_y)\cos(\tau_x)}.
|
||||
\f]
|
||||
\param dMatTiltdTauX if not NULL it returns the derivative of matTilt with
|
||||
respect to \f$\tau_x\f$.
|
||||
\param dMatTiltdTauY if not NULL it returns the derivative of matTilt with
|
||||
respect to \f$\tau_y\f$.
|
||||
\param invMatTilt if not NULL it returns the inverse of matTilt
|
||||
**/
|
||||
template <typename FLOAT>
|
||||
void computeTiltProjectionMatrix(FLOAT tauX,
|
||||
FLOAT tauY,
|
||||
Matx<FLOAT, 3, 3>* matTilt = 0,
|
||||
Matx<FLOAT, 3, 3>* dMatTiltdTauX = 0,
|
||||
Matx<FLOAT, 3, 3>* dMatTiltdTauY = 0,
|
||||
Matx<FLOAT, 3, 3>* invMatTilt = 0)
|
||||
{
|
||||
FLOAT cTauX = cos(tauX);
|
||||
FLOAT sTauX = sin(tauX);
|
||||
FLOAT cTauY = cos(tauY);
|
||||
FLOAT sTauY = sin(tauY);
|
||||
Matx<FLOAT, 3, 3> matRotX = Matx<FLOAT, 3, 3>(1,0,0,0,cTauX,sTauX,0,-sTauX,cTauX);
|
||||
Matx<FLOAT, 3, 3> matRotY = Matx<FLOAT, 3, 3>(cTauY,0,-sTauY,0,1,0,sTauY,0,cTauY);
|
||||
Matx<FLOAT, 3, 3> matRotXY = matRotY * matRotX;
|
||||
Matx<FLOAT, 3, 3> matProjZ = Matx<FLOAT, 3, 3>(matRotXY(2,2),0,-matRotXY(0,2),0,matRotXY(2,2),-matRotXY(1,2),0,0,1);
|
||||
if (matTilt)
|
||||
{
|
||||
// Matrix for trapezoidal distortion of tilted image sensor
|
||||
*matTilt = matProjZ * matRotXY;
|
||||
}
|
||||
if (dMatTiltdTauX)
|
||||
{
|
||||
// Derivative with respect to tauX
|
||||
Matx<FLOAT, 3, 3> dMatRotXYdTauX = matRotY * Matx<FLOAT, 3, 3>(0,0,0,0,-sTauX,cTauX,0,-cTauX,-sTauX);
|
||||
Matx<FLOAT, 3, 3> dMatProjZdTauX = Matx<FLOAT, 3, 3>(dMatRotXYdTauX(2,2),0,-dMatRotXYdTauX(0,2),
|
||||
0,dMatRotXYdTauX(2,2),-dMatRotXYdTauX(1,2),0,0,0);
|
||||
*dMatTiltdTauX = (matProjZ * dMatRotXYdTauX) + (dMatProjZdTauX * matRotXY);
|
||||
}
|
||||
if (dMatTiltdTauY)
|
||||
{
|
||||
// Derivative with respect to tauY
|
||||
Matx<FLOAT, 3, 3> dMatRotXYdTauY = Matx<FLOAT, 3, 3>(-sTauY,0,-cTauY,0,0,0,cTauY,0,-sTauY) * matRotX;
|
||||
Matx<FLOAT, 3, 3> dMatProjZdTauY = Matx<FLOAT, 3, 3>(dMatRotXYdTauY(2,2),0,-dMatRotXYdTauY(0,2),
|
||||
0,dMatRotXYdTauY(2,2),-dMatRotXYdTauY(1,2),0,0,0);
|
||||
*dMatTiltdTauY = (matProjZ * dMatRotXYdTauY) + (dMatProjZdTauY * matRotXY);
|
||||
}
|
||||
if (invMatTilt)
|
||||
{
|
||||
FLOAT inv = 1./matRotXY(2,2);
|
||||
Matx<FLOAT, 3, 3> invMatProjZ = Matx<FLOAT, 3, 3>(inv,0,inv*matRotXY(0,2),0,inv,inv*matRotXY(1,2),0,0,1);
|
||||
*invMatTilt = matRotXY.t()*invMatProjZ;
|
||||
}
|
||||
}
|
||||
}} // namespace detail, cv
|
||||
|
||||
|
||||
//! @endcond
|
||||
|
||||
#endif // OPENCV_IMGPROC_DETAIL_DISTORTION_MODEL_HPP
|
||||
@@ -1,166 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_OBJDETECT_C_H
|
||||
#define OPENCV_OBJDETECT_C_H
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <deque>
|
||||
#include <vector>
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @addtogroup objdetect_c
|
||||
@{
|
||||
*/
|
||||
|
||||
/****************************************************************************************\
|
||||
* Haar-like Object Detection functions *
|
||||
\****************************************************************************************/
|
||||
|
||||
#define CV_HAAR_MAGIC_VAL 0x42500000
|
||||
#define CV_TYPE_NAME_HAAR "opencv-haar-classifier"
|
||||
|
||||
#define CV_IS_HAAR_CLASSIFIER( haar ) \
|
||||
((haar) != NULL && \
|
||||
(((const CvHaarClassifierCascade*)(haar))->flags & CV_MAGIC_MASK)==CV_HAAR_MAGIC_VAL)
|
||||
|
||||
#define CV_HAAR_FEATURE_MAX 3
|
||||
#define CV_HAAR_STAGE_MAX 1000
|
||||
|
||||
typedef struct CvHaarFeature
|
||||
{
|
||||
int tilted;
|
||||
struct
|
||||
{
|
||||
CvRect r;
|
||||
float weight;
|
||||
} rect[CV_HAAR_FEATURE_MAX];
|
||||
} CvHaarFeature;
|
||||
|
||||
typedef struct CvHaarClassifier
|
||||
{
|
||||
int count;
|
||||
CvHaarFeature* haar_feature;
|
||||
float* threshold;
|
||||
int* left;
|
||||
int* right;
|
||||
float* alpha;
|
||||
} CvHaarClassifier;
|
||||
|
||||
typedef struct CvHaarStageClassifier
|
||||
{
|
||||
int count;
|
||||
float threshold;
|
||||
CvHaarClassifier* classifier;
|
||||
|
||||
int next;
|
||||
int child;
|
||||
int parent;
|
||||
} CvHaarStageClassifier;
|
||||
|
||||
typedef struct CvHidHaarClassifierCascade CvHidHaarClassifierCascade;
|
||||
|
||||
typedef struct CvHaarClassifierCascade
|
||||
{
|
||||
int flags;
|
||||
int count;
|
||||
CvSize orig_window_size;
|
||||
CvSize real_window_size;
|
||||
double scale;
|
||||
CvHaarStageClassifier* stage_classifier;
|
||||
CvHidHaarClassifierCascade* hid_cascade;
|
||||
} CvHaarClassifierCascade;
|
||||
|
||||
typedef struct CvAvgComp
|
||||
{
|
||||
CvRect rect;
|
||||
int neighbors;
|
||||
} CvAvgComp;
|
||||
|
||||
/* Loads haar classifier cascade from a directory.
|
||||
It is obsolete: convert your cascade to xml and use cvLoad instead */
|
||||
CVAPI(CvHaarClassifierCascade*) cvLoadHaarClassifierCascade(
|
||||
const char* directory, CvSize orig_window_size);
|
||||
|
||||
CVAPI(void) cvReleaseHaarClassifierCascade( CvHaarClassifierCascade** cascade );
|
||||
|
||||
#define CV_HAAR_DO_CANNY_PRUNING 1
|
||||
#define CV_HAAR_SCALE_IMAGE 2
|
||||
#define CV_HAAR_FIND_BIGGEST_OBJECT 4
|
||||
#define CV_HAAR_DO_ROUGH_SEARCH 8
|
||||
|
||||
CVAPI(CvSeq*) cvHaarDetectObjects( const CvArr* image,
|
||||
CvHaarClassifierCascade* cascade, CvMemStorage* storage,
|
||||
double scale_factor CV_DEFAULT(1.1),
|
||||
int min_neighbors CV_DEFAULT(3), int flags CV_DEFAULT(0),
|
||||
CvSize min_size CV_DEFAULT(cvSize(0,0)), CvSize max_size CV_DEFAULT(cvSize(0,0)));
|
||||
|
||||
/* sets images for haar classifier cascade */
|
||||
CVAPI(void) cvSetImagesForHaarClassifierCascade( CvHaarClassifierCascade* cascade,
|
||||
const CvArr* sum, const CvArr* sqsum,
|
||||
const CvArr* tilted_sum, double scale );
|
||||
|
||||
/* runs the cascade on the specified window */
|
||||
CVAPI(int) cvRunHaarClassifierCascade( const CvHaarClassifierCascade* cascade,
|
||||
CvPoint pt, int start_stage CV_DEFAULT(0));
|
||||
|
||||
/** @} objdetect_c */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
CV_EXPORTS CvSeq* cvHaarDetectObjectsForROC( const CvArr* image,
|
||||
CvHaarClassifierCascade* cascade, CvMemStorage* storage,
|
||||
std::vector<int>& rejectLevels, std::vector<double>& levelWeightds,
|
||||
double scale_factor = 1.1,
|
||||
int min_neighbors = 3, int flags = 0,
|
||||
CvSize min_size = cvSize(0, 0), CvSize max_size = cvSize(0, 0),
|
||||
bool outputRejectLevels = false );
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* OPENCV_OBJDETECT_C_H */
|
||||
@@ -1,74 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2008-2012, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_PHOTO_C_H
|
||||
#define OPENCV_PHOTO_C_H
|
||||
|
||||
#include "opencv2/core/core_c.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @addtogroup photo_c
|
||||
@{
|
||||
*/
|
||||
|
||||
/* Inpainting algorithms */
|
||||
enum InpaintingModes
|
||||
{
|
||||
CV_INPAINT_NS =0,
|
||||
CV_INPAINT_TELEA =1
|
||||
};
|
||||
|
||||
|
||||
/* Inpaints the selected region in the image */
|
||||
CVAPI(void) cvInpaint( const CvArr* src, const CvArr* inpaint_mask,
|
||||
CvArr* dst, double inpaintRange, int flags );
|
||||
|
||||
/** @} */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} //extern "C"
|
||||
#endif
|
||||
|
||||
#endif //OPENCV_PHOTO_C_H
|
||||
@@ -1,57 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2012, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_SHAPE_HPP
|
||||
#define OPENCV_SHAPE_HPP
|
||||
|
||||
#include "opencv2/shape/emdL1.hpp"
|
||||
#include "opencv2/shape/shape_transformer.hpp"
|
||||
#include "opencv2/shape/hist_cost.hpp"
|
||||
#include "opencv2/shape/shape_distance.hpp"
|
||||
|
||||
/**
|
||||
@defgroup shape Shape Distance and Matching
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
/* End of file. */
|
||||
@@ -1,72 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2012, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_EMD_L1_HPP
|
||||
#define OPENCV_EMD_L1_HPP
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
/****************************************************************************************\
|
||||
* EMDL1 Function *
|
||||
\****************************************************************************************/
|
||||
|
||||
//! @addtogroup shape
|
||||
//! @{
|
||||
|
||||
/** @brief Computes the "minimal work" distance between two weighted point configurations base on the papers
|
||||
"EMD-L1: An efficient and Robust Algorithm for comparing histogram-based descriptors", by Haibin
|
||||
Ling and Kazunori Okuda; and "The Earth Mover's Distance is the Mallows Distance: Some Insights from
|
||||
Statistics", by Elizaveta Levina and Peter Bickel.
|
||||
|
||||
@param signature1 First signature, a single column floating-point matrix. Each row is the value of
|
||||
the histogram in each bin.
|
||||
@param signature2 Second signature of the same format and size as signature1.
|
||||
*/
|
||||
CV_EXPORTS float EMDL1(InputArray signature1, InputArray signature2);
|
||||
|
||||
//! @}
|
||||
|
||||
}//namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,111 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_HIST_COST_HPP
|
||||
#define OPENCV_HIST_COST_HPP
|
||||
|
||||
#include "opencv2/imgproc.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
//! @addtogroup shape
|
||||
//! @{
|
||||
|
||||
/** @brief Abstract base class for histogram cost algorithms.
|
||||
*/
|
||||
class CV_EXPORTS_W HistogramCostExtractor : public Algorithm
|
||||
{
|
||||
public:
|
||||
CV_WRAP virtual void buildCostMatrix(InputArray descriptors1, InputArray descriptors2, OutputArray costMatrix) = 0;
|
||||
|
||||
CV_WRAP virtual void setNDummies(int nDummies) = 0;
|
||||
CV_WRAP virtual int getNDummies() const = 0;
|
||||
|
||||
CV_WRAP virtual void setDefaultCost(float defaultCost) = 0;
|
||||
CV_WRAP virtual float getDefaultCost() const = 0;
|
||||
};
|
||||
|
||||
/** @brief A norm based cost extraction. :
|
||||
*/
|
||||
class CV_EXPORTS_W NormHistogramCostExtractor : public HistogramCostExtractor
|
||||
{
|
||||
public:
|
||||
CV_WRAP virtual void setNormFlag(int flag) = 0;
|
||||
CV_WRAP virtual int getNormFlag() const = 0;
|
||||
};
|
||||
|
||||
CV_EXPORTS_W Ptr<HistogramCostExtractor>
|
||||
createNormHistogramCostExtractor(int flag=DIST_L2, int nDummies=25, float defaultCost=0.2f);
|
||||
|
||||
/** @brief An EMD based cost extraction. :
|
||||
*/
|
||||
class CV_EXPORTS_W EMDHistogramCostExtractor : public HistogramCostExtractor
|
||||
{
|
||||
public:
|
||||
CV_WRAP virtual void setNormFlag(int flag) = 0;
|
||||
CV_WRAP virtual int getNormFlag() const = 0;
|
||||
};
|
||||
|
||||
CV_EXPORTS_W Ptr<HistogramCostExtractor>
|
||||
createEMDHistogramCostExtractor(int flag=DIST_L2, int nDummies=25, float defaultCost=0.2f);
|
||||
|
||||
/** @brief An Chi based cost extraction. :
|
||||
*/
|
||||
class CV_EXPORTS_W ChiHistogramCostExtractor : public HistogramCostExtractor
|
||||
{};
|
||||
|
||||
CV_EXPORTS_W Ptr<HistogramCostExtractor> createChiHistogramCostExtractor(int nDummies=25, float defaultCost=0.2f);
|
||||
|
||||
/** @brief An EMD-L1 based cost extraction. :
|
||||
*/
|
||||
class CV_EXPORTS_W EMDL1HistogramCostExtractor : public HistogramCostExtractor
|
||||
{};
|
||||
|
||||
CV_EXPORTS_W Ptr<HistogramCostExtractor>
|
||||
createEMDL1HistogramCostExtractor(int nDummies=25, float defaultCost=0.2f);
|
||||
|
||||
//! @}
|
||||
|
||||
} // cv
|
||||
#endif
|
||||
@@ -1,48 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifdef __OPENCV_BUILD
|
||||
#error this is a compatibility header which should not be used inside the OpenCV library
|
||||
#endif
|
||||
|
||||
#include "opencv2/shape.hpp"
|
||||
@@ -1,227 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_SHAPE_SHAPE_DISTANCE_HPP
|
||||
#define OPENCV_SHAPE_SHAPE_DISTANCE_HPP
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/shape/hist_cost.hpp"
|
||||
#include "opencv2/shape/shape_transformer.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
//! @addtogroup shape
|
||||
//! @{
|
||||
|
||||
/** @example samples/cpp/shape_example.cpp
|
||||
An example using shape distance algorithm
|
||||
*/
|
||||
/** @brief Abstract base class for shape distance algorithms.
|
||||
*/
|
||||
class CV_EXPORTS_W ShapeDistanceExtractor : public Algorithm
|
||||
{
|
||||
public:
|
||||
/** @brief Compute the shape distance between two shapes defined by its contours.
|
||||
|
||||
@param contour1 Contour defining first shape.
|
||||
@param contour2 Contour defining second shape.
|
||||
*/
|
||||
CV_WRAP virtual float computeDistance(InputArray contour1, InputArray contour2) = 0;
|
||||
};
|
||||
|
||||
/***********************************************************************************/
|
||||
/***********************************************************************************/
|
||||
/***********************************************************************************/
|
||||
/** @brief Implementation of the Shape Context descriptor and matching algorithm
|
||||
|
||||
proposed by Belongie et al. in "Shape Matching and Object Recognition Using Shape Contexts" (PAMI
|
||||
2002). This implementation is packaged in a generic scheme, in order to allow you the
|
||||
implementation of the common variations of the original pipeline.
|
||||
*/
|
||||
class CV_EXPORTS_W ShapeContextDistanceExtractor : public ShapeDistanceExtractor
|
||||
{
|
||||
public:
|
||||
/** @brief Establish the number of angular bins for the Shape Context Descriptor used in the shape matching
|
||||
pipeline.
|
||||
|
||||
@param nAngularBins The number of angular bins in the shape context descriptor.
|
||||
*/
|
||||
CV_WRAP virtual void setAngularBins(int nAngularBins) = 0;
|
||||
CV_WRAP virtual int getAngularBins() const = 0;
|
||||
|
||||
/** @brief Establish the number of radial bins for the Shape Context Descriptor used in the shape matching
|
||||
pipeline.
|
||||
|
||||
@param nRadialBins The number of radial bins in the shape context descriptor.
|
||||
*/
|
||||
CV_WRAP virtual void setRadialBins(int nRadialBins) = 0;
|
||||
CV_WRAP virtual int getRadialBins() const = 0;
|
||||
|
||||
/** @brief Set the inner radius of the shape context descriptor.
|
||||
|
||||
@param innerRadius The value of the inner radius.
|
||||
*/
|
||||
CV_WRAP virtual void setInnerRadius(float innerRadius) = 0;
|
||||
CV_WRAP virtual float getInnerRadius() const = 0;
|
||||
|
||||
/** @brief Set the outer radius of the shape context descriptor.
|
||||
|
||||
@param outerRadius The value of the outer radius.
|
||||
*/
|
||||
CV_WRAP virtual void setOuterRadius(float outerRadius) = 0;
|
||||
CV_WRAP virtual float getOuterRadius() const = 0;
|
||||
|
||||
CV_WRAP virtual void setRotationInvariant(bool rotationInvariant) = 0;
|
||||
CV_WRAP virtual bool getRotationInvariant() const = 0;
|
||||
|
||||
/** @brief Set the weight of the shape context distance in the final value of the shape distance. The shape
|
||||
context distance between two shapes is defined as the symmetric sum of shape context matching costs
|
||||
over best matching points. The final value of the shape distance is a user-defined linear
|
||||
combination of the shape context distance, an image appearance distance, and a bending energy.
|
||||
|
||||
@param shapeContextWeight The weight of the shape context distance in the final distance value.
|
||||
*/
|
||||
CV_WRAP virtual void setShapeContextWeight(float shapeContextWeight) = 0;
|
||||
CV_WRAP virtual float getShapeContextWeight() const = 0;
|
||||
|
||||
/** @brief Set the weight of the Image Appearance cost in the final value of the shape distance. The image
|
||||
appearance cost is defined as the sum of squared brightness differences in Gaussian windows around
|
||||
corresponding image points. The final value of the shape distance is a user-defined linear
|
||||
combination of the shape context distance, an image appearance distance, and a bending energy. If
|
||||
this value is set to a number different from 0, is mandatory to set the images that correspond to
|
||||
each shape.
|
||||
|
||||
@param imageAppearanceWeight The weight of the appearance cost in the final distance value.
|
||||
*/
|
||||
CV_WRAP virtual void setImageAppearanceWeight(float imageAppearanceWeight) = 0;
|
||||
CV_WRAP virtual float getImageAppearanceWeight() const = 0;
|
||||
|
||||
/** @brief Set the weight of the Bending Energy in the final value of the shape distance. The bending energy
|
||||
definition depends on what transformation is being used to align the shapes. The final value of the
|
||||
shape distance is a user-defined linear combination of the shape context distance, an image
|
||||
appearance distance, and a bending energy.
|
||||
|
||||
@param bendingEnergyWeight The weight of the Bending Energy in the final distance value.
|
||||
*/
|
||||
CV_WRAP virtual void setBendingEnergyWeight(float bendingEnergyWeight) = 0;
|
||||
CV_WRAP virtual float getBendingEnergyWeight() const = 0;
|
||||
|
||||
/** @brief Set the images that correspond to each shape. This images are used in the calculation of the Image
|
||||
Appearance cost.
|
||||
|
||||
@param image1 Image corresponding to the shape defined by contours1.
|
||||
@param image2 Image corresponding to the shape defined by contours2.
|
||||
*/
|
||||
CV_WRAP virtual void setImages(InputArray image1, InputArray image2) = 0;
|
||||
CV_WRAP virtual void getImages(OutputArray image1, OutputArray image2) const = 0;
|
||||
|
||||
CV_WRAP virtual void setIterations(int iterations) = 0;
|
||||
CV_WRAP virtual int getIterations() const = 0;
|
||||
|
||||
/** @brief Set the algorithm used for building the shape context descriptor cost matrix.
|
||||
|
||||
@param comparer Smart pointer to a HistogramCostExtractor, an algorithm that defines the cost
|
||||
matrix between descriptors.
|
||||
*/
|
||||
CV_WRAP virtual void setCostExtractor(Ptr<HistogramCostExtractor> comparer) = 0;
|
||||
CV_WRAP virtual Ptr<HistogramCostExtractor> getCostExtractor() const = 0;
|
||||
|
||||
/** @brief Set the value of the standard deviation for the Gaussian window for the image appearance cost.
|
||||
|
||||
@param sigma Standard Deviation.
|
||||
*/
|
||||
CV_WRAP virtual void setStdDev(float sigma) = 0;
|
||||
CV_WRAP virtual float getStdDev() const = 0;
|
||||
|
||||
/** @brief Set the algorithm used for aligning the shapes.
|
||||
|
||||
@param transformer Smart pointer to a ShapeTransformer, an algorithm that defines the aligning
|
||||
transformation.
|
||||
*/
|
||||
CV_WRAP virtual void setTransformAlgorithm(Ptr<ShapeTransformer> transformer) = 0;
|
||||
CV_WRAP virtual Ptr<ShapeTransformer> getTransformAlgorithm() const = 0;
|
||||
};
|
||||
|
||||
/* Complete constructor */
|
||||
CV_EXPORTS_W Ptr<ShapeContextDistanceExtractor>
|
||||
createShapeContextDistanceExtractor(int nAngularBins=12, int nRadialBins=4,
|
||||
float innerRadius=0.2f, float outerRadius=2, int iterations=3,
|
||||
const Ptr<HistogramCostExtractor> &comparer = createChiHistogramCostExtractor(),
|
||||
const Ptr<ShapeTransformer> &transformer = createThinPlateSplineShapeTransformer());
|
||||
|
||||
/***********************************************************************************/
|
||||
/***********************************************************************************/
|
||||
/***********************************************************************************/
|
||||
/** @brief A simple Hausdorff distance measure between shapes defined by contours
|
||||
|
||||
according to the paper "Comparing Images using the Hausdorff distance." by D.P. Huttenlocher, G.A.
|
||||
Klanderman, and W.J. Rucklidge. (PAMI 1993). :
|
||||
*/
|
||||
class CV_EXPORTS_W HausdorffDistanceExtractor : public ShapeDistanceExtractor
|
||||
{
|
||||
public:
|
||||
/** @brief Set the norm used to compute the Hausdorff value between two shapes. It can be L1 or L2 norm.
|
||||
|
||||
@param distanceFlag Flag indicating which norm is used to compute the Hausdorff distance
|
||||
(NORM_L1, NORM_L2).
|
||||
*/
|
||||
CV_WRAP virtual void setDistanceFlag(int distanceFlag) = 0;
|
||||
CV_WRAP virtual int getDistanceFlag() const = 0;
|
||||
|
||||
/** @brief This method sets the rank proportion (or fractional value) that establish the Kth ranked value of
|
||||
the partial Hausdorff distance. Experimentally had been shown that 0.6 is a good value to compare
|
||||
shapes.
|
||||
|
||||
@param rankProportion fractional value (between 0 and 1).
|
||||
*/
|
||||
CV_WRAP virtual void setRankProportion(float rankProportion) = 0;
|
||||
CV_WRAP virtual float getRankProportion() const = 0;
|
||||
};
|
||||
|
||||
/* Constructor */
|
||||
CV_EXPORTS_W Ptr<HausdorffDistanceExtractor> createHausdorffDistanceExtractor(int distanceFlag=cv::NORM_L2, float rankProp=0.6f);
|
||||
|
||||
//! @}
|
||||
|
||||
} // cv
|
||||
#endif
|
||||
@@ -1,132 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_SHAPE_SHAPE_TRANSFORM_HPP
|
||||
#define OPENCV_SHAPE_SHAPE_TRANSFORM_HPP
|
||||
#include <vector>
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
|
||||
//! @addtogroup shape
|
||||
//! @{
|
||||
|
||||
/** @brief Abstract base class for shape transformation algorithms.
|
||||
*/
|
||||
class CV_EXPORTS_W ShapeTransformer : public Algorithm
|
||||
{
|
||||
public:
|
||||
/** @brief Estimate the transformation parameters of the current transformer algorithm, based on point matches.
|
||||
|
||||
@param transformingShape Contour defining first shape.
|
||||
@param targetShape Contour defining second shape (Target).
|
||||
@param matches Standard vector of Matches between points.
|
||||
*/
|
||||
CV_WRAP virtual void estimateTransformation(InputArray transformingShape, InputArray targetShape,
|
||||
std::vector<DMatch>& matches) = 0;
|
||||
|
||||
/** @brief Apply a transformation, given a pre-estimated transformation parameters.
|
||||
|
||||
@param input Contour (set of points) to apply the transformation.
|
||||
@param output Output contour.
|
||||
*/
|
||||
CV_WRAP virtual float applyTransformation(InputArray input, OutputArray output=noArray()) = 0;
|
||||
|
||||
/** @brief Apply a transformation, given a pre-estimated transformation parameters, to an Image.
|
||||
|
||||
@param transformingImage Input image.
|
||||
@param output Output image.
|
||||
@param flags Image interpolation method.
|
||||
@param borderMode border style.
|
||||
@param borderValue border value.
|
||||
*/
|
||||
CV_WRAP virtual void warpImage(InputArray transformingImage, OutputArray output,
|
||||
int flags=INTER_LINEAR, int borderMode=BORDER_CONSTANT,
|
||||
const Scalar& borderValue=Scalar()) const = 0;
|
||||
};
|
||||
|
||||
/***********************************************************************************/
|
||||
/***********************************************************************************/
|
||||
|
||||
/** @brief Definition of the transformation
|
||||
|
||||
occupied in the paper "Principal Warps: Thin-Plate Splines and Decomposition of Deformations", by
|
||||
F.L. Bookstein (PAMI 1989). :
|
||||
*/
|
||||
class CV_EXPORTS_W ThinPlateSplineShapeTransformer : public ShapeTransformer
|
||||
{
|
||||
public:
|
||||
/** @brief Set the regularization parameter for relaxing the exact interpolation requirements of the TPS
|
||||
algorithm.
|
||||
|
||||
@param beta value of the regularization parameter.
|
||||
*/
|
||||
CV_WRAP virtual void setRegularizationParameter(double beta) = 0;
|
||||
CV_WRAP virtual double getRegularizationParameter() const = 0;
|
||||
};
|
||||
|
||||
/** Complete constructor */
|
||||
CV_EXPORTS_W Ptr<ThinPlateSplineShapeTransformer>
|
||||
createThinPlateSplineShapeTransformer(double regularizationParameter=0);
|
||||
|
||||
/***********************************************************************************/
|
||||
/***********************************************************************************/
|
||||
|
||||
/** @brief Wrapper class for the OpenCV Affine Transformation algorithm. :
|
||||
*/
|
||||
class CV_EXPORTS_W AffineTransformer : public ShapeTransformer
|
||||
{
|
||||
public:
|
||||
CV_WRAP virtual void setFullAffine(bool fullAffine) = 0;
|
||||
CV_WRAP virtual bool getFullAffine() const = 0;
|
||||
};
|
||||
|
||||
/** Complete constructor */
|
||||
CV_EXPORTS_W Ptr<AffineTransformer> createAffineTransformer(bool fullAffine);
|
||||
|
||||
//! @}
|
||||
|
||||
} // cv
|
||||
#endif
|
||||
@@ -1,136 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_STITCHING_EXPOSURE_COMPENSATE_HPP
|
||||
#define OPENCV_STITCHING_EXPOSURE_COMPENSATE_HPP
|
||||
|
||||
#if defined(NO)
|
||||
# warning Detected Apple 'NO' macro definition, it can cause build conflicts. Please, include this header before any Apple headers.
|
||||
#endif
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
|
||||
namespace cv {
|
||||
namespace detail {
|
||||
|
||||
//! @addtogroup stitching_exposure
|
||||
//! @{
|
||||
|
||||
/** @brief Base class for all exposure compensators.
|
||||
*/
|
||||
class CV_EXPORTS ExposureCompensator
|
||||
{
|
||||
public:
|
||||
virtual ~ExposureCompensator() {}
|
||||
|
||||
enum { NO, GAIN, GAIN_BLOCKS };
|
||||
static Ptr<ExposureCompensator> createDefault(int type);
|
||||
|
||||
/**
|
||||
@param corners Source image top-left corners
|
||||
@param images Source images
|
||||
@param masks Image masks to update (second value in pair specifies the value which should be used
|
||||
to detect where image is)
|
||||
*/
|
||||
void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,
|
||||
const std::vector<UMat> &masks);
|
||||
/** @overload */
|
||||
virtual void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,
|
||||
const std::vector<std::pair<UMat,uchar> > &masks) = 0;
|
||||
/** @brief Compensate exposure in the specified image.
|
||||
|
||||
@param index Image index
|
||||
@param corner Image top-left corner
|
||||
@param image Image to process
|
||||
@param mask Image mask
|
||||
*/
|
||||
virtual void apply(int index, Point corner, InputOutputArray image, InputArray mask) = 0;
|
||||
};
|
||||
|
||||
/** @brief Stub exposure compensator which does nothing.
|
||||
*/
|
||||
class CV_EXPORTS NoExposureCompensator : public ExposureCompensator
|
||||
{
|
||||
public:
|
||||
void feed(const std::vector<Point> &/*corners*/, const std::vector<UMat> &/*images*/,
|
||||
const std::vector<std::pair<UMat,uchar> > &/*masks*/) CV_OVERRIDE { }
|
||||
void apply(int /*index*/, Point /*corner*/, InputOutputArray /*image*/, InputArray /*mask*/) CV_OVERRIDE { }
|
||||
};
|
||||
|
||||
/** @brief Exposure compensator which tries to remove exposure related artifacts by adjusting image
|
||||
intensities, see @cite BL07 and @cite WJ10 for details.
|
||||
*/
|
||||
class CV_EXPORTS GainCompensator : public ExposureCompensator
|
||||
{
|
||||
public:
|
||||
void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,
|
||||
const std::vector<std::pair<UMat,uchar> > &masks) CV_OVERRIDE;
|
||||
void apply(int index, Point corner, InputOutputArray image, InputArray mask) CV_OVERRIDE;
|
||||
std::vector<double> gains() const;
|
||||
|
||||
private:
|
||||
Mat_<double> gains_;
|
||||
};
|
||||
|
||||
/** @brief Exposure compensator which tries to remove exposure related artifacts by adjusting image block
|
||||
intensities, see @cite UES01 for details.
|
||||
*/
|
||||
class CV_EXPORTS BlocksGainCompensator : public ExposureCompensator
|
||||
{
|
||||
public:
|
||||
BlocksGainCompensator(int bl_width = 32, int bl_height = 32)
|
||||
: bl_width_(bl_width), bl_height_(bl_height) {}
|
||||
void feed(const std::vector<Point> &corners, const std::vector<UMat> &images,
|
||||
const std::vector<std::pair<UMat,uchar> > &masks) CV_OVERRIDE;
|
||||
void apply(int index, Point corner, InputOutputArray image, InputArray mask) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
int bl_width_, bl_height_;
|
||||
std::vector<UMat> gain_maps_;
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace detail
|
||||
} // namespace cv
|
||||
|
||||
#endif // OPENCV_STITCHING_EXPOSURE_COMPENSATE_HPP
|
||||
@@ -1,207 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_SUPERRES_HPP
|
||||
#define OPENCV_SUPERRES_HPP
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/superres/optical_flow.hpp"
|
||||
|
||||
/**
|
||||
@defgroup superres Super Resolution
|
||||
|
||||
The Super Resolution module contains a set of functions and classes that can be used to solve the
|
||||
problem of resolution enhancement. There are a few methods implemented, most of them are described in
|
||||
the papers @cite Farsiu03 and @cite Mitzel09 .
|
||||
|
||||
*/
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace superres
|
||||
{
|
||||
|
||||
//! @addtogroup superres
|
||||
//! @{
|
||||
|
||||
class CV_EXPORTS FrameSource
|
||||
{
|
||||
public:
|
||||
virtual ~FrameSource();
|
||||
|
||||
virtual void nextFrame(OutputArray frame) = 0;
|
||||
virtual void reset() = 0;
|
||||
};
|
||||
|
||||
CV_EXPORTS Ptr<FrameSource> createFrameSource_Empty();
|
||||
|
||||
CV_EXPORTS Ptr<FrameSource> createFrameSource_Video(const String& fileName);
|
||||
CV_EXPORTS Ptr<FrameSource> createFrameSource_Video_CUDA(const String& fileName);
|
||||
|
||||
CV_EXPORTS Ptr<FrameSource> createFrameSource_Camera(int deviceId = 0);
|
||||
|
||||
/** @brief Base class for Super Resolution algorithms.
|
||||
|
||||
The class is only used to define the common interface for the whole family of Super Resolution
|
||||
algorithms.
|
||||
*/
|
||||
class CV_EXPORTS SuperResolution : public cv::Algorithm, public FrameSource
|
||||
{
|
||||
public:
|
||||
/** @brief Set input frame source for Super Resolution algorithm.
|
||||
|
||||
@param frameSource Input frame source
|
||||
*/
|
||||
void setInput(const Ptr<FrameSource>& frameSource);
|
||||
|
||||
/** @brief Process next frame from input and return output result.
|
||||
|
||||
@param frame Output result
|
||||
*/
|
||||
void nextFrame(OutputArray frame) CV_OVERRIDE;
|
||||
void reset() CV_OVERRIDE;
|
||||
|
||||
/** @brief Clear all inner buffers.
|
||||
*/
|
||||
virtual void collectGarbage();
|
||||
|
||||
//! @brief Scale factor
|
||||
/** @see setScale */
|
||||
virtual int getScale() const = 0;
|
||||
/** @copybrief getScale @see getScale */
|
||||
virtual void setScale(int val) = 0;
|
||||
|
||||
//! @brief Iterations count
|
||||
/** @see setIterations */
|
||||
virtual int getIterations() const = 0;
|
||||
/** @copybrief getIterations @see getIterations */
|
||||
virtual void setIterations(int val) = 0;
|
||||
|
||||
//! @brief Asymptotic value of steepest descent method
|
||||
/** @see setTau */
|
||||
virtual double getTau() const = 0;
|
||||
/** @copybrief getTau @see getTau */
|
||||
virtual void setTau(double val) = 0;
|
||||
|
||||
//! @brief Weight parameter to balance data term and smoothness term
|
||||
/** @see setLabmda */
|
||||
virtual double getLabmda() const = 0;
|
||||
/** @copybrief getLabmda @see getLabmda */
|
||||
virtual void setLabmda(double val) = 0;
|
||||
|
||||
//! @brief Parameter of spacial distribution in Bilateral-TV
|
||||
/** @see setAlpha */
|
||||
virtual double getAlpha() const = 0;
|
||||
/** @copybrief getAlpha @see getAlpha */
|
||||
virtual void setAlpha(double val) = 0;
|
||||
|
||||
//! @brief Kernel size of Bilateral-TV filter
|
||||
/** @see setKernelSize */
|
||||
virtual int getKernelSize() const = 0;
|
||||
/** @copybrief getKernelSize @see getKernelSize */
|
||||
virtual void setKernelSize(int val) = 0;
|
||||
|
||||
//! @brief Gaussian blur kernel size
|
||||
/** @see setBlurKernelSize */
|
||||
virtual int getBlurKernelSize() const = 0;
|
||||
/** @copybrief getBlurKernelSize @see getBlurKernelSize */
|
||||
virtual void setBlurKernelSize(int val) = 0;
|
||||
|
||||
//! @brief Gaussian blur sigma
|
||||
/** @see setBlurSigma */
|
||||
virtual double getBlurSigma() const = 0;
|
||||
/** @copybrief getBlurSigma @see getBlurSigma */
|
||||
virtual void setBlurSigma(double val) = 0;
|
||||
|
||||
//! @brief Radius of the temporal search area
|
||||
/** @see setTemporalAreaRadius */
|
||||
virtual int getTemporalAreaRadius() const = 0;
|
||||
/** @copybrief getTemporalAreaRadius @see getTemporalAreaRadius */
|
||||
virtual void setTemporalAreaRadius(int val) = 0;
|
||||
|
||||
//! @brief Dense optical flow algorithm
|
||||
/** @see setOpticalFlow */
|
||||
virtual Ptr<cv::superres::DenseOpticalFlowExt> getOpticalFlow() const = 0;
|
||||
/** @copybrief getOpticalFlow @see getOpticalFlow */
|
||||
virtual void setOpticalFlow(const Ptr<cv::superres::DenseOpticalFlowExt> &val) = 0;
|
||||
|
||||
protected:
|
||||
SuperResolution();
|
||||
|
||||
virtual void initImpl(Ptr<FrameSource>& frameSource) = 0;
|
||||
virtual void processImpl(Ptr<FrameSource>& frameSource, OutputArray output) = 0;
|
||||
|
||||
bool isUmat_;
|
||||
|
||||
private:
|
||||
Ptr<FrameSource> frameSource_;
|
||||
bool firstCall_;
|
||||
};
|
||||
|
||||
/** @brief Create Bilateral TV-L1 Super Resolution.
|
||||
|
||||
This class implements Super Resolution algorithm described in the papers @cite Farsiu03 and
|
||||
@cite Mitzel09 .
|
||||
|
||||
Here are important members of the class that control the algorithm, which you can set after
|
||||
constructing the class instance:
|
||||
|
||||
- **int scale** Scale factor.
|
||||
- **int iterations** Iteration count.
|
||||
- **double tau** Asymptotic value of steepest descent method.
|
||||
- **double lambda** Weight parameter to balance data term and smoothness term.
|
||||
- **double alpha** Parameter of spacial distribution in Bilateral-TV.
|
||||
- **int btvKernelSize** Kernel size of Bilateral-TV filter.
|
||||
- **int blurKernelSize** Gaussian blur kernel size.
|
||||
- **double blurSigma** Gaussian blur sigma.
|
||||
- **int temporalAreaRadius** Radius of the temporal search area.
|
||||
- **Ptr\<DenseOpticalFlowExt\> opticalFlow** Dense optical flow algorithm.
|
||||
*/
|
||||
CV_EXPORTS Ptr<SuperResolution> createSuperResolution_BTVL1();
|
||||
CV_EXPORTS Ptr<SuperResolution> createSuperResolution_BTVL1_CUDA();
|
||||
|
||||
//! @} superres
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OPENCV_SUPERRES_HPP
|
||||
@@ -1,203 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_SUPERRES_OPTICAL_FLOW_HPP
|
||||
#define OPENCV_SUPERRES_OPTICAL_FLOW_HPP
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace superres
|
||||
{
|
||||
|
||||
//! @addtogroup superres
|
||||
//! @{
|
||||
|
||||
class CV_EXPORTS DenseOpticalFlowExt : public cv::Algorithm
|
||||
{
|
||||
public:
|
||||
virtual void calc(InputArray frame0, InputArray frame1, OutputArray flow1, OutputArray flow2 = noArray()) = 0;
|
||||
virtual void collectGarbage() = 0;
|
||||
};
|
||||
|
||||
|
||||
class CV_EXPORTS FarnebackOpticalFlow : public virtual DenseOpticalFlowExt
|
||||
{
|
||||
public:
|
||||
/** @see setPyrScale */
|
||||
virtual double getPyrScale() const = 0;
|
||||
/** @copybrief getPyrScale @see getPyrScale */
|
||||
virtual void setPyrScale(double val) = 0;
|
||||
/** @see setLevelsNumber */
|
||||
virtual int getLevelsNumber() const = 0;
|
||||
/** @copybrief getLevelsNumber @see getLevelsNumber */
|
||||
virtual void setLevelsNumber(int val) = 0;
|
||||
/** @see setWindowSize */
|
||||
virtual int getWindowSize() const = 0;
|
||||
/** @copybrief getWindowSize @see getWindowSize */
|
||||
virtual void setWindowSize(int val) = 0;
|
||||
/** @see setIterations */
|
||||
virtual int getIterations() const = 0;
|
||||
/** @copybrief getIterations @see getIterations */
|
||||
virtual void setIterations(int val) = 0;
|
||||
/** @see setPolyN */
|
||||
virtual int getPolyN() const = 0;
|
||||
/** @copybrief getPolyN @see getPolyN */
|
||||
virtual void setPolyN(int val) = 0;
|
||||
/** @see setPolySigma */
|
||||
virtual double getPolySigma() const = 0;
|
||||
/** @copybrief getPolySigma @see getPolySigma */
|
||||
virtual void setPolySigma(double val) = 0;
|
||||
/** @see setFlags */
|
||||
virtual int getFlags() const = 0;
|
||||
/** @copybrief getFlags @see getFlags */
|
||||
virtual void setFlags(int val) = 0;
|
||||
};
|
||||
CV_EXPORTS Ptr<FarnebackOpticalFlow> createOptFlow_Farneback();
|
||||
CV_EXPORTS Ptr<FarnebackOpticalFlow> createOptFlow_Farneback_CUDA();
|
||||
|
||||
|
||||
// CV_EXPORTS Ptr<DenseOpticalFlowExt> createOptFlow_Simple();
|
||||
|
||||
|
||||
class CV_EXPORTS DualTVL1OpticalFlow : public virtual DenseOpticalFlowExt
|
||||
{
|
||||
public:
|
||||
/** @see setTau */
|
||||
virtual double getTau() const = 0;
|
||||
/** @copybrief getTau @see getTau */
|
||||
virtual void setTau(double val) = 0;
|
||||
/** @see setLambda */
|
||||
virtual double getLambda() const = 0;
|
||||
/** @copybrief getLambda @see getLambda */
|
||||
virtual void setLambda(double val) = 0;
|
||||
/** @see setTheta */
|
||||
virtual double getTheta() const = 0;
|
||||
/** @copybrief getTheta @see getTheta */
|
||||
virtual void setTheta(double val) = 0;
|
||||
/** @see setScalesNumber */
|
||||
virtual int getScalesNumber() const = 0;
|
||||
/** @copybrief getScalesNumber @see getScalesNumber */
|
||||
virtual void setScalesNumber(int val) = 0;
|
||||
/** @see setWarpingsNumber */
|
||||
virtual int getWarpingsNumber() const = 0;
|
||||
/** @copybrief getWarpingsNumber @see getWarpingsNumber */
|
||||
virtual void setWarpingsNumber(int val) = 0;
|
||||
/** @see setEpsilon */
|
||||
virtual double getEpsilon() const = 0;
|
||||
/** @copybrief getEpsilon @see getEpsilon */
|
||||
virtual void setEpsilon(double val) = 0;
|
||||
/** @see setIterations */
|
||||
virtual int getIterations() const = 0;
|
||||
/** @copybrief getIterations @see getIterations */
|
||||
virtual void setIterations(int val) = 0;
|
||||
/** @see setUseInitialFlow */
|
||||
virtual bool getUseInitialFlow() const = 0;
|
||||
/** @copybrief getUseInitialFlow @see getUseInitialFlow */
|
||||
virtual void setUseInitialFlow(bool val) = 0;
|
||||
};
|
||||
CV_EXPORTS Ptr<DualTVL1OpticalFlow> createOptFlow_DualTVL1();
|
||||
CV_EXPORTS Ptr<DualTVL1OpticalFlow> createOptFlow_DualTVL1_CUDA();
|
||||
|
||||
|
||||
class CV_EXPORTS BroxOpticalFlow : public virtual DenseOpticalFlowExt
|
||||
{
|
||||
public:
|
||||
//! @brief Flow smoothness
|
||||
/** @see setAlpha */
|
||||
virtual double getAlpha() const = 0;
|
||||
/** @copybrief getAlpha @see getAlpha */
|
||||
virtual void setAlpha(double val) = 0;
|
||||
//! @brief Gradient constancy importance
|
||||
/** @see setGamma */
|
||||
virtual double getGamma() const = 0;
|
||||
/** @copybrief getGamma @see getGamma */
|
||||
virtual void setGamma(double val) = 0;
|
||||
//! @brief Pyramid scale factor
|
||||
/** @see setScaleFactor */
|
||||
virtual double getScaleFactor() const = 0;
|
||||
/** @copybrief getScaleFactor @see getScaleFactor */
|
||||
virtual void setScaleFactor(double val) = 0;
|
||||
//! @brief Number of lagged non-linearity iterations (inner loop)
|
||||
/** @see setInnerIterations */
|
||||
virtual int getInnerIterations() const = 0;
|
||||
/** @copybrief getInnerIterations @see getInnerIterations */
|
||||
virtual void setInnerIterations(int val) = 0;
|
||||
//! @brief Number of warping iterations (number of pyramid levels)
|
||||
/** @see setOuterIterations */
|
||||
virtual int getOuterIterations() const = 0;
|
||||
/** @copybrief getOuterIterations @see getOuterIterations */
|
||||
virtual void setOuterIterations(int val) = 0;
|
||||
//! @brief Number of linear system solver iterations
|
||||
/** @see setSolverIterations */
|
||||
virtual int getSolverIterations() const = 0;
|
||||
/** @copybrief getSolverIterations @see getSolverIterations */
|
||||
virtual void setSolverIterations(int val) = 0;
|
||||
};
|
||||
CV_EXPORTS Ptr<BroxOpticalFlow> createOptFlow_Brox_CUDA();
|
||||
|
||||
|
||||
class PyrLKOpticalFlow : public virtual DenseOpticalFlowExt
|
||||
{
|
||||
public:
|
||||
/** @see setWindowSize */
|
||||
virtual int getWindowSize() const = 0;
|
||||
/** @copybrief getWindowSize @see getWindowSize */
|
||||
virtual void setWindowSize(int val) = 0;
|
||||
/** @see setMaxLevel */
|
||||
virtual int getMaxLevel() const = 0;
|
||||
/** @copybrief getMaxLevel @see getMaxLevel */
|
||||
virtual void setMaxLevel(int val) = 0;
|
||||
/** @see setIterations */
|
||||
virtual int getIterations() const = 0;
|
||||
/** @copybrief getIterations @see getIterations */
|
||||
virtual void setIterations(int val) = 0;
|
||||
};
|
||||
CV_EXPORTS Ptr<PyrLKOpticalFlow> createOptFlow_PyrLK_CUDA();
|
||||
|
||||
//! @}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // OPENCV_SUPERRES_OPTICAL_FLOW_HPP
|
||||
@@ -1,232 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_TRACKING_C_H
|
||||
#define OPENCV_TRACKING_C_H
|
||||
|
||||
#include "opencv2/imgproc/types_c.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** @addtogroup video_c
|
||||
@{
|
||||
*/
|
||||
|
||||
/****************************************************************************************\
|
||||
* Motion Analysis *
|
||||
\****************************************************************************************/
|
||||
|
||||
/************************************ optical flow ***************************************/
|
||||
|
||||
#define CV_LKFLOW_PYR_A_READY 1
|
||||
#define CV_LKFLOW_PYR_B_READY 2
|
||||
#define CV_LKFLOW_INITIAL_GUESSES 4
|
||||
#define CV_LKFLOW_GET_MIN_EIGENVALS 8
|
||||
|
||||
/* It is Lucas & Kanade method, modified to use pyramids.
|
||||
Also it does several iterations to get optical flow for
|
||||
every point at every pyramid level.
|
||||
Calculates optical flow between two images for certain set of points (i.e.
|
||||
it is a "sparse" optical flow, which is opposite to the previous 3 methods) */
|
||||
CVAPI(void) cvCalcOpticalFlowPyrLK( const CvArr* prev, const CvArr* curr,
|
||||
CvArr* prev_pyr, CvArr* curr_pyr,
|
||||
const CvPoint2D32f* prev_features,
|
||||
CvPoint2D32f* curr_features,
|
||||
int count,
|
||||
CvSize win_size,
|
||||
int level,
|
||||
char* status,
|
||||
float* track_error,
|
||||
CvTermCriteria criteria,
|
||||
int flags );
|
||||
|
||||
|
||||
/* Modification of a previous sparse optical flow algorithm to calculate
|
||||
affine flow */
|
||||
CVAPI(void) cvCalcAffineFlowPyrLK( const CvArr* prev, const CvArr* curr,
|
||||
CvArr* prev_pyr, CvArr* curr_pyr,
|
||||
const CvPoint2D32f* prev_features,
|
||||
CvPoint2D32f* curr_features,
|
||||
float* matrices, int count,
|
||||
CvSize win_size, int level,
|
||||
char* status, float* track_error,
|
||||
CvTermCriteria criteria, int flags );
|
||||
|
||||
/* Estimate rigid transformation between 2 images or 2 point sets */
|
||||
CVAPI(int) cvEstimateRigidTransform( const CvArr* A, const CvArr* B,
|
||||
CvMat* M, int full_affine );
|
||||
|
||||
/* Estimate optical flow for each pixel using the two-frame G. Farneback algorithm */
|
||||
CVAPI(void) cvCalcOpticalFlowFarneback( const CvArr* prev, const CvArr* next,
|
||||
CvArr* flow, double pyr_scale, int levels,
|
||||
int winsize, int iterations, int poly_n,
|
||||
double poly_sigma, int flags );
|
||||
|
||||
/********************************* motion templates *************************************/
|
||||
|
||||
/****************************************************************************************\
|
||||
* All the motion template functions work only with single channel images. *
|
||||
* Silhouette image must have depth IPL_DEPTH_8U or IPL_DEPTH_8S *
|
||||
* Motion history image must have depth IPL_DEPTH_32F, *
|
||||
* Gradient mask - IPL_DEPTH_8U or IPL_DEPTH_8S, *
|
||||
* Motion orientation image - IPL_DEPTH_32F *
|
||||
* Segmentation mask - IPL_DEPTH_32F *
|
||||
* All the angles are in degrees, all the times are in milliseconds *
|
||||
\****************************************************************************************/
|
||||
|
||||
/* Updates motion history image given motion silhouette */
|
||||
CVAPI(void) cvUpdateMotionHistory( const CvArr* silhouette, CvArr* mhi,
|
||||
double timestamp, double duration );
|
||||
|
||||
/* Calculates gradient of the motion history image and fills
|
||||
a mask indicating where the gradient is valid */
|
||||
CVAPI(void) cvCalcMotionGradient( const CvArr* mhi, CvArr* mask, CvArr* orientation,
|
||||
double delta1, double delta2,
|
||||
int aperture_size CV_DEFAULT(3));
|
||||
|
||||
/* Calculates average motion direction within a selected motion region
|
||||
(region can be selected by setting ROIs and/or by composing a valid gradient mask
|
||||
with the region mask) */
|
||||
CVAPI(double) cvCalcGlobalOrientation( const CvArr* orientation, const CvArr* mask,
|
||||
const CvArr* mhi, double timestamp,
|
||||
double duration );
|
||||
|
||||
/* Splits a motion history image into a few parts corresponding to separate independent motions
|
||||
(e.g. left hand, right hand) */
|
||||
CVAPI(CvSeq*) cvSegmentMotion( const CvArr* mhi, CvArr* seg_mask,
|
||||
CvMemStorage* storage,
|
||||
double timestamp, double seg_thresh );
|
||||
|
||||
/****************************************************************************************\
|
||||
* Tracking *
|
||||
\****************************************************************************************/
|
||||
|
||||
/* Implements CAMSHIFT algorithm - determines object position, size and orientation
|
||||
from the object histogram back project (extension of meanshift) */
|
||||
CVAPI(int) cvCamShift( const CvArr* prob_image, CvRect window,
|
||||
CvTermCriteria criteria, CvConnectedComp* comp,
|
||||
CvBox2D* box CV_DEFAULT(NULL) );
|
||||
|
||||
/* Implements MeanShift algorithm - determines object position
|
||||
from the object histogram back project */
|
||||
CVAPI(int) cvMeanShift( const CvArr* prob_image, CvRect window,
|
||||
CvTermCriteria criteria, CvConnectedComp* comp );
|
||||
|
||||
/*
|
||||
standard Kalman filter (in G. Welch' and G. Bishop's notation):
|
||||
|
||||
x(k)=A*x(k-1)+B*u(k)+w(k) p(w)~N(0,Q)
|
||||
z(k)=H*x(k)+v(k), p(v)~N(0,R)
|
||||
*/
|
||||
typedef struct CvKalman
|
||||
{
|
||||
int MP; /* number of measurement vector dimensions */
|
||||
int DP; /* number of state vector dimensions */
|
||||
int CP; /* number of control vector dimensions */
|
||||
|
||||
/* backward compatibility fields */
|
||||
#if 1
|
||||
float* PosterState; /* =state_pre->data.fl */
|
||||
float* PriorState; /* =state_post->data.fl */
|
||||
float* DynamMatr; /* =transition_matrix->data.fl */
|
||||
float* MeasurementMatr; /* =measurement_matrix->data.fl */
|
||||
float* MNCovariance; /* =measurement_noise_cov->data.fl */
|
||||
float* PNCovariance; /* =process_noise_cov->data.fl */
|
||||
float* KalmGainMatr; /* =gain->data.fl */
|
||||
float* PriorErrorCovariance;/* =error_cov_pre->data.fl */
|
||||
float* PosterErrorCovariance;/* =error_cov_post->data.fl */
|
||||
float* Temp1; /* temp1->data.fl */
|
||||
float* Temp2; /* temp2->data.fl */
|
||||
#endif
|
||||
|
||||
CvMat* state_pre; /* predicted state (x'(k)):
|
||||
x(k)=A*x(k-1)+B*u(k) */
|
||||
CvMat* state_post; /* corrected state (x(k)):
|
||||
x(k)=x'(k)+K(k)*(z(k)-H*x'(k)) */
|
||||
CvMat* transition_matrix; /* state transition matrix (A) */
|
||||
CvMat* control_matrix; /* control matrix (B)
|
||||
(it is not used if there is no control)*/
|
||||
CvMat* measurement_matrix; /* measurement matrix (H) */
|
||||
CvMat* process_noise_cov; /* process noise covariance matrix (Q) */
|
||||
CvMat* measurement_noise_cov; /* measurement noise covariance matrix (R) */
|
||||
CvMat* error_cov_pre; /* priori error estimate covariance matrix (P'(k)):
|
||||
P'(k)=A*P(k-1)*At + Q)*/
|
||||
CvMat* gain; /* Kalman gain matrix (K(k)):
|
||||
K(k)=P'(k)*Ht*inv(H*P'(k)*Ht+R)*/
|
||||
CvMat* error_cov_post; /* posteriori error estimate covariance matrix (P(k)):
|
||||
P(k)=(I-K(k)*H)*P'(k) */
|
||||
CvMat* temp1; /* temporary matrices */
|
||||
CvMat* temp2;
|
||||
CvMat* temp3;
|
||||
CvMat* temp4;
|
||||
CvMat* temp5;
|
||||
} CvKalman;
|
||||
|
||||
/* Creates Kalman filter and sets A, B, Q, R and state to some initial values */
|
||||
CVAPI(CvKalman*) cvCreateKalman( int dynam_params, int measure_params,
|
||||
int control_params CV_DEFAULT(0));
|
||||
|
||||
/* Releases Kalman filter state */
|
||||
CVAPI(void) cvReleaseKalman( CvKalman** kalman);
|
||||
|
||||
/* Updates Kalman filter by time (predicts future state of the system) */
|
||||
CVAPI(const CvMat*) cvKalmanPredict( CvKalman* kalman,
|
||||
const CvMat* control CV_DEFAULT(NULL));
|
||||
|
||||
/* Updates Kalman filter by measurement
|
||||
(corrects state of the system and internal matrices) */
|
||||
CVAPI(const CvMat*) cvKalmanCorrect( CvKalman* kalman, const CvMat* measurement );
|
||||
|
||||
#define cvKalmanUpdateByTime cvKalmanPredict
|
||||
#define cvKalmanUpdateByMeasurement cvKalmanCorrect
|
||||
|
||||
/** @} video_c */
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
|
||||
#endif // OPENCV_TRACKING_C_H
|
||||
@@ -1,81 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_HPP
|
||||
#define OPENCV_VIDEOSTAB_HPP
|
||||
|
||||
/**
|
||||
@defgroup videostab Video Stabilization
|
||||
|
||||
The video stabilization module contains a set of functions and classes that can be used to solve the
|
||||
problem of video stabilization. There are a few methods implemented, most of them are described in
|
||||
the papers @cite OF06 and @cite G11 . However, there are some extensions and deviations from the original
|
||||
paper methods.
|
||||
|
||||
### References
|
||||
|
||||
1. "Full-Frame Video Stabilization with Motion Inpainting"
|
||||
Yasuyuki Matsushita, Eyal Ofek, Weina Ge, Xiaoou Tang, Senior Member, and Heung-Yeung Shum
|
||||
2. "Auto-Directed Video Stabilization with Robust L1 Optimal Camera Paths"
|
||||
Matthias Grundmann, Vivek Kwatra, Irfan Essa
|
||||
|
||||
@{
|
||||
@defgroup videostab_motion Global Motion Estimation
|
||||
|
||||
The video stabilization module contains a set of functions and classes for global motion estimation
|
||||
between point clouds or between images. In the last case features are extracted and matched
|
||||
internally. For the sake of convenience the motion estimation functions are wrapped into classes.
|
||||
Both the functions and the classes are available.
|
||||
|
||||
@defgroup videostab_marching Fast Marching Method
|
||||
|
||||
The Fast Marching Method @cite Telea04 is used in of the video stabilization routines to do motion and
|
||||
color inpainting. The method is implemented is a flexible way and it's made public for other users.
|
||||
|
||||
@}
|
||||
|
||||
*/
|
||||
|
||||
#include "opencv2/videostab/stabilizer.hpp"
|
||||
#include "opencv2/videostab/ring_buffer.hpp"
|
||||
|
||||
#endif
|
||||
@@ -1,116 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_DEBLURRING_HPP
|
||||
#define OPENCV_VIDEOSTAB_DEBLURRING_HPP
|
||||
|
||||
#include <vector>
|
||||
#include "opencv2/core.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab
|
||||
//! @{
|
||||
|
||||
CV_EXPORTS float calcBlurriness(const Mat &frame);
|
||||
|
||||
class CV_EXPORTS DeblurerBase
|
||||
{
|
||||
public:
|
||||
DeblurerBase() : radius_(0), frames_(0), motions_(0), blurrinessRates_(0) {}
|
||||
|
||||
virtual ~DeblurerBase() {}
|
||||
|
||||
virtual void setRadius(int val) { radius_ = val; }
|
||||
virtual int radius() const { return radius_; }
|
||||
|
||||
virtual void deblur(int idx, Mat &frame) = 0;
|
||||
|
||||
|
||||
// data from stabilizer
|
||||
|
||||
virtual void setFrames(const std::vector<Mat> &val) { frames_ = &val; }
|
||||
virtual const std::vector<Mat>& frames() const { return *frames_; }
|
||||
|
||||
virtual void setMotions(const std::vector<Mat> &val) { motions_ = &val; }
|
||||
virtual const std::vector<Mat>& motions() const { return *motions_; }
|
||||
|
||||
virtual void setBlurrinessRates(const std::vector<float> &val) { blurrinessRates_ = &val; }
|
||||
virtual const std::vector<float>& blurrinessRates() const { return *blurrinessRates_; }
|
||||
|
||||
protected:
|
||||
int radius_;
|
||||
const std::vector<Mat> *frames_;
|
||||
const std::vector<Mat> *motions_;
|
||||
const std::vector<float> *blurrinessRates_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS NullDeblurer : public DeblurerBase
|
||||
{
|
||||
public:
|
||||
virtual void deblur(int /*idx*/, Mat &/*frame*/) CV_OVERRIDE {}
|
||||
};
|
||||
|
||||
class CV_EXPORTS WeightingDeblurer : public DeblurerBase
|
||||
{
|
||||
public:
|
||||
WeightingDeblurer();
|
||||
|
||||
void setSensitivity(float val) { sensitivity_ = val; }
|
||||
float sensitivity() const { return sensitivity_; }
|
||||
|
||||
virtual void deblur(int idx, Mat &frame) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
float sensitivity_;
|
||||
Mat_<float> bSum_, gSum_, rSum_, wSum_;
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,121 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_FAST_MARCHING_HPP
|
||||
#define OPENCV_VIDEOSTAB_FAST_MARCHING_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include <queue>
|
||||
#include <algorithm>
|
||||
#include "opencv2/core.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab_marching
|
||||
//! @{
|
||||
|
||||
/** @brief Describes the Fast Marching Method implementation.
|
||||
|
||||
See http://iwi.eldoc.ub.rug.nl/FILES/root/2004/JGraphToolsTelea/2004JGraphToolsTelea.pdf
|
||||
*/
|
||||
class CV_EXPORTS FastMarchingMethod
|
||||
{
|
||||
public:
|
||||
FastMarchingMethod() : inf_(1e6f), size_(0) {}
|
||||
|
||||
/** @brief Template method that runs the Fast Marching Method.
|
||||
|
||||
@param mask Image mask. 0 value indicates that the pixel value must be inpainted, 255 indicates
|
||||
that the pixel value is known, other values aren't acceptable.
|
||||
@param inpaint Inpainting functor that overloads void operator ()(int x, int y).
|
||||
@return Inpainting functor.
|
||||
*/
|
||||
template <typename Inpaint>
|
||||
Inpaint run(const Mat &mask, Inpaint inpaint);
|
||||
|
||||
/**
|
||||
@return Distance map that's created during working of the method.
|
||||
*/
|
||||
Mat distanceMap() const { return dist_; }
|
||||
|
||||
private:
|
||||
enum { INSIDE = 0, BAND = 1, KNOWN = 255 };
|
||||
|
||||
struct DXY
|
||||
{
|
||||
float dist;
|
||||
int x, y;
|
||||
|
||||
DXY() : dist(0), x(0), y(0) {}
|
||||
DXY(float _dist, int _x, int _y) : dist(_dist), x(_x), y(_y) {}
|
||||
bool operator <(const DXY &dxy) const { return dist < dxy.dist; }
|
||||
};
|
||||
|
||||
float solve(int x1, int y1, int x2, int y2) const;
|
||||
int& indexOf(const DXY &dxy) { return index_(dxy.y, dxy.x); }
|
||||
|
||||
void heapUp(int idx);
|
||||
void heapDown(int idx);
|
||||
void heapAdd(const DXY &dxy);
|
||||
void heapRemoveMin();
|
||||
|
||||
float inf_;
|
||||
|
||||
cv::Mat_<uchar> flag_; // flag map
|
||||
cv::Mat_<float> dist_; // distance map
|
||||
|
||||
cv::Mat_<int> index_; // index of point in the narrow band
|
||||
std::vector<DXY> narrowBand_; // narrow band heap
|
||||
int size_; // narrow band size
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#include "fast_marching_inl.hpp"
|
||||
|
||||
#endif
|
||||
@@ -1,165 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_FAST_MARCHING_INL_HPP
|
||||
#define OPENCV_VIDEOSTAB_FAST_MARCHING_INL_HPP
|
||||
|
||||
#include "opencv2/videostab/fast_marching.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
template <typename Inpaint>
|
||||
Inpaint FastMarchingMethod::run(const cv::Mat &mask, Inpaint inpaint)
|
||||
{
|
||||
using namespace cv;
|
||||
|
||||
CV_Assert(mask.type() == CV_8U);
|
||||
|
||||
static const int lut[4][2] = {{-1,0}, {0,-1}, {1,0}, {0,1}};
|
||||
|
||||
mask.copyTo(flag_);
|
||||
flag_.create(mask.size());
|
||||
dist_.create(mask.size());
|
||||
index_.create(mask.size());
|
||||
narrowBand_.clear();
|
||||
size_ = 0;
|
||||
|
||||
// init
|
||||
for (int y = 0; y < flag_.rows; ++y)
|
||||
{
|
||||
for (int x = 0; x < flag_.cols; ++x)
|
||||
{
|
||||
if (flag_(y,x) == KNOWN)
|
||||
dist_(y,x) = 0.f;
|
||||
else
|
||||
{
|
||||
int n = 0;
|
||||
int nunknown = 0;
|
||||
|
||||
for (int i = 0; i < 4; ++i)
|
||||
{
|
||||
int xn = x + lut[i][0];
|
||||
int yn = y + lut[i][1];
|
||||
|
||||
if (xn >= 0 && xn < flag_.cols && yn >= 0 && yn < flag_.rows)
|
||||
{
|
||||
n++;
|
||||
if (flag_(yn,xn) != KNOWN)
|
||||
nunknown++;
|
||||
}
|
||||
}
|
||||
|
||||
if (n>0 && nunknown == n)
|
||||
{
|
||||
dist_(y,x) = inf_;
|
||||
flag_(y,x) = INSIDE;
|
||||
}
|
||||
else
|
||||
{
|
||||
dist_(y,x) = 0.f;
|
||||
flag_(y,x) = BAND;
|
||||
inpaint(x, y);
|
||||
|
||||
narrowBand_.push_back(DXY(0.f,x,y));
|
||||
index_(y,x) = size_++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// make heap
|
||||
for (int i = size_/2-1; i >= 0; --i)
|
||||
heapDown(i);
|
||||
|
||||
// main cycle
|
||||
while (size_ > 0)
|
||||
{
|
||||
int x = narrowBand_[0].x;
|
||||
int y = narrowBand_[0].y;
|
||||
heapRemoveMin();
|
||||
|
||||
flag_(y,x) = KNOWN;
|
||||
for (int n = 0; n < 4; ++n)
|
||||
{
|
||||
int xn = x + lut[n][0];
|
||||
int yn = y + lut[n][1];
|
||||
|
||||
if (xn >= 0 && xn < flag_.cols && yn >= 0 && yn < flag_.rows && flag_(yn,xn) != KNOWN)
|
||||
{
|
||||
dist_(yn,xn) = std::min(std::min(solve(xn-1, yn, xn, yn-1), solve(xn+1, yn, xn, yn-1)),
|
||||
std::min(solve(xn-1, yn, xn, yn+1), solve(xn+1, yn, xn, yn+1)));
|
||||
|
||||
if (flag_(yn,xn) == INSIDE)
|
||||
{
|
||||
flag_(yn,xn) = BAND;
|
||||
inpaint(xn, yn);
|
||||
heapAdd(DXY(dist_(yn,xn),xn,yn));
|
||||
}
|
||||
else
|
||||
{
|
||||
int i = index_(yn,xn);
|
||||
if (dist_(yn,xn) < narrowBand_[i].dist)
|
||||
{
|
||||
narrowBand_[i].dist = dist_(yn,xn);
|
||||
heapUp(i);
|
||||
}
|
||||
// works better if it's commented out
|
||||
/*else if (dist(yn,xn) > narrowBand[i].dist)
|
||||
{
|
||||
narrowBand[i].dist = dist(yn,xn);
|
||||
heapDown(i);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return inpaint;
|
||||
}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,94 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_FRAME_SOURCE_HPP
|
||||
#define OPENCV_VIDEOSTAB_FRAME_SOURCE_HPP
|
||||
|
||||
#include <vector>
|
||||
#include "opencv2/core.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab
|
||||
//! @{
|
||||
|
||||
class CV_EXPORTS IFrameSource
|
||||
{
|
||||
public:
|
||||
virtual ~IFrameSource() {}
|
||||
virtual void reset() = 0;
|
||||
virtual Mat nextFrame() = 0;
|
||||
};
|
||||
|
||||
class CV_EXPORTS NullFrameSource : public IFrameSource
|
||||
{
|
||||
public:
|
||||
virtual void reset() CV_OVERRIDE {}
|
||||
virtual Mat nextFrame() CV_OVERRIDE { return Mat(); }
|
||||
};
|
||||
|
||||
class CV_EXPORTS VideoFileSource : public IFrameSource
|
||||
{
|
||||
public:
|
||||
VideoFileSource(const String &path, bool volatileFrame = false);
|
||||
|
||||
virtual void reset() CV_OVERRIDE;
|
||||
virtual Mat nextFrame() CV_OVERRIDE;
|
||||
|
||||
int width();
|
||||
int height();
|
||||
int count();
|
||||
double fps();
|
||||
|
||||
private:
|
||||
Ptr<IFrameSource> impl;
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,300 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_GLOBAL_MOTION_HPP
|
||||
#define OPENCV_VIDEOSTAB_GLOBAL_MOTION_HPP
|
||||
|
||||
#include <vector>
|
||||
#include <fstream>
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/features2d.hpp"
|
||||
#include "opencv2/opencv_modules.hpp"
|
||||
#include "opencv2/videostab/optical_flow.hpp"
|
||||
#include "opencv2/videostab/motion_core.hpp"
|
||||
#include "opencv2/videostab/outlier_rejection.hpp"
|
||||
|
||||
#ifdef HAVE_OPENCV_CUDAIMGPROC
|
||||
# include "opencv2/cudaimgproc.hpp"
|
||||
#endif
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab_motion
|
||||
//! @{
|
||||
|
||||
/** @brief Estimates best global motion between two 2D point clouds in the least-squares sense.
|
||||
|
||||
@note Works in-place and changes input point arrays.
|
||||
|
||||
@param points0 Source set of 2D points (32F).
|
||||
@param points1 Destination set of 2D points (32F).
|
||||
@param model Motion model (up to MM_AFFINE).
|
||||
@param rmse Final root-mean-square error.
|
||||
@return 3x3 2D transformation matrix (32F).
|
||||
*/
|
||||
CV_EXPORTS Mat estimateGlobalMotionLeastSquares(
|
||||
InputOutputArray points0, InputOutputArray points1, int model = MM_AFFINE,
|
||||
float *rmse = 0);
|
||||
|
||||
/** @brief Estimates best global motion between two 2D point clouds robustly (using RANSAC method).
|
||||
|
||||
@param points0 Source set of 2D points (32F).
|
||||
@param points1 Destination set of 2D points (32F).
|
||||
@param model Motion model. See cv::videostab::MotionModel.
|
||||
@param params RANSAC method parameters. See videostab::RansacParams.
|
||||
@param rmse Final root-mean-square error.
|
||||
@param ninliers Final number of inliers.
|
||||
*/
|
||||
CV_EXPORTS Mat estimateGlobalMotionRansac(
|
||||
InputArray points0, InputArray points1, int model = MM_AFFINE,
|
||||
const RansacParams ¶ms = RansacParams::default2dMotion(MM_AFFINE),
|
||||
float *rmse = 0, int *ninliers = 0);
|
||||
|
||||
/** @brief Base class for all global motion estimation methods.
|
||||
*/
|
||||
class CV_EXPORTS MotionEstimatorBase
|
||||
{
|
||||
public:
|
||||
virtual ~MotionEstimatorBase() {}
|
||||
|
||||
/** @brief Sets motion model.
|
||||
|
||||
@param val Motion model. See cv::videostab::MotionModel.
|
||||
*/
|
||||
virtual void setMotionModel(MotionModel val) { motionModel_ = val; }
|
||||
|
||||
/**
|
||||
@return Motion model. See cv::videostab::MotionModel.
|
||||
*/
|
||||
virtual MotionModel motionModel() const { return motionModel_; }
|
||||
|
||||
/** @brief Estimates global motion between two 2D point clouds.
|
||||
|
||||
@param points0 Source set of 2D points (32F).
|
||||
@param points1 Destination set of 2D points (32F).
|
||||
@param ok Indicates whether motion was estimated successfully.
|
||||
@return 3x3 2D transformation matrix (32F).
|
||||
*/
|
||||
virtual Mat estimate(InputArray points0, InputArray points1, bool *ok = 0) = 0;
|
||||
|
||||
protected:
|
||||
MotionEstimatorBase(MotionModel model) { setMotionModel(model); }
|
||||
|
||||
private:
|
||||
MotionModel motionModel_;
|
||||
};
|
||||
|
||||
/** @brief Describes a robust RANSAC-based global 2D motion estimation method which minimizes L2 error.
|
||||
*/
|
||||
class CV_EXPORTS MotionEstimatorRansacL2 : public MotionEstimatorBase
|
||||
{
|
||||
public:
|
||||
MotionEstimatorRansacL2(MotionModel model = MM_AFFINE);
|
||||
|
||||
void setRansacParams(const RansacParams &val) { ransacParams_ = val; }
|
||||
RansacParams ransacParams() const { return ransacParams_; }
|
||||
|
||||
void setMinInlierRatio(float val) { minInlierRatio_ = val; }
|
||||
float minInlierRatio() const { return minInlierRatio_; }
|
||||
|
||||
virtual Mat estimate(InputArray points0, InputArray points1, bool *ok = 0) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
RansacParams ransacParams_;
|
||||
float minInlierRatio_;
|
||||
};
|
||||
|
||||
/** @brief Describes a global 2D motion estimation method which minimizes L1 error.
|
||||
|
||||
@note To be able to use this method you must build OpenCV with CLP library support. :
|
||||
*/
|
||||
class CV_EXPORTS MotionEstimatorL1 : public MotionEstimatorBase
|
||||
{
|
||||
public:
|
||||
MotionEstimatorL1(MotionModel model = MM_AFFINE);
|
||||
|
||||
virtual Mat estimate(InputArray points0, InputArray points1, bool *ok = 0) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
std::vector<double> obj_, collb_, colub_;
|
||||
std::vector<double> elems_, rowlb_, rowub_;
|
||||
std::vector<int> rows_, cols_;
|
||||
|
||||
void set(int row, int col, double coef)
|
||||
{
|
||||
rows_.push_back(row);
|
||||
cols_.push_back(col);
|
||||
elems_.push_back(coef);
|
||||
}
|
||||
};
|
||||
|
||||
/** @brief Base class for global 2D motion estimation methods which take frames as input.
|
||||
*/
|
||||
class CV_EXPORTS ImageMotionEstimatorBase
|
||||
{
|
||||
public:
|
||||
virtual ~ImageMotionEstimatorBase() {}
|
||||
|
||||
virtual void setMotionModel(MotionModel val) { motionModel_ = val; }
|
||||
virtual MotionModel motionModel() const { return motionModel_; }
|
||||
|
||||
virtual Mat estimate(const Mat &frame0, const Mat &frame1, bool *ok = 0) = 0;
|
||||
|
||||
protected:
|
||||
ImageMotionEstimatorBase(MotionModel model) { setMotionModel(model); }
|
||||
|
||||
private:
|
||||
MotionModel motionModel_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS FromFileMotionReader : public ImageMotionEstimatorBase
|
||||
{
|
||||
public:
|
||||
FromFileMotionReader(const String &path);
|
||||
|
||||
virtual Mat estimate(const Mat &frame0, const Mat &frame1, bool *ok = 0) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
std::ifstream file_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS ToFileMotionWriter : public ImageMotionEstimatorBase
|
||||
{
|
||||
public:
|
||||
ToFileMotionWriter(const String &path, Ptr<ImageMotionEstimatorBase> estimator);
|
||||
|
||||
virtual void setMotionModel(MotionModel val) CV_OVERRIDE { motionEstimator_->setMotionModel(val); }
|
||||
virtual MotionModel motionModel() const CV_OVERRIDE { return motionEstimator_->motionModel(); }
|
||||
|
||||
virtual Mat estimate(const Mat &frame0, const Mat &frame1, bool *ok = 0) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
std::ofstream file_;
|
||||
Ptr<ImageMotionEstimatorBase> motionEstimator_;
|
||||
};
|
||||
|
||||
/** @brief Describes a global 2D motion estimation method which uses keypoints detection and optical flow for
|
||||
matching.
|
||||
*/
|
||||
class CV_EXPORTS KeypointBasedMotionEstimator : public ImageMotionEstimatorBase
|
||||
{
|
||||
public:
|
||||
KeypointBasedMotionEstimator(Ptr<MotionEstimatorBase> estimator);
|
||||
|
||||
virtual void setMotionModel(MotionModel val) CV_OVERRIDE { motionEstimator_->setMotionModel(val); }
|
||||
virtual MotionModel motionModel() const CV_OVERRIDE { return motionEstimator_->motionModel(); }
|
||||
|
||||
void setDetector(Ptr<FeatureDetector> val) { detector_ = val; }
|
||||
Ptr<FeatureDetector> detector() const { return detector_; }
|
||||
|
||||
void setOpticalFlowEstimator(Ptr<ISparseOptFlowEstimator> val) { optFlowEstimator_ = val; }
|
||||
Ptr<ISparseOptFlowEstimator> opticalFlowEstimator() const { return optFlowEstimator_; }
|
||||
|
||||
void setOutlierRejector(Ptr<IOutlierRejector> val) { outlierRejector_ = val; }
|
||||
Ptr<IOutlierRejector> outlierRejector() const { return outlierRejector_; }
|
||||
|
||||
virtual Mat estimate(const Mat &frame0, const Mat &frame1, bool *ok = 0) CV_OVERRIDE;
|
||||
Mat estimate(InputArray frame0, InputArray frame1, bool *ok = 0);
|
||||
|
||||
private:
|
||||
Ptr<MotionEstimatorBase> motionEstimator_;
|
||||
Ptr<FeatureDetector> detector_;
|
||||
Ptr<ISparseOptFlowEstimator> optFlowEstimator_;
|
||||
Ptr<IOutlierRejector> outlierRejector_;
|
||||
|
||||
std::vector<uchar> status_;
|
||||
std::vector<KeyPoint> keypointsPrev_;
|
||||
std::vector<Point2f> pointsPrev_, points_;
|
||||
std::vector<Point2f> pointsPrevGood_, pointsGood_;
|
||||
};
|
||||
|
||||
#if defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDAOPTFLOW)
|
||||
|
||||
class CV_EXPORTS KeypointBasedMotionEstimatorGpu : public ImageMotionEstimatorBase
|
||||
{
|
||||
public:
|
||||
KeypointBasedMotionEstimatorGpu(Ptr<MotionEstimatorBase> estimator);
|
||||
|
||||
virtual void setMotionModel(MotionModel val) CV_OVERRIDE { motionEstimator_->setMotionModel(val); }
|
||||
virtual MotionModel motionModel() const CV_OVERRIDE { return motionEstimator_->motionModel(); }
|
||||
|
||||
void setOutlierRejector(Ptr<IOutlierRejector> val) { outlierRejector_ = val; }
|
||||
Ptr<IOutlierRejector> outlierRejector() const { return outlierRejector_; }
|
||||
|
||||
virtual Mat estimate(const Mat &frame0, const Mat &frame1, bool *ok = 0) CV_OVERRIDE;
|
||||
Mat estimate(const cuda::GpuMat &frame0, const cuda::GpuMat &frame1, bool *ok = 0);
|
||||
|
||||
private:
|
||||
Ptr<MotionEstimatorBase> motionEstimator_;
|
||||
Ptr<cuda::CornersDetector> detector_;
|
||||
SparsePyrLkOptFlowEstimatorGpu optFlowEstimator_;
|
||||
Ptr<IOutlierRejector> outlierRejector_;
|
||||
|
||||
cuda::GpuMat frame0_, grayFrame0_, frame1_;
|
||||
cuda::GpuMat pointsPrev_, points_;
|
||||
cuda::GpuMat status_;
|
||||
|
||||
Mat hostPointsPrev_, hostPoints_;
|
||||
std::vector<Point2f> hostPointsPrevTmp_, hostPointsTmp_;
|
||||
std::vector<uchar> rejectionStatus_;
|
||||
};
|
||||
|
||||
#endif // defined(HAVE_OPENCV_CUDAIMGPROC) && defined(HAVE_OPENCV_CUDAOPTFLOW)
|
||||
|
||||
/** @brief Computes motion between two frames assuming that all the intermediate motions are known.
|
||||
|
||||
@param from Source frame index.
|
||||
@param to Destination frame index.
|
||||
@param motions Pair-wise motions. motions[i] denotes motion from the frame i to the frame i+1
|
||||
@return Motion from the Source frame to the Destination frame.
|
||||
*/
|
||||
CV_EXPORTS Mat getMotion(int from, int to, const std::vector<Mat> &motions);
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,212 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_INPAINTINT_HPP
|
||||
#define OPENCV_VIDEOSTAB_INPAINTINT_HPP
|
||||
|
||||
#include <vector>
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/videostab/optical_flow.hpp"
|
||||
#include "opencv2/videostab/fast_marching.hpp"
|
||||
#include "opencv2/videostab/global_motion.hpp"
|
||||
#include "opencv2/photo.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab
|
||||
//! @{
|
||||
|
||||
class CV_EXPORTS InpainterBase
|
||||
{
|
||||
public:
|
||||
InpainterBase()
|
||||
: radius_(0), motionModel_(MM_UNKNOWN), frames_(0), motions_(0),
|
||||
stabilizedFrames_(0), stabilizationMotions_(0) {}
|
||||
|
||||
virtual ~InpainterBase() {}
|
||||
|
||||
virtual void setRadius(int val) { radius_ = val; }
|
||||
virtual int radius() const { return radius_; }
|
||||
|
||||
virtual void setMotionModel(MotionModel val) { motionModel_ = val; }
|
||||
virtual MotionModel motionModel() const { return motionModel_; }
|
||||
|
||||
virtual void inpaint(int idx, Mat &frame, Mat &mask) = 0;
|
||||
|
||||
|
||||
// data from stabilizer
|
||||
|
||||
virtual void setFrames(const std::vector<Mat> &val) { frames_ = &val; }
|
||||
virtual const std::vector<Mat>& frames() const { return *frames_; }
|
||||
|
||||
virtual void setMotions(const std::vector<Mat> &val) { motions_ = &val; }
|
||||
virtual const std::vector<Mat>& motions() const { return *motions_; }
|
||||
|
||||
virtual void setStabilizedFrames(const std::vector<Mat> &val) { stabilizedFrames_ = &val; }
|
||||
virtual const std::vector<Mat>& stabilizedFrames() const { return *stabilizedFrames_; }
|
||||
|
||||
virtual void setStabilizationMotions(const std::vector<Mat> &val) { stabilizationMotions_ = &val; }
|
||||
virtual const std::vector<Mat>& stabilizationMotions() const { return *stabilizationMotions_; }
|
||||
|
||||
protected:
|
||||
int radius_;
|
||||
MotionModel motionModel_;
|
||||
const std::vector<Mat> *frames_;
|
||||
const std::vector<Mat> *motions_;
|
||||
const std::vector<Mat> *stabilizedFrames_;
|
||||
const std::vector<Mat> *stabilizationMotions_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS NullInpainter : public InpainterBase
|
||||
{
|
||||
public:
|
||||
virtual void inpaint(int /*idx*/, Mat &/*frame*/, Mat &/*mask*/) CV_OVERRIDE {}
|
||||
};
|
||||
|
||||
class CV_EXPORTS InpaintingPipeline : public InpainterBase
|
||||
{
|
||||
public:
|
||||
void pushBack(Ptr<InpainterBase> inpainter) { inpainters_.push_back(inpainter); }
|
||||
bool empty() const { return inpainters_.empty(); }
|
||||
|
||||
virtual void setRadius(int val) CV_OVERRIDE;
|
||||
virtual void setMotionModel(MotionModel val) CV_OVERRIDE;
|
||||
virtual void setFrames(const std::vector<Mat> &val) CV_OVERRIDE;
|
||||
virtual void setMotions(const std::vector<Mat> &val) CV_OVERRIDE;
|
||||
virtual void setStabilizedFrames(const std::vector<Mat> &val) CV_OVERRIDE;
|
||||
virtual void setStabilizationMotions(const std::vector<Mat> &val) CV_OVERRIDE;
|
||||
|
||||
virtual void inpaint(int idx, Mat &frame, Mat &mask) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
std::vector<Ptr<InpainterBase> > inpainters_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS ConsistentMosaicInpainter : public InpainterBase
|
||||
{
|
||||
public:
|
||||
ConsistentMosaicInpainter();
|
||||
|
||||
void setStdevThresh(float val) { stdevThresh_ = val; }
|
||||
float stdevThresh() const { return stdevThresh_; }
|
||||
|
||||
virtual void inpaint(int idx, Mat &frame, Mat &mask) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
float stdevThresh_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS MotionInpainter : public InpainterBase
|
||||
{
|
||||
public:
|
||||
MotionInpainter();
|
||||
|
||||
void setOptFlowEstimator(Ptr<IDenseOptFlowEstimator> val) { optFlowEstimator_ = val; }
|
||||
Ptr<IDenseOptFlowEstimator> optFlowEstimator() const { return optFlowEstimator_; }
|
||||
|
||||
void setFlowErrorThreshold(float val) { flowErrorThreshold_ = val; }
|
||||
float flowErrorThreshold() const { return flowErrorThreshold_; }
|
||||
|
||||
void setDistThreshold(float val) { distThresh_ = val; }
|
||||
float distThresh() const { return distThresh_; }
|
||||
|
||||
void setBorderMode(int val) { borderMode_ = val; }
|
||||
int borderMode() const { return borderMode_; }
|
||||
|
||||
virtual void inpaint(int idx, Mat &frame, Mat &mask) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
FastMarchingMethod fmm_;
|
||||
Ptr<IDenseOptFlowEstimator> optFlowEstimator_;
|
||||
float flowErrorThreshold_;
|
||||
float distThresh_;
|
||||
int borderMode_;
|
||||
|
||||
Mat frame1_, transformedFrame1_;
|
||||
Mat_<uchar> grayFrame_, transformedGrayFrame1_;
|
||||
Mat_<uchar> mask1_, transformedMask1_;
|
||||
Mat_<float> flowX_, flowY_, flowErrors_;
|
||||
Mat_<uchar> flowMask_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS ColorAverageInpainter : public InpainterBase
|
||||
{
|
||||
public:
|
||||
virtual void inpaint(int idx, Mat &frame, Mat &mask) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
FastMarchingMethod fmm_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS ColorInpainter : public InpainterBase
|
||||
{
|
||||
public:
|
||||
ColorInpainter(int method = INPAINT_TELEA, double radius = 2.);
|
||||
|
||||
virtual void inpaint(int idx, Mat &frame, Mat &mask) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
int method_;
|
||||
double radius_;
|
||||
Mat invMask_;
|
||||
};
|
||||
|
||||
inline ColorInpainter::ColorInpainter(int _method, double _radius)
|
||||
: method_(_method), radius_(_radius) {}
|
||||
|
||||
CV_EXPORTS void calcFlowMask(
|
||||
const Mat &flowX, const Mat &flowY, const Mat &errors, float maxError,
|
||||
const Mat &mask0, const Mat &mask1, Mat &flowMask);
|
||||
|
||||
CV_EXPORTS void completeFrameAccordingToFlow(
|
||||
const Mat &flowMask, const Mat &flowX, const Mat &flowY, const Mat &frame1, const Mat &mask1,
|
||||
float distThresh, Mat& frame0, Mat &mask0);
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,80 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_LOG_HPP
|
||||
#define OPENCV_VIDEOSTAB_LOG_HPP
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab
|
||||
//! @{
|
||||
|
||||
class CV_EXPORTS ILog
|
||||
{
|
||||
public:
|
||||
virtual ~ILog() {}
|
||||
virtual void print(const char *format, ...) = 0;
|
||||
};
|
||||
|
||||
class CV_EXPORTS NullLog : public ILog
|
||||
{
|
||||
public:
|
||||
virtual void print(const char * /*format*/, ...) CV_OVERRIDE {}
|
||||
};
|
||||
|
||||
class CV_EXPORTS LogToStdout : public ILog
|
||||
{
|
||||
public:
|
||||
virtual void print(const char *format, ...) CV_OVERRIDE;
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,129 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_MOTION_CORE_HPP
|
||||
#define OPENCV_VIDEOSTAB_MOTION_CORE_HPP
|
||||
|
||||
#include <cmath>
|
||||
#include "opencv2/core.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab_motion
|
||||
//! @{
|
||||
|
||||
/** @brief Describes motion model between two point clouds.
|
||||
*/
|
||||
enum MotionModel
|
||||
{
|
||||
MM_TRANSLATION = 0,
|
||||
MM_TRANSLATION_AND_SCALE = 1,
|
||||
MM_ROTATION = 2,
|
||||
MM_RIGID = 3,
|
||||
MM_SIMILARITY = 4,
|
||||
MM_AFFINE = 5,
|
||||
MM_HOMOGRAPHY = 6,
|
||||
MM_UNKNOWN = 7
|
||||
};
|
||||
|
||||
/** @brief Describes RANSAC method parameters.
|
||||
*/
|
||||
struct CV_EXPORTS RansacParams
|
||||
{
|
||||
int size; //!< subset size
|
||||
float thresh; //!< max error to classify as inlier
|
||||
float eps; //!< max outliers ratio
|
||||
float prob; //!< probability of success
|
||||
|
||||
RansacParams() : size(0), thresh(0), eps(0), prob(0) {}
|
||||
/** @brief Constructor
|
||||
@param size Subset size.
|
||||
@param thresh Maximum re-projection error value to classify as inlier.
|
||||
@param eps Maximum ratio of incorrect correspondences.
|
||||
@param prob Required success probability.
|
||||
*/
|
||||
RansacParams(int size, float thresh, float eps, float prob);
|
||||
|
||||
/**
|
||||
@return Number of iterations that'll be performed by RANSAC method.
|
||||
*/
|
||||
int niters() const
|
||||
{
|
||||
return static_cast<int>(
|
||||
std::ceil(std::log(1 - prob) / std::log(1 - std::pow(1 - eps, size))));
|
||||
}
|
||||
|
||||
/**
|
||||
@param model Motion model. See cv::videostab::MotionModel.
|
||||
@return Default RANSAC method parameters for the given motion model.
|
||||
*/
|
||||
static RansacParams default2dMotion(MotionModel model)
|
||||
{
|
||||
CV_Assert(model < MM_UNKNOWN);
|
||||
if (model == MM_TRANSLATION)
|
||||
return RansacParams(1, 0.5f, 0.5f, 0.99f);
|
||||
if (model == MM_TRANSLATION_AND_SCALE)
|
||||
return RansacParams(2, 0.5f, 0.5f, 0.99f);
|
||||
if (model == MM_ROTATION)
|
||||
return RansacParams(1, 0.5f, 0.5f, 0.99f);
|
||||
if (model == MM_RIGID)
|
||||
return RansacParams(2, 0.5f, 0.5f, 0.99f);
|
||||
if (model == MM_SIMILARITY)
|
||||
return RansacParams(2, 0.5f, 0.5f, 0.99f);
|
||||
if (model == MM_AFFINE)
|
||||
return RansacParams(3, 0.5f, 0.5f, 0.99f);
|
||||
return RansacParams(4, 0.5f, 0.5f, 0.99f);
|
||||
}
|
||||
};
|
||||
|
||||
inline RansacParams::RansacParams(int _size, float _thresh, float _eps, float _prob)
|
||||
: size(_size), thresh(_thresh), eps(_eps), prob(_prob) {}
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,174 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_MOTION_STABILIZING_HPP
|
||||
#define OPENCV_VIDEOSTAB_MOTION_STABILIZING_HPP
|
||||
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/videostab/global_motion.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab_motion
|
||||
//! @{
|
||||
|
||||
class CV_EXPORTS IMotionStabilizer
|
||||
{
|
||||
public:
|
||||
virtual ~IMotionStabilizer() {}
|
||||
|
||||
//! assumes that [0, size-1) is in or equals to [range.first, range.second)
|
||||
virtual void stabilize(
|
||||
int size, const std::vector<Mat> &motions, std::pair<int,int> range,
|
||||
Mat *stabilizationMotions) = 0;
|
||||
};
|
||||
|
||||
class CV_EXPORTS MotionStabilizationPipeline : public IMotionStabilizer
|
||||
{
|
||||
public:
|
||||
void pushBack(Ptr<IMotionStabilizer> stabilizer) { stabilizers_.push_back(stabilizer); }
|
||||
bool empty() const { return stabilizers_.empty(); }
|
||||
|
||||
virtual void stabilize(
|
||||
int size, const std::vector<Mat> &motions, std::pair<int,int> range,
|
||||
Mat *stabilizationMotions) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
std::vector<Ptr<IMotionStabilizer> > stabilizers_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS MotionFilterBase : public IMotionStabilizer
|
||||
{
|
||||
public:
|
||||
virtual ~MotionFilterBase() {}
|
||||
|
||||
virtual Mat stabilize(
|
||||
int idx, const std::vector<Mat> &motions, std::pair<int,int> range) = 0;
|
||||
|
||||
virtual void stabilize(
|
||||
int size, const std::vector<Mat> &motions, std::pair<int,int> range,
|
||||
Mat *stabilizationMotions) CV_OVERRIDE;
|
||||
};
|
||||
|
||||
class CV_EXPORTS GaussianMotionFilter : public MotionFilterBase
|
||||
{
|
||||
public:
|
||||
GaussianMotionFilter(int radius = 15, float stdev = -1.f);
|
||||
|
||||
void setParams(int radius, float stdev = -1.f);
|
||||
int radius() const { return radius_; }
|
||||
float stdev() const { return stdev_; }
|
||||
|
||||
virtual Mat stabilize(
|
||||
int idx, const std::vector<Mat> &motions, std::pair<int,int> range) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
int radius_;
|
||||
float stdev_;
|
||||
std::vector<float> weight_;
|
||||
};
|
||||
|
||||
inline GaussianMotionFilter::GaussianMotionFilter(int _radius, float _stdev) { setParams(_radius, _stdev); }
|
||||
|
||||
class CV_EXPORTS LpMotionStabilizer : public IMotionStabilizer
|
||||
{
|
||||
public:
|
||||
LpMotionStabilizer(MotionModel model = MM_SIMILARITY);
|
||||
|
||||
void setMotionModel(MotionModel val) { model_ = val; }
|
||||
MotionModel motionModel() const { return model_; }
|
||||
|
||||
void setFrameSize(Size val) { frameSize_ = val; }
|
||||
Size frameSize() const { return frameSize_; }
|
||||
|
||||
void setTrimRatio(float val) { trimRatio_ = val; }
|
||||
float trimRatio() const { return trimRatio_; }
|
||||
|
||||
void setWeight1(float val) { w1_ = val; }
|
||||
float weight1() const { return w1_; }
|
||||
|
||||
void setWeight2(float val) { w2_ = val; }
|
||||
float weight2() const { return w2_; }
|
||||
|
||||
void setWeight3(float val) { w3_ = val; }
|
||||
float weight3() const { return w3_; }
|
||||
|
||||
void setWeight4(float val) { w4_ = val; }
|
||||
float weight4() const { return w4_; }
|
||||
|
||||
virtual void stabilize(
|
||||
int size, const std::vector<Mat> &motions, std::pair<int,int> range,
|
||||
Mat *stabilizationMotions) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
MotionModel model_;
|
||||
Size frameSize_;
|
||||
float trimRatio_;
|
||||
float w1_, w2_, w3_, w4_;
|
||||
|
||||
std::vector<double> obj_, collb_, colub_;
|
||||
std::vector<int> rows_, cols_;
|
||||
std::vector<double> elems_, rowlb_, rowub_;
|
||||
|
||||
void set(int row, int col, double coef)
|
||||
{
|
||||
rows_.push_back(row);
|
||||
cols_.push_back(col);
|
||||
elems_.push_back(coef);
|
||||
}
|
||||
};
|
||||
|
||||
CV_EXPORTS Mat ensureInclusionConstraint(const Mat &M, Size size, float trimRatio);
|
||||
|
||||
CV_EXPORTS float estimateOptimalTrimRatio(const Mat &M, Size size);
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace
|
||||
|
||||
#endif
|
||||
@@ -1,150 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_OPTICAL_FLOW_HPP
|
||||
#define OPENCV_VIDEOSTAB_OPTICAL_FLOW_HPP
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/opencv_modules.hpp"
|
||||
|
||||
#ifdef HAVE_OPENCV_CUDAOPTFLOW
|
||||
#include "opencv2/cudaoptflow.hpp"
|
||||
#endif
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab
|
||||
//! @{
|
||||
|
||||
class CV_EXPORTS ISparseOptFlowEstimator
|
||||
{
|
||||
public:
|
||||
virtual ~ISparseOptFlowEstimator() {}
|
||||
virtual void run(
|
||||
InputArray frame0, InputArray frame1, InputArray points0, InputOutputArray points1,
|
||||
OutputArray status, OutputArray errors) = 0;
|
||||
};
|
||||
|
||||
class CV_EXPORTS IDenseOptFlowEstimator
|
||||
{
|
||||
public:
|
||||
virtual ~IDenseOptFlowEstimator() {}
|
||||
virtual void run(
|
||||
InputArray frame0, InputArray frame1, InputOutputArray flowX, InputOutputArray flowY,
|
||||
OutputArray errors) = 0;
|
||||
};
|
||||
|
||||
class CV_EXPORTS PyrLkOptFlowEstimatorBase
|
||||
{
|
||||
public:
|
||||
PyrLkOptFlowEstimatorBase() { setWinSize(Size(21, 21)); setMaxLevel(3); }
|
||||
|
||||
virtual void setWinSize(Size val) { winSize_ = val; }
|
||||
virtual Size winSize() const { return winSize_; }
|
||||
|
||||
virtual void setMaxLevel(int val) { maxLevel_ = val; }
|
||||
virtual int maxLevel() const { return maxLevel_; }
|
||||
virtual ~PyrLkOptFlowEstimatorBase() {}
|
||||
|
||||
protected:
|
||||
Size winSize_;
|
||||
int maxLevel_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS SparsePyrLkOptFlowEstimator
|
||||
: public PyrLkOptFlowEstimatorBase, public ISparseOptFlowEstimator
|
||||
{
|
||||
public:
|
||||
virtual void run(
|
||||
InputArray frame0, InputArray frame1, InputArray points0, InputOutputArray points1,
|
||||
OutputArray status, OutputArray errors) CV_OVERRIDE;
|
||||
};
|
||||
|
||||
#ifdef HAVE_OPENCV_CUDAOPTFLOW
|
||||
|
||||
class CV_EXPORTS SparsePyrLkOptFlowEstimatorGpu
|
||||
: public PyrLkOptFlowEstimatorBase, public ISparseOptFlowEstimator
|
||||
{
|
||||
public:
|
||||
SparsePyrLkOptFlowEstimatorGpu();
|
||||
|
||||
virtual void run(
|
||||
InputArray frame0, InputArray frame1, InputArray points0, InputOutputArray points1,
|
||||
OutputArray status, OutputArray errors) CV_OVERRIDE;
|
||||
|
||||
void run(const cuda::GpuMat &frame0, const cuda::GpuMat &frame1, const cuda::GpuMat &points0, cuda::GpuMat &points1,
|
||||
cuda::GpuMat &status, cuda::GpuMat &errors);
|
||||
|
||||
void run(const cuda::GpuMat &frame0, const cuda::GpuMat &frame1, const cuda::GpuMat &points0, cuda::GpuMat &points1,
|
||||
cuda::GpuMat &status);
|
||||
|
||||
private:
|
||||
Ptr<cuda::SparsePyrLKOpticalFlow> optFlowEstimator_;
|
||||
cuda::GpuMat frame0_, frame1_, points0_, points1_, status_, errors_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS DensePyrLkOptFlowEstimatorGpu
|
||||
: public PyrLkOptFlowEstimatorBase, public IDenseOptFlowEstimator
|
||||
{
|
||||
public:
|
||||
DensePyrLkOptFlowEstimatorGpu();
|
||||
|
||||
virtual void run(
|
||||
InputArray frame0, InputArray frame1, InputOutputArray flowX, InputOutputArray flowY,
|
||||
OutputArray errors) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
Ptr<cuda::DensePyrLKOpticalFlow> optFlowEstimator_;
|
||||
cuda::GpuMat frame0_, frame1_, flowX_, flowY_, errors_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,101 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_OUTLIER_REJECTION_HPP
|
||||
#define OPENCV_VIDEOSTAB_OUTLIER_REJECTION_HPP
|
||||
|
||||
#include <vector>
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/videostab/motion_core.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab
|
||||
//! @{
|
||||
|
||||
class CV_EXPORTS IOutlierRejector
|
||||
{
|
||||
public:
|
||||
virtual ~IOutlierRejector() {}
|
||||
|
||||
virtual void process(
|
||||
Size frameSize, InputArray points0, InputArray points1, OutputArray mask) = 0;
|
||||
};
|
||||
|
||||
class CV_EXPORTS NullOutlierRejector : public IOutlierRejector
|
||||
{
|
||||
public:
|
||||
virtual void process(
|
||||
Size frameSize, InputArray points0, InputArray points1, OutputArray mask) CV_OVERRIDE;
|
||||
};
|
||||
|
||||
class CV_EXPORTS TranslationBasedLocalOutlierRejector : public IOutlierRejector
|
||||
{
|
||||
public:
|
||||
TranslationBasedLocalOutlierRejector();
|
||||
|
||||
void setCellSize(Size val) { cellSize_ = val; }
|
||||
Size cellSize() const { return cellSize_; }
|
||||
|
||||
void setRansacParams(RansacParams val) { ransacParams_ = val; }
|
||||
RansacParams ransacParams() const { return ransacParams_; }
|
||||
|
||||
virtual void process(
|
||||
Size frameSize, InputArray points0, InputArray points1, OutputArray mask) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
Size cellSize_;
|
||||
RansacParams ransacParams_;
|
||||
|
||||
typedef std::vector<int> Cell;
|
||||
std::vector<Cell> grid_;
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,72 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_RING_BUFFER_HPP
|
||||
#define OPENCV_VIDEOSTAB_RING_BUFFER_HPP
|
||||
|
||||
#include <vector>
|
||||
#include "opencv2/imgproc.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab
|
||||
//! @{
|
||||
|
||||
template <typename T> inline T& at(int idx, std::vector<T> &items)
|
||||
{
|
||||
return items[cv::borderInterpolate(idx, static_cast<int>(items.size()), cv::BORDER_WRAP)];
|
||||
}
|
||||
|
||||
template <typename T> inline const T& at(int idx, const std::vector<T> &items)
|
||||
{
|
||||
return items[cv::borderInterpolate(idx, static_cast<int>(items.size()), cv::BORDER_WRAP)];
|
||||
}
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,200 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_STABILIZER_HPP
|
||||
#define OPENCV_VIDEOSTAB_STABILIZER_HPP
|
||||
|
||||
#include <vector>
|
||||
#include <ctime>
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/videostab/global_motion.hpp"
|
||||
#include "opencv2/videostab/motion_stabilizing.hpp"
|
||||
#include "opencv2/videostab/frame_source.hpp"
|
||||
#include "opencv2/videostab/log.hpp"
|
||||
#include "opencv2/videostab/inpainting.hpp"
|
||||
#include "opencv2/videostab/deblurring.hpp"
|
||||
#include "opencv2/videostab/wobble_suppression.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab
|
||||
//! @{
|
||||
|
||||
class CV_EXPORTS StabilizerBase
|
||||
{
|
||||
public:
|
||||
virtual ~StabilizerBase() {}
|
||||
|
||||
void setLog(Ptr<ILog> ilog) { log_ = ilog; }
|
||||
Ptr<ILog> log() const { return log_; }
|
||||
|
||||
void setRadius(int val) { radius_ = val; }
|
||||
int radius() const { return radius_; }
|
||||
|
||||
void setFrameSource(Ptr<IFrameSource> val) { frameSource_ = val; }
|
||||
Ptr<IFrameSource> frameSource() const { return frameSource_; }
|
||||
|
||||
void setMotionEstimator(Ptr<ImageMotionEstimatorBase> val) { motionEstimator_ = val; }
|
||||
Ptr<ImageMotionEstimatorBase> motionEstimator() const { return motionEstimator_; }
|
||||
|
||||
void setDeblurer(Ptr<DeblurerBase> val) { deblurer_ = val; }
|
||||
Ptr<DeblurerBase> deblurrer() const { return deblurer_; }
|
||||
|
||||
void setTrimRatio(float val) { trimRatio_ = val; }
|
||||
float trimRatio() const { return trimRatio_; }
|
||||
|
||||
void setCorrectionForInclusion(bool val) { doCorrectionForInclusion_ = val; }
|
||||
bool doCorrectionForInclusion() const { return doCorrectionForInclusion_; }
|
||||
|
||||
void setBorderMode(int val) { borderMode_ = val; }
|
||||
int borderMode() const { return borderMode_; }
|
||||
|
||||
void setInpainter(Ptr<InpainterBase> val) { inpainter_ = val; }
|
||||
Ptr<InpainterBase> inpainter() const { return inpainter_; }
|
||||
|
||||
protected:
|
||||
StabilizerBase();
|
||||
|
||||
void reset();
|
||||
Mat nextStabilizedFrame();
|
||||
bool doOneIteration();
|
||||
virtual void setUp(const Mat &firstFrame);
|
||||
virtual Mat estimateMotion() = 0;
|
||||
virtual Mat estimateStabilizationMotion() = 0;
|
||||
void stabilizeFrame();
|
||||
virtual Mat postProcessFrame(const Mat &frame);
|
||||
void logProcessingTime();
|
||||
|
||||
Ptr<ILog> log_;
|
||||
Ptr<IFrameSource> frameSource_;
|
||||
Ptr<ImageMotionEstimatorBase> motionEstimator_;
|
||||
Ptr<DeblurerBase> deblurer_;
|
||||
Ptr<InpainterBase> inpainter_;
|
||||
int radius_;
|
||||
float trimRatio_;
|
||||
bool doCorrectionForInclusion_;
|
||||
int borderMode_;
|
||||
|
||||
Size frameSize_;
|
||||
Mat frameMask_;
|
||||
int curPos_;
|
||||
int curStabilizedPos_;
|
||||
bool doDeblurring_;
|
||||
Mat preProcessedFrame_;
|
||||
bool doInpainting_;
|
||||
Mat inpaintingMask_;
|
||||
Mat finalFrame_;
|
||||
std::vector<Mat> frames_;
|
||||
std::vector<Mat> motions_; // motions_[i] is the motion from i-th to i+1-th frame
|
||||
std::vector<float> blurrinessRates_;
|
||||
std::vector<Mat> stabilizedFrames_;
|
||||
std::vector<Mat> stabilizedMasks_;
|
||||
std::vector<Mat> stabilizationMotions_;
|
||||
clock_t processingStartTime_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS OnePassStabilizer : public StabilizerBase, public IFrameSource
|
||||
{
|
||||
public:
|
||||
OnePassStabilizer();
|
||||
|
||||
void setMotionFilter(Ptr<MotionFilterBase> val) { motionFilter_ = val; }
|
||||
Ptr<MotionFilterBase> motionFilter() const { return motionFilter_; }
|
||||
|
||||
virtual void reset() CV_OVERRIDE;
|
||||
virtual Mat nextFrame() CV_OVERRIDE { return nextStabilizedFrame(); }
|
||||
|
||||
protected:
|
||||
virtual void setUp(const Mat &firstFrame) CV_OVERRIDE;
|
||||
virtual Mat estimateMotion() CV_OVERRIDE;
|
||||
virtual Mat estimateStabilizationMotion() CV_OVERRIDE;
|
||||
virtual Mat postProcessFrame(const Mat &frame) CV_OVERRIDE;
|
||||
|
||||
Ptr<MotionFilterBase> motionFilter_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS TwoPassStabilizer : public StabilizerBase, public IFrameSource
|
||||
{
|
||||
public:
|
||||
TwoPassStabilizer();
|
||||
|
||||
void setMotionStabilizer(Ptr<IMotionStabilizer> val) { motionStabilizer_ = val; }
|
||||
Ptr<IMotionStabilizer> motionStabilizer() const { return motionStabilizer_; }
|
||||
|
||||
void setWobbleSuppressor(Ptr<WobbleSuppressorBase> val) { wobbleSuppressor_ = val; }
|
||||
Ptr<WobbleSuppressorBase> wobbleSuppressor() const { return wobbleSuppressor_; }
|
||||
|
||||
void setEstimateTrimRatio(bool val) { mustEstTrimRatio_ = val; }
|
||||
bool mustEstimateTrimaRatio() const { return mustEstTrimRatio_; }
|
||||
|
||||
virtual void reset() CV_OVERRIDE;
|
||||
virtual Mat nextFrame() CV_OVERRIDE;
|
||||
|
||||
protected:
|
||||
void runPrePassIfNecessary();
|
||||
|
||||
virtual void setUp(const Mat &firstFrame) CV_OVERRIDE;
|
||||
virtual Mat estimateMotion() CV_OVERRIDE;
|
||||
virtual Mat estimateStabilizationMotion() CV_OVERRIDE;
|
||||
virtual Mat postProcessFrame(const Mat &frame) CV_OVERRIDE;
|
||||
|
||||
Ptr<IMotionStabilizer> motionStabilizer_;
|
||||
Ptr<WobbleSuppressorBase> wobbleSuppressor_;
|
||||
bool mustEstTrimRatio_;
|
||||
|
||||
int frameCount_;
|
||||
bool isPrePassDone_;
|
||||
bool doWobbleSuppression_;
|
||||
std::vector<Mat> motions2_;
|
||||
Mat suppressedFrame_;
|
||||
};
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,140 +0,0 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009-2011, Willow Garage Inc., all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_VIDEOSTAB_WOBBLE_SUPPRESSION_HPP
|
||||
#define OPENCV_VIDEOSTAB_WOBBLE_SUPPRESSION_HPP
|
||||
|
||||
#include <vector>
|
||||
#include "opencv2/core.hpp"
|
||||
#include "opencv2/core/cuda.hpp"
|
||||
#include "opencv2/videostab/global_motion.hpp"
|
||||
#include "opencv2/videostab/log.hpp"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
namespace videostab
|
||||
{
|
||||
|
||||
//! @addtogroup videostab
|
||||
//! @{
|
||||
|
||||
class CV_EXPORTS WobbleSuppressorBase
|
||||
{
|
||||
public:
|
||||
WobbleSuppressorBase();
|
||||
|
||||
virtual ~WobbleSuppressorBase() {}
|
||||
|
||||
void setMotionEstimator(Ptr<ImageMotionEstimatorBase> val) { motionEstimator_ = val; }
|
||||
Ptr<ImageMotionEstimatorBase> motionEstimator() const { return motionEstimator_; }
|
||||
|
||||
virtual void suppress(int idx, const Mat &frame, Mat &result) = 0;
|
||||
|
||||
|
||||
// data from stabilizer
|
||||
|
||||
virtual void setFrameCount(int val) { frameCount_ = val; }
|
||||
virtual int frameCount() const { return frameCount_; }
|
||||
|
||||
virtual void setMotions(const std::vector<Mat> &val) { motions_ = &val; }
|
||||
virtual const std::vector<Mat>& motions() const { return *motions_; }
|
||||
|
||||
virtual void setMotions2(const std::vector<Mat> &val) { motions2_ = &val; }
|
||||
virtual const std::vector<Mat>& motions2() const { return *motions2_; }
|
||||
|
||||
virtual void setStabilizationMotions(const std::vector<Mat> &val) { stabilizationMotions_ = &val; }
|
||||
virtual const std::vector<Mat>& stabilizationMotions() const { return *stabilizationMotions_; }
|
||||
|
||||
protected:
|
||||
Ptr<ImageMotionEstimatorBase> motionEstimator_;
|
||||
int frameCount_;
|
||||
const std::vector<Mat> *motions_;
|
||||
const std::vector<Mat> *motions2_;
|
||||
const std::vector<Mat> *stabilizationMotions_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS NullWobbleSuppressor : public WobbleSuppressorBase
|
||||
{
|
||||
public:
|
||||
virtual void suppress(int idx, const Mat &frame, Mat &result) CV_OVERRIDE;
|
||||
};
|
||||
|
||||
class CV_EXPORTS MoreAccurateMotionWobbleSuppressorBase : public WobbleSuppressorBase
|
||||
{
|
||||
public:
|
||||
virtual void setPeriod(int val) { period_ = val; }
|
||||
virtual int period() const { return period_; }
|
||||
|
||||
protected:
|
||||
MoreAccurateMotionWobbleSuppressorBase() { setPeriod(30); }
|
||||
|
||||
int period_;
|
||||
};
|
||||
|
||||
class CV_EXPORTS MoreAccurateMotionWobbleSuppressor : public MoreAccurateMotionWobbleSuppressorBase
|
||||
{
|
||||
public:
|
||||
virtual void suppress(int idx, const Mat &frame, Mat &result) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
Mat_<float> mapx_, mapy_;
|
||||
};
|
||||
|
||||
#if defined(HAVE_OPENCV_CUDAWARPING)
|
||||
class CV_EXPORTS MoreAccurateMotionWobbleSuppressorGpu : public MoreAccurateMotionWobbleSuppressorBase
|
||||
{
|
||||
public:
|
||||
void suppress(int idx, const cuda::GpuMat &frame, cuda::GpuMat &result);
|
||||
virtual void suppress(int idx, const Mat &frame, Mat &result) CV_OVERRIDE;
|
||||
|
||||
private:
|
||||
cuda::GpuMat frameDevice_, resultDevice_;
|
||||
cuda::GpuMat mapx_, mapy_;
|
||||
};
|
||||
#endif
|
||||
|
||||
//! @}
|
||||
|
||||
} // namespace videostab
|
||||
} // namespace cv
|
||||
|
||||
#endif
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5cc75be243439729d3faca7b20e9c0fe0e4b8d6139fffbbb05383735f54136af
|
||||
size 27804
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ce622e0ee7151279d492776a768946324a4739cb4810d5b77aae4daa413a945c
|
||||
size 4833204
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:673035c2d9da9fd08b6912fa23c7d06388f310818730f95ef8d953f8f271529a
|
||||
size 2467276
|
||||
Binary file not shown.
@@ -1,111 +0,0 @@
|
||||
7767517
|
||||
109 125
|
||||
Input input 0 1 input
|
||||
Convolution 339 1 1 input 341 0=24 1=3 3=2 4=1 5=1 6=648 9=1
|
||||
Pooling 342 1 1 341 342 1=3 2=2 12=1 3=1 5=1
|
||||
Split splitncnn_0 1 2 342 342_splitncnn_0 342_splitncnn_1
|
||||
ConvolutionDepthWise 343 1 1 342_splitncnn_1 343 0=24 1=3 3=2 4=1 5=1 6=216 7=24
|
||||
Convolution 345 1 1 343 347 0=24 1=1 5=1 6=576 9=1
|
||||
Convolution 348 1 1 342_splitncnn_0 350 0=24 1=1 5=1 6=576 9=1
|
||||
ConvolutionDepthWise 351 1 1 350 351 0=24 1=3 3=2 4=1 5=1 6=216 7=24
|
||||
Convolution 353 1 1 351 355 0=24 1=1 5=1 6=576 9=1
|
||||
Concat 356 2 1 347 355 356
|
||||
ShuffleChannel 361 1 1 356 361 0=2
|
||||
Slice 362 1 2 361 362 363 -23300=2,24,-233
|
||||
Convolution 364 1 1 363 366 0=24 1=1 5=1 6=576 9=1
|
||||
ConvolutionDepthWise 367 1 1 366 367 0=24 1=3 4=1 5=1 6=216 7=24
|
||||
Convolution 369 1 1 367 371 0=24 1=1 5=1 6=576 9=1
|
||||
Concat 372 2 1 362 371 372
|
||||
ShuffleChannel 377 1 1 372 377 0=2
|
||||
Slice 378 1 2 377 378 379 -23300=2,24,-233
|
||||
Convolution 380 1 1 379 382 0=24 1=1 5=1 6=576 9=1
|
||||
ConvolutionDepthWise 383 1 1 382 383 0=24 1=3 4=1 5=1 6=216 7=24
|
||||
Convolution 385 1 1 383 387 0=24 1=1 5=1 6=576 9=1
|
||||
Concat 388 2 1 378 387 388
|
||||
ShuffleChannel 393 1 1 388 393 0=2
|
||||
Slice 394 1 2 393 394 395 -23300=2,24,-233
|
||||
Convolution 396 1 1 395 398 0=24 1=1 5=1 6=576 9=1
|
||||
ConvolutionDepthWise 399 1 1 398 399 0=24 1=3 4=1 5=1 6=216 7=24
|
||||
Convolution 401 1 1 399 403 0=24 1=1 5=1 6=576 9=1
|
||||
Concat 404 2 1 394 403 404
|
||||
ShuffleChannel 409 1 1 404 409 0=2
|
||||
Split splitncnn_1 1 2 409 409_splitncnn_0 409_splitncnn_1
|
||||
ConvolutionDepthWise 410 1 1 409_splitncnn_1 410 0=48 1=3 3=2 4=1 5=1 6=432 7=48
|
||||
Convolution 412 1 1 410 414 0=48 1=1 5=1 6=2304 9=1
|
||||
Convolution 415 1 1 409_splitncnn_0 417 0=48 1=1 5=1 6=2304 9=1
|
||||
ConvolutionDepthWise 418 1 1 417 418 0=48 1=3 3=2 4=1 5=1 6=432 7=48
|
||||
Convolution 420 1 1 418 422 0=48 1=1 5=1 6=2304 9=1
|
||||
Concat 423 2 1 414 422 423
|
||||
ShuffleChannel 428 1 1 423 428 0=2
|
||||
Slice 429 1 2 428 429 430 -23300=2,48,-233
|
||||
Convolution 431 1 1 430 433 0=48 1=1 5=1 6=2304 9=1
|
||||
ConvolutionDepthWise 434 1 1 433 434 0=48 1=3 4=1 5=1 6=432 7=48
|
||||
Convolution 436 1 1 434 438 0=48 1=1 5=1 6=2304 9=1
|
||||
Concat 439 2 1 429 438 439
|
||||
ShuffleChannel 444 1 1 439 444 0=2
|
||||
Slice 445 1 2 444 445 446 -23300=2,48,-233
|
||||
Convolution 447 1 1 446 449 0=48 1=1 5=1 6=2304 9=1
|
||||
ConvolutionDepthWise 450 1 1 449 450 0=48 1=3 4=1 5=1 6=432 7=48
|
||||
Convolution 452 1 1 450 454 0=48 1=1 5=1 6=2304 9=1
|
||||
Concat 455 2 1 445 454 455
|
||||
ShuffleChannel 460 1 1 455 460 0=2
|
||||
Slice 461 1 2 460 461 462 -23300=2,48,-233
|
||||
Convolution 463 1 1 462 465 0=48 1=1 5=1 6=2304 9=1
|
||||
ConvolutionDepthWise 466 1 1 465 466 0=48 1=3 4=1 5=1 6=432 7=48
|
||||
Convolution 468 1 1 466 470 0=48 1=1 5=1 6=2304 9=1
|
||||
Concat 471 2 1 461 470 471
|
||||
ShuffleChannel 476 1 1 471 476 0=2
|
||||
Slice 477 1 2 476 477 478 -23300=2,48,-233
|
||||
Convolution 479 1 1 478 481 0=48 1=1 5=1 6=2304 9=1
|
||||
ConvolutionDepthWise 482 1 1 481 482 0=48 1=3 4=1 5=1 6=432 7=48
|
||||
Convolution 484 1 1 482 486 0=48 1=1 5=1 6=2304 9=1
|
||||
Concat 487 2 1 477 486 487
|
||||
ShuffleChannel 492 1 1 487 492 0=2
|
||||
Slice 493 1 2 492 493 494 -23300=2,48,-233
|
||||
Convolution 495 1 1 494 497 0=48 1=1 5=1 6=2304 9=1
|
||||
ConvolutionDepthWise 498 1 1 497 498 0=48 1=3 4=1 5=1 6=432 7=48
|
||||
Convolution 500 1 1 498 502 0=48 1=1 5=1 6=2304 9=1
|
||||
Concat 503 2 1 493 502 503
|
||||
ShuffleChannel 508 1 1 503 508 0=2
|
||||
Slice 509 1 2 508 509 510 -23300=2,48,-233
|
||||
Convolution 511 1 1 510 513 0=48 1=1 5=1 6=2304 9=1
|
||||
ConvolutionDepthWise 514 1 1 513 514 0=48 1=3 4=1 5=1 6=432 7=48
|
||||
Convolution 516 1 1 514 518 0=48 1=1 5=1 6=2304 9=1
|
||||
Concat 519 2 1 509 518 519
|
||||
ShuffleChannel 524 1 1 519 524 0=2
|
||||
Slice 525 1 2 524 525 526 -23300=2,48,-233
|
||||
Convolution 527 1 1 526 529 0=48 1=1 5=1 6=2304 9=1
|
||||
ConvolutionDepthWise 530 1 1 529 530 0=48 1=3 4=1 5=1 6=432 7=48
|
||||
Convolution 532 1 1 530 534 0=48 1=1 5=1 6=2304 9=1
|
||||
Concat 535 2 1 525 534 535
|
||||
ShuffleChannel 540 1 1 535 540 0=2
|
||||
Split splitncnn_2 1 2 540 540_splitncnn_0 540_splitncnn_1
|
||||
ConvolutionDepthWise 541 1 1 540_splitncnn_1 541 0=96 1=3 3=2 4=1 5=1 6=864 7=96
|
||||
Convolution 543 1 1 541 545 0=96 1=1 5=1 6=9216 9=1
|
||||
Convolution 546 1 1 540_splitncnn_0 548 0=96 1=1 5=1 6=9216 9=1
|
||||
ConvolutionDepthWise 549 1 1 548 549 0=96 1=3 3=2 4=1 5=1 6=864 7=96
|
||||
Convolution 551 1 1 549 553 0=96 1=1 5=1 6=9216 9=1
|
||||
Concat 554 2 1 545 553 554
|
||||
ShuffleChannel 559 1 1 554 559 0=2
|
||||
Slice 560 1 2 559 560 561 -23300=2,96,-233
|
||||
Convolution 562 1 1 561 564 0=96 1=1 5=1 6=9216 9=1
|
||||
ConvolutionDepthWise 565 1 1 564 565 0=96 1=3 4=1 5=1 6=864 7=96
|
||||
Convolution 567 1 1 565 569 0=96 1=1 5=1 6=9216 9=1
|
||||
Concat 570 2 1 560 569 570
|
||||
ShuffleChannel 575 1 1 570 575 0=2
|
||||
Slice 576 1 2 575 576 577 -23300=2,96,-233
|
||||
Convolution 578 1 1 577 580 0=96 1=1 5=1 6=9216 9=1
|
||||
ConvolutionDepthWise 581 1 1 580 581 0=96 1=3 4=1 5=1 6=864 7=96
|
||||
Convolution 583 1 1 581 585 0=96 1=1 5=1 6=9216 9=1
|
||||
Concat 586 2 1 576 585 586
|
||||
ShuffleChannel 591 1 1 586 591 0=2
|
||||
Slice 592 1 2 591 592 593 -23300=2,96,-233
|
||||
Convolution 594 1 1 593 596 0=96 1=1 5=1 6=9216 9=1
|
||||
ConvolutionDepthWise 597 1 1 596 597 0=96 1=3 4=1 5=1 6=864 7=96
|
||||
Convolution 599 1 1 597 601 0=96 1=1 5=1 6=9216 9=1
|
||||
Concat 602 2 1 592 601 602
|
||||
ShuffleChannel 607 1 1 602 607 0=2
|
||||
Convolution 608 1 1 607 610 0=256 1=1 5=1 6=49152 9=1
|
||||
Reduction 611 1 1 610 611 0=3 1=0 -23303=2,2,3
|
||||
InnerProduct 612 1 1 611 612 0=2 1=1 2=512
|
||||
Softmax out 1 1 612 out
|
||||
Binary file not shown.
@@ -1,203 +0,0 @@
|
||||
7767517
|
||||
201 244
|
||||
Input input 0 1 input
|
||||
Convolution 423 1 1 input 425 0=8 1=3 3=2 4=1 5=1 6=216 9=1
|
||||
Split splitncnn_0 1 2 425 425_splitncnn_0 425_splitncnn_1
|
||||
Convolution 426 1 1 425_splitncnn_1 428 0=4 1=1 5=1 6=32 9=1
|
||||
Split splitncnn_1 1 2 428 428_splitncnn_0 428_splitncnn_1
|
||||
ConvolutionDepthWise 429 1 1 428_splitncnn_1 431 0=4 1=3 4=1 5=1 6=36 7=4 9=1
|
||||
Concat 432 2 1 428_splitncnn_0 431 432
|
||||
ConvolutionDepthWise 433 1 1 432 433 0=8 1=3 13=2 4=1 5=1 6=72 7=8
|
||||
Split splitncnn_2 1 2 433 433_splitncnn_0 433_splitncnn_1
|
||||
Pooling 441 1 1 433_splitncnn_1 445 0=1 4=1
|
||||
InnerProduct 446 1 1 445 447 0=2 1=1 2=16 9=1
|
||||
InnerProduct 448 1 1 447 448 0=8 1=1 2=16
|
||||
Reshape 456 1 1 448 456 0=1 1=1 2=8
|
||||
Clip 457 1 1 456 457 0=0.000000e+00 1=1.000000e+00
|
||||
BinaryOp 458 2 1 433_splitncnn_0 457 458 0=2
|
||||
Convolution 459 1 1 458 459 0=4 1=1 5=1 6=32
|
||||
Split splitncnn_3 1 2 459 459_splitncnn_0 459_splitncnn_1
|
||||
ConvolutionDepthWise 461 1 1 459_splitncnn_1 461 0=4 1=3 4=1 5=1 6=36 7=4
|
||||
Concat 463 2 1 459_splitncnn_0 461 463
|
||||
ConvolutionDepthWise 464 1 1 425_splitncnn_0 466 0=8 1=3 13=2 4=1 5=1 6=72 7=8 9=1
|
||||
Convolution 467 1 1 466 467 0=8 1=1 5=1 6=64
|
||||
BinaryOp 469 2 1 463 467 469
|
||||
Split splitncnn_4 1 2 469 469_splitncnn_0 469_splitncnn_1
|
||||
Convolution 470 1 1 469_splitncnn_1 472 0=28 1=1 5=1 6=224 9=1
|
||||
Split splitncnn_5 1 2 472 472_splitncnn_0 472_splitncnn_1
|
||||
ConvolutionDepthWise 473 1 1 472_splitncnn_1 475 0=28 1=3 4=1 5=1 6=252 7=28 9=1
|
||||
Concat 476 2 1 472_splitncnn_0 475 476
|
||||
ConvolutionDepthWise 477 1 1 476 477 0=56 1=3 13=2 4=1 5=1 6=504 7=56
|
||||
Convolution 479 1 1 477 479 0=6 1=1 5=1 6=336
|
||||
Split splitncnn_6 1 2 479 479_splitncnn_0 479_splitncnn_1
|
||||
ConvolutionDepthWise 481 1 1 479_splitncnn_1 481 0=6 1=3 4=1 5=1 6=54 7=6
|
||||
Concat 483 2 1 479_splitncnn_0 481 483
|
||||
ConvolutionDepthWise 484 1 1 469_splitncnn_0 486 0=8 1=3 13=2 4=1 5=1 6=72 7=8 9=1
|
||||
Convolution 487 1 1 486 487 0=12 1=1 5=1 6=96
|
||||
BinaryOp 489 2 1 483 487 489
|
||||
Split splitncnn_7 1 2 489 489_splitncnn_0 489_splitncnn_1
|
||||
Convolution 490 1 1 489_splitncnn_1 492 0=22 1=1 5=1 6=264 9=1
|
||||
Split splitncnn_8 1 2 492 492_splitncnn_0 492_splitncnn_1
|
||||
ConvolutionDepthWise 493 1 1 492_splitncnn_1 495 0=22 1=3 4=1 5=1 6=198 7=22 9=1
|
||||
Concat 496 2 1 492_splitncnn_0 495 496
|
||||
Convolution 497 1 1 496 497 0=6 1=1 5=1 6=264
|
||||
Split splitncnn_9 1 2 497 497_splitncnn_0 497_splitncnn_1
|
||||
ConvolutionDepthWise 499 1 1 497_splitncnn_1 499 0=6 1=3 4=1 5=1 6=54 7=6
|
||||
Concat 501 2 1 497_splitncnn_0 499 501
|
||||
BinaryOp 502 2 1 501 489_splitncnn_0 502
|
||||
Split splitncnn_10 1 2 502 502_splitncnn_0 502_splitncnn_1
|
||||
Convolution 503 1 1 502_splitncnn_1 505 0=40 1=1 5=1 6=480 9=1
|
||||
Split splitncnn_11 1 2 505 505_splitncnn_0 505_splitncnn_1
|
||||
ConvolutionDepthWise 506 1 1 505_splitncnn_1 508 0=40 1=3 4=1 5=1 6=360 7=40 9=1
|
||||
Concat 509 2 1 505_splitncnn_0 508 509
|
||||
ConvolutionDepthWise 510 1 1 509 510 0=80 1=5 13=2 4=2 5=1 6=2000 7=80
|
||||
Split splitncnn_12 1 2 510 510_splitncnn_0 510_splitncnn_1
|
||||
Pooling 518 1 1 510_splitncnn_1 522 0=1 4=1
|
||||
InnerProduct 523 1 1 522 524 0=20 1=1 2=1600 9=1
|
||||
InnerProduct 525 1 1 524 525 0=80 1=1 2=1600
|
||||
Reshape 533 1 1 525 533 0=1 1=1 2=80
|
||||
Clip 534 1 1 533 534 0=0.000000e+00 1=1.000000e+00
|
||||
BinaryOp 535 2 1 510_splitncnn_0 534 535 0=2
|
||||
Convolution 536 1 1 535 536 0=10 1=1 5=1 6=800
|
||||
Split splitncnn_13 1 2 536 536_splitncnn_0 536_splitncnn_1
|
||||
ConvolutionDepthWise 538 1 1 536_splitncnn_1 538 0=10 1=3 4=1 5=1 6=90 7=10
|
||||
Concat 540 2 1 536_splitncnn_0 538 540
|
||||
ConvolutionDepthWise 541 1 1 502_splitncnn_0 543 0=12 1=3 13=2 4=1 5=1 6=108 7=12 9=1
|
||||
Convolution 544 1 1 543 544 0=20 1=1 5=1 6=240
|
||||
BinaryOp 546 2 1 540 544 546
|
||||
Split splitncnn_14 1 2 546 546_splitncnn_0 546_splitncnn_1
|
||||
Convolution 547 1 1 546_splitncnn_1 549 0=60 1=1 5=1 6=1200 9=1
|
||||
Split splitncnn_15 1 2 549 549_splitncnn_0 549_splitncnn_1
|
||||
ConvolutionDepthWise 550 1 1 549_splitncnn_1 552 0=60 1=3 4=1 5=1 6=540 7=60 9=1
|
||||
Concat 553 2 1 549_splitncnn_0 552 553
|
||||
Split splitncnn_16 1 2 553 553_splitncnn_0 553_splitncnn_1
|
||||
Pooling 560 1 1 553_splitncnn_1 564 0=1 4=1
|
||||
InnerProduct 565 1 1 564 566 0=30 1=1 2=3600 9=1
|
||||
InnerProduct 567 1 1 566 567 0=120 1=1 2=3600
|
||||
Reshape 575 1 1 567 575 0=1 1=1 2=120
|
||||
Clip 576 1 1 575 576 0=0.000000e+00 1=1.000000e+00
|
||||
BinaryOp 577 2 1 553_splitncnn_0 576 577 0=2
|
||||
Convolution 578 1 1 577 578 0=10 1=1 5=1 6=1200
|
||||
Split splitncnn_17 1 2 578 578_splitncnn_0 578_splitncnn_1
|
||||
ConvolutionDepthWise 580 1 1 578_splitncnn_1 580 0=10 1=3 4=1 5=1 6=90 7=10
|
||||
Concat 582 2 1 578_splitncnn_0 580 582
|
||||
BinaryOp 583 2 1 582 546_splitncnn_0 583
|
||||
Split splitncnn_18 1 2 583 583_splitncnn_0 583_splitncnn_1
|
||||
Convolution 584 1 1 583_splitncnn_1 586 0=60 1=1 5=1 6=1200 9=1
|
||||
Split splitncnn_19 1 2 586 586_splitncnn_0 586_splitncnn_1
|
||||
ConvolutionDepthWise 587 1 1 586_splitncnn_1 589 0=60 1=3 4=1 5=1 6=540 7=60 9=1
|
||||
Concat 590 2 1 586_splitncnn_0 589 590
|
||||
Split splitncnn_20 1 2 590 590_splitncnn_0 590_splitncnn_1
|
||||
Pooling 597 1 1 590_splitncnn_1 601 0=1 4=1
|
||||
InnerProduct 602 1 1 601 603 0=30 1=1 2=3600 9=1
|
||||
InnerProduct 604 1 1 603 604 0=120 1=1 2=3600
|
||||
Reshape 612 1 1 604 612 0=1 1=1 2=120
|
||||
Clip 613 1 1 612 613 0=0.000000e+00 1=1.000000e+00
|
||||
BinaryOp 614 2 1 590_splitncnn_0 613 614 0=2
|
||||
Convolution 615 1 1 614 615 0=10 1=1 5=1 6=1200
|
||||
Split splitncnn_21 1 2 615 615_splitncnn_0 615_splitncnn_1
|
||||
ConvolutionDepthWise 617 1 1 615_splitncnn_1 617 0=10 1=3 4=1 5=1 6=90 7=10
|
||||
Concat 619 2 1 615_splitncnn_0 617 619
|
||||
BinaryOp 620 2 1 619 583_splitncnn_0 620
|
||||
Split splitncnn_22 1 2 620 620_splitncnn_0 620_splitncnn_1
|
||||
Convolution 621 1 1 620_splitncnn_1 623 0=36 1=1 5=1 6=720 9=1
|
||||
Split splitncnn_23 1 2 623 623_splitncnn_0 623_splitncnn_1
|
||||
ConvolutionDepthWise 624 1 1 623_splitncnn_1 626 0=36 1=3 4=1 5=1 6=324 7=36 9=1
|
||||
Concat 627 2 1 623_splitncnn_0 626 627
|
||||
Split splitncnn_24 1 2 627 627_splitncnn_0 627_splitncnn_1
|
||||
Pooling 634 1 1 627_splitncnn_1 638 0=1 4=1
|
||||
InnerProduct 639 1 1 638 640 0=18 1=1 2=1296 9=1
|
||||
InnerProduct 641 1 1 640 641 0=72 1=1 2=1296
|
||||
Reshape 649 1 1 641 649 0=1 1=1 2=72
|
||||
Clip 650 1 1 649 650 0=0.000000e+00 1=1.000000e+00
|
||||
BinaryOp 651 2 1 627_splitncnn_0 650 651 0=2
|
||||
Convolution 652 1 1 651 652 0=12 1=1 5=1 6=864
|
||||
Split splitncnn_25 1 2 652 652_splitncnn_0 652_splitncnn_1
|
||||
ConvolutionDepthWise 654 1 1 652_splitncnn_1 654 0=12 1=3 4=1 5=1 6=108 7=12
|
||||
Concat 656 2 1 652_splitncnn_0 654 656
|
||||
ConvolutionDepthWise 657 1 1 620_splitncnn_0 659 0=20 1=3 4=1 5=1 6=180 7=20 9=1
|
||||
Convolution 660 1 1 659 660 0=24 1=1 5=1 6=480
|
||||
BinaryOp 662 2 1 656 660 662
|
||||
Split splitncnn_26 1 2 662 662_splitncnn_0 662_splitncnn_1
|
||||
Convolution 663 1 1 662_splitncnn_1 665 0=36 1=1 5=1 6=864 9=1
|
||||
Split splitncnn_27 1 2 665 665_splitncnn_0 665_splitncnn_1
|
||||
ConvolutionDepthWise 666 1 1 665_splitncnn_1 668 0=36 1=3 4=1 5=1 6=324 7=36 9=1
|
||||
Concat 669 2 1 665_splitncnn_0 668 669
|
||||
Split splitncnn_28 1 2 669 669_splitncnn_0 669_splitncnn_1
|
||||
Pooling 676 1 1 669_splitncnn_1 680 0=1 4=1
|
||||
InnerProduct 681 1 1 680 682 0=18 1=1 2=1296 9=1
|
||||
InnerProduct 683 1 1 682 683 0=72 1=1 2=1296
|
||||
Reshape 691 1 1 683 691 0=1 1=1 2=72
|
||||
Clip 692 1 1 691 692 0=0.000000e+00 1=1.000000e+00
|
||||
BinaryOp 693 2 1 669_splitncnn_0 692 693 0=2
|
||||
Convolution 694 1 1 693 694 0=12 1=1 5=1 6=864
|
||||
Split splitncnn_29 1 2 694 694_splitncnn_0 694_splitncnn_1
|
||||
ConvolutionDepthWise 696 1 1 694_splitncnn_1 696 0=12 1=3 4=1 5=1 6=108 7=12
|
||||
Concat 698 2 1 694_splitncnn_0 696 698
|
||||
BinaryOp 699 2 1 698 662_splitncnn_0 699
|
||||
Split splitncnn_30 1 2 699 699_splitncnn_0 699_splitncnn_1
|
||||
Convolution 700 1 1 699_splitncnn_1 702 0=144 1=1 5=1 6=3456 9=1
|
||||
Split splitncnn_31 1 2 702 702_splitncnn_0 702_splitncnn_1
|
||||
ConvolutionDepthWise 703 1 1 702_splitncnn_1 705 0=144 1=3 4=1 5=1 6=1296 7=144 9=1
|
||||
Concat 706 2 1 702_splitncnn_0 705 706
|
||||
ConvolutionDepthWise 707 1 1 706 707 0=288 1=5 13=2 4=2 5=1 6=7200 7=288
|
||||
Split splitncnn_32 1 2 707 707_splitncnn_0 707_splitncnn_1
|
||||
Pooling 715 1 1 707_splitncnn_1 719 0=1 4=1
|
||||
InnerProduct 720 1 1 719 721 0=72 1=1 2=20736 9=1
|
||||
InnerProduct 722 1 1 721 722 0=288 1=1 2=20736
|
||||
Reshape 730 1 1 722 730 0=1 1=1 2=288
|
||||
Clip 731 1 1 730 731 0=0.000000e+00 1=1.000000e+00
|
||||
BinaryOp 732 2 1 707_splitncnn_0 731 732 0=2
|
||||
Convolution 733 1 1 732 733 0=24 1=1 5=1 6=6912
|
||||
Split splitncnn_33 1 2 733 733_splitncnn_0 733_splitncnn_1
|
||||
ConvolutionDepthWise 735 1 1 733_splitncnn_1 735 0=24 1=3 4=1 5=1 6=216 7=24
|
||||
Concat 737 2 1 733_splitncnn_0 735 737
|
||||
ConvolutionDepthWise 738 1 1 699_splitncnn_0 740 0=24 1=3 13=2 4=1 5=1 6=216 7=24 9=1
|
||||
Convolution 741 1 1 740 741 0=48 1=1 5=1 6=1152
|
||||
BinaryOp 743 2 1 737 741 743
|
||||
Split splitncnn_34 1 2 743 743_splitncnn_0 743_splitncnn_1
|
||||
Convolution 744 1 1 743_splitncnn_1 746 0=144 1=1 5=1 6=6912 9=1
|
||||
Split splitncnn_35 1 2 746 746_splitncnn_0 746_splitncnn_1
|
||||
ConvolutionDepthWise 747 1 1 746_splitncnn_1 749 0=144 1=3 4=1 5=1 6=1296 7=144 9=1
|
||||
Concat 750 2 1 746_splitncnn_0 749 750
|
||||
Split splitncnn_36 1 2 750 750_splitncnn_0 750_splitncnn_1
|
||||
Pooling 757 1 1 750_splitncnn_1 761 0=1 4=1
|
||||
InnerProduct 762 1 1 761 763 0=72 1=1 2=20736 9=1
|
||||
InnerProduct 764 1 1 763 764 0=288 1=1 2=20736
|
||||
Reshape 772 1 1 764 772 0=1 1=1 2=288
|
||||
Clip 773 1 1 772 773 0=0.000000e+00 1=1.000000e+00
|
||||
BinaryOp 774 2 1 750_splitncnn_0 773 774 0=2
|
||||
Convolution 775 1 1 774 775 0=24 1=1 5=1 6=6912
|
||||
Split splitncnn_37 1 2 775 775_splitncnn_0 775_splitncnn_1
|
||||
ConvolutionDepthWise 777 1 1 775_splitncnn_1 777 0=24 1=3 4=1 5=1 6=216 7=24
|
||||
Concat 779 2 1 775_splitncnn_0 777 779
|
||||
BinaryOp 780 2 1 779 743_splitncnn_0 780
|
||||
Split splitncnn_38 1 2 780 780_splitncnn_0 780_splitncnn_1
|
||||
Convolution 781 1 1 780_splitncnn_1 783 0=144 1=1 5=1 6=6912 9=1
|
||||
Split splitncnn_39 1 2 783 783_splitncnn_0 783_splitncnn_1
|
||||
ConvolutionDepthWise 784 1 1 783_splitncnn_1 786 0=144 1=3 4=1 5=1 6=1296 7=144 9=1
|
||||
Concat 787 2 1 783_splitncnn_0 786 787
|
||||
Split splitncnn_40 1 2 787 787_splitncnn_0 787_splitncnn_1
|
||||
Pooling 794 1 1 787_splitncnn_1 798 0=1 4=1
|
||||
InnerProduct 799 1 1 798 800 0=72 1=1 2=20736 9=1
|
||||
InnerProduct 801 1 1 800 801 0=288 1=1 2=20736
|
||||
Reshape 809 1 1 801 809 0=1 1=1 2=288
|
||||
Clip 810 1 1 809 810 0=0.000000e+00 1=1.000000e+00
|
||||
BinaryOp 811 2 1 787_splitncnn_0 810 811 0=2
|
||||
Convolution 812 1 1 811 812 0=24 1=1 5=1 6=6912
|
||||
Split splitncnn_41 1 2 812 812_splitncnn_0 812_splitncnn_1
|
||||
ConvolutionDepthWise 814 1 1 812_splitncnn_1 814 0=24 1=3 4=1 5=1 6=216 7=24
|
||||
Concat 816 2 1 812_splitncnn_0 814 816
|
||||
BinaryOp 817 2 1 816 780_splitncnn_0 817
|
||||
Convolution 818 1 1 817 820 0=288 1=1 5=1 6=13824 9=1
|
||||
Pooling 821 1 1 820 821 1=2 11=1 2=2 12=1 5=1
|
||||
Reshape 822 1 1 821 822 0=-1 1=288 2=-233
|
||||
Permute 823 1 1 822 823 0=1
|
||||
Split splitncnn_42 1 2 823 823_splitncnn_0 823_splitncnn_1
|
||||
LSTM 857 1 1 823_splitncnn_1 860 0=48 1=55296 2=0
|
||||
LSTM 883 1 1 860 886 0=48 1=9216 2=0
|
||||
LSTM 943 1 1 823_splitncnn_0 948 0=48 1=110592 2=2
|
||||
LSTM 994 1 1 948 999 0=48 1=36864 2=2
|
||||
Concat 1000 2 1 886 999 1000 0=1
|
||||
Reshape 1014 1 1 1000 1014 0=144 1=-1
|
||||
InnerProduct out 1 1 1014 out 0=5531 1=1 2=796464
|
||||
Binary file not shown.
@@ -1,144 +0,0 @@
|
||||
7767517
|
||||
142 163
|
||||
Input input0 0 1 input0
|
||||
Convolution 346 1 1 input0 346 0=16 1=3 3=2 4=1 5=1 6=432
|
||||
HardSwish 353 1 1 346 353 0=1.666667e-01
|
||||
Split splitncnn_0 1 2 353 353_splitncnn_0 353_splitncnn_1
|
||||
ConvolutionDepthWise 354 1 1 353_splitncnn_1 356 0=16 1=3 4=1 5=1 6=144 7=16 9=1
|
||||
Convolution 357 1 1 356 357 0=16 1=1 5=1 6=256
|
||||
BinaryOp 359 2 1 353_splitncnn_0 357 359
|
||||
Convolution 360 1 1 359 362 0=64 1=1 5=1 6=1024 9=1
|
||||
ConvolutionDepthWise 363 1 1 362 365 0=64 1=3 3=2 4=1 5=1 6=576 7=64 9=1
|
||||
Convolution 366 1 1 365 366 0=24 1=1 5=1 6=1536
|
||||
Split splitncnn_1 1 2 366 366_splitncnn_0 366_splitncnn_1
|
||||
Convolution 368 1 1 366_splitncnn_1 370 0=72 1=1 5=1 6=1728 9=1
|
||||
ConvolutionDepthWise 371 1 1 370 373 0=72 1=3 4=1 5=1 6=648 7=72 9=1
|
||||
Convolution 374 1 1 373 374 0=24 1=1 5=1 6=1728
|
||||
BinaryOp 376 2 1 366_splitncnn_0 374 376
|
||||
Split splitncnn_2 1 2 376 376_splitncnn_0 376_splitncnn_1
|
||||
Convolution 377 1 1 376_splitncnn_1 379 0=72 1=1 5=1 6=1728 9=1
|
||||
ConvolutionDepthWise 380 1 1 379 380 0=72 1=5 3=2 4=2 5=1 6=1800 7=72
|
||||
Split splitncnn_3 1 2 380 380_splitncnn_0 380_splitncnn_1
|
||||
Pooling 388 1 1 380_splitncnn_1 392 0=1 4=1
|
||||
InnerProduct 393 1 1 392 394 0=24 1=1 2=1728 9=1
|
||||
InnerProduct 395 1 1 394 395 0=72 1=1 2=1728
|
||||
HardSigmoid 400 1 1 395 400 0=1.666667e-01
|
||||
BinaryOp 409 2 1 380_splitncnn_0 400 409 0=2
|
||||
ReLU 410 1 1 409 410
|
||||
Convolution 411 1 1 410 411 0=32 1=1 5=1 6=2304
|
||||
Split splitncnn_4 1 2 411 411_splitncnn_0 411_splitncnn_1
|
||||
Convolution 413 1 1 411_splitncnn_1 415 0=96 1=1 5=1 6=3072 9=1
|
||||
ConvolutionDepthWise 416 1 1 415 416 0=96 1=5 4=2 5=1 6=2400 7=96
|
||||
Split splitncnn_5 1 2 416 416_splitncnn_0 416_splitncnn_1
|
||||
Pooling 424 1 1 416_splitncnn_1 428 0=1 4=1
|
||||
InnerProduct 429 1 1 428 430 0=24 1=1 2=2304 9=1
|
||||
InnerProduct 431 1 1 430 431 0=96 1=1 2=2304
|
||||
HardSigmoid 436 1 1 431 436 0=1.666667e-01
|
||||
BinaryOp 445 2 1 416_splitncnn_0 436 445 0=2
|
||||
ReLU 446 1 1 445 446
|
||||
Convolution 447 1 1 446 447 0=32 1=1 5=1 6=3072
|
||||
BinaryOp 449 2 1 411_splitncnn_0 447 449
|
||||
Split splitncnn_6 1 2 449 449_splitncnn_0 449_splitncnn_1
|
||||
Convolution 450 1 1 449_splitncnn_1 452 0=96 1=1 5=1 6=3072 9=1
|
||||
ConvolutionDepthWise 453 1 1 452 453 0=96 1=5 4=2 5=1 6=2400 7=96
|
||||
Split splitncnn_7 1 2 453 453_splitncnn_0 453_splitncnn_1
|
||||
Pooling 461 1 1 453_splitncnn_1 465 0=1 4=1
|
||||
InnerProduct 466 1 1 465 467 0=24 1=1 2=2304 9=1
|
||||
InnerProduct 468 1 1 467 468 0=96 1=1 2=2304
|
||||
HardSigmoid 473 1 1 468 473 0=1.666667e-01
|
||||
BinaryOp 482 2 1 453_splitncnn_0 473 482 0=2
|
||||
ReLU 483 1 1 482 483
|
||||
Convolution 484 1 1 483 484 0=32 1=1 5=1 6=3072
|
||||
BinaryOp 486 2 1 449_splitncnn_0 484 486
|
||||
Split splitncnn_8 1 2 486 486_splitncnn_0 486_splitncnn_1
|
||||
Convolution 487 1 1 486_splitncnn_1 487 0=192 1=1 5=1 6=6144
|
||||
HardSwish 494 1 1 487 494 0=1.666667e-01
|
||||
ConvolutionDepthWise 495 1 1 494 495 0=192 1=3 3=2 4=1 5=1 6=1728 7=192
|
||||
HardSwish 502 1 1 495 502 0=1.666667e-01
|
||||
Convolution 503 1 1 502 503 0=64 1=1 5=1 6=12288
|
||||
Split splitncnn_9 1 2 503 503_splitncnn_0 503_splitncnn_1
|
||||
Convolution 505 1 1 503_splitncnn_1 505 0=160 1=1 5=1 6=10240
|
||||
HardSwish 512 1 1 505 512 0=1.666667e-01
|
||||
ConvolutionDepthWise 513 1 1 512 513 0=160 1=3 4=1 5=1 6=1440 7=160
|
||||
HardSwish 520 1 1 513 520 0=1.666667e-01
|
||||
Convolution 521 1 1 520 521 0=64 1=1 5=1 6=10240
|
||||
BinaryOp 523 2 1 503_splitncnn_0 521 523
|
||||
Split splitncnn_10 1 2 523 523_splitncnn_0 523_splitncnn_1
|
||||
Convolution 524 1 1 523_splitncnn_1 524 0=144 1=1 5=1 6=9216
|
||||
HardSwish 531 1 1 524 531 0=1.666667e-01
|
||||
ConvolutionDepthWise 532 1 1 531 532 0=144 1=3 4=1 5=1 6=1296 7=144
|
||||
HardSwish 539 1 1 532 539 0=1.666667e-01
|
||||
Convolution 540 1 1 539 540 0=64 1=1 5=1 6=9216
|
||||
BinaryOp 542 2 1 523_splitncnn_0 540 542
|
||||
Split splitncnn_11 1 2 542 542_splitncnn_0 542_splitncnn_1
|
||||
Convolution 543 1 1 542_splitncnn_1 543 0=144 1=1 5=1 6=9216
|
||||
HardSwish 550 1 1 543 550 0=1.666667e-01
|
||||
ConvolutionDepthWise 551 1 1 550 551 0=144 1=3 4=1 5=1 6=1296 7=144
|
||||
HardSwish 558 1 1 551 558 0=1.666667e-01
|
||||
Convolution 559 1 1 558 559 0=64 1=1 5=1 6=9216
|
||||
BinaryOp 561 2 1 542_splitncnn_0 559 561
|
||||
Convolution 562 1 1 561 562 0=384 1=1 5=1 6=24576
|
||||
HardSwish 569 1 1 562 569 0=1.666667e-01
|
||||
ConvolutionDepthWise 570 1 1 569 570 0=384 1=3 4=1 5=1 6=3456 7=384
|
||||
Split splitncnn_12 1 2 570 570_splitncnn_0 570_splitncnn_1
|
||||
Pooling 578 1 1 570_splitncnn_1 582 0=1 4=1
|
||||
InnerProduct 583 1 1 582 584 0=96 1=1 2=36864 9=1
|
||||
InnerProduct 585 1 1 584 585 0=384 1=1 2=36864
|
||||
HardSigmoid 590 1 1 585 590 0=1.666667e-01
|
||||
BinaryOp 599 2 1 570_splitncnn_0 590 599 0=2
|
||||
HardSwish 605 1 1 599 605 0=1.666667e-01
|
||||
Convolution 606 1 1 605 606 0=88 1=1 5=1 6=33792
|
||||
Split splitncnn_13 1 2 606 606_splitncnn_0 606_splitncnn_1
|
||||
Convolution 608 1 1 606_splitncnn_1 608 0=528 1=1 5=1 6=46464
|
||||
HardSwish 615 1 1 608 615 0=1.666667e-01
|
||||
ConvolutionDepthWise 616 1 1 615 616 0=528 1=3 4=1 5=1 6=4752 7=528
|
||||
Split splitncnn_14 1 2 616 616_splitncnn_0 616_splitncnn_1
|
||||
Pooling 624 1 1 616_splitncnn_1 628 0=1 4=1
|
||||
InnerProduct 629 1 1 628 630 0=136 1=1 2=71808 9=1
|
||||
InnerProduct 631 1 1 630 631 0=528 1=1 2=71808
|
||||
HardSigmoid 636 1 1 631 636 0=1.666667e-01
|
||||
BinaryOp 645 2 1 616_splitncnn_0 636 645 0=2
|
||||
HardSwish 651 1 1 645 651 0=1.666667e-01
|
||||
Convolution 652 1 1 651 652 0=88 1=1 5=1 6=46464
|
||||
BinaryOp 654 2 1 606_splitncnn_0 652 654
|
||||
Split splitncnn_15 1 2 654 654_splitncnn_0 654_splitncnn_1
|
||||
Convolution 655 1 1 654_splitncnn_1 655 0=528 1=1 5=1 6=46464
|
||||
HardSwish 662 1 1 655 662 0=1.666667e-01
|
||||
ConvolutionDepthWise 663 1 1 662 663 0=528 1=5 3=2 4=2 5=1 6=13200 7=528
|
||||
Split splitncnn_16 1 2 663 663_splitncnn_0 663_splitncnn_1
|
||||
Pooling 671 1 1 663_splitncnn_1 675 0=1 4=1
|
||||
InnerProduct 676 1 1 675 677 0=136 1=1 2=71808 9=1
|
||||
InnerProduct 678 1 1 677 678 0=528 1=1 2=71808
|
||||
HardSigmoid 683 1 1 678 683 0=1.666667e-01
|
||||
BinaryOp 692 2 1 663_splitncnn_0 683 692 0=2
|
||||
HardSwish 698 1 1 692 698 0=1.666667e-01
|
||||
Convolution 699 1 1 698 699 0=120 1=1 5=1 6=63360
|
||||
Convolution 701 1 1 699 703 0=24 1=1 5=1 6=2880 9=1
|
||||
Split splitncnn_17 1 2 703 703_splitncnn_0 703_splitncnn_1
|
||||
Convolution 704 1 1 654_splitncnn_0 706 0=24 1=1 5=1 6=2112 9=1
|
||||
Interp 723 1 1 703_splitncnn_1 723 0=1 1=2.000000e+00 2=2.000000e+00
|
||||
BinaryOp 724 2 1 723 706 724
|
||||
Convolution 725 1 1 724 727 0=24 1=3 4=1 5=1 6=5184 9=1
|
||||
Split splitncnn_18 1 2 727 727_splitncnn_0 727_splitncnn_1
|
||||
Convolution 728 1 1 486_splitncnn_0 730 0=24 1=1 5=1 6=768 9=1
|
||||
Interp 747 1 1 727_splitncnn_1 747 0=1 1=2.000000e+00 2=2.000000e+00
|
||||
BinaryOp 748 2 1 747 730 748
|
||||
Convolution 749 1 1 748 751 0=24 1=3 4=1 5=1 6=5184 9=1
|
||||
Split splitncnn_19 1 2 751 751_splitncnn_0 751_splitncnn_1
|
||||
Convolution 752 1 1 376_splitncnn_0 754 0=24 1=1 5=1 6=576 9=1
|
||||
Interp 771 1 1 751_splitncnn_1 771 0=1 1=2.000000e+00 2=2.000000e+00
|
||||
BinaryOp 772 2 1 771 754 772
|
||||
Convolution 773 1 1 772 775 0=24 1=3 4=1 5=1 6=5184 9=1
|
||||
Interp 792 1 1 751_splitncnn_0 792 0=1 1=2.000000e+00 2=2.000000e+00
|
||||
Interp 803 1 1 727_splitncnn_0 803 0=1 1=4.000000e+00 2=4.000000e+00
|
||||
Interp 814 1 1 703_splitncnn_0 814 0=1 1=8.000000e+00 2=8.000000e+00
|
||||
Concat 815 4 1 775 792 803 814 815
|
||||
Convolution 816 1 1 815 818 0=96 1=3 4=1 5=1 6=82944 9=1
|
||||
Split splitncnn_20 1 2 818 818_splitncnn_0 818_splitncnn_1
|
||||
Convolution 819 1 1 818_splitncnn_1 821 0=24 1=3 4=1 5=1 6=20736 9=1
|
||||
Deconvolution 822 1 1 821 824 0=24 1=2 3=2 5=1 6=2304 9=1
|
||||
Deconvolution 825 1 1 824 826 0=1 1=2 3=2 5=1 6=96 9=4
|
||||
Convolution 827 1 1 818_splitncnn_0 829 0=24 1=3 4=1 5=1 6=20736 9=1
|
||||
Deconvolution 830 1 1 829 832 0=24 1=2 3=2 5=1 6=2304 9=1
|
||||
Deconvolution 833 1 1 832 834 0=1 1=2 3=2 5=1 6=96 9=4
|
||||
Concat out1 2 1 826 834 out1
|
||||
BIN
3rdparty/bin/OcrLiteOnnx.dll
vendored
Normal file
BIN
3rdparty/bin/OcrLiteOnnx.dll
vendored
Normal file
Binary file not shown.
BIN
3rdparty/bin/aria2c.exe
vendored
Normal file
BIN
3rdparty/bin/aria2c.exe
vendored
Normal file
Binary file not shown.
BIN
3rdparty/bin/opencv_world453.dll
vendored
Normal file
BIN
3rdparty/bin/opencv_world453.dll
vendored
Normal file
Binary file not shown.
BIN
3rdparty/bin/penguin-stats-recognize.dll
vendored
Normal file
BIN
3rdparty/bin/penguin-stats-recognize.dll
vendored
Normal file
Binary file not shown.
41
3rdparty/include/OcrLiteOnnx/AngleNet.h
vendored
Normal file
41
3rdparty/include/OcrLiteOnnx/AngleNet.h
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef __OCR_ANGLENET_H__
|
||||
#define __OCR_ANGLENET_H__
|
||||
|
||||
#include "OcrStruct.h"
|
||||
#include "onnxruntime_cxx_api.h"
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
class AngleNet {
|
||||
public:
|
||||
AngleNet();
|
||||
|
||||
~AngleNet();
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
|
||||
void initModel(const std::string &pathStr);
|
||||
|
||||
std::vector<Angle> getAngles(std::vector<cv::Mat> &partImgs, const char *path,
|
||||
const char *imgName, bool doAngle, bool mostAngle);
|
||||
|
||||
private:
|
||||
bool isOutputAngleImg = false;
|
||||
|
||||
Ort::Session *session;
|
||||
Ort::Env env = Ort::Env(ORT_LOGGING_LEVEL_ERROR, "AngleNet");
|
||||
Ort::SessionOptions sessionOptions = Ort::SessionOptions();
|
||||
int numThread = 0;
|
||||
|
||||
char *inputName;
|
||||
char *outputName;
|
||||
|
||||
const float meanValues[3] = {127.5, 127.5, 127.5};
|
||||
const float normValues[3] = {1.0 / 127.5, 1.0 / 127.5, 1.0 / 127.5};
|
||||
const int dstWidth = 192;
|
||||
const int dstHeight = 32;
|
||||
|
||||
Angle getAngle(cv::Mat &src);
|
||||
};
|
||||
|
||||
|
||||
#endif //__OCR_ANGLENET_H__
|
||||
43
3rdparty/include/OcrLiteOnnx/CrnnNet.h
vendored
Normal file
43
3rdparty/include/OcrLiteOnnx/CrnnNet.h
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef __OCR_CRNNNET_H__
|
||||
#define __OCR_CRNNNET_H__
|
||||
|
||||
#include "OcrStruct.h"
|
||||
#include "onnxruntime_cxx_api.h"
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
class CrnnNet {
|
||||
public:
|
||||
|
||||
CrnnNet();
|
||||
|
||||
~CrnnNet();
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
|
||||
void initModel(const std::string &pathStr, const std::string &keysPath);
|
||||
|
||||
std::vector<TextLine> getTextLines(std::vector<cv::Mat> &partImg, const char *path, const char *imgName);
|
||||
|
||||
private:
|
||||
bool isOutputDebugImg = false;
|
||||
Ort::Session *session;
|
||||
Ort::Env env = Ort::Env(ORT_LOGGING_LEVEL_ERROR, "CrnnNet");
|
||||
Ort::SessionOptions sessionOptions = Ort::SessionOptions();
|
||||
int numThread = 0;
|
||||
|
||||
char *inputName;
|
||||
char *outputName;
|
||||
|
||||
const float meanValues[3] = {127.5, 127.5, 127.5};
|
||||
const float normValues[3] = {1.0 / 127.5, 1.0 / 127.5, 1.0 / 127.5};
|
||||
const int dstHeight = 32;
|
||||
|
||||
std::vector<std::string> keys;
|
||||
|
||||
TextLine scoreToTextLine(const std::vector<float> &outputData, int h, int w);
|
||||
|
||||
TextLine getTextLine(const cv::Mat &src);
|
||||
};
|
||||
|
||||
|
||||
#endif //__OCR_CRNNNET_H__
|
||||
34
3rdparty/include/OcrLiteOnnx/DbNet.h
vendored
Normal file
34
3rdparty/include/OcrLiteOnnx/DbNet.h
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
#ifndef __OCR_DBNET_H__
|
||||
#define __OCR_DBNET_H__
|
||||
|
||||
#include "OcrStruct.h"
|
||||
#include "onnxruntime_cxx_api.h"
|
||||
#include <opencv2/opencv.hpp>
|
||||
|
||||
class DbNet {
|
||||
public:
|
||||
DbNet();
|
||||
|
||||
~DbNet();
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
|
||||
void initModel(const std::string &pathStr);
|
||||
|
||||
std::vector<TextBox> getTextBoxes(cv::Mat &src, ScaleParam &s, float boxScoreThresh,
|
||||
float boxThresh, float unClipRatio);
|
||||
|
||||
private:
|
||||
Ort::Session *session;
|
||||
Ort::Env env = Ort::Env(ORT_LOGGING_LEVEL_ERROR, "DbNet");
|
||||
Ort::SessionOptions sessionOptions = Ort::SessionOptions();
|
||||
int numThread = 0;
|
||||
char *inputName;
|
||||
char *outputName;
|
||||
|
||||
const float meanValues[3] = {0.485 * 255, 0.456 * 255, 0.406 * 255};
|
||||
const float normValues[3] = {1.0 / 0.229 / 255.0, 1.0 / 0.224 / 255.0, 1.0 / 0.225 / 255.0};
|
||||
};
|
||||
|
||||
|
||||
#endif //__OCR_DBNET_H__
|
||||
56
3rdparty/include/OcrLiteOnnx/OcrLite.h
vendored
Normal file
56
3rdparty/include/OcrLiteOnnx/OcrLite.h
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
#ifndef __OCR_LITE_H__
|
||||
#define __OCR_LITE_H__
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include "onnxruntime_cxx_api.h"
|
||||
#include "OcrStruct.h"
|
||||
#include "DbNet.h"
|
||||
#include "AngleNet.h"
|
||||
#include "CrnnNet.h"
|
||||
|
||||
class OcrLite {
|
||||
public:
|
||||
OcrLite();
|
||||
|
||||
~OcrLite();
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
|
||||
void initLogger(bool isConsole, bool isPartImg, bool isResultImg);
|
||||
|
||||
void enableResultTxt(const char *path, const char *imgName);
|
||||
|
||||
void initModels(const std::string &detPath, const std::string &clsPath,
|
||||
const std::string &recPath, const std::string &keysPath);
|
||||
|
||||
void Logger(const char *format, ...);
|
||||
|
||||
OcrResult detect(const char *path, const char *imgName,
|
||||
int padding, int maxSideLen,
|
||||
float boxScoreThresh, float boxThresh, float unClipRatio, bool doAngle, bool mostAngle);
|
||||
|
||||
|
||||
OcrResult detect(const cv::Mat& mat,
|
||||
int padding, int maxSideLen,
|
||||
float boxScoreThresh, float boxThresh, float unClipRatio, bool doAngle, bool mostAngle);
|
||||
|
||||
private:
|
||||
bool isOutputConsole = false;
|
||||
bool isOutputPartImg = false;
|
||||
bool isOutputResultTxt = false;
|
||||
bool isOutputResultImg = false;
|
||||
FILE *resultTxt;
|
||||
DbNet dbNet;
|
||||
AngleNet angleNet;
|
||||
CrnnNet crnnNet;
|
||||
|
||||
std::vector<cv::Mat> getPartImages(cv::Mat &src, std::vector<TextBox> &textBoxes,
|
||||
const char *path, const char *imgName);
|
||||
|
||||
OcrResult detect(const char *path, const char *imgName,
|
||||
cv::Mat &src, cv::Rect &originRect, ScaleParam &scale,
|
||||
float boxScoreThresh = 0.6f, float boxThresh = 0.3f,
|
||||
float unClipRatio = 2.0f, bool doAngle = true, bool mostAngle = true);
|
||||
};
|
||||
|
||||
#endif //__OCR_LITE_H__
|
||||
39
3rdparty/include/OcrLiteOnnx/OcrLiteCaller.h
vendored
Normal file
39
3rdparty/include/OcrLiteOnnx/OcrLiteCaller.h
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "OcrLitePort.h"
|
||||
#include "OcrStruct.h"
|
||||
|
||||
namespace cv
|
||||
{
|
||||
class Mat;
|
||||
}
|
||||
class OcrLite;
|
||||
|
||||
class OCRLITE_PORT OcrLiteCaller
|
||||
{
|
||||
public:
|
||||
OcrLiteCaller();
|
||||
~OcrLiteCaller();
|
||||
OcrLiteCaller(const OcrLite&) = delete;
|
||||
OcrLiteCaller(OcrLite&&) = delete;
|
||||
|
||||
void setNumThread(int numOfThread);
|
||||
bool initModels(const std::string& detPath, const std::string& clsPath,
|
||||
const std::string& recPath, const std::string& keysPath);
|
||||
|
||||
OcrResult detect(const cv::Mat& mat,
|
||||
int padding, int maxSideLen,
|
||||
float boxScoreThresh, float boxThresh, float unClipRatio, bool doAngle, bool mostAngle);
|
||||
|
||||
OcrResult detect(const std::string& dir, const std::string& file,
|
||||
int padding, int maxSideLen,
|
||||
float boxScoreThresh, float boxThresh, float unClipRatio, bool doAngle, bool mostAngle);
|
||||
|
||||
OcrLiteCaller& operator=(const OcrLiteCaller&) = delete;
|
||||
OcrLiteCaller& operator=(OcrLiteCaller&&) = delete;
|
||||
private:
|
||||
std::unique_ptr<OcrLite> m_ocrlite_ptr;
|
||||
};
|
||||
45
3rdparty/include/OcrLiteOnnx/OcrLitePort.h
vendored
Normal file
45
3rdparty/include/OcrLiteOnnx/OcrLitePort.h
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
#pragma once
|
||||
|
||||
#if !defined(__JNI__) && !defined(__EXEC__)
|
||||
|
||||
// The way how the function is called
|
||||
#if !defined(OCRLITE_CALL)
|
||||
#if defined(_WIN32)
|
||||
#define OCRLITE_CALL __stdcall
|
||||
#else
|
||||
#define OCRLITE_CALL
|
||||
#endif /* _WIN32 */
|
||||
#endif /* OCRLITE_CALL */
|
||||
|
||||
#if defined _WIN32 || defined __CYGWIN__
|
||||
#define OCRLITE_EXPORT __declspec(dllexport)
|
||||
#define OCRLITE_IMPORT __declspec(dllimport)
|
||||
#define OCRLITE_LOCAL
|
||||
#else // ! defined _WIN32 || defined __CYGWIN__
|
||||
#if __GNUC__ >= 4
|
||||
#define OCRLITE_EXPORT __attribute__ ((visibility ("default")))
|
||||
#define OCRLITE_IMPORT __attribute__ ((visibility ("default")))
|
||||
#define OCRLITE_LOCAL __attribute__ ((visibility ("hidden")))
|
||||
#else // ! __GNUC__ >= 4
|
||||
#define OCRLITE_EXPORT
|
||||
#define OCRLITE_IMPORT
|
||||
#endif // End __GNUC__ >= 4
|
||||
#endif // End defined _WIN32 || defined __CYGWIN__
|
||||
|
||||
#ifdef __CLIB__
|
||||
#define OCRLITE_PORT OCRLITE_EXPORT
|
||||
#else
|
||||
#define OCRLITE_PORT OCRLITE_IMPORT
|
||||
#endif // OCRLITE_PORT
|
||||
|
||||
#define OCR_API OCRLITE_PORT OCRLITE_CALL
|
||||
|
||||
#define OCR_LOCAL OCRLITE_LOCAL OCRLITE_CALL
|
||||
|
||||
#else // __JNI__ || __EXEC__
|
||||
|
||||
#define OCRLITE_PORT
|
||||
#define OCR_API
|
||||
#define OCR_LOCAL
|
||||
|
||||
#endif // __JNI__ || __EXEC__
|
||||
55
3rdparty/include/OcrLiteOnnx/OcrStruct.h
vendored
Normal file
55
3rdparty/include/OcrLiteOnnx/OcrStruct.h
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
#ifndef __OCR_STRUCT_H__
|
||||
#define __OCR_STRUCT_H__
|
||||
|
||||
#include "opencv2/core.hpp"
|
||||
#include <vector>
|
||||
|
||||
#include "OcrLitePort.h"
|
||||
|
||||
struct ScaleParam {
|
||||
int srcWidth;
|
||||
int srcHeight;
|
||||
int dstWidth;
|
||||
int dstHeight;
|
||||
float ratioWidth;
|
||||
float ratioHeight;
|
||||
};
|
||||
|
||||
struct TextBox {
|
||||
std::vector<cv::Point> boxPoint;
|
||||
float score;
|
||||
};
|
||||
|
||||
struct Angle {
|
||||
int index;
|
||||
float score;
|
||||
double time;
|
||||
};
|
||||
|
||||
struct TextLine {
|
||||
std::string text;
|
||||
std::vector<float> charScores;
|
||||
double time;
|
||||
};
|
||||
|
||||
struct OCRLITE_PORT TextBlock {
|
||||
std::vector<cv::Point> boxPoint;
|
||||
float boxScore;
|
||||
int angleIndex;
|
||||
float angleScore;
|
||||
double angleTime;
|
||||
std::string text;
|
||||
std::vector<float> charScores;
|
||||
double crnnTime;
|
||||
double blockTime;
|
||||
};
|
||||
|
||||
struct OCRLITE_PORT OcrResult {
|
||||
double dbNetTime;
|
||||
std::vector<TextBlock> textBlocks;
|
||||
cv::Mat boxImg;
|
||||
double detectTime;
|
||||
std::string strRes;
|
||||
};
|
||||
|
||||
#endif //__OCR_STRUCT_H__
|
||||
103
3rdparty/include/OcrLiteOnnx/OcrUtils.h
vendored
Normal file
103
3rdparty/include/OcrLiteOnnx/OcrUtils.h
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
#ifndef __OCR_UTILS_H__
|
||||
#define __OCR_UTILS_H__
|
||||
|
||||
#include <opencv2/core.hpp>
|
||||
#include "OcrStruct.h"
|
||||
#include "onnxruntime_cxx_api.h"
|
||||
#include <numeric>
|
||||
#include <sys/stat.h>
|
||||
|
||||
template<typename T, typename... Ts>
|
||||
static std::unique_ptr<T> makeUnique(Ts &&... params) {
|
||||
return std::unique_ptr<T>(new T(std::forward<Ts>(params)...));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static double getMean(std::vector<T> &input) {
|
||||
auto sum = accumulate(input.begin(), input.end(), 0.0);
|
||||
return sum / input.size();
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static double getStdev(std::vector<T> &input, double mean) {
|
||||
if (input.size() <= 1) return 0;
|
||||
double accum = 0.0;
|
||||
for_each(input.begin(), input.end(), [&](const double d) {
|
||||
accum += (d - mean) * (d - mean);
|
||||
});
|
||||
double stdev = sqrt(accum / (input.size() - 1));
|
||||
return stdev;
|
||||
}
|
||||
|
||||
double getCurrentTime();
|
||||
|
||||
inline bool isFileExists(const std::string &name) {
|
||||
struct stat buffer;
|
||||
return (stat(name.c_str(), &buffer) == 0);
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#define my_strtol wcstol
|
||||
#define my_strrchr wcsrchr
|
||||
#define my_strcasecmp _wcsicmp
|
||||
#define my_strdup _strdup
|
||||
#else
|
||||
#define my_strtol strtol
|
||||
#define my_strrchr strrchr
|
||||
#define my_strcasecmp strcasecmp
|
||||
#define my_strdup strdup
|
||||
#endif
|
||||
|
||||
std::wstring strToWstr(std::string str);
|
||||
|
||||
ScaleParam getScaleParam(cv::Mat &src, const float scale);
|
||||
|
||||
ScaleParam getScaleParam(cv::Mat &src, const int targetSize);
|
||||
|
||||
std::vector<cv::Point2f> getBox(const cv::RotatedRect &rect);
|
||||
|
||||
int getThickness(cv::Mat &boxImg);
|
||||
|
||||
void drawTextBox(cv::Mat &boxImg, cv::RotatedRect &rect, int thickness);
|
||||
|
||||
void drawTextBox(cv::Mat &boxImg, const std::vector<cv::Point> &box, int thickness);
|
||||
|
||||
void drawTextBoxes(cv::Mat &boxImg, std::vector<TextBox> &textBoxes, int thickness);
|
||||
|
||||
cv::Mat matRotateClockWise180(cv::Mat src);
|
||||
|
||||
cv::Mat matRotateClockWise90(cv::Mat src);
|
||||
|
||||
cv::Mat getRotateCropImage(const cv::Mat &src, std::vector<cv::Point> box);
|
||||
|
||||
cv::Mat adjustTargetImg(cv::Mat &src, int dstWidth, int dstHeight);
|
||||
|
||||
std::vector<cv::Point> getMinBoxes(const std::vector<cv::Point> &inVec, float &minSideLen, float &allEdgeSize);
|
||||
|
||||
float boxScoreFast(const cv::Mat &inMat, const std::vector<cv::Point> &inBox);
|
||||
|
||||
std::vector<cv::Point> unClip(const std::vector<cv::Point> &inBox, float perimeter, float unClipRatio);
|
||||
|
||||
std::vector<float> substractMeanNormalize(cv::Mat &src, const float *meanVals, const float *normVals);
|
||||
|
||||
std::vector<int> getAngleIndexes(std::vector<Angle> &angles);
|
||||
|
||||
std::vector<char *> getInputNames(Ort::Session *session);
|
||||
|
||||
std::vector<char *> getOutputNames(Ort::Session *session);
|
||||
|
||||
void getInputName(Ort::Session *session, char *&inputName);
|
||||
|
||||
void getOutputName(Ort::Session *session, char *&outputName);
|
||||
|
||||
void saveImg(cv::Mat &img, const char *imgPath);
|
||||
|
||||
std::string getSrcImgFilePath(const char *path, const char *imgName);
|
||||
|
||||
std::string getResultTxtFilePath(const char *path, const char *imgName);
|
||||
|
||||
std::string getResultImgFilePath(const char *path, const char *imgName);
|
||||
|
||||
std::string getDebugImgFilePath(const char *path, const char *imgName, int i, const char *tag);
|
||||
|
||||
#endif //__OCR_UTILS_H__
|
||||
44
3rdparty/include/OcrLiteOnnx/getopt.h
vendored
Normal file
44
3rdparty/include/OcrLiteOnnx/getopt.h
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* getopt - POSIX like getopt for Windows console Application
|
||||
*
|
||||
* win-c - Windows Console Library
|
||||
* Copyright (c) 2015 Koji Takami
|
||||
* Released under the MIT license
|
||||
* https://github.com/takamin/win-c/blob/master/LICENSE
|
||||
*/
|
||||
#ifndef _GETOPT_H_
|
||||
#define _GETOPT_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
int getopt(int argc, char *const argv[],
|
||||
const char *optstring);
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind, opterr, optopt;
|
||||
|
||||
#define no_argument 0
|
||||
#define required_argument 1
|
||||
#define optional_argument 2
|
||||
|
||||
struct option {
|
||||
const char *name;
|
||||
int has_arg;
|
||||
int *flag;
|
||||
int val;
|
||||
};
|
||||
|
||||
int getopt_long(int argc, char *const argv[],
|
||||
const char *optstring,
|
||||
const struct option *longopts, int *longindex);
|
||||
/****************************************************************************
|
||||
int getopt_long_only(int argc, char* const argv[],
|
||||
const char* optstring,
|
||||
const struct option* longopts, int* longindex);
|
||||
****************************************************************************/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif // __cplusplus
|
||||
#endif // _GETOPT_H_
|
||||
54
3rdparty/include/OcrLiteOnnx/main.h
vendored
Normal file
54
3rdparty/include/OcrLiteOnnx/main.h
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
#ifndef __MAIN_H__
|
||||
#define __MAIN_H__
|
||||
|
||||
#include "getopt.h"
|
||||
|
||||
static const struct option long_options[] = {
|
||||
{"models", required_argument, NULL, 'd'},
|
||||
{"det", required_argument, NULL, '1'},
|
||||
{"cls", required_argument, NULL, '2'},
|
||||
{"rec", required_argument, NULL, '3'},
|
||||
{"keys", required_argument, NULL, '4'},
|
||||
{"image", required_argument, NULL, 'i'},
|
||||
{"numThread", required_argument, NULL, 't'},
|
||||
{"padding", required_argument, NULL, 'p'},
|
||||
{"maxSideLen", required_argument, NULL, 's'},
|
||||
{"boxScoreThresh", required_argument, NULL, 'b'},
|
||||
{"boxThresh", required_argument, NULL, 'o'},
|
||||
{"unClipRatio", required_argument, NULL, 'u'},
|
||||
{"doAngle", required_argument, NULL, 'a'},
|
||||
{"mostAngle", required_argument, NULL, 'A'},
|
||||
{"version", no_argument, NULL, 'v'},
|
||||
{"help", no_argument, NULL, 'h'},
|
||||
{"loopCount", required_argument, NULL, 'l'},
|
||||
{NULL, no_argument, NULL, 0}
|
||||
};
|
||||
|
||||
const char *usageMsg = "(-d --models) (-1 --det) (-2 --cls) (-3 --rec) (-4 --keys) (-i --image)\n"\
|
||||
"[-t --numThread] [-p --padding] [-s --maxSideLen]\n" \
|
||||
"[-b --boxScoreThresh] [-o --boxThresh] [-u --unClipRatio]\n" \
|
||||
"[-a --noAngle] [-A --mostAngle]\n\n";
|
||||
|
||||
const char *requiredMsg = "-d --models: models directory.\n" \
|
||||
"-1 --det: model file name of det.\n" \
|
||||
"-2 --cls: model file name of cls.\n" \
|
||||
"-3 --rec: model file name of rec.\n" \
|
||||
"-4 --keys: keys file name.\n" \
|
||||
"-i --image: path of target image.\n\n";
|
||||
|
||||
const char *optionalMsg = "-t --numThread: value of numThread(int), default: 4\n" \
|
||||
"-p --padding: value of padding(int), default: 50\n" \
|
||||
"-s --maxSideLen: Long side of picture for resize(int), default: 1024\n" \
|
||||
"-b --boxScoreThresh: value of boxScoreThresh(float), default: 0.6\n" \
|
||||
"-o --boxThresh: value of boxThresh(float), default: 0.3\n" \
|
||||
"-u --unClipRatio: value of unClipRatio(float), default: 2.0\n" \
|
||||
"-a --doAngle: Enable(1)/Disable(0) Angle Net, default: Enable\n" \
|
||||
"-A --mostAngle: Enable(1)/Disable(0) Most Possible AngleIndex, default: Enable\n\n";
|
||||
|
||||
const char *otherMsg = "-v --version: show version\n" \
|
||||
"-h --help: print this help\n\n";
|
||||
|
||||
const char *example1Msg = "Example1: %s --models models --det det.onnx --cls cls.onnx --rec rec.onnx --keys keys.txt --image 1.jpg\n";
|
||||
const char *example2Msg = "Example2: %s -d models -1 det.onnx -2 cls.onnx -3 rec.onnx -4 keys.txt -i 1.jpg -t 4 -p 50 -s 0 -b 0.6 -o 0.3 -u 2.0 -a 1 -A 1\n";
|
||||
|
||||
#endif //__MAIN_H__
|
||||
@@ -1,8 +1,6 @@
|
||||
#ifndef __OCR_VERSION_H__
|
||||
#define __OCR_VERSION_H__
|
||||
|
||||
namespace ocr {
|
||||
static const char* VERSION = "1.5.1.20210128";
|
||||
}
|
||||
#define VERSION "1.5.1.20210128"
|
||||
|
||||
#endif //__OCR_VERSION_H__
|
||||
462
3rdparty/include/calculator/calculator.hpp
vendored
Normal file
462
3rdparty/include/calculator/calculator.hpp
vendored
Normal file
@@ -0,0 +1,462 @@
|
||||
///
|
||||
/// @file calculator.hpp
|
||||
/// @brief calculator::eval(const std::string&) evaluates an integer
|
||||
/// arithmetic expression and returns the result. If an error
|
||||
/// occurs a calculator::error exception is thrown.
|
||||
/// <https://github.com/kimwalisch/calculator>
|
||||
/// @author Kim Walisch, <kim.walisch@gmail.com>
|
||||
/// @copyright Copyright (C) 2013-2018 Kim Walisch
|
||||
/// @license BSD 2-Clause, https://opensource.org/licenses/BSD-2-Clause
|
||||
/// @version 1.4
|
||||
///
|
||||
/// == Supported operators ==
|
||||
///
|
||||
/// OPERATOR NAME ASSOCIATIVITY PRECEDENCE
|
||||
///
|
||||
/// | Bitwise Inclusive OR Left 4
|
||||
/// ^ Bitwise Exclusive OR Left 5
|
||||
/// & Bitwise AND Left 6
|
||||
/// << Shift Left Left 9
|
||||
/// >> Shift Right Left 9
|
||||
/// + Addition Left 10
|
||||
/// - Subtraction Left 10
|
||||
/// * Multiplication Left 20
|
||||
/// / Division Left 20
|
||||
/// % Modulo Left 20
|
||||
/// ** Raise to power Right 30
|
||||
/// e, E Scientific notation Right 40
|
||||
/// ~ Unary complement Left 99
|
||||
///
|
||||
/// The operator precedence has been set according to (uses the C and
|
||||
/// C++ operator precedence): https://en.wikipedia.org/wiki/Order_of_operations
|
||||
/// Operators with higher precedence are evaluated before operators
|
||||
/// with relatively lower precedence. Unary operators are set to have
|
||||
/// the highest precedence, this is not strictly correct for the power
|
||||
/// operator e.g. "-3**2" = 9 but a lot of software tools (Bash shell,
|
||||
/// Microsoft Excel, GNU bc, ...) use the same convention.
|
||||
///
|
||||
/// == Examples of valid expressions ==
|
||||
///
|
||||
/// "65536 >> 15" = 2
|
||||
/// "2**16" = 65536
|
||||
/// "(0 + 0xDf234 - 1000)*3/2%999" = 828
|
||||
/// "-(2**2**2**2)" = -65536
|
||||
/// "(0 + ~(0xDF234 & 1000) *3) /-2" = 817
|
||||
/// "(2**16) + (1 << 16) >> 0X5" = 4096
|
||||
/// "5*-(2**(9+7))/3+5*(1 & 0xFf123)" = -109221
|
||||
///
|
||||
/// == About the algorithm used ==
|
||||
///
|
||||
/// calculator::eval(std::string&) relies on the ExpressionParser
|
||||
/// class which is a simple C++ operator precedence parser with infix
|
||||
/// notation for integer arithmetic expressions.
|
||||
/// ExpressionParser has its roots in a JavaScript parser published
|
||||
/// at: http://stackoverflow.com/questions/28256/equation-expression-parser-with-precedence/114961#114961
|
||||
/// The same author has also published an article about his operator
|
||||
/// precedence algorithm at PerlMonks:
|
||||
/// http://www.perlmonks.org/?node_id=554516
|
||||
///
|
||||
|
||||
#ifndef CALCULATOR_HPP
|
||||
#define CALCULATOR_HPP
|
||||
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <stack>
|
||||
#include <cstddef>
|
||||
#include <cctype>
|
||||
|
||||
namespace calculator
|
||||
{
|
||||
|
||||
/// calculator::eval() throws a calculator::error if it fails
|
||||
/// to evaluate the expression string.
|
||||
///
|
||||
class error : public std::runtime_error
|
||||
{
|
||||
public:
|
||||
error(const std::string& expr, const std::string& message)
|
||||
: std::runtime_error(message),
|
||||
expr_(expr)
|
||||
{ }
|
||||
#if __cplusplus < 201103L
|
||||
~error() throw() { }
|
||||
#endif
|
||||
std::string expression() const
|
||||
{
|
||||
return expr_;
|
||||
}
|
||||
private:
|
||||
std::string expr_;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class ExpressionParser
|
||||
{
|
||||
public:
|
||||
/// Evaluate an integer arithmetic expression and return its result.
|
||||
/// @throw error if parsing fails.
|
||||
///
|
||||
T eval(const std::string& expr)
|
||||
{
|
||||
T result = 0;
|
||||
index_ = 0;
|
||||
expr_ = expr;
|
||||
try
|
||||
{
|
||||
result = parseExpr();
|
||||
if (!isEnd())
|
||||
unexpected();
|
||||
}
|
||||
catch (const calculator::error&)
|
||||
{
|
||||
while(!stack_.empty())
|
||||
stack_.pop();
|
||||
throw;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// Get the integer value of a character.
|
||||
T eval(char c)
|
||||
{
|
||||
std::string expr(1, c);
|
||||
return eval(expr);
|
||||
}
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
OPERATOR_NULL,
|
||||
OPERATOR_BITWISE_OR, /// |
|
||||
OPERATOR_BITWISE_XOR, /// ^
|
||||
OPERATOR_BITWISE_AND, /// &
|
||||
OPERATOR_BITWISE_SHL, /// <<
|
||||
OPERATOR_BITWISE_SHR, /// >>
|
||||
OPERATOR_ADDITION, /// +
|
||||
OPERATOR_SUBTRACTION, /// -
|
||||
OPERATOR_MULTIPLICATION, /// *
|
||||
OPERATOR_DIVISION, /// /
|
||||
OPERATOR_MODULO, /// %
|
||||
OPERATOR_POWER, /// **
|
||||
OPERATOR_EXPONENT /// e, E
|
||||
};
|
||||
|
||||
struct Operator
|
||||
{
|
||||
/// Operator, one of the OPERATOR_* enum definitions
|
||||
int op;
|
||||
int precedence;
|
||||
/// 'L' = left or 'R' = right
|
||||
int associativity;
|
||||
Operator(int opr, int prec, int assoc) :
|
||||
op(opr),
|
||||
precedence(prec),
|
||||
associativity(assoc)
|
||||
{ }
|
||||
};
|
||||
|
||||
struct OperatorValue
|
||||
{
|
||||
Operator op;
|
||||
T value;
|
||||
OperatorValue(const Operator& opr, T val) :
|
||||
op(opr),
|
||||
value(val)
|
||||
{ }
|
||||
int getPrecedence() const
|
||||
{
|
||||
return op.precedence;
|
||||
}
|
||||
bool isNull() const
|
||||
{
|
||||
return op.op == OPERATOR_NULL;
|
||||
}
|
||||
};
|
||||
|
||||
/// Expression string
|
||||
std::string expr_;
|
||||
/// Current expression index, incremented whilst parsing
|
||||
std::size_t index_;
|
||||
/// The current operator and its left value
|
||||
/// are pushed onto the stack if the operator on
|
||||
/// top of the stack has lower precedence.
|
||||
std::stack<OperatorValue> stack_;
|
||||
|
||||
/// Exponentiation by squaring, x^n.
|
||||
static T pow(T x, T n)
|
||||
{
|
||||
T res = 1;
|
||||
|
||||
while (n > 0)
|
||||
{
|
||||
if (n % 2 != 0)
|
||||
{
|
||||
res *= x;
|
||||
n -= 1;
|
||||
}
|
||||
n /= 2;
|
||||
|
||||
if (n > 0)
|
||||
x *= x;
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
T checkZero(T value) const
|
||||
{
|
||||
if (value == 0)
|
||||
{
|
||||
std::string divOperators("/%");
|
||||
std::size_t division = expr_.find_last_of(divOperators, index_ - 2);
|
||||
std::ostringstream msg;
|
||||
msg << "Parser error: division by 0";
|
||||
if (division != std::string::npos)
|
||||
msg << " (error token is \""
|
||||
<< expr_.substr(division, expr_.size() - division)
|
||||
<< "\")";
|
||||
throw calculator::error(expr_, msg.str());
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
T calculate(T v1, T v2, const Operator& op) const
|
||||
{
|
||||
switch (op.op)
|
||||
{
|
||||
case OPERATOR_BITWISE_OR: return v1 | v2;
|
||||
case OPERATOR_BITWISE_XOR: return v1 ^ v2;
|
||||
case OPERATOR_BITWISE_AND: return v1 & v2;
|
||||
case OPERATOR_BITWISE_SHL: return v1 << v2;
|
||||
case OPERATOR_BITWISE_SHR: return v1 >> v2;
|
||||
case OPERATOR_ADDITION: return v1 + v2;
|
||||
case OPERATOR_SUBTRACTION: return v1 - v2;
|
||||
case OPERATOR_MULTIPLICATION: return v1 * v2;
|
||||
case OPERATOR_DIVISION: return v1 / checkZero(v2);
|
||||
case OPERATOR_MODULO: return v1 % checkZero(v2);
|
||||
case OPERATOR_POWER: return pow(v1, v2);
|
||||
case OPERATOR_EXPONENT: return v1 * pow(10, v2);
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool isEnd() const
|
||||
{
|
||||
return index_ >= expr_.size();
|
||||
}
|
||||
|
||||
/// Returns the character at the current expression index or
|
||||
/// 0 if the end of the expression is reached.
|
||||
///
|
||||
char getCharacter() const
|
||||
{
|
||||
if (!isEnd())
|
||||
return expr_[index_];
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// Parse str at the current expression index.
|
||||
/// @throw error if parsing fails.
|
||||
///
|
||||
void expect(const std::string& str)
|
||||
{
|
||||
if (expr_.compare(index_, str.size(), str) != 0)
|
||||
unexpected();
|
||||
index_ += str.size();
|
||||
}
|
||||
|
||||
void unexpected() const
|
||||
{
|
||||
std::ostringstream msg;
|
||||
msg << "Syntax error: unexpected token \""
|
||||
<< expr_.substr(index_, expr_.size() - index_)
|
||||
<< "\" at index "
|
||||
<< index_;
|
||||
throw calculator::error(expr_, msg.str());
|
||||
}
|
||||
|
||||
/// Eat all white space characters at the
|
||||
/// current expression index.
|
||||
///
|
||||
void eatSpaces()
|
||||
{
|
||||
while (std::isspace(getCharacter()) != 0)
|
||||
index_++;
|
||||
}
|
||||
|
||||
/// Parse a binary operator at the current expression index.
|
||||
/// @return Operator with precedence and associativity.
|
||||
///
|
||||
Operator parseOp()
|
||||
{
|
||||
eatSpaces();
|
||||
switch (getCharacter())
|
||||
{
|
||||
case '|': index_++; return Operator(OPERATOR_BITWISE_OR, 4, 'L');
|
||||
case '^': index_++; return Operator(OPERATOR_BITWISE_XOR, 5, 'L');
|
||||
case '&': index_++; return Operator(OPERATOR_BITWISE_AND, 6, 'L');
|
||||
case '<': expect("<<"); return Operator(OPERATOR_BITWISE_SHL, 9, 'L');
|
||||
case '>': expect(">>"); return Operator(OPERATOR_BITWISE_SHR, 9, 'L');
|
||||
case '+': index_++; return Operator(OPERATOR_ADDITION, 10, 'L');
|
||||
case '-': index_++; return Operator(OPERATOR_SUBTRACTION, 10, 'L');
|
||||
case '/': index_++; return Operator(OPERATOR_DIVISION, 20, 'L');
|
||||
case '%': index_++; return Operator(OPERATOR_MODULO, 20, 'L');
|
||||
case '*': index_++; if (getCharacter() != '*')
|
||||
return Operator(OPERATOR_MULTIPLICATION, 20, 'L');
|
||||
index_++; return Operator(OPERATOR_POWER, 30, 'R');
|
||||
case 'e': index_++; return Operator(OPERATOR_EXPONENT, 40, 'R');
|
||||
case 'E': index_++; return Operator(OPERATOR_EXPONENT, 40, 'R');
|
||||
default : return Operator(OPERATOR_NULL, 0, 'L');
|
||||
}
|
||||
}
|
||||
|
||||
static T toInteger(char c)
|
||||
{
|
||||
if (c >= '0' && c <= '9') return c -'0';
|
||||
if (c >= 'a' && c <= 'f') return c -'a' + 0xa;
|
||||
if (c >= 'A' && c <= 'F') return c -'A' + 0xa;
|
||||
T noDigit = 0xf + 1;
|
||||
return noDigit;
|
||||
}
|
||||
|
||||
T getInteger() const
|
||||
{
|
||||
return toInteger(getCharacter());
|
||||
}
|
||||
|
||||
T parseDecimal()
|
||||
{
|
||||
T value = 0;
|
||||
for (T d; (d = getInteger()) <= 9; index_++)
|
||||
value = value * 10 + d;
|
||||
return value;
|
||||
}
|
||||
|
||||
T parseHex()
|
||||
{
|
||||
index_ = index_ + 2;
|
||||
T value = 0;
|
||||
for (T h; (h = getInteger()) <= 0xf; index_++)
|
||||
value = value * 0x10 + h;
|
||||
return value;
|
||||
}
|
||||
|
||||
bool isHex() const
|
||||
{
|
||||
if (index_ + 2 < expr_.size())
|
||||
{
|
||||
char x = expr_[index_ + 1];
|
||||
char h = expr_[index_ + 2];
|
||||
return (std::tolower(x) == 'x' && toInteger(h) <= 0xf);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Parse an integer value at the current expression index.
|
||||
/// The unary `+', `-' and `~' operators and opening
|
||||
/// parentheses `(' cause recursion.
|
||||
///
|
||||
T parseValue()
|
||||
{
|
||||
T val = 0;
|
||||
eatSpaces();
|
||||
switch (getCharacter())
|
||||
{
|
||||
case '0': if (isHex())
|
||||
val = parseHex();
|
||||
else
|
||||
val = parseDecimal();
|
||||
break;
|
||||
case '1': case '2': case '3': case '4': case '5':
|
||||
case '6': case '7': case '8': case '9':
|
||||
val = parseDecimal();
|
||||
break;
|
||||
case '(': index_++;
|
||||
val = parseExpr();
|
||||
eatSpaces();
|
||||
if (getCharacter() != ')')
|
||||
{
|
||||
if (!isEnd())
|
||||
unexpected();
|
||||
throw calculator::error(expr_, "Syntax error: `)' expected at end of expression");
|
||||
}
|
||||
index_++; break;
|
||||
case '~': index_++; val = ~parseValue(); break;
|
||||
case '+': index_++; val = parseValue(); break;
|
||||
case '-': index_++; val = parseValue() * static_cast<T>(-1);
|
||||
break;
|
||||
default : if (!isEnd())
|
||||
unexpected();
|
||||
throw calculator::error(expr_, "Syntax error: value expected at end of expression");
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
/// Parse all operations of the current parenthesis
|
||||
/// level and the levels above, when done
|
||||
/// return the result (value).
|
||||
///
|
||||
T parseExpr()
|
||||
{
|
||||
stack_.push(OperatorValue(Operator(OPERATOR_NULL, 0, 'L'), 0));
|
||||
// first parse value on the left
|
||||
T value = parseValue();
|
||||
|
||||
while (!stack_.empty())
|
||||
{
|
||||
// parse an operator (+, -, *, ...)
|
||||
Operator op(parseOp());
|
||||
while (op.precedence < stack_.top().getPrecedence() || (
|
||||
op.precedence == stack_.top().getPrecedence() &&
|
||||
op.associativity == 'L'))
|
||||
{
|
||||
// end reached
|
||||
if (stack_.top().isNull())
|
||||
{
|
||||
stack_.pop();
|
||||
return value;
|
||||
}
|
||||
// do the calculation ("reduce"), producing a new value
|
||||
value = calculate(stack_.top().value, value, stack_.top().op);
|
||||
stack_.pop();
|
||||
}
|
||||
|
||||
// store on stack_ and continue parsing ("shift")
|
||||
stack_.push(OperatorValue(op, value));
|
||||
// parse value on the right
|
||||
value = parseValue();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
inline T eval(const std::string& expression)
|
||||
{
|
||||
ExpressionParser<T> parser;
|
||||
return parser.eval(expression);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T eval(char c)
|
||||
{
|
||||
ExpressionParser<T> parser;
|
||||
return parser.eval(c);
|
||||
}
|
||||
|
||||
inline int eval(const std::string& expression)
|
||||
{
|
||||
return eval<int>(expression);
|
||||
}
|
||||
|
||||
inline int eval(char c)
|
||||
{
|
||||
return eval<int>(c);
|
||||
}
|
||||
|
||||
} // namespace calculator
|
||||
|
||||
#endif
|
||||
@@ -18,18 +18,27 @@ namespace json
|
||||
using const_reverse_iterator = raw_array::const_reverse_iterator;
|
||||
|
||||
array() = default;
|
||||
array(const array &rhs) = default;
|
||||
array(array &&rhs) noexcept = default;
|
||||
array(const raw_array &arr);
|
||||
array(raw_array &&arr) noexcept;
|
||||
array(const array& rhs) = default;
|
||||
array(array&& rhs) noexcept = default;
|
||||
array(const raw_array& arr);
|
||||
array(raw_array&& arr) noexcept;
|
||||
array(std::initializer_list<raw_array::value_type> init_list);
|
||||
template<typename ArrayType>
|
||||
array(ArrayType arr) {
|
||||
static_assert(
|
||||
std::is_constructible<json::value, typename ArrayType::value_type>::value,
|
||||
"Parameter can't be used to construct a json::value");
|
||||
for (auto&& ele : arr) {
|
||||
_array_data.emplace_back(std::move(ele));
|
||||
}
|
||||
}
|
||||
|
||||
~array() noexcept = default;
|
||||
|
||||
bool empty() const noexcept { return _array_data.empty(); }
|
||||
size_t size() const noexcept { return _array_data.size(); }
|
||||
bool exist(size_t pos) const { return _array_data.size() < pos; }
|
||||
const value &at(size_t pos) const;
|
||||
const value& at(size_t pos) const;
|
||||
const std::string to_string() const;
|
||||
const std::string format(std::string shift_str = " ", size_t basic_shift_count = 0) const;
|
||||
|
||||
@@ -43,7 +52,7 @@ namespace json
|
||||
const double get(size_t pos, double default_value) const;
|
||||
const long double get(size_t pos, long double default_value) const;
|
||||
const std::string get(size_t pos, std::string default_value) const;
|
||||
const std::string get(size_t pos, const char * default_value) const;
|
||||
const std::string get(size_t pos, const char* default_value) const;
|
||||
|
||||
template <typename... Args>
|
||||
decltype(auto) emplace_back(Args &&... args)
|
||||
@@ -59,19 +68,23 @@ namespace json
|
||||
|
||||
iterator begin() noexcept;
|
||||
iterator end() noexcept;
|
||||
const_iterator begin() const noexcept;
|
||||
const_iterator end() const noexcept;
|
||||
const_iterator cbegin() const noexcept;
|
||||
const_iterator cend() const noexcept;
|
||||
|
||||
reverse_iterator rbegin() noexcept;
|
||||
reverse_iterator rend() noexcept;
|
||||
const_reverse_iterator rbegin() const noexcept;
|
||||
const_reverse_iterator rend() const noexcept;
|
||||
const_reverse_iterator crbegin() const noexcept;
|
||||
const_reverse_iterator crend() const noexcept;
|
||||
|
||||
const value &operator[](size_t pos) const;
|
||||
value &operator[](size_t pos);
|
||||
const value& operator[](size_t pos) const;
|
||||
value& operator[](size_t pos);
|
||||
|
||||
array &operator=(const array &) = default;
|
||||
array &operator=(array &&) noexcept = default;
|
||||
array& operator=(const array&) = default;
|
||||
array& operator=(array&&) noexcept = default;
|
||||
|
||||
// const raw_array &raw_data() const;
|
||||
|
||||
@@ -79,6 +92,6 @@ namespace json
|
||||
raw_array _array_data;
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &out, const array &arr);
|
||||
std::ostream& operator<<(std::ostream& out, const array& arr);
|
||||
|
||||
} // namespace json
|
||||
97
3rdparty/include/meojson/json_aux.h
vendored
Normal file
97
3rdparty/include/meojson/json_aux.h
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include "json_value.h"
|
||||
|
||||
namespace json
|
||||
{
|
||||
static std::string unescape_string(std::string&& str)
|
||||
{
|
||||
std::string replace_str;
|
||||
std::string escape_str = std::move(str);
|
||||
|
||||
for (size_t pos = 0; pos < escape_str.size(); ++pos)
|
||||
{
|
||||
switch (escape_str[pos]) {
|
||||
case '\"':
|
||||
replace_str = R"(\")";
|
||||
break;
|
||||
case '\\':
|
||||
replace_str = R"(\\)";
|
||||
break;
|
||||
case '\b':
|
||||
replace_str = R"(\b)";
|
||||
break;
|
||||
case '\f':
|
||||
replace_str = R"(\f)";
|
||||
break;
|
||||
case '\n':
|
||||
replace_str = R"(\n)";
|
||||
break;
|
||||
case '\r':
|
||||
replace_str = R"(\r)";
|
||||
break;
|
||||
case '\t':
|
||||
replace_str = R"(\t)";
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
escape_str.replace(pos, 1, replace_str);
|
||||
++pos;
|
||||
}
|
||||
return escape_str;
|
||||
}
|
||||
|
||||
static std::string unescape_string(const std::string& str)
|
||||
{
|
||||
return unescape_string(std::string(str));
|
||||
}
|
||||
|
||||
static std::string escape_string(std::string&& str)
|
||||
{
|
||||
std::string escape_str = std::move(str);
|
||||
|
||||
for (size_t pos = 0; pos + 1 < escape_str.size(); ++pos)
|
||||
{
|
||||
if (escape_str[pos] != '\\') {
|
||||
continue;
|
||||
}
|
||||
std::string replace_str;
|
||||
switch (escape_str[pos + 1]) {
|
||||
case '"':
|
||||
replace_str = "\"";
|
||||
break;
|
||||
case '\\':
|
||||
replace_str = "\\";
|
||||
break;
|
||||
case 'b':
|
||||
replace_str = "\b";
|
||||
break;
|
||||
case 'f':
|
||||
replace_str = "\f";
|
||||
break;
|
||||
case 'n':
|
||||
replace_str = "\n";
|
||||
break;
|
||||
case 'r':
|
||||
replace_str = "\r";
|
||||
break;
|
||||
case 't':
|
||||
replace_str = "\t";
|
||||
break;
|
||||
default:
|
||||
return std::string();
|
||||
break;
|
||||
}
|
||||
escape_str.replace(pos, 2, replace_str);
|
||||
}
|
||||
return escape_str;
|
||||
}
|
||||
|
||||
static std::string escape_string(const std::string& str)
|
||||
{
|
||||
return escape_string(std::string(str));
|
||||
}
|
||||
}
|
||||
27
3rdparty/include/meojson/json_exception.h
vendored
Normal file
27
3rdparty/include/meojson/json_exception.h
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
|
||||
namespace json
|
||||
{
|
||||
class exception : public std::exception
|
||||
{
|
||||
public:
|
||||
exception() = default;
|
||||
exception(const std::string& msg);
|
||||
|
||||
exception(const exception&) = default;
|
||||
exception& operator=(const exception&) = default;
|
||||
exception(exception&&) = default;
|
||||
exception& operator=(exception&&) = default;
|
||||
|
||||
virtual ~exception() noexcept override = default;
|
||||
|
||||
virtual const char* what() const noexcept override;
|
||||
|
||||
private:
|
||||
std::string m_msg;
|
||||
};
|
||||
|
||||
} // namespace json
|
||||
@@ -21,7 +21,16 @@ namespace json
|
||||
object(const raw_object& raw_obj);
|
||||
object(raw_object&& raw_obj);
|
||||
object(std::initializer_list<raw_object::value_type> init_list);
|
||||
|
||||
template<typename MapType>
|
||||
object(MapType map) {
|
||||
static_assert(
|
||||
std::is_constructible<raw_object::value_type, typename MapType::value_type>::value,
|
||||
"Parameter can't be used to construct a json::object::raw_object::value_type");
|
||||
for (auto&& ele : map) {
|
||||
_object_data.emplace(std::move(ele));
|
||||
}
|
||||
}
|
||||
|
||||
~object() = default;
|
||||
|
||||
bool empty() const noexcept { return _object_data.empty(); }
|
||||
@@ -57,6 +66,8 @@ namespace json
|
||||
|
||||
iterator begin() noexcept;
|
||||
iterator end() noexcept;
|
||||
const_iterator begin() const noexcept;
|
||||
const_iterator end() const noexcept;
|
||||
const_iterator cbegin() const noexcept;
|
||||
const_iterator cend() const noexcept;
|
||||
|
||||
@@ -15,12 +15,12 @@ namespace json
|
||||
public:
|
||||
~parser() noexcept = default;
|
||||
|
||||
static std::optional<value> parse(const std::string &content);
|
||||
static std::optional<value> parse(const std::string& content);
|
||||
|
||||
private:
|
||||
parser(
|
||||
const std::string::const_iterator &cbegin,
|
||||
const std::string::const_iterator &cend) noexcept
|
||||
const std::string::const_iterator& cbegin,
|
||||
const std::string::const_iterator& cend) noexcept
|
||||
: _cur(cbegin), _end(cend) {}
|
||||
|
||||
std::optional<value> parse();
|
||||
@@ -44,4 +44,7 @@ namespace json
|
||||
std::string::const_iterator _cur;
|
||||
std::string::const_iterator _end;
|
||||
};
|
||||
|
||||
std::optional<value> parse(const std::string& content);
|
||||
|
||||
} // namespace json
|
||||
@@ -29,8 +29,8 @@ namespace json
|
||||
|
||||
public:
|
||||
value();
|
||||
value(const value &rhs);
|
||||
value(value &&rhs) noexcept;
|
||||
value(const value& rhs);
|
||||
value(value&& rhs) noexcept;
|
||||
|
||||
value(bool b);
|
||||
|
||||
@@ -44,24 +44,24 @@ namespace json
|
||||
value(double num);
|
||||
value(long double num);
|
||||
|
||||
value(const char *str);
|
||||
value(const std::string &str);
|
||||
value(std::string &&str);
|
||||
value(const char* str);
|
||||
value(const std::string& str);
|
||||
value(std::string&& str);
|
||||
|
||||
value(const array &arr);
|
||||
value(array &&arr);
|
||||
value(const array& arr);
|
||||
value(array&& arr);
|
||||
// value(std::initializer_list<value> init_list); // for array
|
||||
|
||||
value(const object &obj);
|
||||
value(object &&obj);
|
||||
value(const object& obj);
|
||||
value(object&& obj);
|
||||
// error: conversion from ‘<brace-enclosed initializer list>’ to ‘json::value’ is ambiguous
|
||||
// value(std::initializer_list<std::pair<std::string, value>> init_list); // for object
|
||||
|
||||
// Constructed from raw data
|
||||
template <typename... Args>
|
||||
value(value_type type, Args &&... args)
|
||||
value(value_type type, Args &&...args)
|
||||
: _type(type),
|
||||
_raw_data(std::forward<Args>(args)...)
|
||||
_raw_data(std::forward<Args>(args)...)
|
||||
{
|
||||
static_assert(
|
||||
std::is_constructible<std::string, Args...>::value,
|
||||
@@ -85,15 +85,17 @@ namespace json
|
||||
bool exist(const std::string& key) const;
|
||||
bool exist(size_t pos) const;
|
||||
value_type type() const noexcept { return _type; }
|
||||
const value &at(size_t pos) const;
|
||||
const value &at(const std::string &key) const;
|
||||
const value& at(size_t pos) const;
|
||||
const value& at(const std::string& key) const;
|
||||
|
||||
template<typename Type>
|
||||
decltype(auto) get(const std::string& key, Type default_value) {
|
||||
template <typename Type>
|
||||
decltype(auto) get(const std::string& key, Type default_value) const
|
||||
{
|
||||
return is_object() ? as_object().get(key, default_value) : default_value;
|
||||
}
|
||||
template<typename Type>
|
||||
decltype(auto) get(size_t pos, Type default_value) {
|
||||
template <typename Type>
|
||||
decltype(auto) get(size_t pos, Type default_value) const
|
||||
{
|
||||
return is_array() ? as_array().get(pos, default_value) : default_value;
|
||||
}
|
||||
|
||||
@@ -108,8 +110,8 @@ namespace json
|
||||
const double as_double() const;
|
||||
const long double as_long_double() const;
|
||||
const std::string as_string() const;
|
||||
const array & as_array() const;
|
||||
const object & as_object() const;
|
||||
const array& as_array() const;
|
||||
const object& as_object() const;
|
||||
|
||||
array& as_array();
|
||||
object& as_object();
|
||||
@@ -118,18 +120,29 @@ namespace json
|
||||
const std::string to_string() const;
|
||||
const std::string format(std::string shift_str = " ", size_t basic_shift_count = 0) const;
|
||||
|
||||
value &operator=(const value &rhs);
|
||||
value &operator=(value &&) noexcept;
|
||||
value& operator=(const value& rhs);
|
||||
value& operator=(value&&) noexcept;
|
||||
|
||||
const value &operator[](size_t pos) const;
|
||||
value &operator[](size_t pos);
|
||||
value &operator[](const std::string &key);
|
||||
value &operator[](std::string &&key);
|
||||
explicit operator bool() const noexcept { return valid(); }
|
||||
const value& operator[](size_t pos) const;
|
||||
value& operator[](size_t pos);
|
||||
value& operator[](const std::string& key);
|
||||
value& operator[](std::string&& key);
|
||||
//explicit operator bool() const noexcept { return valid(); }
|
||||
|
||||
explicit operator bool() const { return as_boolean(); }
|
||||
explicit operator int() const { return as_integer(); }
|
||||
explicit operator long() const { return as_long(); }
|
||||
explicit operator unsigned long() const { return as_unsigned_long(); }
|
||||
explicit operator long long() const { return as_long_long(); }
|
||||
explicit operator unsigned long long() const { return as_unsigned_long_long(); }
|
||||
explicit operator float() const { return as_float(); }
|
||||
explicit operator double() const { return as_double(); }
|
||||
explicit operator long double() const { return as_long_double(); }
|
||||
explicit operator std::string() const { return as_string(); }
|
||||
|
||||
private:
|
||||
template <typename T>
|
||||
static std::unique_ptr<T> copy_unique_ptr(const std::unique_ptr<T> &t)
|
||||
static std::unique_ptr<T> copy_unique_ptr(const std::unique_ptr<T>& t)
|
||||
{
|
||||
return t == nullptr ? nullptr : std::make_unique<T>(*t);
|
||||
}
|
||||
@@ -141,7 +154,7 @@ namespace json
|
||||
};
|
||||
|
||||
const value invalid_value();
|
||||
std::ostream &operator<<(std::ostream &out, const value &val);
|
||||
std::ostream& operator<<(std::ostream& out, const value& val);
|
||||
// std::istream &operator>>(std::istream &in, value &val);
|
||||
|
||||
} // namespace json
|
||||
File diff suppressed because it is too large
Load Diff
150
3rdparty/include/opencv2/calib3d/calib3d_c.h
vendored
Normal file
150
3rdparty/include/opencv2/calib3d/calib3d_c.h
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
/*M///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
||||
//
|
||||
// By downloading, copying, installing or using the software you agree to this license.
|
||||
// If you do not agree to this license, do not download, install,
|
||||
// copy or use the software.
|
||||
//
|
||||
//
|
||||
// License Agreement
|
||||
// For Open Source Computer Vision Library
|
||||
//
|
||||
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
||||
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
||||
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
|
||||
// Third party copyrights are property of their respective owners.
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without modification,
|
||||
// are permitted provided that the following conditions are met:
|
||||
//
|
||||
// * Redistribution's of source code must retain the above copyright notice,
|
||||
// this list of conditions and the following disclaimer.
|
||||
//
|
||||
// * Redistribution's 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.
|
||||
//
|
||||
// * The name of the copyright holders may not 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 Intel Corporation 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.
|
||||
//
|
||||
//M*/
|
||||
|
||||
#ifndef OPENCV_CALIB3D_C_H
|
||||
#define OPENCV_CALIB3D_C_H
|
||||
|
||||
#include "opencv2/core/types_c.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Calculates fundamental matrix given a set of corresponding points */
|
||||
#define CV_FM_7POINT 1
|
||||
#define CV_FM_8POINT 2
|
||||
|
||||
#define CV_LMEDS 4
|
||||
#define CV_RANSAC 8
|
||||
|
||||
#define CV_FM_LMEDS_ONLY CV_LMEDS
|
||||
#define CV_FM_RANSAC_ONLY CV_RANSAC
|
||||
#define CV_FM_LMEDS CV_LMEDS
|
||||
#define CV_FM_RANSAC CV_RANSAC
|
||||
|
||||
enum
|
||||
{
|
||||
CV_ITERATIVE = 0,
|
||||
CV_EPNP = 1, // F.Moreno-Noguer, V.Lepetit and P.Fua "EPnP: Efficient Perspective-n-Point Camera Pose Estimation"
|
||||
CV_P3P = 2, // X.S. Gao, X.-R. Hou, J. Tang, H.-F. Chang; "Complete Solution Classification for the Perspective-Three-Point Problem"
|
||||
CV_DLS = 3 // Joel A. Hesch and Stergios I. Roumeliotis. "A Direct Least-Squares (DLS) Method for PnP"
|
||||
};
|
||||
|
||||
#define CV_CALIB_CB_ADAPTIVE_THRESH 1
|
||||
#define CV_CALIB_CB_NORMALIZE_IMAGE 2
|
||||
#define CV_CALIB_CB_FILTER_QUADS 4
|
||||
#define CV_CALIB_CB_FAST_CHECK 8
|
||||
|
||||
#define CV_CALIB_USE_INTRINSIC_GUESS 1
|
||||
#define CV_CALIB_FIX_ASPECT_RATIO 2
|
||||
#define CV_CALIB_FIX_PRINCIPAL_POINT 4
|
||||
#define CV_CALIB_ZERO_TANGENT_DIST 8
|
||||
#define CV_CALIB_FIX_FOCAL_LENGTH 16
|
||||
#define CV_CALIB_FIX_K1 32
|
||||
#define CV_CALIB_FIX_K2 64
|
||||
#define CV_CALIB_FIX_K3 128
|
||||
#define CV_CALIB_FIX_K4 2048
|
||||
#define CV_CALIB_FIX_K5 4096
|
||||
#define CV_CALIB_FIX_K6 8192
|
||||
#define CV_CALIB_RATIONAL_MODEL 16384
|
||||
#define CV_CALIB_THIN_PRISM_MODEL 32768
|
||||
#define CV_CALIB_FIX_S1_S2_S3_S4 65536
|
||||
#define CV_CALIB_TILTED_MODEL 262144
|
||||
#define CV_CALIB_FIX_TAUX_TAUY 524288
|
||||
#define CV_CALIB_FIX_TANGENT_DIST 2097152
|
||||
|
||||
#define CV_CALIB_NINTRINSIC 18
|
||||
|
||||
#define CV_CALIB_FIX_INTRINSIC 256
|
||||
#define CV_CALIB_SAME_FOCAL_LENGTH 512
|
||||
|
||||
#define CV_CALIB_ZERO_DISPARITY 1024
|
||||
|
||||
/* stereo correspondence parameters and functions */
|
||||
#define CV_STEREO_BM_NORMALIZED_RESPONSE 0
|
||||
#define CV_STEREO_BM_XSOBEL 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
class CV_EXPORTS CvLevMarq
|
||||
{
|
||||
public:
|
||||
CvLevMarq();
|
||||
CvLevMarq( int nparams, int nerrs, CvTermCriteria criteria=
|
||||
cvTermCriteria(CV_TERMCRIT_EPS+CV_TERMCRIT_ITER,30,DBL_EPSILON),
|
||||
bool completeSymmFlag=false );
|
||||
~CvLevMarq();
|
||||
void init( int nparams, int nerrs, CvTermCriteria criteria=
|
||||
cvTermCriteria(CV_TERMCRIT_EPS+CV_TERMCRIT_ITER,30,DBL_EPSILON),
|
||||
bool completeSymmFlag=false );
|
||||
bool update( const CvMat*& param, CvMat*& J, CvMat*& err );
|
||||
bool updateAlt( const CvMat*& param, CvMat*& JtJ, CvMat*& JtErr, double*& errNorm );
|
||||
|
||||
void clear();
|
||||
void step();
|
||||
enum { DONE=0, STARTED=1, CALC_J=2, CHECK_ERR=3 };
|
||||
|
||||
cv::Ptr<CvMat> mask;
|
||||
cv::Ptr<CvMat> prevParam;
|
||||
cv::Ptr<CvMat> param;
|
||||
cv::Ptr<CvMat> J;
|
||||
cv::Ptr<CvMat> err;
|
||||
cv::Ptr<CvMat> JtJ;
|
||||
cv::Ptr<CvMat> JtJN;
|
||||
cv::Ptr<CvMat> JtErr;
|
||||
cv::Ptr<CvMat> JtJV;
|
||||
cv::Ptr<CvMat> JtJW;
|
||||
double prevErrNorm, errNorm;
|
||||
int lambdaLg10;
|
||||
CvTermCriteria criteria;
|
||||
int state;
|
||||
int iters;
|
||||
bool completeSymmFlag;
|
||||
int solveMethod;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* OPENCV_CALIB3D_C_H */
|
||||
@@ -94,6 +94,11 @@
|
||||
@{
|
||||
@defgroup core_hal_intrin_impl Private implementation helpers
|
||||
@}
|
||||
@defgroup core_lowlevel_api Low-level API for external libraries / plugins
|
||||
@}
|
||||
@defgroup core_parallel Parallel Processing
|
||||
@{
|
||||
@defgroup core_parallel_backend Parallel backends API
|
||||
@}
|
||||
@}
|
||||
*/
|
||||
@@ -147,7 +152,7 @@ It is possible to alternate error processing by using #redirectError().
|
||||
@param exc the exception raisen.
|
||||
@deprecated drop this version
|
||||
*/
|
||||
CV_EXPORTS void error( const Exception& exc );
|
||||
CV_EXPORTS CV_NORETURN void error(const Exception& exc);
|
||||
|
||||
enum SortFlags { SORT_EVERY_ROW = 0, //!< each matrix row is sorted independently
|
||||
SORT_EVERY_COLUMN = 1, //!< each matrix column is sorted
|
||||
@@ -219,27 +224,6 @@ enum KmeansFlags {
|
||||
|
||||
//! @} core_cluster
|
||||
|
||||
//! type of line
|
||||
enum LineTypes {
|
||||
FILLED = -1,
|
||||
LINE_4 = 4, //!< 4-connected line
|
||||
LINE_8 = 8, //!< 8-connected line
|
||||
LINE_AA = 16 //!< antialiased line
|
||||
};
|
||||
|
||||
//! Only a subset of Hershey fonts <https://en.wikipedia.org/wiki/Hershey_fonts> are supported
|
||||
enum HersheyFonts {
|
||||
FONT_HERSHEY_SIMPLEX = 0, //!< normal size sans-serif font
|
||||
FONT_HERSHEY_PLAIN = 1, //!< small size sans-serif font
|
||||
FONT_HERSHEY_DUPLEX = 2, //!< normal size sans-serif font (more complex than FONT_HERSHEY_SIMPLEX)
|
||||
FONT_HERSHEY_COMPLEX = 3, //!< normal size serif font
|
||||
FONT_HERSHEY_TRIPLEX = 4, //!< normal size serif font (more complex than FONT_HERSHEY_COMPLEX)
|
||||
FONT_HERSHEY_COMPLEX_SMALL = 5, //!< smaller version of FONT_HERSHEY_COMPLEX
|
||||
FONT_HERSHEY_SCRIPT_SIMPLEX = 6, //!< hand-writing style font
|
||||
FONT_HERSHEY_SCRIPT_COMPLEX = 7, //!< more complex variant of FONT_HERSHEY_SCRIPT_SIMPLEX
|
||||
FONT_ITALIC = 16 //!< flag for italic font
|
||||
};
|
||||
|
||||
//! @addtogroup core_array
|
||||
//! @{
|
||||
|
||||
@@ -448,8 +432,13 @@ The function cv::divide divides one array by another:
|
||||
or a scalar by an array when there is no src1 :
|
||||
\f[\texttt{dst(I) = saturate(scale/src2(I))}\f]
|
||||
|
||||
When src2(I) is zero, dst(I) will also be zero. Different channels of
|
||||
multi-channel arrays are processed independently.
|
||||
Different channels of multi-channel arrays are processed independently.
|
||||
|
||||
For integer types when src2(I) is zero, dst(I) will also be zero.
|
||||
|
||||
@note In case of floating point data there is no special defined behavior for zero src2(I) values.
|
||||
Regular floating-point division is used.
|
||||
Expect correct IEEE-754 behaviour for floating-point data (with NaN, Inf result values).
|
||||
|
||||
@note Saturation is not applied when the output array has the depth CV_32S. You may even get
|
||||
result of an incorrect sign in the case of overflow.
|
||||
@@ -614,7 +603,7 @@ or
|
||||
// access pixel coordinates
|
||||
Point pnt = locations[i];
|
||||
@endcode
|
||||
@param src single-channel array (type CV_8UC1)
|
||||
@param src single-channel array
|
||||
@param idx the output array, type of cv::Mat or std::vector<Point>, corresponding to non-zero indices in the input
|
||||
*/
|
||||
CV_EXPORTS_W void findNonZero( InputArray src, OutputArray idx );
|
||||
@@ -714,7 +703,8 @@ CV_EXPORTS double norm( const SparseMat& src, int normType );
|
||||
|
||||
/** @brief Computes the Peak Signal-to-Noise Ratio (PSNR) image quality metric.
|
||||
|
||||
This function calculates the Peak Signal-to-Noise Ratio (PSNR) image quality metric in decibels (dB), between two input arrays src1 and src2. Arrays must have depth CV_8U.
|
||||
This function calculates the Peak Signal-to-Noise Ratio (PSNR) image quality metric in decibels (dB),
|
||||
between two input arrays src1 and src2. The arrays must have the same type.
|
||||
|
||||
The PSNR is calculated as follows:
|
||||
|
||||
@@ -722,13 +712,15 @@ The PSNR is calculated as follows:
|
||||
\texttt{PSNR} = 10 \cdot \log_{10}{\left( \frac{R^2}{MSE} \right) }
|
||||
\f]
|
||||
|
||||
where R is the maximum integer value of depth CV_8U (255) and MSE is the mean squared error between the two arrays.
|
||||
where R is the maximum integer value of depth (e.g. 255 in the case of CV_8U data)
|
||||
and MSE is the mean squared error between the two arrays.
|
||||
|
||||
@param src1 first input array.
|
||||
@param src2 second input array of the same size as src1.
|
||||
@param R the maximum pixel value (255 by default)
|
||||
|
||||
*/
|
||||
CV_EXPORTS_W double PSNR(InputArray src1, InputArray src2);
|
||||
CV_EXPORTS_W double PSNR(InputArray src1, InputArray src2, double R=255.);
|
||||
|
||||
/** @brief naive nearest neighbor finder
|
||||
|
||||
@@ -1371,6 +1363,17 @@ You may even get a negative value in the case of overflow.
|
||||
*/
|
||||
CV_EXPORTS_W void absdiff(InputArray src1, InputArray src2, OutputArray dst);
|
||||
|
||||
/** @brief This is an overloaded member function, provided for convenience (python)
|
||||
Copies the matrix to another one.
|
||||
When the operation mask is specified, if the Mat::create call shown above reallocates the matrix, the newly allocated matrix is initialized with all zeros before copying the data.
|
||||
@param src source matrix.
|
||||
@param dst Destination matrix. If it does not have a proper size or type before the operation, it is
|
||||
reallocated.
|
||||
@param mask Operation mask of the same size as \*this. Its non-zero elements indicate which matrix
|
||||
elements need to be copied. The mask has to be of type CV_8U and can have 1 or multiple channels.
|
||||
*/
|
||||
|
||||
void CV_EXPORTS_W copyTo(InputArray src, OutputArray dst, InputArray mask);
|
||||
/** @brief Checks if array elements lie between the elements of two other arrays.
|
||||
|
||||
The function checks the range as follows:
|
||||
@@ -2617,7 +2620,6 @@ public:
|
||||
static Mat subspaceReconstruct(InputArray W, InputArray mean, InputArray src);
|
||||
|
||||
protected:
|
||||
bool _dataAsRow; // unused, but needed for 3.0 ABI compatibility.
|
||||
int _num_components;
|
||||
Mat _eigenvectors;
|
||||
Mat _eigenvalues;
|
||||
@@ -3030,7 +3032,8 @@ public:
|
||||
class CV_EXPORTS Formatter
|
||||
{
|
||||
public:
|
||||
enum { FMT_DEFAULT = 0,
|
||||
enum FormatType {
|
||||
FMT_DEFAULT = 0,
|
||||
FMT_MATLAB = 1,
|
||||
FMT_CSV = 2,
|
||||
FMT_PYTHON = 3,
|
||||
@@ -3042,11 +3045,12 @@ public:
|
||||
|
||||
virtual Ptr<Formatted> format(const Mat& mtx) const = 0;
|
||||
|
||||
virtual void set16fPrecision(int p = 4) = 0;
|
||||
virtual void set32fPrecision(int p = 8) = 0;
|
||||
virtual void set64fPrecision(int p = 16) = 0;
|
||||
virtual void setMultiline(bool ml = true) = 0;
|
||||
|
||||
static Ptr<Formatter> get(int fmt = FMT_DEFAULT);
|
||||
static Ptr<Formatter> get(Formatter::FormatType fmt = FMT_DEFAULT);
|
||||
|
||||
};
|
||||
|
||||
@@ -3069,7 +3073,7 @@ String& operator << (String& out, const Mat& mtx)
|
||||
|
||||
class CV_EXPORTS Algorithm;
|
||||
|
||||
template<typename _Tp> struct ParamType {};
|
||||
template<typename _Tp, typename _EnumTp = void> struct ParamType {};
|
||||
|
||||
|
||||
/** @brief This is a base class for all more or less complex algorithms in OpenCV
|
||||
@@ -3182,9 +3186,9 @@ protected:
|
||||
void writeFormat(FileStorage& fs) const;
|
||||
};
|
||||
|
||||
struct Param {
|
||||
enum { INT=0, BOOLEAN=1, REAL=2, STRING=3, MAT=4, MAT_VECTOR=5, ALGORITHM=6, FLOAT=7,
|
||||
UNSIGNED_INT=8, UINT64=9, UCHAR=11, SCALAR=12 };
|
||||
enum struct Param {
|
||||
INT=0, BOOLEAN=1, REAL=2, STRING=3, MAT=4, MAT_VECTOR=5, ALGORITHM=6, FLOAT=7,
|
||||
UNSIGNED_INT=8, UINT64=9, UCHAR=11, SCALAR=12
|
||||
};
|
||||
|
||||
|
||||
@@ -3194,7 +3198,7 @@ template<> struct ParamType<bool>
|
||||
typedef bool const_param_type;
|
||||
typedef bool member_type;
|
||||
|
||||
enum { type = Param::BOOLEAN };
|
||||
static const Param type = Param::BOOLEAN;
|
||||
};
|
||||
|
||||
template<> struct ParamType<int>
|
||||
@@ -3202,7 +3206,7 @@ template<> struct ParamType<int>
|
||||
typedef int const_param_type;
|
||||
typedef int member_type;
|
||||
|
||||
enum { type = Param::INT };
|
||||
static const Param type = Param::INT;
|
||||
};
|
||||
|
||||
template<> struct ParamType<double>
|
||||
@@ -3210,7 +3214,7 @@ template<> struct ParamType<double>
|
||||
typedef double const_param_type;
|
||||
typedef double member_type;
|
||||
|
||||
enum { type = Param::REAL };
|
||||
static const Param type = Param::REAL;
|
||||
};
|
||||
|
||||
template<> struct ParamType<String>
|
||||
@@ -3218,7 +3222,7 @@ template<> struct ParamType<String>
|
||||
typedef const String& const_param_type;
|
||||
typedef String member_type;
|
||||
|
||||
enum { type = Param::STRING };
|
||||
static const Param type = Param::STRING;
|
||||
};
|
||||
|
||||
template<> struct ParamType<Mat>
|
||||
@@ -3226,7 +3230,7 @@ template<> struct ParamType<Mat>
|
||||
typedef const Mat& const_param_type;
|
||||
typedef Mat member_type;
|
||||
|
||||
enum { type = Param::MAT };
|
||||
static const Param type = Param::MAT;
|
||||
};
|
||||
|
||||
template<> struct ParamType<std::vector<Mat> >
|
||||
@@ -3234,7 +3238,7 @@ template<> struct ParamType<std::vector<Mat> >
|
||||
typedef const std::vector<Mat>& const_param_type;
|
||||
typedef std::vector<Mat> member_type;
|
||||
|
||||
enum { type = Param::MAT_VECTOR };
|
||||
static const Param type = Param::MAT_VECTOR;
|
||||
};
|
||||
|
||||
template<> struct ParamType<Algorithm>
|
||||
@@ -3242,7 +3246,7 @@ template<> struct ParamType<Algorithm>
|
||||
typedef const Ptr<Algorithm>& const_param_type;
|
||||
typedef Ptr<Algorithm> member_type;
|
||||
|
||||
enum { type = Param::ALGORITHM };
|
||||
static const Param type = Param::ALGORITHM;
|
||||
};
|
||||
|
||||
template<> struct ParamType<float>
|
||||
@@ -3250,7 +3254,7 @@ template<> struct ParamType<float>
|
||||
typedef float const_param_type;
|
||||
typedef float member_type;
|
||||
|
||||
enum { type = Param::FLOAT };
|
||||
static const Param type = Param::FLOAT;
|
||||
};
|
||||
|
||||
template<> struct ParamType<unsigned>
|
||||
@@ -3258,7 +3262,7 @@ template<> struct ParamType<unsigned>
|
||||
typedef unsigned const_param_type;
|
||||
typedef unsigned member_type;
|
||||
|
||||
enum { type = Param::UNSIGNED_INT };
|
||||
static const Param type = Param::UNSIGNED_INT;
|
||||
};
|
||||
|
||||
template<> struct ParamType<uint64>
|
||||
@@ -3266,7 +3270,7 @@ template<> struct ParamType<uint64>
|
||||
typedef uint64 const_param_type;
|
||||
typedef uint64 member_type;
|
||||
|
||||
enum { type = Param::UINT64 };
|
||||
static const Param type = Param::UINT64;
|
||||
};
|
||||
|
||||
template<> struct ParamType<uchar>
|
||||
@@ -3274,7 +3278,7 @@ template<> struct ParamType<uchar>
|
||||
typedef uchar const_param_type;
|
||||
typedef uchar member_type;
|
||||
|
||||
enum { type = Param::UCHAR };
|
||||
static const Param type = Param::UCHAR;
|
||||
};
|
||||
|
||||
template<> struct ParamType<Scalar>
|
||||
@@ -3282,7 +3286,16 @@ template<> struct ParamType<Scalar>
|
||||
typedef const Scalar& const_param_type;
|
||||
typedef Scalar member_type;
|
||||
|
||||
enum { type = Param::SCALAR };
|
||||
static const Param type = Param::SCALAR;
|
||||
};
|
||||
|
||||
template<typename _Tp>
|
||||
struct ParamType<_Tp, typename std::enable_if< std::is_enum<_Tp>::value >::type>
|
||||
{
|
||||
typedef typename std::underlying_type<_Tp>::type const_param_type;
|
||||
typedef typename std::underlying_type<_Tp>::type member_type;
|
||||
|
||||
static const Param type = Param::INT;
|
||||
};
|
||||
|
||||
//! @} core_basic
|
||||
@@ -499,7 +499,7 @@ typename cv::Affine3<T>::Vec3 cv::Affine3<T>::rvec() const
|
||||
double s = std::sqrt((rx*rx + ry*ry + rz*rz)*0.25);
|
||||
double c = (R.val[0] + R.val[4] + R.val[8] - 1) * 0.5;
|
||||
c = c > 1.0 ? 1.0 : c < -1.0 ? -1.0 : c;
|
||||
double theta = acos(c);
|
||||
double theta = std::acos(c);
|
||||
|
||||
if( s < 1e-5 )
|
||||
{
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user