|
@@ -120,8 +120,8 @@ int main(int argc, char *argv[]) {
|
|
|
//安卓原生上传
|
|
|
filepath[5] = "";
|
|
|
//PC 上传
|
|
|
- filepath[5] = "http://rescdn.yishihui.com/longvideo/video/vpc/20220309/17025689nSyGzifJFr4Apl0zc8";
|
|
|
-// filepath[5] = "http://rescdn.yishihui.com/longvideo/video/vpc/20220304/20090872TkYCoGR785GKZPPM7K";
|
|
|
+// filepath[5] = "http://rescdn.yishihui.com/longvideo/video/vpc/20220309/17025689nSyGzifJFr4Apl0zc8";
|
|
|
+ filepath[5] = "http://rescdn.yishihui.com/longvideo/video/vpc/20220310/701939000F0qpyCLetflI3COz";
|
|
|
http://rescdn.yishihui.com/longvideo/video/vpc/20220304/17938576TxEh0UJXpzcoYRJuHu
|
|
|
//本地 local 上传的视频
|
|
|
filepath[6] = "/Users/devyk/Data/Project/sample/github_code/OpenCVSample/temp/19581045gIiFKepxbbplF3XtsG.mp4";
|
|
@@ -160,16 +160,6 @@ int main(int argc, char *argv[]) {
|
|
|
|
|
|
//本地 local
|
|
|
std::vector<VideoSimilarityModel *> local = lists[size - 1];
|
|
|
- int *total_sim[size - 1];
|
|
|
-
|
|
|
- //本地检查的结果
|
|
|
-// for (int i = 0; i < local.size(); ++i) {
|
|
|
- //第 i 本地层的 hashs
|
|
|
-// std::vector<ImageHashModel *> local_hashs = local[i]->hashs;
|
|
|
-
|
|
|
- //对比的视频 size
|
|
|
-
|
|
|
-
|
|
|
int test_vis[6][10] = {0};
|
|
|
int test_vis_total[6][10] = {0};
|
|
|
for (int j = 0; j < size - 1; ++j) {
|
|
@@ -180,15 +170,8 @@ int main(int argc, char *argv[]) {
|
|
|
test_vis[j][g] = a;
|
|
|
test_vis_total[j][g] = b;
|
|
|
}
|
|
|
-
|
|
|
-// int *cur_sim = list_sim_compare(local[0]->hashs, lists[j][0]->hashs);
|
|
|
-// int a = cur_sim[0];
|
|
|
-// int b = cur_sim[1];
|
|
|
-// test_vis[j][0] = a;
|
|
|
-// test_vis_total[j][0] = b;
|
|
|
-
|
|
|
}
|
|
|
-// LOGE("相似度 = %f \n", sim_v * 1.0 / total_v * 1.0);
|
|
|
+
|
|
|
|
|
|
for (int i = 0; i <size-1; ++i) {
|
|
|
int a_t = 0,b_t = 0;
|
|
@@ -200,51 +183,6 @@ int main(int argc, char *argv[]) {
|
|
|
}
|
|
|
printf("");
|
|
|
|
|
|
-// const char *ret = get_video_similarity_list(input_json);
|
|
|
-// printf("ret =%s \n", ret);
|
|
|
-// free((void *) ret);
|
|
|
-// return 1;
|
|
|
-
|
|
|
-// VsimBean vsimBean[size];
|
|
|
-// for (int i = 0; i < size; ++i) {
|
|
|
-// vsimBean[i].filepath = strdup(filepath[i]);
|
|
|
-//// vsimBean[i].lists = vs->clips[i];
|
|
|
-// pthread_create(&vsimBean[i].id, 0, run_thread, &vsimBean[i]);
|
|
|
-// }
|
|
|
-// for (int i = 0; i < size; ++i) {
|
|
|
-// pthread_join(vsimBean[i].id, 0);
|
|
|
-// LOGE("################# path=%s size=%d \n", vsimBean[i].filepath, vsimBean[i].lists.size());
|
|
|
-// }
|
|
|
-
|
|
|
- //开始比较
|
|
|
-// for (int i = 0; i < size; ++i) {
|
|
|
-// for (int i = 0; i < 1; ++i) {
|
|
|
-// auto a = vsimBean[6];
|
|
|
-// for (int j = i; j < size - 1; ++j) {
|
|
|
-// auto b = vsimBean[j];
|
|
|
-// //比较 md5
|
|
|
-//// if (md5_is_exactly_the_same(a.image_md5, b.image_md5) == 0) {
|
|
|
-//// LOGE("path1=%s path2=%s MD5 完全相似\n", a.filepath, b.filepath);
|
|
|
-//// continue;
|
|
|
-//// } else {
|
|
|
-//// LOGE("path1=%s path2=%s MD5 完全不相似\n", a.filepath, b.filepath);
|
|
|
-//// }
|
|
|
-// int minFrames = MIN(a.lists.size(), b.lists.size());
|
|
|
-// int maxFrames = MAX(a.lists.size(), b.lists.size());
|
|
|
-// int sim_frame_count = 0;
|
|
|
-// //比较帧指纹
|
|
|
-// for (int k = 0; k < minFrames; ++k) {
|
|
|
-// float v_sim = fingerprint_compare(a.lists[k]->image_hash, b.lists[k]->image_hash,
|
|
|
-// MIN(a.lists[k]->img_len, b.lists[k]->img_len));
|
|
|
-// if (v_sim > 0.90) {
|
|
|
-// sim_frame_count++;
|
|
|
-// }
|
|
|
-// }
|
|
|
-// LOGE("path1=%s path2=%s 相似度=%f \n", a.filepath, b.filepath,
|
|
|
-// (float) sim_frame_count / (float) maxFrames);
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
LOGE("end \n");
|
|
|
return 0;
|
|
|
}
|