doxygen code sample updated.
[platform/framework/native/vision.git] / inc / FUixVisionImageRecognizer.h
index 49fdc45..0d411c7 100644 (file)
@@ -44,44 +44,78 @@ class ImageFeatureManager;
  * The following example demonstrates how to use the %ImageRecognizer class.
  *
  * @code
- *
- *  // Process of initialization follows
- * void
- * Tracker::Initialize()
+ * #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
+ *     : ICameraEventListener
  * {
- *     // Creates and initializes recognition engine
- *     __pImageRecognizer = new Tizen::Uix::Vision::ImageRecognizer();
- *     __pImageRecognizer->Construct();
- *
- *     // Creates an initialized ImageFeatureManager
- *     __pFeatureManager  = new Tizen::Uix::Vision::ImageFeatureManager();
- *     __pFeatureManager->Construct();
- *
- *     // Loads feature set
- *     __pFeatureManager->Load("/mnt/ums/Images/sharks/testFeatureSet.xdb");
- *
- *     // Configures recognition engine
- *     __pImageRecognizer->SetFeatureManager(__pFeatureManager);
- *     __pImageRecognizer->SetImageSize(CAMERA_WIDTH, CAMERA_HEIGHT);
+ * public:
+ *     MyClass();
+ *     ~MyClass();
+ *     result Initialize(void);
+ * 
+ *     // Called when camera auto focus occurred
+ *     void OnCameraAutoFocused(bool completeCondition);
+ *     // Called when camera preview occurred
+ *     void OnCameraPreviewed(Tizen::Base::ByteBuffer& previewedData, result r);
+ *     // Called when camera captured image
+ *     void OnCameraCaptured(Tizen::Base::ByteBuffer& capturedData, result r);
+ *     // Called when camera  error occurred
+ *     void OnCameraErrorOccurred(Tizen::Media::CameraErrorReason r);
+ * 
+ * private:
+ *     ImageRecognizer*        __pImageRecognizer;
+ *     ImageFeatureManager*    __pFeatureManager;
+ * };
+ * 
+ * result
+ * MyClass::Initialize(void)
+ * {
+ *     result r;
+ * 
+ *     // Creates and initializes recognition engine
+ *     __pImageRecognizer = new Tizen::Uix::Vision::ImageRecognizer();
+ *     r = __pImageRecognizer->Construct();
+ *     // Creates an initialized ImageFeatureManager
+ *     __pFeatureManager  = new Tizen::Uix::Vision::ImageFeatureManager();
+ *     r = __pFeatureManager->Construct();
+ * 
+ *     // Loads feature set
+ *     r = __pFeatureManager->Load("/opt/usr/media/Images/testFeatureSet.xdb");
+ * 
+ *     // Configures recognition engine
+ *     r =__pImageRecognizer->SetFeatureManager(*__pFeatureManager);
  *
- *     __pImageRecognizer->SetMultiTracking(true);
+ *      //Image size must be same as camera preview size
+ *     r = __pImageRecognizer->SetImageSize(640, 480);
+ * 
+ *     __pImageRecognizer->SetMultiTrackingEnabled(false);
+ * 
+ *     return r;
  * }
- *
+ * 
  * // We suppose camera to be initialized with Tizen::Graphics::PIXEL_FORMAT_YCbCr420_PLANAR format
- *
  * void
- * Tracker::OnCameraPreviewed(Tizen::Base::ByteBuffer& previewedData, result r)
+ * MyClass::OnCameraPreviewed(Tizen::Base::ByteBuffer& previewedData, result r)
  * {
- *     // Processing of the camera image follows
- *     __pImageRecognizer->ProcessImage(previewedData);
- *
- *     // Loops through all recognized images
- *     for (int i = 0; i < __pImageRecognizer->GetRecognizedObjectCount(); i++)
- *     {
- *         const Tizen::Uix::Vision::ImageObject *o = __pImageRecognizer->GetRecognizedObject(i);
- *         int featId = o->GetFeatureId();
- *      }
- *
+ *     // Processing of the camera image follows
+ *     __pImageRecognizer->ProcessImage(previewedData);
+ * 
+ *     // Loops through all recognized images
+ *     for (int i = 0; i < __pImageRecognizer->GetRecognizedObjectCount(); i++)
+ *     {
+ *             const ImageObject *o = __pImageRecognizer->GetRecognizedObject(i);
+ *             int featId = o->GetFeatureId();
+ *     }
  * }
  *
  * @endcode