From: Tae-Young Chung Date: Tue, 5 Jun 2018 01:17:51 +0000 (+0900) Subject: Migration to OpenCV 3.4.1 X-Git-Tag: submit/tizen/20180620.034203^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a64e54c9545aa32e7984ecce9e6db400f1657e6;p=platform%2Fcore%2Fmultimedia%2Flibmm-utility.git Migration to OpenCV 3.4.1 imgcv has dependency to OpenCV which is upgraded to 3.4.1. This is a patch for Migration to OpenCV 3.4.1. Change-Id: I19c988f222c606f3d5084b8b046235c360f1e2dc Signed-off-by: Tae-Young Chung --- diff --git a/common/include/mm_util_debug.h b/common/include/mm_util_debug.h index 0ef1599..b98ec90 100755 --- a/common/include/mm_util_debug.h +++ b/common/include/mm_util_debug.h @@ -41,23 +41,23 @@ extern "C" #define FONT_COLOR_CYAN "\033[36m" #define mm_util_debug(fmt, arg...) do { \ - LOGD(FONT_COLOR_RESET""fmt"", ##arg); \ + LOGD(FONT_COLOR_RESET#fmt, ##arg); \ } while (0) #define mm_util_info(fmt, arg...) do { \ - LOGI(FONT_COLOR_RESET""fmt"", ##arg); \ + LOGI(FONT_COLOR_RESET#fmt, ##arg); \ } while (0) #define mm_util_warn(fmt, arg...) do { \ - LOGW(FONT_COLOR_RESET""fmt"", ##arg); \ + LOGW(FONT_COLOR_RESET#fmt, ##arg); \ } while (0) #define mm_util_error(fmt, arg...) do { \ - LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \ + LOGE(FONT_COLOR_RED#fmt FONT_COLOR_RESET, ##arg); \ } while (0) #define mm_util_sec_debug(fmt, arg...) do { \ - SECURE_LOGD(FONT_COLOR_CYAN""fmt""FONT_COLOR_RESET, ##arg); \ + SECURE_LOGD(FONT_COLOR_CYAN#fmt FONT_COLOR_RESET, ##arg); \ } while (0) #define mm_util_fenter() do { \ @@ -70,14 +70,14 @@ extern "C" #define mm_util_retm_if(expr, fmt, arg...) do { \ if (expr) { \ - LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \ + LOGE(FONT_COLOR_RED#fmt FONT_COLOR_RESET, ##arg); \ return; \ } \ } while (0) #define mm_util_retvm_if(expr, val, fmt, arg...) do { \ if (expr) { \ - LOGE(FONT_COLOR_RED""fmt""FONT_COLOR_RESET, ##arg); \ + LOGE(FONT_COLOR_RED#fmt FONT_COLOR_RESET, ##arg); \ return (val); \ } \ } while (0) @@ -86,7 +86,7 @@ extern "C" #define mm_util_stderror(fmt) do { \ char buf[ERR_BUF_LENGHT] = {0,}; \ strerror_r(errno, buf, ERR_BUF_LENGHT); \ - mm_util_error(fmt" : standard error= [%s]", buf); \ + mm_util_error(#fmt" : standard error= [%s]", buf); \ } while (0) /** diff --git a/imgcv/CMakeLists.txt b/imgcv/CMakeLists.txt index dbc9919..39a4288 100755 --- a/imgcv/CMakeLists.txt +++ b/imgcv/CMakeLists.txt @@ -23,10 +23,13 @@ INCLUDE(FindPkgConfig) pkg_check_modules(${fw_name} REQUIRED ${dependents}) FOREACH(flag ${${fw_name}_CFLAGS}) SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") + SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}") ENDFOREACH(flag) SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror") SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -fPIC") +SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g --w") IF("${ARCH}" STREQUAL "arm") ADD_DEFINITIONS("-DTARGET") diff --git a/imgcv/include/mm_util_imgcv_internal.h b/imgcv/include/mm_util_imgcv_internal.h index edd9fee..1682cd4 100755 --- a/imgcv/include/mm_util_imgcv_internal.h +++ b/imgcv/include/mm_util_imgcv_internal.h @@ -21,13 +21,13 @@ #include #include +#include +#include #ifdef __cplusplus extern "C" { #endif -#include -#include typedef struct _mm_util_imgcv_s { IplImage *inImg; diff --git a/imgcv/mm_util_imgcv.c b/imgcv/mm_util_imgcv.c deleted file mode 100755 index 2667a8c..0000000 --- a/imgcv/mm_util_imgcv.c +++ /dev/null @@ -1,249 +0,0 @@ -/* - * libmm-utility - * - * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. - * - * Contact: YoungHun Kim - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -#include -#include -#include "mm_util_private.h" -#include "mm_util_imgcv.h" -#include "mm_util_imgcv_internal.h" - -#define RGB_COLOR_CHANNELS 3 -#define HSV_COLOR_CHANNELS 3 - -#define HISTOGRAM_CHANNELS 3 -#define DEFAULT_NUM_HBINS 30 -#define DEFAULT_NUM_SBINS 32 -#define DEFAULT_NUM_VBINS 30 - -#define DEFAULT_RANGE_HUE 180 -#define DEFAULT_RANGE_SATURATION 256 -#define DEFAULT_RANGE_VALUE 256 - -static int _mm_util_imgcv_init(mm_util_imgcv_s *handle, int width, int height) -{ - mm_util_fenter(); - - handle->width = width; - handle->height = height; - - handle->inImg = cvCreateImageHeader(cvSize(width, height), IPL_DEPTH_8U, RGB_COLOR_CHANNELS); - if (handle->inImg == NULL) - return MM_UTIL_ERROR_INVALID_OPERATION; - - handle->hBins = DEFAULT_NUM_HBINS; - handle->sBins = DEFAULT_NUM_SBINS; - handle->vBins = DEFAULT_NUM_VBINS; - - handle->sizeOfHist[0] = handle->hBins; - handle->sizeOfHist[1] = handle->sBins; - handle->sizeOfHist[2] = handle->vBins; - - handle->hRanges[0] = 0; - handle->hRanges[1] = DEFAULT_RANGE_HUE; - handle->sRanges[0] = 0; - handle->sRanges[1] = DEFAULT_RANGE_SATURATION; - handle->vRanges[0] = 0; - handle->vRanges[1] = DEFAULT_RANGE_VALUE; - - mm_util_fleave(); - - return MM_UTIL_ERROR_NONE; -} - -static void _mm_util_imgcv_uninit(mm_util_imgcv_s *handle) -{ - mm_util_fenter(); - - if (handle->inImg != NULL) { - cvReleaseImageHeader(&handle->inImg); - handle->inImg = NULL; - } - - mm_util_fleave(); -} - -static int _mm_util_imgcv_set_buffer(mm_util_imgcv_s *handle, void *image_buffer) -{ - mm_util_fenter(); - - unsigned char *buffer = (unsigned char *)image_buffer; - - mm_util_debug("image_buffer [%p], width [%d]", buffer, handle->width); - - cvSetData(handle->inImg, buffer, RGB_COLOR_CHANNELS*(handle->width)); - if (handle->inImg == NULL) - return MM_UTIL_ERROR_INVALID_OPERATION; - - mm_util_fleave(); - - return MM_UTIL_ERROR_NONE; -} - -static void _convert_hsv_to_rgb(int hVal, int sVal, int vVal, float *rVal, float *gVal, float *bVal) -{ - mm_util_fenter(); - - CvMat *mat1 = cvCreateMat(1, 1 , CV_8UC3); - cvSet2D(mat1, 0, 0, cvScalar((double)hVal, (double)sVal, (double)vVal, 0.0)); - - CvMat *mat2 = cvCreateMat(1, 1, CV_8UC3); - - cvCvtColor(mat1, mat2, CV_HSV2BGR); - - CvScalar bgr = cvGet2D(mat2, 0, 0); - *bVal = (float)bgr.val[0]; - *gVal = (float)bgr.val[1]; - *rVal = (float)bgr.val[2]; - - mm_util_debug("from HSV[%f, %f, %f]", (float)hVal, (float)sVal, (float)vVal); - mm_util_debug("to BGR[%f, %f, %f]", *bVal, *gVal, *rVal); - -} - -static int _mm_util_imgcv_calculate_hist(mm_util_imgcv_s *handle, unsigned char *rgb_r, unsigned char *rgb_g, unsigned char *rgb_b) -{ - int nh = 0; - int ns = 0; - int nv = 0; - - int hVal = 0; - int sVal = 0; - int vVal = 0; - - float rVal = 0.f; - float gVal = 0.f; - float bVal = 0.f; - - unsigned int maxBinVal = 0; - int max_bin_idx[3] = {-1, -1, -1}; - - mm_util_fenter(); - - IplImage *hsvImg = cvCreateImage(cvSize(handle->width, handle->height), IPL_DEPTH_8U, HSV_COLOR_CHANNELS); - IplImage *hImg = cvCreateImage(cvSize(handle->width, handle->height), IPL_DEPTH_8U, 1); - IplImage *sImg = cvCreateImage(cvSize(handle->width, handle->height), IPL_DEPTH_8U, 1); - IplImage *vImg = cvCreateImage(cvSize(handle->width, handle->height), IPL_DEPTH_8U, 1); - - if (!hsvImg || !hImg || !sImg || !vImg) { - mm_util_error("fail to cvCreateImage()"); - return MM_UTIL_ERROR_INVALID_OPERATION; - } - - IplImage *planes[] = {hImg, sImg, vImg}; - - cvCvtColor(handle->inImg, hsvImg, CV_RGB2HSV); - cvSplit(hsvImg, hImg, sImg, vImg, NULL); - - float *ranges[] = {handle->hRanges, handle->sRanges, handle->vRanges}; - int histsize[] = {handle->sizeOfHist[0], handle->sizeOfHist[1], handle->sizeOfHist[2]}; - - /* create histogram*/ - CvHistogram *hist = cvCreateHist(HISTOGRAM_CHANNELS, histsize, CV_HIST_ARRAY, ranges, 1); - if (hist == NULL) - return MM_UTIL_ERROR_INVALID_OPERATION; - - cvCalcHist(planes, hist, 0, NULL); - - for (nh = 0; nh < (handle->hBins); nh++) { - for (ns = 0; ns < (handle->sBins); ns++) { - for (nv = 0; nv < (handle->vBins); nv++) { - unsigned int binVal = (unsigned int)cvGetReal3D((hist)->bins, nh, ns, nv); - if (binVal > maxBinVal) { - maxBinVal = binVal; - max_bin_idx[0] = nh; - max_bin_idx[1] = ns; - max_bin_idx[2] = nv; - } - } - } - } - - rVal = gVal = bVal = 0.0f; - hVal = cvRound((max_bin_idx[0]+1)*(handle->hRanges[1]/(float)handle->hBins)); - sVal = cvRound((max_bin_idx[1]+1)*(handle->sRanges[1]/(float)handle->sBins)); - vVal = cvRound((max_bin_idx[2]+1)*(handle->vRanges[1]/(float)handle->vBins)); - - _convert_hsv_to_rgb(hVal, sVal, vVal, &rVal, &gVal, &bVal); - - mm_util_debug("nh[%d], ns[%d], nv[%d]", max_bin_idx[0], max_bin_idx[1], max_bin_idx[2]); - mm_util_debug("h[%d], s[%d], v[%d]", hVal, sVal, vVal); - *rgb_r = rVal; - *rgb_g = gVal; - *rgb_b = bVal; - - cvReleaseImage(&hsvImg); - cvReleaseImage(&hImg); - cvReleaseImage(&sImg); - cvReleaseImage(&vImg); - - cvReleaseHist(&hist); - - mm_util_fleave(); - - return MM_UTIL_ERROR_NONE; -} - -int mm_util_cv_extract_representative_color(void *image_buffer, int width, int height, unsigned char *r_color, unsigned char *g_color, unsigned char *b_color) -{ - mm_util_fenter(); - - if (image_buffer == NULL) { - mm_util_error("#ERROR#: image buffer is NULL"); - return MM_UTIL_ERROR_INVALID_PARAMETER; - } - - mm_util_imgcv_s *handle = (mm_util_imgcv_s *)calloc(1, sizeof(mm_util_imgcv_s)); - if (handle == NULL) { - mm_util_error("#ERROR#: fail to create handle"); - return MM_UTIL_ERROR_OUT_OF_MEMORY; - } - - int ret = _mm_util_imgcv_init(handle, width, height); - if (ret != MM_UTIL_ERROR_NONE) { - _mm_util_imgcv_uninit(handle); - MMUTIL_SAFE_FREE(handle); - mm_util_error("#ERROR#: Fail to mm_util_imgcv_init: ret=%d", ret); - return ret; - } - - ret = _mm_util_imgcv_set_buffer(handle, image_buffer); - if (ret != MM_UTIL_ERROR_NONE) { - _mm_util_imgcv_uninit(handle); - MMUTIL_SAFE_FREE(handle); - mm_util_error("#ERROR#: Fail to mm_util_imgcv_set_buffer: ret=%d", ret); - return ret; - } - - ret = _mm_util_imgcv_calculate_hist(handle, r_color, g_color, b_color); - if (ret != MM_UTIL_ERROR_NONE) { - _mm_util_imgcv_uninit(handle); - MMUTIL_SAFE_FREE(handle); - mm_util_error("#ERROR#: Fail to mm_util_imgcv_calculate_hist: ret=%d", ret); - return ret; - } - - _mm_util_imgcv_uninit(handle); - - MMUTIL_SAFE_FREE(handle); - - mm_util_fleave(); - - return MM_UTIL_ERROR_NONE; -} diff --git a/imgcv/mm_util_imgcv.cpp b/imgcv/mm_util_imgcv.cpp new file mode 100755 index 0000000..2667a8c --- /dev/null +++ b/imgcv/mm_util_imgcv.cpp @@ -0,0 +1,249 @@ +/* + * libmm-utility + * + * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved. + * + * Contact: YoungHun Kim + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +#include +#include +#include "mm_util_private.h" +#include "mm_util_imgcv.h" +#include "mm_util_imgcv_internal.h" + +#define RGB_COLOR_CHANNELS 3 +#define HSV_COLOR_CHANNELS 3 + +#define HISTOGRAM_CHANNELS 3 +#define DEFAULT_NUM_HBINS 30 +#define DEFAULT_NUM_SBINS 32 +#define DEFAULT_NUM_VBINS 30 + +#define DEFAULT_RANGE_HUE 180 +#define DEFAULT_RANGE_SATURATION 256 +#define DEFAULT_RANGE_VALUE 256 + +static int _mm_util_imgcv_init(mm_util_imgcv_s *handle, int width, int height) +{ + mm_util_fenter(); + + handle->width = width; + handle->height = height; + + handle->inImg = cvCreateImageHeader(cvSize(width, height), IPL_DEPTH_8U, RGB_COLOR_CHANNELS); + if (handle->inImg == NULL) + return MM_UTIL_ERROR_INVALID_OPERATION; + + handle->hBins = DEFAULT_NUM_HBINS; + handle->sBins = DEFAULT_NUM_SBINS; + handle->vBins = DEFAULT_NUM_VBINS; + + handle->sizeOfHist[0] = handle->hBins; + handle->sizeOfHist[1] = handle->sBins; + handle->sizeOfHist[2] = handle->vBins; + + handle->hRanges[0] = 0; + handle->hRanges[1] = DEFAULT_RANGE_HUE; + handle->sRanges[0] = 0; + handle->sRanges[1] = DEFAULT_RANGE_SATURATION; + handle->vRanges[0] = 0; + handle->vRanges[1] = DEFAULT_RANGE_VALUE; + + mm_util_fleave(); + + return MM_UTIL_ERROR_NONE; +} + +static void _mm_util_imgcv_uninit(mm_util_imgcv_s *handle) +{ + mm_util_fenter(); + + if (handle->inImg != NULL) { + cvReleaseImageHeader(&handle->inImg); + handle->inImg = NULL; + } + + mm_util_fleave(); +} + +static int _mm_util_imgcv_set_buffer(mm_util_imgcv_s *handle, void *image_buffer) +{ + mm_util_fenter(); + + unsigned char *buffer = (unsigned char *)image_buffer; + + mm_util_debug("image_buffer [%p], width [%d]", buffer, handle->width); + + cvSetData(handle->inImg, buffer, RGB_COLOR_CHANNELS*(handle->width)); + if (handle->inImg == NULL) + return MM_UTIL_ERROR_INVALID_OPERATION; + + mm_util_fleave(); + + return MM_UTIL_ERROR_NONE; +} + +static void _convert_hsv_to_rgb(int hVal, int sVal, int vVal, float *rVal, float *gVal, float *bVal) +{ + mm_util_fenter(); + + CvMat *mat1 = cvCreateMat(1, 1 , CV_8UC3); + cvSet2D(mat1, 0, 0, cvScalar((double)hVal, (double)sVal, (double)vVal, 0.0)); + + CvMat *mat2 = cvCreateMat(1, 1, CV_8UC3); + + cvCvtColor(mat1, mat2, CV_HSV2BGR); + + CvScalar bgr = cvGet2D(mat2, 0, 0); + *bVal = (float)bgr.val[0]; + *gVal = (float)bgr.val[1]; + *rVal = (float)bgr.val[2]; + + mm_util_debug("from HSV[%f, %f, %f]", (float)hVal, (float)sVal, (float)vVal); + mm_util_debug("to BGR[%f, %f, %f]", *bVal, *gVal, *rVal); + +} + +static int _mm_util_imgcv_calculate_hist(mm_util_imgcv_s *handle, unsigned char *rgb_r, unsigned char *rgb_g, unsigned char *rgb_b) +{ + int nh = 0; + int ns = 0; + int nv = 0; + + int hVal = 0; + int sVal = 0; + int vVal = 0; + + float rVal = 0.f; + float gVal = 0.f; + float bVal = 0.f; + + unsigned int maxBinVal = 0; + int max_bin_idx[3] = {-1, -1, -1}; + + mm_util_fenter(); + + IplImage *hsvImg = cvCreateImage(cvSize(handle->width, handle->height), IPL_DEPTH_8U, HSV_COLOR_CHANNELS); + IplImage *hImg = cvCreateImage(cvSize(handle->width, handle->height), IPL_DEPTH_8U, 1); + IplImage *sImg = cvCreateImage(cvSize(handle->width, handle->height), IPL_DEPTH_8U, 1); + IplImage *vImg = cvCreateImage(cvSize(handle->width, handle->height), IPL_DEPTH_8U, 1); + + if (!hsvImg || !hImg || !sImg || !vImg) { + mm_util_error("fail to cvCreateImage()"); + return MM_UTIL_ERROR_INVALID_OPERATION; + } + + IplImage *planes[] = {hImg, sImg, vImg}; + + cvCvtColor(handle->inImg, hsvImg, CV_RGB2HSV); + cvSplit(hsvImg, hImg, sImg, vImg, NULL); + + float *ranges[] = {handle->hRanges, handle->sRanges, handle->vRanges}; + int histsize[] = {handle->sizeOfHist[0], handle->sizeOfHist[1], handle->sizeOfHist[2]}; + + /* create histogram*/ + CvHistogram *hist = cvCreateHist(HISTOGRAM_CHANNELS, histsize, CV_HIST_ARRAY, ranges, 1); + if (hist == NULL) + return MM_UTIL_ERROR_INVALID_OPERATION; + + cvCalcHist(planes, hist, 0, NULL); + + for (nh = 0; nh < (handle->hBins); nh++) { + for (ns = 0; ns < (handle->sBins); ns++) { + for (nv = 0; nv < (handle->vBins); nv++) { + unsigned int binVal = (unsigned int)cvGetReal3D((hist)->bins, nh, ns, nv); + if (binVal > maxBinVal) { + maxBinVal = binVal; + max_bin_idx[0] = nh; + max_bin_idx[1] = ns; + max_bin_idx[2] = nv; + } + } + } + } + + rVal = gVal = bVal = 0.0f; + hVal = cvRound((max_bin_idx[0]+1)*(handle->hRanges[1]/(float)handle->hBins)); + sVal = cvRound((max_bin_idx[1]+1)*(handle->sRanges[1]/(float)handle->sBins)); + vVal = cvRound((max_bin_idx[2]+1)*(handle->vRanges[1]/(float)handle->vBins)); + + _convert_hsv_to_rgb(hVal, sVal, vVal, &rVal, &gVal, &bVal); + + mm_util_debug("nh[%d], ns[%d], nv[%d]", max_bin_idx[0], max_bin_idx[1], max_bin_idx[2]); + mm_util_debug("h[%d], s[%d], v[%d]", hVal, sVal, vVal); + *rgb_r = rVal; + *rgb_g = gVal; + *rgb_b = bVal; + + cvReleaseImage(&hsvImg); + cvReleaseImage(&hImg); + cvReleaseImage(&sImg); + cvReleaseImage(&vImg); + + cvReleaseHist(&hist); + + mm_util_fleave(); + + return MM_UTIL_ERROR_NONE; +} + +int mm_util_cv_extract_representative_color(void *image_buffer, int width, int height, unsigned char *r_color, unsigned char *g_color, unsigned char *b_color) +{ + mm_util_fenter(); + + if (image_buffer == NULL) { + mm_util_error("#ERROR#: image buffer is NULL"); + return MM_UTIL_ERROR_INVALID_PARAMETER; + } + + mm_util_imgcv_s *handle = (mm_util_imgcv_s *)calloc(1, sizeof(mm_util_imgcv_s)); + if (handle == NULL) { + mm_util_error("#ERROR#: fail to create handle"); + return MM_UTIL_ERROR_OUT_OF_MEMORY; + } + + int ret = _mm_util_imgcv_init(handle, width, height); + if (ret != MM_UTIL_ERROR_NONE) { + _mm_util_imgcv_uninit(handle); + MMUTIL_SAFE_FREE(handle); + mm_util_error("#ERROR#: Fail to mm_util_imgcv_init: ret=%d", ret); + return ret; + } + + ret = _mm_util_imgcv_set_buffer(handle, image_buffer); + if (ret != MM_UTIL_ERROR_NONE) { + _mm_util_imgcv_uninit(handle); + MMUTIL_SAFE_FREE(handle); + mm_util_error("#ERROR#: Fail to mm_util_imgcv_set_buffer: ret=%d", ret); + return ret; + } + + ret = _mm_util_imgcv_calculate_hist(handle, r_color, g_color, b_color); + if (ret != MM_UTIL_ERROR_NONE) { + _mm_util_imgcv_uninit(handle); + MMUTIL_SAFE_FREE(handle); + mm_util_error("#ERROR#: Fail to mm_util_imgcv_calculate_hist: ret=%d", ret); + return ret; + } + + _mm_util_imgcv_uninit(handle); + + MMUTIL_SAFE_FREE(handle); + + mm_util_fleave(); + + return MM_UTIL_ERROR_NONE; +} diff --git a/imgcv/test/mm_util_imgcv_testsuite.c b/imgcv/test/mm_util_imgcv_testsuite.c index 89623af..fced574 100755 --- a/imgcv/test/mm_util_imgcv_testsuite.c +++ b/imgcv/test/mm_util_imgcv_testsuite.c @@ -19,11 +19,11 @@ * */ #include +#include #include #include #include -#include #define MAX_FILENAME_LEN 1024 diff --git a/packaging/libmm-utility.spec b/packaging/libmm-utility.spec index e166334..493e2a4 100755 --- a/packaging/libmm-utility.spec +++ b/packaging/libmm-utility.spec @@ -1,6 +1,6 @@ Name: libmm-utility Summary: Multimedia Framework Utility Library -Version: 0.1.23 +Version: 0.1.24 Release: 0 Group: System/Libraries License: Apache-2.0 @@ -17,7 +17,7 @@ BuildRequires: pkgconfig(gio-2.0) BuildRequires: pkgconfig(gmodule-2.0) BuildRequires: libjpeg-turbo-devel BuildRequires: pkgconfig(libtzplatform-config) -BuildRequires: pkgconfig(opencv) +BuildRequires: pkgconfig(opencv) >= 3.4.1 BuildRequires: pkgconfig(libpng) BuildRequires: giflib-devel BuildRequires: pkgconfig(libbmp)