This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"script" : { | |
"lang": "painless", | |
"inline" : " | |
for (def key : params.keySet()) { | |
if (key == \"ctx\") | |
continue; | |
if (key == \"array1\") { | |
for (int i = 0; i < params.array1.size(); i++) { | |
for (int j = 0; j < ctx._source.array1.size(); j++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 图像匹配 - 在另一附图中找到匹配部分(小图是大图中的一部分) | |
* 1. 归一化互相关算法 - 简单, 但是需要尺寸不变, 应用较少 | |
* 2. SIFT(Scale-invariant feature transform, 尺度不变特征转换) - 对形变支持好 | |
* | |
* 图像相似度识别 - 给出两幅图的相似程度 | |
* 1. 颜色直方图计算方法 | |
* 缺点: 按照颜色的全局分布来看的,无法描述颜色的局部分布和色彩所处的位置。 | |
* 2. 图像指纹与汉明距离 (图像相似度比较的核心思想) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _UITILS_EXCEPTIONS_H | |
#define _UITILS_EXCEPTIONS_H | |
#include <stdexcept> | |
#include <string> | |
#include <cstring> | |
#include <errno.h> | |
#define NOEXCEPT noexcept |