doxygen code sample updated.
[framework/osp/vision.git] / inc / FUixVisionQrCodeRecognizer.h
index 877b0f1..55b844c 100644 (file)
@@ -42,35 +42,67 @@ namespace Tizen { namespace Uix { namespace Vision
  * The following example demonstrates how to use the %QrCodeRecognizer class.
  *
  * @code
- *
- * // Initializes recognition engine 
- *
- * 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
+ * {
+ * 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:
+ *     QrCodeRecognizer*               __pQrRecognizer;
+ * };
+ * 
+ * result
+ * MyClass::Initialize(void)
  * {
- *      __pQrRecognizer = new Tizen::Uix::Vision::QrCodeRecognizer();
- *      __pQrRecognizer->Construct();
- *      __pQrRecognizer->SetFrameSize(CAMERA_WIDTH, CAMERA_HEIGHT);
+ *     result r;
+ * 
+ *     // Creates and initializes recognition engine
+ *     __pQrRecognizer = new Tizen::Uix::Vision::QrCodeRecognizer();
+ *     r = __pQrRecognizer->Construct();
+ * 
+ *     //Image size must be same as camera preview size
+ *     r = __pQrRecognizer->SetImageSize(640, 480);
+ * 
+ *     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
- *         __pQrRecognizer->ProcessFrame(previewedData);
- *
- *        // Loops through all recognized QRs
- *        for (int i = 0; i < __pQrRecognizer->GetRecognizedObjectCount(); i++)
- *        {
- *
- *             const Tizen::Uix::Vision::QrCodeObject *o = __pQrRecognizer->GetQrCodeObject(i);
- *             Tizen::Base::String qrText = o->GetText();
- *
- *         }
- *     }
+ *     // Processing of the camera image follows
+ *     __pQrRecognizer->ProcessImage(previewedData);
+ * 
+ *     // Loops through all recognized QRs
+ *     for (int i = 0; i < __pQrRecognizer->GetRecognizedObjectCount(); i++)
+ *     {
+ *             const QrCodeObject *o = __pQrRecognizer->GetRecognizedObject(i);
+ *             String qrText = o->GetText();
+ *     }
  * }
  *
  * @endcode