/**
* @file FUixVisionImageFeatureManager.h
- * @brief This is the header file for the %Tizen::Uix::Vision::ImageFeatureManager class.
+ * @brief This is the header file for the %ImageFeatureManager class.
+ *
+ * This header file contains the declarations of the %ImageFeatureManager class.
*/
#ifndef _FUIX_VISION_IMAGE_FEATURE_MANAGER_H_
/**
* @class ImageFeatureManager
- * @brief This class provides methods to generate individual feature data from individual image data.
- * And this class also provides method to manage image feature set which is the collection of individual feature data.
+ * @brief This class provides methods to generate individual feature data from an individual image data and collect to feature set file.
*
* @since 2.1
*
- * The %ImageFeatureManager class provides the ability to generate individual image feature data and manage image feature set.
+ * The %ImageFeatureManager class provides methods to generate individual feature data from an individual image data. This class also provides methods to manage image feature set which is a collection of individual feature data.
*
* The following example demonstrates how to use the %ImageFeatureManager class.
*
* @code
- * void GenerateImageFeatureSet()
+ *
+ * #include <FBase.h>
+ * #include <FUix.h>
+ * #include <FGraphics.h>
+ * #include <FIo.h>
+ * #include <FMedia.h>
+ *
+ * using namespace Tizen::Base;
+ * using namespace Tizen::Media;
+ * using namespace Tizen::Graphics;
+ * using namespace Tizen::Io;
+ * using namespace Tizen::Uix::Vision;
+ *
+ * class MyClass
* {
- * Tizen::Uix::Vision::ImageFeatureManager imageFeatureManager;
+ *
+ * public:
+ * MyClass();
+ * ~MyClass();
+ * result GenerateFeatureSet(void);
+ * result AddImageFeatureSet(void);
+ * };
+ *
+ * result
+ * MyClass::GenerateFeatureSet(void)
+ * {
+ * result r;
+ * ImageFeatureManager imageFeatureManager;
+ * r = imageFeatureManager.Construct();
+ * //Creating new feature set
+ * imageFeatureManager.AddFeature("/opt/usr/media/Images/image1.jpg");
+ * imageFeatureManager.AddFeature("/opt/usr/media/Images/image2.jpg");
+ * imageFeatureManager.AddFeature("/opt/usr/media/Images/image3.jpg");
+ * r = imageFeatureManager.Flush(new String("/opt/usr/media/Images/testFeatureSet.xdb"));
+ *
+ * return r;
+ * }
+ *
+ * result
+ * MyClass::AddImageFeatureSet()
+ * {
+ * result r;
+ * ImageFeatureManager imageFeatureManager;
* imageFeatureManager.Construct();
- * imageFeatureManager.Load("/mnt/ums/Images/testFeatureSet.xdb");
- * imageFeatureManager.AddFeature("/mnt/ums/Images/image1.jpg");
- * imageFeatureManager.AddFeature("/mnt/ums/Images/image2.jpg");
- * imageFeatureManager.AddFeature("/mnt/ums/Images/image3.jpg");
- * imageFeatureManager.Flush();
+ * imageFeatureManager.Load("/opt/usr/media/Images/testFeatureSet.xdb");
+ * imageFeatureManager.AddFeature("/opt/usr/media/Images/image1.jpg");
+ * imageFeatureManager.AddFeature("/opt/usr/media/Images/image2.jpg");
+ * imageFeatureManager.AddFeature("/opt/usr/media/Images/image3.jpg");
+ * r = imageFeatureManager.Flush();
+ *
+ * return r;
* }
+ * @endcode
*/
class _OSP_EXPORT_ ImageFeatureManager
: public Tizen::Base::Object
public:
/**
- * This is the default constructor for this class.
- * The object is not fully constructed after this constructor is called.
+ * This is the default constructor for this class. @n
+ * The object is not fully constructed after this constructor is called. @n
* For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.1
~ImageFeatureManager(void);
/**
- * Initialize this instance of ImageFeatureManager and create image feature set.
- * Every application must call Construct() before calling any other method of ImageFeatureManager.
+ * Initializes this instance of %ImageFeatureManager and create image feature set. @n
+ * Every application must call %Construct() before calling any other methods of %ImageFeatureManager.
*
* @since 2.1
*
- * @return An error code.
+ * @feature %http://tizen.org/feature/vision.image_recognition
+ *
+ * @return An error code
*
* @exception E_SUCCESS The method is successful.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
- * @see
+ * @exception E_UNSUPPORTED_OPERATION The Emulator or target device does not support the required feature.
+ * For more information, see <a href="../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm">Application Filtering</a>.
+ * @remarks Before calling this method, check whether the feature is supported by
+ * Tizen::System::SystemInfo::GetValue(const Tizen::Base::String&, bool&).
*/
result Construct(void);
/**
- * Loads feature set file
+ * Loads a feature set file.
*
* @since 2.1
*
- * @return An error code.
+ * @return An error code
*
- * @param[in] featureSetFilePath Feature set file path
+ * @param[in] featureSetFilePath The feature set file path
*
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified feature set file path is invalid.
+ * @exception E_INVALID_ARG The specified feature set file path is invalid.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
*
- * @remarks if feature set file exists, it will be updated.
- * if feature set file does not exist, it will be newly created.
- * @see
+ * @remarks
+ * - If a feature set file exists, it is updated.
+ * - If a feature set file does not exist, it is newly created.
+ * - It is not mandatory to call this method to create new feature set file, but Flush() must be called with valid feature set file path.
*/
result Load(const Tizen::Base::String& featureSetFilePath);
/**
- * Returns list of supported image file formats for adding feature.
+ * Gets a list of supported image file formats for adding a feature.
*
* @since 2.1
- * @return list of supported image file formats
- *
- * @see
+ *
+ * @return A list of supported image file formats
*/
static Tizen::Base::Collection::IListT<Tizen::Media::ImageFormat>* GetSupportedImageFileFormatsListN(void);
/**
- * Adds a feature to feature set
+ * Adds a feature to a feature set.
*
* @since 2.1
*
- * @return Feature index of newly created feature on success.
- * If the specified input image file path is invalid, it returns -1.
+ * @return A feature index of newly and successfully created feature, otherwise returns -1.
*
- * @param[in] imagePath Input image file path
+ * @param[in] imagePath The input image file path
*
- * @exception E_INVALID_ARG A specified input parameter is invalid.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
*
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * Input image file must be one of the supported image file formats.
- * Calling this method actually means 'Mark As Add Feature'.
- * And the marked feature data will be added to feature set file after calling Flush();
- * @see GetSupportedImageFileFormatsListN(void)
- * Flush(const Tizen::Base::String* featureSetFilePath = 0);
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - Input image file must be one of the supported image file formats.
+ * - Calling this method actually means 'Mark As Add Feature'.
+ * And the marked feature data will be added to a feature set file after calling Flush().
+ * @see GetSupportedImageFileFormatsListN()
+ * Flush(const Tizen::Base::String*)
*/
int AddFeature(const Tizen::Base::String& imagePath);
/**
- * Adds a feature to feature set
+ * Adds a feature to a feature set.
*
* @since 2.1
*
- * @return Feature index of newly created feature on success.
- * If A specified input image file path is invalid, it returns -1.
+ * @return A feature index of newly and successfully created feature, otherwise returns -1.
*
- * @param[in] imageBuffer Image buffer of grayscale image data of specified width and height
- * @param[in] width Width of input image
- * @param[in] height Height of input image
- * @param[in] description Description of the feature
+ * @param[in] imageBuffer The image buffer of grayscale image data of specified width and height
+ * @param[in] width The width of the input image
+ * @param[in] height The height of the input image
+ * @param[in] description The description of the feature
*
* @exception E_INVALID_ARG A specified input parameter is invalid.
*
- * @remarks The specific error code can be accessed using the GetLastResult() method.
- * Calling this method actually means 'Mark As Add Feature'.
- * And the marked feature data will be added to feature set file after calling Flush();
- * @see Flush(const Tizen::Base::String* featureSetFilePath = 0);
+ * @remarks
+ * - The specific error code can be accessed using the GetLastResult() method.
+ * - Calling this method actually means 'Mark As Add Feature'.
+ * And the marked feature data will be added to a feature set file after calling Flush().
+ * @see Flush(const Tizen::Base::String*)
*/
int AddFeature(const Tizen::Base::ByteBuffer& imageBuffer, int width, int height, const Tizen::Base::String& description);
/**
- * Gets total number of features in feature set.
+ * Gets the total number of features in a feature set.
*
* @since 2.1
*
- * @return Total number of features in the feature set.
- * @see
+ * @return The total number of features in a feature set
*/
int GetTotalNumberOfFeatures(void);
/**
- * Deletes a feature of specified index in the feature set
+ * Deletes a feature with a specified index in a feature set.
*
* @since 2.1
*
- * @return An error code.
+ * @return An error code
*
- * @param[in] featureIndex Feature index in feature set
+ * @param[in] featureIndex The feature index in a feature set
*
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified input parameter is invalid.
- * @exception E_OUT_OF_MEMORY The memory is insufficient.
+ * @exception E_INVALID_ARG The specified input parameter is invalid.
+ * @exception E_OUT_OF_MEMORY The memory is insufficient.
*
* @remarks Calling this method actually means 'Mark As Delete Feature'.
- * And the marked feature data will be deleted after calling Flush();
- * @see Flush(const Tizen::Base::String* featureSetFilePath = 0);
+ * And the marked feature data is deleted after calling Flush().
+ * @see Flush(const Tizen::Base::String*)
*/
result DeleteFeature(int featureIndex);
/**
- * Deletes all features in feature set
+ * Deletes all features in a feature set.
*
* @since 2.1
*
- * @return An error code.
+ * @return An error code
*
* @exception E_SUCCESS The method is successful.
* @exception E_OUT_OF_MEMORY The memory is insufficient.
*
* @remarks Calling this method actually means 'Mark As Delete All Features'.
- * And all feature data will be deleted after calling Flush();
- * @see Flush(const Tizen::Base::String* featureSetFilePath = 0);
+ * And all feature data is deleted after calling Flush().
+ * @see Flush(const Tizen::Base::String*)
*/
result DeleteAllFeatures(void);
/**
- * Saves features into feature set file and update all changes as marked.
+ * Flushes features into a feature set file and updates all changes as marked.
*
*
* @since 2.1
*
- * @return An error code.
+ * @return An error code
*
- * @param[in] featureSetFilePath Feature set file path
+ * @param[in] featureSetFilePath The feature set file path
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG A specified Feature set path is invalid.
+ * @exception E_INVALID_ARG The specified feature set path is invalid.
*
- * @remarks All changes in feature set file by 'AddFeature' or 'DeleteFeature' or 'DeleteAllFeatures' are updated by calling this Flush() method.
- * If featureSetFilePath is not decided or is same to file path used in Load(), the loaded feature set file will be updated.
- * If featureSetFilePath is not same to file path used in Load(), the loaded feature set file is remained and new feature set file will be created.
- * @remarks If featureSetFilePath is null, the feature set file loaded by Load() method will be overwritten.
+ * @remarks
+ * - All changes in the feature set file by AddFeature() or DeleteFeature() or DeleteAllFeatures() are updated by calling this method.
+ * - If @c featureSetFilePath is not decided or is same as the file path used in Load(), the loaded feature set file is updated.
+ * - If @c featureSetFilePath is not same as the file path used in %Load(), the loaded feature set file remains as is and new feature set file is created.
+ * - If @c featureSetFilePath is @c null, the feature set file loaded by %Load() is overwritten.
+ * - If @c featureSetFilePath is not decided or is same to file path used in %Load() and the loaded feature set file is read-only @c E_INVALID_ARG exception will be returned.
+ * - If %Load() is not called to create new feature set file, this method must be called with valid @c featureSetFilePath.
*
- * @see
*/
result Flush(const Tizen::Base::String* featureSetFilePath = null);
/**
- * Gets information of the individual feature
+ * Gets information of the individual feature.
*
* @since 2.1
*
- * @return pointer to ImageFeatureInfo
+ * @return A pointer to ImageFeatureInfo
*
- * @param[in] index Feature index in feature set.
- * @see
+ * @param[in] featureIndex The feature index in a feature set
*/
const Tizen::Uix::Vision::ImageFeatureInfo* GetImageFeatureInfo(int featureIndex) const;
ImageFeatureManager& operator=(const ImageFeatureManager&);
private:
- class _ImageFeatureManagerImpl* __pImageFeatureManagerImpl;
+ class _ImageFeatureManagerImpl* __pImageFeatureManagerImpl;
friend class _ImageFeatureManagerImpl;
};