Name: capi-media-vision
Summary: Media Vision library for Tizen Native API
-Version: 0.2.2
+Version: 0.2.3
Release: 0
Group: Multimedia/Framework
License: Apache-2.0 and BSD-2.0
*/
int mv_barcode_detect(
- mv_source_h source,
- mv_engine_config_h engine_cfg,
- mv_rectangle_s roi,
- mv_barcode_detected_cb detect_cb,
- void *user_data)
+ mv_source_h source,
+ mv_engine_config_h engine_cfg,
+ mv_rectangle_s roi,
+ mv_barcode_detected_cb detect_cb,
+ void *user_data)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_barcode_detect_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(detect_cb);
-
- MEDIA_VISION_FUNCTION_ENTER();
-
- int ret = MEDIA_VISION_ERROR_NONE;
- unsigned int src_w = 0;
- unsigned int src_h = 0;
-
- ret = mv_source_get_width(source, &src_w);
- if (ret != MEDIA_VISION_ERROR_NONE)
- {
- LOGE("mv_source_get_width fail");
- return ret;
- }
-
- ret = mv_source_get_height(source, &src_h);
- if (ret != MEDIA_VISION_ERROR_NONE)
- {
- LOGE("mv_source_get_height fail");
- return ret;
- }
-
- if (roi.point.x < 0 || roi.point.y < 0 ||
- (roi.point.x + roi.width) > src_w ||
- (roi.point.y + roi.height) > src_h)
- {
- LOGE("roi is out of area on source");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(__mv_barcode_detect_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(detect_cb);
+
+ MEDIA_VISION_FUNCTION_ENTER();
+
+ int ret = MEDIA_VISION_ERROR_NONE;
+ unsigned int src_w = 0;
+ unsigned int src_h = 0;
+
+ ret = mv_source_get_width(source, &src_w);
+ if (ret != MEDIA_VISION_ERROR_NONE) {
+ LOGE("mv_source_get_width fail");
+ return ret;
+ }
+
+ ret = mv_source_get_height(source, &src_h);
+ if (ret != MEDIA_VISION_ERROR_NONE) {
+ LOGE("mv_source_get_height fail");
+ return ret;
+ }
+
+ if (roi.point.x < 0 || roi.point.y < 0 ||
+ (roi.point.x + roi.width) > src_w ||
+ (roi.point.y + roi.height) > src_h) {
+ LOGE("roi is out of area on source");
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
#ifdef MEDIA_VISION_BARCODE_DETECTOR_LICENSE_PORT
- /* Use licensed barcode detect functionality here. */
- ret = mv_barcode_detect_lic(
- source, engine_cfg, roi, detect_cb, user_data);
+ /* Use licensed barcode detect functionality here. */
+ ret = mv_barcode_detect_lic(
+ source, engine_cfg, roi, detect_cb, user_data);
#else
- /* Use open barcode detect functionality here. */
- ret = mv_barcode_detect_open(
- source, engine_cfg, roi, detect_cb, user_data);
+ /* Use open barcode detect functionality here. */
+ ret = mv_barcode_detect_open(
+ source, engine_cfg, roi, detect_cb, user_data);
#endif /* MEDIA_VISION_BARCODE_DETECTOR_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_barcode_generate_source(
- mv_engine_config_h engine_cfg,
- const char *message,
- mv_barcode_type_e type,
- mv_barcode_qr_mode_e qr_enc_mode,
- mv_barcode_qr_ecc_e qr_ecc,
- int qr_version,
- mv_source_h image)
+ mv_engine_config_h engine_cfg,
+ const char *message,
+ mv_barcode_type_e type,
+ mv_barcode_qr_mode_e qr_enc_mode,
+ mv_barcode_qr_ecc_e qr_ecc,
+ int qr_version,
+ mv_source_h image)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_barcode_generate_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(message);
- MEDIA_VISION_INSTANCE_CHECK(image);
-
- MEDIA_VISION_FUNCTION_ENTER();
-
- if (type < MV_BARCODE_QR ||
- type >= MV_BARCODE_UNDEFINED)
- {
- LOGE("Not supported barcode type [%d]", type);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
-
- if (type == MV_BARCODE_QR)
- {
- if (qr_enc_mode < MV_BARCODE_QR_MODE_NUMERIC ||
- qr_enc_mode >= MV_BARCODE_QR_MODE_UNAVAILABLE)
- {
- LOGE("Not supported QR encoding mode[%d]", qr_enc_mode);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
-
- if (qr_ecc < MV_BARCODE_QR_ECC_LOW ||
- qr_ecc >= MV_BARCODE_QR_ECC_UNAVAILABLE)
- {
- LOGE("Not supported QR ECC level [%d]", qr_ecc);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
-
- if (qr_version < 1 || qr_version > 40)
- {
- LOGE("Not supported QR version [%d]", qr_version);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
- }
+ MEDIA_VISION_SUPPORT_CHECK(__mv_barcode_generate_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(message);
+ MEDIA_VISION_INSTANCE_CHECK(image);
+
+ MEDIA_VISION_FUNCTION_ENTER();
+
+ if (type < MV_BARCODE_QR ||
+ type >= MV_BARCODE_UNDEFINED) {
+ LOGE("Not supported barcode type [%d]", type);
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
+
+ if (type == MV_BARCODE_QR) {
+ if (qr_enc_mode < MV_BARCODE_QR_MODE_NUMERIC ||
+ qr_enc_mode >= MV_BARCODE_QR_MODE_UNAVAILABLE) {
+ LOGE("Not supported QR encoding mode[%d]", qr_enc_mode);
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
+
+ if (qr_ecc < MV_BARCODE_QR_ECC_LOW ||
+ qr_ecc >= MV_BARCODE_QR_ECC_UNAVAILABLE) {
+ LOGE("Not supported QR ECC level [%d]", qr_ecc);
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
+
+ if (qr_version < 1 || qr_version > 40) {
+ LOGE("Not supported QR version [%d]", qr_version);
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
+ }
#ifdef MEDIA_VISION_BARCODE_GENERATOR_LICENSE_PORT
- /* Use licensed barcode generate functionality here. */
- int ret = mv_barcode_generate_source_lic(
- engine_cfg, message, type, qr_enc_mode, qr_ecc, qr_version,
- image);
+ /* Use licensed barcode generate functionality here. */
+ int ret = mv_barcode_generate_source_lic(
+ engine_cfg, message, type, qr_enc_mode, qr_ecc, qr_version,
+ image);
#else
- /* Use open barcode generate functionality here. */
- int ret = mv_barcode_generate_source_open(
- engine_cfg, message, type, qr_enc_mode, qr_ecc, qr_version,
- image);
+ /* Use open barcode generate functionality here. */
+ int ret = mv_barcode_generate_source_open(
+ engine_cfg, message, type, qr_enc_mode, qr_ecc, qr_version,
+ image);
#endif /* MEDIA_VISION_BARCODE_GENERATOR_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_barcode_generate_image(
- mv_engine_config_h engine_cfg,
- const char *message,
- int image_width,
- int image_height,
- mv_barcode_type_e type,
- mv_barcode_qr_mode_e qr_enc_mode,
- mv_barcode_qr_ecc_e qr_ecc,
- int qr_version,
- const char *image_path,
- mv_barcode_image_format_e image_format)
+ mv_engine_config_h engine_cfg,
+ const char *message,
+ int image_width,
+ int image_height,
+ mv_barcode_type_e type,
+ mv_barcode_qr_mode_e qr_enc_mode,
+ mv_barcode_qr_ecc_e qr_ecc,
+ int qr_version,
+ const char *image_path,
+ mv_barcode_image_format_e image_format)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_barcode_generate_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(message);
-
- MEDIA_VISION_FUNCTION_ENTER();
-
- if (image_path == NULL)
- {
- LOGE("image_path is NULL\n");
- return MEDIA_VISION_ERROR_INVALID_PATH;
- }
-
- if (type < MV_BARCODE_QR ||
- type >= MV_BARCODE_UNDEFINED)
- {
- LOGE("Not supported barcode type [%d]", type);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
-
- if (type == MV_BARCODE_QR)
- {
- if (qr_enc_mode < MV_BARCODE_QR_MODE_NUMERIC ||
- qr_enc_mode >= MV_BARCODE_QR_MODE_UNAVAILABLE)
- {
- LOGE("Not supported QR encoding mode[%d]", qr_enc_mode);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
-
- if (qr_ecc < MV_BARCODE_QR_ECC_LOW ||
- qr_ecc >= MV_BARCODE_QR_ECC_UNAVAILABLE)
- {
- LOGE("Not supported QR ECC level [%d]", qr_ecc);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
-
- if (qr_version < 1 || qr_version > 40)
- {
- LOGE("Not supported QR version [%d]", qr_version);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
- }
-
- if (image_format < MV_BARCODE_IMAGE_FORMAT_BMP ||
- image_format >= MV_BARCODE_IMAGE_FORMAT_NUM)
- {
- LOGE("Not supported image format [%d]", image_format);
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
+ MEDIA_VISION_SUPPORT_CHECK(__mv_barcode_generate_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(message);
+
+ MEDIA_VISION_FUNCTION_ENTER();
+
+ if (image_path == NULL) {
+ LOGE("image_path is NULL\n");
+ return MEDIA_VISION_ERROR_INVALID_PATH;
+ }
+
+ if (type < MV_BARCODE_QR ||
+ type >= MV_BARCODE_UNDEFINED) {
+ LOGE("Not supported barcode type [%d]", type);
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
+
+ if (type == MV_BARCODE_QR) {
+ if (qr_enc_mode < MV_BARCODE_QR_MODE_NUMERIC ||
+ qr_enc_mode >= MV_BARCODE_QR_MODE_UNAVAILABLE) {
+ LOGE("Not supported QR encoding mode[%d]", qr_enc_mode);
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
+
+ if (qr_ecc < MV_BARCODE_QR_ECC_LOW ||
+ qr_ecc >= MV_BARCODE_QR_ECC_UNAVAILABLE) {
+ LOGE("Not supported QR ECC level [%d]", qr_ecc);
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
+
+ if (qr_version < 1 || qr_version > 40) {
+ LOGE("Not supported QR version [%d]", qr_version);
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
+ }
+
+ if (image_format < MV_BARCODE_IMAGE_FORMAT_BMP ||
+ image_format >= MV_BARCODE_IMAGE_FORMAT_NUM) {
+ LOGE("Not supported image format [%d]", image_format);
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
#ifdef MEDIA_VISION_BARCODE_GENERATOR_LICENSE_PORT
- /* Use licensed barcode generate functionality here. */
- int ret = mv_barcode_generate_image_lic(
- engine_cfg, message, image_width, image_height, type,
- qr_enc_mode, qr_ecc, qr_version, image_path, image_format);
+ /* Use licensed barcode generate functionality here. */
+ int ret = mv_barcode_generate_image_lic(
+ engine_cfg, message, image_width, image_height, type,
+ qr_enc_mode, qr_ecc, qr_version, image_path, image_format);
#else
- /* Use open barcode generate functionality here. */
- int ret = mv_barcode_generate_image_open(
- engine_cfg, message, image_width, image_height, type,
- qr_enc_mode, qr_ecc, qr_version, image_path, image_format);
+ /* Use open barcode generate functionality here. */
+ int ret = mv_barcode_generate_image_open(
+ engine_cfg, message, image_width, image_height, type,
+ qr_enc_mode, qr_ecc, qr_version, image_path, image_format);
#endif /* MEDIA_VISION_BARCODE_GENERATOR_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
#include "mv_common_c.h"
int mv_create_source(
- mv_source_h *source)
+ mv_source_h *source)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(source);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(source);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_create_source_c(source);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_create_source_c(source);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_destroy_source(
- mv_source_h source)
+ mv_source_h source)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_destroy_source_c(source);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_destroy_source_c(source);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_source_fill_by_media_packet(
- mv_source_h source,
- media_packet_h media_packet)
+ mv_source_h source,
+ media_packet_h media_packet)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_INSTANCE_CHECK(media_packet);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_INSTANCE_CHECK(media_packet);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_fill_by_media_packet_c(source, media_packet);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_source_fill_by_media_packet_c(source, media_packet);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_source_fill_by_buffer(
- mv_source_h source,
- unsigned char *data_buffer,
- unsigned int buffer_size,
- unsigned int image_width,
- unsigned int image_height,
- mv_colorspace_e image_colorspace)
+ mv_source_h source,
+ unsigned char *data_buffer,
+ unsigned int buffer_size,
+ unsigned int image_width,
+ unsigned int image_height,
+ mv_colorspace_e image_colorspace)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(data_buffer);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(data_buffer);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_fill_by_buffer_c(
- source, data_buffer, buffer_size, image_width, image_height,
- image_colorspace);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_source_fill_by_buffer_c(
+ source, data_buffer, buffer_size, image_width, image_height,
+ image_colorspace);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_source_clear(
- mv_source_h source)
+ mv_source_h source)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_clear_c(source);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_source_clear_c(source);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_source_get_buffer(
- mv_source_h source,
- unsigned char **data_buffer,
- unsigned int *buffer_size)
+ mv_source_h source,
+ unsigned char **data_buffer,
+ unsigned int *buffer_size)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(data_buffer);
- MEDIA_VISION_NULL_ARG_CHECK(buffer_size);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(data_buffer);
+ MEDIA_VISION_NULL_ARG_CHECK(buffer_size);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_get_buffer_c(source, data_buffer, buffer_size);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_source_get_buffer_c(source, data_buffer, buffer_size);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_source_get_height(
- mv_source_h source,
- unsigned int *image_height)
+ mv_source_h source,
+ unsigned int *image_height)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(image_height);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(image_height);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_get_height_c(source, image_height);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_source_get_height_c(source, image_height);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_source_get_width(
- mv_source_h source,
- unsigned int *image_width)
+ mv_source_h source,
+ unsigned int *image_width)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(image_width);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(image_width);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_get_width_c(source, image_width);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_source_get_width_c(source, image_width);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_source_get_colorspace(
- mv_source_h source,
- mv_colorspace_e *image_colorspace)
+ mv_source_h source,
+ mv_colorspace_e *image_colorspace)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(image_colorspace);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(image_colorspace);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_source_get_colorspace_c(source, image_colorspace);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_source_get_colorspace_c(source, image_colorspace);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_create_engine_config(
- mv_engine_config_h *engine_cfg)
+ mv_engine_config_h *engine_cfg)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(engine_cfg);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(engine_cfg);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_create_engine_config_c(engine_cfg);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_create_engine_config_c(engine_cfg);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_destroy_engine_config(
- mv_engine_config_h engine_cfg)
+ mv_engine_config_h engine_cfg)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_destroy_engine_config_c(engine_cfg);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_destroy_engine_config_c(engine_cfg);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_engine_config_set_double_attribute(
- mv_engine_config_h engine_cfg,
- const char *name,
- double value)
+ mv_engine_config_h engine_cfg,
+ const char *name,
+ double value)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_set_double_attribute_c(
- engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_engine_config_set_double_attribute_c(
+ engine_cfg, name, value);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_engine_config_set_int_attribute(
- mv_engine_config_h engine_cfg,
- const char *name,
- int value)
+ mv_engine_config_h engine_cfg,
+ const char *name,
+ int value)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_set_int_attribute_c(
- engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_engine_config_set_int_attribute_c(
+ engine_cfg, name, value);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_engine_config_set_bool_attribute(
- mv_engine_config_h engine_cfg,
- const char *name,
- bool value)
+ mv_engine_config_h engine_cfg,
+ const char *name,
+ bool value)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_set_bool_attribute_c(
- engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_engine_config_set_bool_attribute_c(
+ engine_cfg, name, value);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_engine_config_set_string_attribute(
- mv_engine_config_h engine_cfg,
- const char *name,
- const char *value)
+ mv_engine_config_h engine_cfg,
+ const char *name,
+ const char *value)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_NULL_ARG_CHECK(value);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_NULL_ARG_CHECK(value);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_set_string_attribute_c(
- engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_engine_config_set_string_attribute_c(
+ engine_cfg, name, value);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_engine_config_get_double_attribute(
- mv_engine_config_h engine_cfg,
- const char *name,
- double *value)
+ mv_engine_config_h engine_cfg,
+ const char *name,
+ double *value)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_NULL_ARG_CHECK(value);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_NULL_ARG_CHECK(value);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_get_double_attribute_c(
- engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_engine_config_get_double_attribute_c(
+ engine_cfg, name, value);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_engine_config_get_int_attribute(
- mv_engine_config_h engine_cfg,
- const char *name,
- int *value)
+ mv_engine_config_h engine_cfg,
+ const char *name,
+ int *value)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_NULL_ARG_CHECK(value);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_NULL_ARG_CHECK(value);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_get_int_attribute_c(
- engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_engine_config_get_int_attribute_c(
+ engine_cfg, name, value);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_engine_config_get_bool_attribute(
- mv_engine_config_h engine_cfg,
- const char *name,
- bool *value)
+ mv_engine_config_h engine_cfg,
+ const char *name,
+ bool *value)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_NULL_ARG_CHECK(value);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_NULL_ARG_CHECK(value);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_get_bool_attribute_c(
- engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_engine_config_get_bool_attribute_c(
+ engine_cfg, name, value);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_engine_config_get_string_attribute(
- mv_engine_config_h engine_cfg,
- const char *name,
- char **value)
+ mv_engine_config_h engine_cfg,
+ const char *name,
+ char **value)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
- MEDIA_VISION_NULL_ARG_CHECK(name);
- MEDIA_VISION_NULL_ARG_CHECK(value);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(engine_cfg);
+ MEDIA_VISION_NULL_ARG_CHECK(name);
+ MEDIA_VISION_NULL_ARG_CHECK(value);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret = mv_engine_config_get_string_attribute_c(
- engine_cfg, name, value);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret = mv_engine_config_get_string_attribute_c(
+ engine_cfg, name, value);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
int mv_engine_config_foreach_supported_attribute(
- mv_supported_attribute_cb callback,
- void *user_data)
+ mv_supported_attribute_cb callback,
+ void *user_data)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(callback);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(callback);
- MEDIA_VISION_FUNCTION_ENTER();
- int ret =
- mv_engine_config_foreach_supported_attribute_c(callback, user_data);
- MEDIA_VISION_FUNCTION_LEAVE();
+ MEDIA_VISION_FUNCTION_ENTER();
+ int ret =
+ mv_engine_config_foreach_supported_attribute_c(callback, user_data);
+ MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ return ret;
}
static const int check_source_roi_quadrangle(mv_quadrangle_s *roi, mv_source_h source)
{
- int ret = MEDIA_VISION_ERROR_NONE;
-
- if (roi)
- {
- int src_w = 0;
- int src_h = 0;
-
- ret = mv_source_get_width(source, &src_w);
- if (ret != MEDIA_VISION_ERROR_NONE)
- {
- LOGE("mv_source_get_width fail");
- return ret;
- }
-
- ret = mv_source_get_height(source, &src_h);
- if (ret != MEDIA_VISION_ERROR_NONE)
- {
- LOGE("mv_source_get_height fail");
- return ret;
- }
-
- int idx = 0;
- while (idx < 4)
- {
- if (roi->points[idx].x < 0 || roi->points[idx].y < 0 ||
- roi->points[idx].x > src_w || roi->points[idx].y > src_h)
- {
- LOGE("roi is out of area on source");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
- ++idx;
- }
- }
-
- return ret;
+ int ret = MEDIA_VISION_ERROR_NONE;
+
+ if (roi) {
+ int src_w = 0;
+ int src_h = 0;
+
+ ret = mv_source_get_width(source, &src_w);
+ if (ret != MEDIA_VISION_ERROR_NONE) {
+ LOGE("mv_source_get_width fail");
+ return ret;
+ }
+
+ ret = mv_source_get_height(source, &src_h);
+ if (ret != MEDIA_VISION_ERROR_NONE) {
+ LOGE("mv_source_get_height fail");
+ return ret;
+ }
+
+ int idx = 0;
+ while (idx < 4) {
+ if (roi->points[idx].x < 0 || roi->points[idx].y < 0 ||
+ roi->points[idx].x > src_w || roi->points[idx].y > src_h) {
+ LOGE("roi is out of area on source");
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
+ ++idx;
+ }
+ }
+
+ return ret;
}
static const int check_source_roi(mv_rectangle_s *roi, mv_source_h source)
{
- int ret = MEDIA_VISION_ERROR_NONE;
-
- if (roi)
- {
- int src_w = 0;
- int src_h = 0;
-
- ret = mv_source_get_width(source, &src_w);
- if (ret != MEDIA_VISION_ERROR_NONE)
- {
- LOGE("mv_source_get_width fail");
- return ret;
- }
-
- ret = mv_source_get_height(source, &src_h);
- if (ret != MEDIA_VISION_ERROR_NONE)
- {
- LOGE("mv_source_get_height fail");
- return ret;
- }
-
- if (roi->width <= 0 || roi->height <= 0)
- {
- LOGE("roi has negative width or height");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
-
- if (roi->point.x < 0 || roi->point.y < 0 ||
- (roi->point.x + roi->width) > src_w ||
- (roi->point.y + roi->height) > src_h)
- {
- LOGE("roi is out of area on source");
- return MEDIA_VISION_ERROR_INVALID_PARAMETER;
- }
- }
-
- return ret;
+ int ret = MEDIA_VISION_ERROR_NONE;
+
+ if (roi) {
+ int src_w = 0;
+ int src_h = 0;
+
+ ret = mv_source_get_width(source, &src_w);
+ if (ret != MEDIA_VISION_ERROR_NONE) {
+ LOGE("mv_source_get_width fail");
+ return ret;
+ }
+
+ ret = mv_source_get_height(source, &src_h);
+ if (ret != MEDIA_VISION_ERROR_NONE) {
+ LOGE("mv_source_get_height fail");
+ return ret;
+ }
+
+ if (roi->width <= 0 || roi->height <= 0) {
+ LOGE("roi has negative width or height");
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
+
+ if (roi->point.x < 0 || roi->point.y < 0 ||
+ (roi->point.x + roi->width) > src_w ||
+ (roi->point.y + roi->height) > src_h) {
+ LOGE("roi is out of area on source");
+ return MEDIA_VISION_ERROR_INVALID_PARAMETER;
+ }
+ }
+
+ return ret;
}
int mv_face_detect(
- mv_source_h source,
- mv_engine_config_h engine_cfg,
- mv_face_detected_cb detected_cb,
- void *user_data)
+ mv_source_h source,
+ mv_engine_config_h engine_cfg,
+ mv_face_detected_cb detected_cb,
+ void *user_data)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(detected_cb);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(detected_cb);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_detect_lic(source, engine_cfg, detected_cb, user_data);
+ ret = mv_face_detect_lic(source, engine_cfg, detected_cb, user_data);
- #else
+#else
- ret = mv_face_detect_open(source, engine_cfg, detected_cb, user_data);
+ ret = mv_face_detect_open(source, engine_cfg, detected_cb, user_data);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_recognize(
- mv_source_h source,
- mv_face_recognition_model_h recognition_model,
- mv_engine_config_h engine_cfg,
- mv_rectangle_s *face_location,
- mv_face_recognized_cb recognized_cb,
- void *user_data)
+ mv_source_h source,
+ mv_face_recognition_model_h recognition_model,
+ mv_engine_config_h engine_cfg,
+ mv_rectangle_s *face_location,
+ mv_face_recognized_cb recognized_cb,
+ void *user_data)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_INSTANCE_CHECK(recognition_model);
- MEDIA_VISION_NULL_ARG_CHECK(recognized_cb);
-
- MEDIA_VISION_FUNCTION_ENTER();
-
- int ret = check_source_roi(face_location, source);
- if (MEDIA_VISION_ERROR_NONE != ret)
- {
- LOGE("Errors occured when check source and ROI");
- return ret;
- }
-
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
-
- ret = mv_face_recognize_lic(
- source,
- recognition_model,
- engine_cfg,
- face_location,
- recognized_cb,
- user_data);
-
- #else
-
- ret = mv_face_recognize_open(
- source,
- recognition_model,
- engine_cfg,
- face_location,
- recognized_cb,
- user_data);
-
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
-
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_INSTANCE_CHECK(recognition_model);
+ MEDIA_VISION_NULL_ARG_CHECK(recognized_cb);
+
+ MEDIA_VISION_FUNCTION_ENTER();
+
+ int ret = check_source_roi(face_location, source);
+ if (MEDIA_VISION_ERROR_NONE != ret) {
+ LOGE("Errors occured when check source and ROI");
+ return ret;
+ }
+
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
+
+ ret = mv_face_recognize_lic(
+ source,
+ recognition_model,
+ engine_cfg,
+ face_location,
+ recognized_cb,
+ user_data);
+
+#else
+
+ ret = mv_face_recognize_open(
+ source,
+ recognition_model,
+ engine_cfg,
+ face_location,
+ recognized_cb,
+ user_data);
+
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_track(
- mv_source_h source,
- mv_face_tracking_model_h tracking_model,
- mv_engine_config_h engine_cfg,
- mv_face_tracked_cb tracked_cb,
- bool do_learn,
- void *user_data)
+ mv_source_h source,
+ mv_face_tracking_model_h tracking_model,
+ mv_engine_config_h engine_cfg,
+ mv_face_tracked_cb tracked_cb,
+ bool do_learn,
+ void *user_data)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_INSTANCE_CHECK(tracking_model);
- MEDIA_VISION_NULL_ARG_CHECK(tracked_cb);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_INSTANCE_CHECK(tracking_model);
+ MEDIA_VISION_NULL_ARG_CHECK(tracked_cb);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_track_lic(
- source,
- tracking_model,
- engine_cfg,
- tracked_cb,
- do_learn,
- user_data);
+ ret = mv_face_track_lic(
+ source,
+ tracking_model,
+ engine_cfg,
+ tracked_cb,
+ do_learn,
+ user_data);
- #else
+#else
- ret = mv_face_track_open(
- source,
- tracking_model,
- engine_cfg,
- tracked_cb,
- do_learn,
- user_data);
+ ret = mv_face_track_open(
+ source,
+ tracking_model,
+ engine_cfg,
+ tracked_cb,
+ do_learn,
+ user_data);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+ #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_eye_condition_recognize(
- mv_source_h source,
- mv_engine_config_h engine_cfg,
- mv_rectangle_s face_location,
- mv_face_eye_condition_recognized_cb eye_condition_recognized_cb,
- void *user_data)
+ mv_source_h source,
+ mv_engine_config_h engine_cfg,
+ mv_rectangle_s face_location,
+ mv_face_eye_condition_recognized_cb eye_condition_recognized_cb,
+ void *user_data)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(eye_condition_recognized_cb);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(eye_condition_recognized_cb);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_eye_condition_recognize_lic(
- source,
- engine_cfg,
- face_location,
- eye_condition_recognized_cb,
- user_data);
+ ret = mv_face_eye_condition_recognize_lic(
+ source,
+ engine_cfg,
+ face_location,
+ eye_condition_recognized_cb,
+ user_data);
- #else
+#else
- ret = mv_face_eye_condition_recognize_open(
- source,
- engine_cfg,
- face_location,
- eye_condition_recognized_cb,
- user_data);
+ ret = mv_face_eye_condition_recognize_open(
+ source,
+ engine_cfg,
+ face_location,
+ eye_condition_recognized_cb,
+ user_data);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+MEDIA_VISION_FUNCTION_LEAVE();
+return ret;
}
int mv_face_facial_expression_recognize(
- mv_source_h source,
- mv_engine_config_h engine_cfg,
- mv_rectangle_s face_location,
- mv_face_facial_expression_recognized_cb expression_recognized_cb,
- void *user_data)
+ mv_source_h source,
+ mv_engine_config_h engine_cfg,
+ mv_rectangle_s face_location,
+ mv_face_facial_expression_recognized_cb expression_recognized_cb,
+ void *user_data)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(expression_recognized_cb);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(expression_recognized_cb);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = check_source_roi(&face_location, source);
- if (MEDIA_VISION_ERROR_NONE != ret)
- {
- LOGE("Errors occurred when check source and ROI");
- return ret;
- }
+ int ret = check_source_roi(&face_location, source);
+ if (MEDIA_VISION_ERROR_NONE != ret) {
+ LOGE("Errors occurred when check source and ROI");
+ return ret;
+ }
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_facial_expression_recognize_lic(
- source,
- engine_cfg,
- face_location,
- expression_recognized_cb,
- user_data);
+ ret = mv_face_facial_expression_recognize_lic(
+ source,
+ engine_cfg,
+ face_location,
+ expression_recognized_cb,
+ user_data);
- #else
+#else
- ret = mv_face_facial_expression_recognize_open(
- source,
- engine_cfg,
- face_location,
- expression_recognized_cb,
- user_data);
+ ret = mv_face_facial_expression_recognize_open(
+ source,
+ engine_cfg,
+ face_location,
+ expression_recognized_cb,
+ user_data);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_recognition_model_create(
- mv_face_recognition_model_h *recognition_model)
+ mv_face_recognition_model_h *recognition_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(recognition_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(recognition_model);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_recognition_model_create_lic(recognition_model);
+ ret = mv_face_recognition_model_create_lic(recognition_model);
- #else
+#else
- ret = mv_face_recognition_model_create_open(recognition_model);
+ ret = mv_face_recognition_model_create_open(recognition_model);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_recognition_model_destroy(
- mv_face_recognition_model_h recognition_model)
+ mv_face_recognition_model_h recognition_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(recognition_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(recognition_model);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_recognition_model_destroy_lic(recognition_model);
+ ret = mv_face_recognition_model_destroy_lic(recognition_model);
- #else
+#else
- ret = mv_face_recognition_model_destroy_open(recognition_model);
+ ret = mv_face_recognition_model_destroy_open(recognition_model);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+MEDIA_VISION_FUNCTION_LEAVE();
+return ret;
}
int mv_face_recognition_model_clone(
- mv_face_recognition_model_h src,
- mv_face_recognition_model_h *dst)
+ mv_face_recognition_model_h src,
+ mv_face_recognition_model_h *dst)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(src);
- MEDIA_VISION_NULL_ARG_CHECK(dst);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(src);
+ MEDIA_VISION_NULL_ARG_CHECK(dst);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_recognition_model_clone_lic(src, dst);
+ ret = mv_face_recognition_model_clone_lic(src, dst);
- #else
+#else
- ret = mv_face_recognition_model_clone_open(src, dst);
+ ret = mv_face_recognition_model_clone_open(src, dst);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_recognition_model_save(
- const char *file_name,
- mv_face_recognition_model_h recognition_model)
+ const char *file_name,
+ mv_face_recognition_model_h recognition_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(recognition_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(recognition_model);
- if (file_name == NULL)
- {
- LOGE("File name is NULL. The file name has to be specified");
- return MEDIA_VISION_ERROR_INVALID_PATH;
- }
+ if (file_name == NULL) {
+ LOGE("File name is NULL. The file name has to be specified");
+ return MEDIA_VISION_ERROR_INVALID_PATH;
+ }
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_recognition_model_save_lic(
- file_name,
- recognition_model);
+ ret = mv_face_recognition_model_save_lic(
+ file_name,
+ recognition_model);
- #else
+#else
- ret = mv_face_recognition_model_save_open(
- file_name,
- recognition_model);
+ ret = mv_face_recognition_model_save_open(
+ file_name,
+ recognition_model);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_recognition_model_load(
- const char *file_name,
- mv_face_recognition_model_h *recognition_model)
+ const char *file_name,
+ mv_face_recognition_model_h *recognition_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(recognition_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(recognition_model);
- if (file_name == NULL)
- {
- LOGE("File name is NULL. The file name has to be specified");
- return MEDIA_VISION_ERROR_INVALID_PATH;
- }
+ if (file_name == NULL) {
+ LOGE("File name is NULL. The file name has to be specified");
+ return MEDIA_VISION_ERROR_INVALID_PATH;
+ }
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_recognition_model_load_lic(
- file_name,
- recognition_model);
+ ret = mv_face_recognition_model_load_lic(
+ file_name,
+ recognition_model);
- #else
+#else
- ret = mv_face_recognition_model_load_open(
- file_name,
- recognition_model);
+ ret = mv_face_recognition_model_load_open(
+ file_name,
+ recognition_model);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_recognition_model_add(
- const mv_source_h source,
- mv_face_recognition_model_h recognition_model,
- const mv_rectangle_s *example_location,
- int face_label)
+ const mv_source_h source,
+ mv_face_recognition_model_h recognition_model,
+ const mv_rectangle_s *example_location,
+ int face_label)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_INSTANCE_CHECK(recognition_model);
-
- MEDIA_VISION_FUNCTION_ENTER();
-
- int ret = check_source_roi(example_location, source);
- if (MEDIA_VISION_ERROR_NONE != ret)
- {
- LOGE("Errors occured when check source and ROI");
- return ret;
- }
-
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
-
- ret = mv_face_recognition_model_add_lic(
- source,
- recognition_model,
- example_location,
- face_label);
- #else
-
- ret = mv_face_recognition_model_add_open(
- source,
- recognition_model,
- example_location,
- face_label);
-
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
-
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_INSTANCE_CHECK(recognition_model);
+
+ MEDIA_VISION_FUNCTION_ENTER();
+
+ int ret = check_source_roi(example_location, source);
+ if (MEDIA_VISION_ERROR_NONE != ret) {
+ LOGE("Errors occured when check source and ROI");
+ return ret;
+ }
+
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
+
+ ret = mv_face_recognition_model_add_lic(
+ source,
+ recognition_model,
+ example_location,
+ face_label);
+#else
+
+ret = mv_face_recognition_model_add_open(
+ source,
+ recognition_model,
+ example_location,
+ face_label);
+
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_recognition_model_reset(
- mv_face_recognition_model_h recognition_model,
- int *face_label)
+ mv_face_recognition_model_h recognition_model,
+ int *face_label)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(recognition_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(recognition_model);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_recognition_model_reset_lic(
- recognition_model,
- face_label);
+ ret = mv_face_recognition_model_reset_lic(
+ recognition_model,
+ face_label);
- #else
+#else
- ret = mv_face_recognition_model_reset_open(
- recognition_model,
- face_label);
+ret = mv_face_recognition_model_reset_open(
+ recognition_model,
+ face_label);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_recognition_model_learn(
- mv_engine_config_h engine_cfg,
- mv_face_recognition_model_h recognition_model)
+ mv_engine_config_h engine_cfg,
+ mv_face_recognition_model_h recognition_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(recognition_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(recognition_model);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_recognition_model_learn_lic(engine_cfg, recognition_model);
+ ret = mv_face_recognition_model_learn_lic(engine_cfg, recognition_model);
- #else
+#else
- ret = mv_face_recognition_model_learn_open(engine_cfg, recognition_model);
+ ret = mv_face_recognition_model_learn_open(engine_cfg, recognition_model);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_recognition_model_query_labels(
- mv_face_recognition_model_h recognition_model,
- int **labels,
- unsigned int *number_of_labels)
+ mv_face_recognition_model_h recognition_model,
+ int **labels,
+ unsigned int *number_of_labels)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(recognition_model);
- MEDIA_VISION_NULL_ARG_CHECK(labels);
- MEDIA_VISION_NULL_ARG_CHECK(number_of_labels);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(recognition_model);
+ MEDIA_VISION_NULL_ARG_CHECK(labels);
+ MEDIA_VISION_NULL_ARG_CHECK(number_of_labels);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_recognition_model_query_labels_lic(recognition_model, labels, number_of_labels);
+ ret = mv_face_recognition_model_query_labels_lic(recognition_model, labels, number_of_labels);
- #else
+#else
- ret = mv_face_recognition_model_query_labels_open(recognition_model, labels, number_of_labels);
+ ret = mv_face_recognition_model_query_labels_open(recognition_model, labels, number_of_labels);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+MEDIA_VISION_FUNCTION_LEAVE();
+return ret;
}
int mv_face_tracking_model_create(
- mv_face_tracking_model_h *tracking_model)
+ mv_face_tracking_model_h *tracking_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(tracking_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(tracking_model);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_tracking_model_create_lic(tracking_model);
+ ret = mv_face_tracking_model_create_lic(tracking_model);
- #else
+#else
- ret = mv_face_tracking_model_create_open(tracking_model);
+ ret = mv_face_tracking_model_create_open(tracking_model);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_tracking_model_destroy(
- mv_face_tracking_model_h tracking_model)
+ mv_face_tracking_model_h tracking_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(tracking_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(tracking_model);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_tracking_model_destroy_lic(tracking_model);
+ ret = mv_face_tracking_model_destroy_lic(tracking_model);
- #else
+#else
- ret = mv_face_tracking_model_destroy_open(tracking_model);
+ ret = mv_face_tracking_model_destroy_open(tracking_model);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_tracking_model_prepare(
- mv_face_tracking_model_h tracking_model,
- mv_engine_config_h engine_cfg,
- mv_source_h source,
- mv_quadrangle_s *location)
+ mv_face_tracking_model_h tracking_model,
+ mv_engine_config_h engine_cfg,
+ mv_source_h source,
+ mv_quadrangle_s *location)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(tracking_model);
- MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(tracking_model);
+ MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = check_source_roi_quadrangle(location, source);
- if (MEDIA_VISION_ERROR_NONE != ret)
- {
- LOGE("Errors occured when check source and tracking start location");
- return ret;
- }
+ int ret = check_source_roi_quadrangle(location, source);
+ if (MEDIA_VISION_ERROR_NONE != ret) {
+ LOGE("Errors occured when check source and tracking start location");
+ return ret;
+ }
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_tracking_model_prepare_lic(
- tracking_model, engine_cfg, source, location);
+ ret = mv_face_tracking_model_prepare_lic(
+ tracking_model, engine_cfg, source, location);
- #else
+#else
- ret = mv_face_tracking_model_prepare_open(
- tracking_model, engine_cfg, source, location);
+ ret = mv_face_tracking_model_prepare_open(
+ tracking_model, engine_cfg, source, location);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_tracking_model_clone(
- mv_face_tracking_model_h src,
- mv_face_tracking_model_h *dst)
+ mv_face_tracking_model_h src,
+ mv_face_tracking_model_h *dst)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(src);
- MEDIA_VISION_NULL_ARG_CHECK(dst);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(src);
+ MEDIA_VISION_NULL_ARG_CHECK(dst);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_tracking_model_clone_lic(src, dst);
+ ret = mv_face_tracking_model_clone_lic(src, dst);
- #else
+#else
- ret = mv_face_tracking_model_clone_open(src, dst);
+ ret = mv_face_tracking_model_clone_open(src, dst);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_tracking_model_save(
- const char *file_name,
- mv_face_tracking_model_h tracking_model)
+ const char *file_name,
+ mv_face_tracking_model_h tracking_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(tracking_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(tracking_model);
- if (file_name == NULL)
- {
- LOGE("File name is NULL. The file name has to be specified");
- return MEDIA_VISION_ERROR_INVALID_PATH;
- }
+ if (file_name == NULL) {
+ LOGE("File name is NULL. The file name has to be specified");
+ return MEDIA_VISION_ERROR_INVALID_PATH;
+ }
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_tracking_model_save_lic(
- file_name,
- tracking_model);
+ret = mv_face_tracking_model_save_lic(
+ file_name,
+ tracking_model);
- #else
+#else
- ret = mv_face_tracking_model_save_open(
- file_name,
- tracking_model);
+ ret = mv_face_tracking_model_save_open(
+ file_name,
+ tracking_model);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_face_tracking_model_load(
- const char *file_name,
- mv_face_tracking_model_h *tracking_model)
+ const char *file_name,
+ mv_face_tracking_model_h *tracking_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(tracking_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_face_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(tracking_model);
- if (file_name == NULL)
- {
- LOGE("File name is NULL. The file name has to be specifiled");
- return MEDIA_VISION_ERROR_INVALID_PATH;
- }
+ if (file_name == NULL) {
+ LOGE("File name is NULL. The file name has to be specifiled");
+ return MEDIA_VISION_ERROR_INVALID_PATH;
+ }
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
- int ret = MEDIA_VISION_ERROR_NONE;
+ int ret = MEDIA_VISION_ERROR_NONE;
- #ifdef MEDIA_VISION_FACE_LICENSE_PORT
+#ifdef MEDIA_VISION_FACE_LICENSE_PORT
- ret = mv_face_tracking_model_load_lic(
- file_name,
- tracking_model);
+ ret = mv_face_tracking_model_load_lic(
+ file_name,
+ tracking_model);
- #else
+#else
- ret = mv_face_tracking_model_load_open(
- file_name,
- tracking_model);
+ret = mv_face_tracking_model_load_open(
+ file_name,
+ tracking_model);
- #endif /* MEDIA_VISION_FACE_LICENSE_PORT */
+#endif /* MEDIA_VISION_FACE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
*/
int mv_image_recognize(
- mv_source_h source,
- const mv_image_object_h *image_objects,
- int number_of_objects,
- mv_engine_config_h engine_cfg,
- mv_image_recognized_cb recognized_cb,
- void *user_data)
+ mv_source_h source,
+ const mv_image_object_h *image_objects,
+ int number_of_objects,
+ mv_engine_config_h engine_cfg,
+ mv_image_recognized_cb recognized_cb,
+ void *user_data)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_NULL_ARG_CHECK(image_objects);
- int object_num = 0;
- for (; object_num < number_of_objects; ++object_num)
- {
- MEDIA_VISION_INSTANCE_CHECK(image_objects[object_num]);
- }
- MEDIA_VISION_NULL_ARG_CHECK(recognized_cb);
-
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_NULL_ARG_CHECK(image_objects);
+
+ int object_num = 0;
+ for (; object_num < number_of_objects; ++object_num)
+ MEDIA_VISION_INSTANCE_CHECK(image_objects[object_num]);
+
+ MEDIA_VISION_NULL_ARG_CHECK(recognized_cb);
+
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_recognize_lic(source, image_objects,
- number_of_objects, engine_cfg, recognized_cb, user_data);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_recognize_lic(source, image_objects,
+ number_of_objects, engine_cfg, recognized_cb, user_data);
#else
- /* Use open image functionality here. */
- int ret = mv_image_recognize_open(source, image_objects,
- number_of_objects, engine_cfg, recognized_cb, user_data);
+/* Use open image functionality here. */
+ int ret = mv_image_recognize_open(source, image_objects,
+ number_of_objects, engine_cfg, recognized_cb, user_data);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_track(
- mv_source_h source,
- mv_image_tracking_model_h image_tracking_model,
- mv_engine_config_h engine_cfg,
- mv_image_tracked_cb tracked_cb,
- void *user_data)
+ mv_source_h source,
+ mv_image_tracking_model_h image_tracking_model,
+ mv_engine_config_h engine_cfg,
+ mv_image_tracked_cb tracked_cb,
+ void *user_data)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_INSTANCE_CHECK(image_tracking_model);
- MEDIA_VISION_NULL_ARG_CHECK(tracked_cb);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_INSTANCE_CHECK(image_tracking_model);
+ MEDIA_VISION_NULL_ARG_CHECK(tracked_cb);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_track_lic(source, image_tracking_model, engine_cfg, tracked_cb, user_data);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_track_lic(source, image_tracking_model, engine_cfg, tracked_cb, user_data);
#else
- /* Use open image functionality here. */
- int ret = mv_image_track_open(source, image_tracking_model, engine_cfg, tracked_cb, user_data);
+ /* Use open image functionality here. */
+ int ret = mv_image_track_open(source, image_tracking_model, engine_cfg, tracked_cb, user_data);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_object_create(
- mv_image_object_h *image_object)
+ mv_image_object_h *image_object)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(image_object);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(image_object);
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_object_create_lic(image_object);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_object_create_lic(image_object);
#else
- /* Use open image functionality here. */
- int ret = mv_image_object_create_open(image_object);
+ /* Use open image functionality here. */
+ int ret = mv_image_object_create_open(image_object);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_object_destroy(
- mv_image_object_h image_object)
+ mv_image_object_h image_object)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(image_object);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(image_object);
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_object_destroy_lic(image_object);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_object_destroy_lic(image_object);
#else
- /* Use open image functionality here. */
- int ret = mv_image_object_destroy_open(image_object);
+ /* Use open image functionality here. */
+ int ret = mv_image_object_destroy_open(image_object);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_object_fill(
- mv_image_object_h image_object,
- mv_engine_config_h engine_cfg,
- mv_source_h source,
- mv_rectangle_s *location)
+ mv_image_object_h image_object,
+ mv_engine_config_h engine_cfg,
+ mv_source_h source,
+ mv_rectangle_s *location)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(image_object);
- MEDIA_VISION_INSTANCE_CHECK(source);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(image_object);
+ MEDIA_VISION_INSTANCE_CHECK(source);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_object_fill_lic(image_object, engine_cfg, source, location);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_object_fill_lic(image_object, engine_cfg, source, location);
#else
- /* Use open image functionality here. */
- int ret = mv_image_object_fill_open(image_object, engine_cfg, source, location);
+ /* Use open image functionality here. */
+ int ret = mv_image_object_fill_open(image_object, engine_cfg, source, location);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_object_get_recognition_rate(
- mv_image_object_h image_object,
- double *recognition_rate)
+ mv_image_object_h image_object,
+ double *recognition_rate)
{
MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(image_object);
- MEDIA_VISION_NULL_ARG_CHECK(recognition_rate);
+ MEDIA_VISION_INSTANCE_CHECK(image_object);
+ MEDIA_VISION_NULL_ARG_CHECK(recognition_rate);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_object_get_recognition_rate_lic(image_object, recognition_rate);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_object_get_recognition_rate_lic(image_object, recognition_rate);
#else
- /* Use open image functionality here. */
- int ret = mv_image_object_get_recognition_rate_open(image_object, recognition_rate);
+ /* Use open image functionality here. */
+ int ret = mv_image_object_get_recognition_rate_open(image_object, recognition_rate);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_object_set_label(
- mv_image_object_h image_object,
- int label)
+ mv_image_object_h image_object,
+ int label)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(image_object);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(image_object);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_object_set_label_lic(image_object, label);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_object_set_label_lic(image_object, label);
#else
- /* Use open image functionality here. */
- int ret = mv_image_object_set_label_open(image_object, label);
+ /* Use open image functionality here. */
+ int ret = mv_image_object_set_label_open(image_object, label);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_object_get_label(
- mv_image_object_h image_object,
- int *label)
+ mv_image_object_h image_object,
+ int *label)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(image_object);
- MEDIA_VISION_NULL_ARG_CHECK(label);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(image_object);
+ MEDIA_VISION_NULL_ARG_CHECK(label);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_object_get_label_lic(image_object, label);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_object_get_label_lic(image_object, label);
#else
- /* Use open image functionality here. */
- int ret = mv_image_object_get_label_open(image_object, label);
+ /* Use open image functionality here. */
+ int ret = mv_image_object_get_label_open(image_object, label);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_object_clone(
- mv_image_object_h src,
- mv_image_object_h *dst)
+ mv_image_object_h src,
+ mv_image_object_h *dst)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(src);
- MEDIA_VISION_NULL_ARG_CHECK(dst);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(src);
+ MEDIA_VISION_NULL_ARG_CHECK(dst);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_object_clone_lic(src, dst);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_object_clone_lic(src, dst);
#else
- /* Use open image functionality here. */
- int ret = mv_image_object_clone_open(src, dst);
+ /* Use open image functionality here. */
+ int ret = mv_image_object_clone_open(src, dst);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_object_save(
- const char *file_name, mv_image_object_h image_object)
+ const char *file_name, mv_image_object_h image_object)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(image_object);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(image_object);
- if (file_name == NULL)
- {
- LOGE("File name is NULL. The file name has to be specified");
- return MEDIA_VISION_ERROR_INVALID_PATH;
- }
+ if (file_name == NULL) {
+ LOGE("File name is NULL. The file name has to be specified");
+ return MEDIA_VISION_ERROR_INVALID_PATH;
+ }
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_object_save_lic(file_name, image_object);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_object_save_lic(file_name, image_object);
#else
- /* Use open image functionality here. */
- int ret = mv_image_object_save_open(file_name, image_object);
+ /* Use open image functionality here. */
+ int ret = mv_image_object_save_open(file_name, image_object);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_object_load(
- const char *file_name, mv_image_object_h *image_object)
+ const char *file_name, mv_image_object_h *image_object)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(image_object);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(image_object);
- if (file_name == NULL)
- {
- LOGE("file name is NULL. The file name has to be specified");
- return MEDIA_VISION_ERROR_INVALID_PATH;
- }
+ if (file_name == NULL) {
+ LOGE("file name is NULL. The file name has to be specified");
+ return MEDIA_VISION_ERROR_INVALID_PATH;
+ }
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_object_load_lic(file_name, image_object);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_object_load_lic(file_name, image_object);
#else
- /* Use open image functionality here. */
- int ret = mv_image_object_load_open(file_name, image_object);
+ /* Use open image functionality here. */
+ int ret = mv_image_object_load_open(file_name, image_object);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_tracking_model_create(
- mv_image_tracking_model_h *image_tracking_model)
+ mv_image_tracking_model_h *image_tracking_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(image_tracking_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(image_tracking_model);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_tracking_model_create_lic(image_tracking_model);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_tracking_model_create_lic(image_tracking_model);
#else
- /* Use open image functionality here. */
- int ret = mv_image_tracking_model_create_open(image_tracking_model);
+ /* Use open image functionality here. */
+ int ret = mv_image_tracking_model_create_open(image_tracking_model);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_tracking_model_set_target(
- mv_image_object_h image_object,
- mv_image_tracking_model_h image_tracking_model)
+ mv_image_object_h image_object,
+ mv_image_tracking_model_h image_tracking_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(image_tracking_model);
- MEDIA_VISION_INSTANCE_CHECK(image_object);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(image_tracking_model);
+ MEDIA_VISION_INSTANCE_CHECK(image_object);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_tracking_model_set_target_lic(image_object, image_tracking_model);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_tracking_model_set_target_lic(image_object, image_tracking_model);
#else
- /* Use open image functionality here. */
- int ret = mv_image_tracking_model_set_target_open(image_object, image_tracking_model);
+ /* Use open image functionality here. */
+ int ret = mv_image_tracking_model_set_target_open(image_object, image_tracking_model);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_tracking_model_destroy(
- mv_image_tracking_model_h image_tracking_model)
+ mv_image_tracking_model_h image_tracking_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(image_tracking_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(image_tracking_model);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_tracking_model_destroy_lic(image_tracking_model);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_tracking_model_destroy_lic(image_tracking_model);
#else
- /* Use open image functionality here. */
- int ret = mv_image_tracking_model_destroy_open(image_tracking_model);
+ /* Use open image functionality here. */
+ int ret = mv_image_tracking_model_destroy_open(image_tracking_model);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_tracking_model_refresh(
- mv_image_tracking_model_h image_tracking_model,
- mv_engine_config_h engine_cfg)
+ mv_image_tracking_model_h image_tracking_model,
+ mv_engine_config_h engine_cfg)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(image_tracking_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(image_tracking_model);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_tracking_model_refresh_lic(
- image_tracking_model,
- engine_cfg);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_tracking_model_refresh_lic(
+ image_tracking_model,
+ engine_cfg);
#else
- /* Use open image functionality here. */
- int ret = mv_image_tracking_model_refresh_open(
- image_tracking_model,
- engine_cfg);
+ /* Use open image functionality here. */
+ int ret = mv_image_tracking_model_refresh_open(
+ image_tracking_model,
+ engine_cfg);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_tracking_model_clone(
- mv_image_tracking_model_h src,
- mv_image_tracking_model_h *dst)
+ mv_image_tracking_model_h src,
+ mv_image_tracking_model_h *dst)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(src);
- MEDIA_VISION_NULL_ARG_CHECK(dst);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(src);
+ MEDIA_VISION_NULL_ARG_CHECK(dst);
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_tracking_model_clone_lic(src, dst);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_tracking_model_clone_lic(src, dst);
#else
- /* Use open image functionality here. */
- int ret = mv_image_tracking_model_clone_open(src, dst);
+ /* Use open image functionality here. */
+ int ret = mv_image_tracking_model_clone_open(src, dst);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_tracking_model_save(
- const char *file_name, mv_image_tracking_model_h image_tracking_model)
+ const char *file_name, mv_image_tracking_model_h image_tracking_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_INSTANCE_CHECK(image_tracking_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_INSTANCE_CHECK(image_tracking_model);
- if (file_name == NULL)
- {
- LOGE("File name is NULL. The file name has to be specified");
- return MEDIA_VISION_ERROR_INVALID_PATH;
- }
+ if (file_name == NULL) {
+ LOGE("File name is NULL. The file name has to be specified");
+ return MEDIA_VISION_ERROR_INVALID_PATH;
+ }
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_tracking_model_save_lic(file_name, image_tracking_model);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_tracking_model_save_lic(file_name, image_tracking_model);
#else
- /* Use open image functionality here. */
- int ret = mv_image_tracking_model_save_open(file_name, image_tracking_model);
+ /* Use open image functionality here. */
+ int ret = mv_image_tracking_model_save_open(file_name, image_tracking_model);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
int mv_image_tracking_model_load(
- const char *file_name, mv_image_tracking_model_h *image_tracking_model)
+ const char *file_name, mv_image_tracking_model_h *image_tracking_model)
{
- MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
- MEDIA_VISION_NULL_ARG_CHECK(image_tracking_model);
+ MEDIA_VISION_SUPPORT_CHECK(__mv_image_check_system_info_feature_supported());
+ MEDIA_VISION_NULL_ARG_CHECK(image_tracking_model);
- if (file_name == NULL)
- {
- LOGE("File name is NULL. The file name has to be specified");
- return MEDIA_VISION_ERROR_INVALID_PATH;
- }
+ if (file_name == NULL) {
+ LOGE("File name is NULL. The file name has to be specified");
+ return MEDIA_VISION_ERROR_INVALID_PATH;
+ }
- MEDIA_VISION_FUNCTION_ENTER();
+ MEDIA_VISION_FUNCTION_ENTER();
#ifdef MEDIA_VISION_IMAGE_LICENSE_PORT
- /* Use licensed image functionality here. */
- int ret = mv_image_tracking_model_load_lic(file_name, image_tracking_model);
+ /* Use licensed image functionality here. */
+ int ret = mv_image_tracking_model_load_lic(file_name, image_tracking_model);
#else
- /* Use open image functionality here. */
- int ret = mv_image_tracking_model_load_open(file_name, image_tracking_model);
+ /* Use open image functionality here. */
+ int ret = mv_image_tracking_model_load_open(file_name, image_tracking_model);
#endif /* MEDIA_VISION_IMAGE_LICENSE_PORT */
- MEDIA_VISION_FUNCTION_LEAVE();
- return ret;
+ MEDIA_VISION_FUNCTION_LEAVE();
+ return ret;
}
bool __mv_check_system_info_feature_supported()
{
- bool isBarcodeDetectionSupported = false;
- bool isBarcodeGenerationSupported = false;
- bool isFaceRecognitionSupported = false;
- bool isImageRecognitionSupported = false;
-
- const int nRetVal1 = system_info_get_platform_bool("http://tizen.org/feature/vision.barcode_detection", &isBarcodeDetectionSupported);
-
- if (nRetVal1 != SYSTEM_INFO_ERROR_NONE)
- {
- LOGE("[%s] SYSTEM_INFO_ERROR: __FUNCTION__");
- return false;
- }
-
- const int nRetVal2 = system_info_get_platform_bool("http://tizen.org/feature/vision.barcode_generation", &isBarcodeGenerationSupported);
-
- if (nRetVal2 != SYSTEM_INFO_ERROR_NONE)
- {
- LOGE("[%s] SYSTEM_INFO_ERROR: __FUNCTION__");
- return false;
- }
-
- const int nRetVal3 = system_info_get_platform_bool("http://tizen.org/feature/vision.face_recognition", &isFaceRecognitionSupported);
-
- if (nRetVal3 != SYSTEM_INFO_ERROR_NONE)
- {
- LOGE("[%s] SYSTEM_INFO_ERROR: __FUNCTION__");
- return false;
- }
-
- const int nRetVal4 = system_info_get_platform_bool("http://tizen.org/feature/vision.image_recognition", &isImageRecognitionSupported);
-
- if (nRetVal4 != SYSTEM_INFO_ERROR_NONE)
- {
- LOGE("[%s] SYSTEM_INFO_ERROR: __FUNCTION__");
- return false;
- }
-
- (isBarcodeDetectionSupported || isBarcodeGenerationSupported ||
- isFaceRecognitionSupported || isImageRecognitionSupported) ?
- LOGI("system_info_get_platform_bool returned"
- "Supported one feature among barcode detection, "
- "barcode generation, face recognition, "
- "and image recognition capability\n") :
- LOGE("system_info_get_platform_bool returned"
- "Unsupported all features of barcode detection, "
- "barcode generation, face recognition, "
- "and image recognition capability\n") ;
-
- return (isBarcodeDetectionSupported || isBarcodeGenerationSupported ||
- isFaceRecognitionSupported || isImageRecognitionSupported);
+ bool isBarcodeDetectionSupported = false;
+ bool isBarcodeGenerationSupported = false;
+ bool isFaceRecognitionSupported = false;
+ bool isImageRecognitionSupported = false;
+
+ const int nRetVal1 = system_info_get_platform_bool("http://tizen.org/feature/vision.barcode_detection", &isBarcodeDetectionSupported);
+
+ if (nRetVal1 != SYSTEM_INFO_ERROR_NONE) {
+ LOGE("[%s] SYSTEM_INFO_ERROR: __FUNCTION__");
+ return false;
+ }
+
+ const int nRetVal2 = system_info_get_platform_bool("http://tizen.org/feature/vision.barcode_generation", &isBarcodeGenerationSupported);
+
+ if (nRetVal2 != SYSTEM_INFO_ERROR_NONE) {
+ LOGE("[%s] SYSTEM_INFO_ERROR: __FUNCTION__");
+ return false;
+ }
+
+ const int nRetVal3 = system_info_get_platform_bool("http://tizen.org/feature/vision.face_recognition", &isFaceRecognitionSupported);
+
+ if (nRetVal3 != SYSTEM_INFO_ERROR_NONE) {
+ LOGE("[%s] SYSTEM_INFO_ERROR: __FUNCTION__");
+ return false;
+ }
+
+ const int nRetVal4 = system_info_get_platform_bool("http://tizen.org/feature/vision.image_recognition", &isImageRecognitionSupported);
+
+ if (nRetVal4 != SYSTEM_INFO_ERROR_NONE) {
+ LOGE("[%s] SYSTEM_INFO_ERROR: __FUNCTION__");
+ return false;
+ }
+
+ (isBarcodeDetectionSupported || isBarcodeGenerationSupported ||
+ isFaceRecognitionSupported || isImageRecognitionSupported) ?
+ LOGI("system_info_get_platform_bool returned"
+ "Supported one feature among barcode detection, "
+ "barcode generation, face recognition, "
+ "and image recognition capability\n") :
+ LOGE("system_info_get_platform_bool returned"
+ "Unsupported all features of barcode detection, "
+ "barcode generation, face recognition, "
+ "and image recognition capability\n") ;
+
+ return (isBarcodeDetectionSupported || isBarcodeGenerationSupported ||
+ isFaceRecognitionSupported || isImageRecognitionSupported);
}
bool __mv_barcode_detect_check_system_info_feature_supported()
{
- bool isBarcodeDetectionSupported = false;
+ bool isBarcodeDetectionSupported = false;
- const int nRetVal = system_info_get_platform_bool("http://tizen.org/feature/vision.barcode_detection", &isBarcodeDetectionSupported);
+ const int nRetVal = system_info_get_platform_bool("http://tizen.org/feature/vision.barcode_detection", &isBarcodeDetectionSupported);
- if (nRetVal != SYSTEM_INFO_ERROR_NONE)
- {
- LOGE("[%s] SYSTEM_INFO_ERROR: __FUNCTION__");
- return false;
- }
+ if (nRetVal != SYSTEM_INFO_ERROR_NONE) {
+ LOGE("[%s] SYSTEM_INFO_ERROR: __FUNCTION__");
+ return false;
+ }
- isBarcodeDetectionSupported ?
- LOGI("system_info_get_platform_bool returned "
- "Supported barcode detection feature capability\n") :
- LOGE("system_info_get_platform_bool returned "
- "Unsupported barcode detection feature capability\n");
+ isBarcodeDetectionSupported ?
+ LOGI("system_info_get_platform_bool returned "
+ "Supported barcode detection feature capability\n") :
+ LOGE("system_info_get_platform_bool returned "
+ "Unsupported barcode detection feature capability\n");
- return isBarcodeDetectionSupported;
+ return isBarcodeDetectionSupported;
}
bool __mv_barcode_generate_check_system_info_feature_supported()
{
- bool isBarcodeGenerationSupported = false;
+ bool isBarcodeGenerationSupported = false;
- const int nRetVal = system_info_get_platform_bool("http://tizen.org/feature/vision.barcode_generation", &isBarcodeGenerationSupported);
+ const int nRetVal = system_info_get_platform_bool("http://tizen.org/feature/vision.barcode_generation", &isBarcodeGenerationSupported);
- if (nRetVal != SYSTEM_INFO_ERROR_NONE)
- {
- LOGE("[%s] SYSTEM_INFO_ERROR: __FUNCTION__");
- return false;
- }
+ if (nRetVal != SYSTEM_INFO_ERROR_NONE) {
+ LOGE("[%s] SYSTEM_INFO_ERROR: __FUNCTION__");
+ return false;
+ }
- isBarcodeGenerationSupported ?
- LOGI("system_info_get_platform_bool returned "
- "Supported barcode generation feature capability\n") :
- LOGE("system_info_get_platform_bool returned "
- "Unsupported barcode generation feature capability\n");
+ isBarcodeGenerationSupported ?
+ LOGI("system_info_get_platform_bool returned "
+ "Supported barcode generation feature capability\n") :
+ LOGE("system_info_get_platform_bool returned "
+ "Unsupported barcode generation feature capability\n");
- return isBarcodeGenerationSupported;
+ return isBarcodeGenerationSupported;
}
bool __mv_face_check_system_info_feature_supported()