mirror of https://github.com/opencv/opencv.git
commit
e8058b9fdb
43 changed files with 3519 additions and 844 deletions
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
@ -0,0 +1,67 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Functions for 64-bit Perf</h4> |
||||
<h7>CountnonZero, Mat::dot, Split, Merge</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Mat Shape</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (1000x1000) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../opencv.js" type="text/javascript"></script> |
||||
<script src="./perf_64bits.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Modules</h4> |
||||
<h7>Image Processing</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Kernels</h4> |
||||
<h7>Blur</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Parameters Filter</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (1280x720, CV_8UC1, BORDER_REPLICATE) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../../opencv.js" type="text/javascript"></script> |
||||
<script src="../base.js"></script> |
||||
<script src="../perf_helpfunc.js"></script> |
||||
<script src="./perf_blur.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Modules</h4> |
||||
<h7>Image Processing</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Kernels</h4> |
||||
<h7>Dilate</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Parameters Filter</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (1024x768, CV_8UC1) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../../opencv.js" type="text/javascript"></script> |
||||
<script src="../base.js"></script> |
||||
<script src="../perf_helpfunc.js"></script> |
||||
<script src="./perf_dilate.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Modules</h4> |
||||
<h7>Image Processing</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Kernels</h4> |
||||
<h7>Erode</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Parameters Filter</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (1024x768, CV_8UC1) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../../opencv.js" type="text/javascript"></script> |
||||
<script src="../base.js"></script> |
||||
<script src="../perf_helpfunc.js"></script> |
||||
<script src="./perf_erode.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Modules</h4> |
||||
<h7>Image Processing</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Kernels</h4> |
||||
<h7>Filter2D</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Parameters Filter</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (320x240, 3, BORDER_CONSTANT) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../../opencv.js" type="text/javascript"></script> |
||||
<script src="../base.js"></script> |
||||
<script src="../perf_helpfunc.js"></script> |
||||
<script src="./perf_filter2D.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Modules</h4> |
||||
<h7>Image Processing</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Kernels</h4> |
||||
<h7>gaussianBlur</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Parameters Filter</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (1280x720, CV_8UC1, BORDER_REPLICATE) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../../opencv.js" type="text/javascript"></script> |
||||
<script src="../base.js"></script> |
||||
<script src="../perf_helpfunc.js"></script> |
||||
<script src="./perf_gaussianBlur.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Modules</h4> |
||||
<h7>Image Processing</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Kernels</h4> |
||||
<h7>MedianBlur</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Parameters Filter</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (1280x720, CV_8UC1, 3) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../../opencv.js" type="text/javascript"></script> |
||||
<script src="../base.js"></script> |
||||
<script src="../perf_helpfunc.js"></script> |
||||
<script src="./perf_medianBlur.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Modules</h4> |
||||
<h7>Image Processing</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Kernels</h4> |
||||
<h7>pyrDown</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Parameters Filter</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (1920x1080, CV_8UC3) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../../opencv.js" type="text/javascript"></script> |
||||
<script src="../base.js"></script> |
||||
<script src="../perf_helpfunc.js"></script> |
||||
<script src="./perf_pyrDown.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Modules</h4> |
||||
<h7>Image Processing</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Kernels</h4> |
||||
<h7>Remap</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Parameters Filter</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (640x480, CV_16UC1, CV_16SC2, INTER_NEAREST) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../../opencv.js" type="text/javascript"></script> |
||||
<script src="../base.js"></script> |
||||
<script src="../perf_helpfunc.js"></script> |
||||
<script src="./perf_remap.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Modules</h4> |
||||
<h7>Image Processing</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Kernels</h4> |
||||
<h7>Scharr</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Parameters Filter</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (640x480, CV_16SC1, (0,1), BORDER_REPLICATE) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../../opencv.js" type="text/javascript"></script> |
||||
<script src="../base.js"></script> |
||||
<script src="../perf_helpfunc.js"></script> |
||||
<script src="./perf_scharr.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Modules</h4> |
||||
<h7>Image Processing</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Kernels</h4> |
||||
<h7>Sobel</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Parameters Filter</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (640x480, CV_16SC1, (0,1), BORDER_REPLICATE) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../../opencv.js" type="text/javascript"></script> |
||||
<script src="../base.js"></script> |
||||
<script src="../perf_helpfunc.js"></script> |
||||
<script src="./perf_sobel.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Modules</h4> |
||||
<h7>Image Processing</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Kernels</h4> |
||||
<h7>warpAffine</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Parameters Filter</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (640x480, INTER_NEAREST, BORDER_CONSTANT) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../../opencv.js" type="text/javascript"></script> |
||||
<script src="../base.js"></script> |
||||
<script src="../perf_helpfunc.js"></script> |
||||
<script src="./perf_warpAffine.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,73 @@ |
||||
<!DOCTYPE html> |
||||
<html> |
||||
<head> |
||||
<meta charset="utf-8"> |
||||
<title>OpenCV.js Performance Test</title> |
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"> |
||||
<style> |
||||
body { |
||||
font-size: 13px; |
||||
} |
||||
.top-margin { |
||||
margin-top:10px; |
||||
} |
||||
h1, h4 { |
||||
margin: 24px 0 0; |
||||
} |
||||
h1 { |
||||
font-size: 2.0em; |
||||
} |
||||
h4 { |
||||
font-size: 1.2em; |
||||
} |
||||
pre { |
||||
font-family: 'Consolas', 'Monaco', monospace, serif; |
||||
font-size: 12px; |
||||
tab-size: 2; |
||||
} |
||||
input[type=checkbox] { |
||||
vertical-align: middle; |
||||
} |
||||
</style> |
||||
</head> |
||||
<body> |
||||
<div class="container" id="container"> |
||||
<div class="row"> |
||||
<div class="col-12"> |
||||
<h1>OpenCV.js Performance Test</h1> |
||||
<div> |
||||
<h4>Modules</h4> |
||||
<h7>Image Processing</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Kernels</h4> |
||||
<h7>warpPerspective</h7> |
||||
</div> |
||||
<div> |
||||
<h4>Parameters Filter</h4> |
||||
<input type="text" id="params" min="1" size="40" placeholder="default: run all the case"/> for example: (640x480, INTER_NEAREST, BORDER_CONSTANT) |
||||
</div> |
||||
<div class='row labels-wrapper' id='labelitem'></div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<button type="button" id="runButton" class="btn btn-primary disabled" disabled="disabled">Loading</button> |
||||
(It will take several minutes)</div> |
||||
<div class="row top-margin"> |
||||
</div> |
||||
<div> |
||||
<pre id="log"></pre> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
</div> |
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/platform/1.3.5/platform.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/2.1.4/benchmark.js"></script> |
||||
<script src="../../opencv.js" type="text/javascript"></script> |
||||
<script src="../base.js"></script> |
||||
<script src="../perf_helpfunc.js"></script> |
||||
<script src="./perf_warpPerspective.js"></script> |
||||
</body> |
||||
</html> |
@ -0,0 +1,96 @@ |
||||
async function loadOpenCV(paths, onloadCallback) { |
||||
let OPENCV_URL = ""; |
||||
let asmPath = ""; |
||||
let wasmPath = ""; |
||||
let simdPath = ""; |
||||
let threadsPath = ""; |
||||
let threadsSimdPath = ""; |
||||
|
||||
if(!(paths instanceof Object)) { |
||||
throw new Error("The first input should be a object that points the path to the OpenCV.js"); |
||||
} |
||||
|
||||
if ("asm" in paths) { |
||||
asmPath = paths["asm"]; |
||||
} |
||||
|
||||
if ("wasm" in paths) { |
||||
wasmPath = paths["wasm"]; |
||||
} |
||||
|
||||
if ("threads" in paths) { |
||||
threadsPath = paths["threads"]; |
||||
} |
||||
|
||||
if ("simd" in paths) { |
||||
simdPath = paths["simd"]; |
||||
} |
||||
|
||||
if ("threadsSimd" in paths) { |
||||
threadsSimdPath = paths["threadsSimd"]; |
||||
} |
||||
|
||||
let wasmSupported = !(typeof WebAssembly === 'undefined'); |
||||
if (!wasmSupported && OPENCV_URL === "" && asmPath != "") { |
||||
OPENCV_URL = asmPath; |
||||
console.log("The OpenCV.js for Asm.js is loaded now"); |
||||
} else if (!wasmSupported && asmPath == ""){ |
||||
throw new Error("The browser supports the Asm.js only, but the path of OpenCV.js for Asm.js is empty"); |
||||
} |
||||
|
||||
let simdSupported = wasmSupported ? await wasmFeatureDetect.simd() : false; |
||||
let threadsSupported = wasmSupported ? await wasmFeatureDetect.threads() : false; |
||||
|
||||
if (simdSupported && threadsSupported && threadsSimdPath != "") { |
||||
OPENCV_URL = threadsSimdPath; |
||||
console.log("The OpenCV.js with simd and threads optimization is loaded now"); |
||||
} else if (simdSupported && simdPath != "") { |
||||
if (threadsSupported && threadsSimdPath === "") { |
||||
console.log("The browser supports simd and threads, but the path of OpenCV.js with simd and threads optimization is empty"); |
||||
} |
||||
OPENCV_URL = simdPath; |
||||
console.log("The OpenCV.js with simd optimization is loaded now."); |
||||
} else if (threadsSupported && threadsPath != "") { |
||||
if (simdSupported && threadsSimdPath === "") { |
||||
console.log("The browser supports simd and threads, but the path of OpenCV.js with simd and threads optimization is empty"); |
||||
} |
||||
OPENCV_URL = threadsPath; |
||||
console.log("The OpenCV.js with threads optimization is loaded now"); |
||||
} else if (wasmSupported && wasmPath != "") { |
||||
if(simdSupported && threadsSupported) { |
||||
console.log("The browser supports simd and threads, but the path of OpenCV.js with simd and threads optimization is empty"); |
||||
} |
||||
|
||||
if (simdSupported) { |
||||
console.log("The browser supports simd optimization, but the path of OpenCV.js with simd optimization is empty"); |
||||
} |
||||
|
||||
if (threadsSupported) { |
||||
console.log("The browser supports threads optimization, but the path of OpenCV.js with threads optimization is empty"); |
||||
} |
||||
|
||||
OPENCV_URL = wasmPath; |
||||
console.log("The OpenCV.js for wasm is loaded now"); |
||||
} else if (wasmSupported) { |
||||
console.log("The browser supports wasm, but the path of OpenCV.js for wasm is empty"); |
||||
} |
||||
|
||||
if (OPENCV_URL === "") { |
||||
throw new Error("No available OpenCV.js, please check your paths"); |
||||
} |
||||
|
||||
let script = document.createElement('script'); |
||||
script.setAttribute('async', ''); |
||||
script.setAttribute('type', 'text/javascript'); |
||||
script.addEventListener('load', () => { |
||||
onloadCallback(); |
||||
}); |
||||
script.addEventListener('error', () => { |
||||
console.log('Failed to load opencv.js'); |
||||
}); |
||||
script.src = OPENCV_URL; |
||||
let node = document.getElementsByTagName('script')[0]; |
||||
if (node.src != OPENCV_URL) { |
||||
node.parentNode.insertBefore(script, node); |
||||
} |
||||
} |
Loading…
Reference in new issue