|
@@ -4,8 +4,8 @@
|
|
|
|
|
|
|
|
|
|
static void *detection_thread(void *arg) {
|
|
static void *detection_thread(void *arg) {
|
|
-// const char *filename = "/Users/devyk/Downloads/IMG_3067.PNG";
|
|
|
|
- const char *filename = "/Users/devyk/Downloads/black.png";
|
|
|
|
|
|
+ const char *filename = "/Users/devyk/Downloads/IMG_3067.PNG";
|
|
|
|
+// const char *filename = "/Users/devyk/Downloads/black.png";
|
|
FILE *fp = fopen(filename, "rb");
|
|
FILE *fp = fopen(filename, "rb");
|
|
if (!fp) return reinterpret_cast<void *>(-1);
|
|
if (!fp) return reinterpret_cast<void *>(-1);
|
|
fseek(fp, 0L, SEEK_END);
|
|
fseek(fp, 0L, SEEK_END);
|
|
@@ -14,7 +14,7 @@ static void *detection_thread(void *arg) {
|
|
rewind(fp);
|
|
rewind(fp);
|
|
uint8_t *data = (uint8_t *) malloc(sizeof(uint8_t) * size);
|
|
uint8_t *data = (uint8_t *) malloc(sizeof(uint8_t) * size);
|
|
size_t size2 = fread(data, size, 1, fp);
|
|
size_t size2 = fread(data, size, 1, fp);
|
|
-// printf("图片模糊度检测 %d \n", image_blur_detection("/Users/devyk/Downloads/IMG_3067.PNG"));
|
|
|
|
|
|
+ printf("图片模糊度检测 %d \n", image_blur_detection("/Users/devyk/Downloads/IMG_3067.PNG"));
|
|
printf("图片模糊度检测 %d \n", bytes_blur_detection(data,size));
|
|
printf("图片模糊度检测 %d \n", bytes_blur_detection(data,size));
|
|
free(data);
|
|
free(data);
|
|
// printf("图片模糊度检测 %d \n", image_blur_detection("/Users/devyk/Downloads/black.png"));
|
|
// printf("图片模糊度检测 %d \n", image_blur_detection("/Users/devyk/Downloads/black.png"));
|