0% found this document useful (0 votes)
22 views13 pages

DOLA1

Uploaded by

MOHAMED Adel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views13 pages

DOLA1

Uploaded by

MOHAMED Adel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Capture

Modes:
3 Modes
TABLE OF CONTENTS
01 02
Continuous Capture
Read Mode: Mode:

03
Synchronous
Continuous Capture
Mode:
01
Read Mode:
Imagine a teacher asking a student a
question (application requesting a frame).
The student waits to finish their current
thought (current frame) and then answers
the question (delivers the captured frame).
Advantage: Low CPU usage (like the
student not needing to multitask).
Disadvantage: Delay (the teacher has to
wait for an answer).
Continuous Capture
Mode:
Imagine a photographer taking pictures continuously,
one after another, without waiting for a specific
request.
Advantage: No delay in requesting a frame (there's
always a recent picture available).
Disadvantage: Requires more memory to store
captured frames (like needing a bigger camera roll).
Synchronous Continuous Capture
Mode:

Imagine a photographer taking pictures continuously, but


also having an assistant constantly checking the photos.
When a good one is captured, the assistant alerts the
photographer (interrupt signal).
Advantage: Captures all frames continuously, ideal for
recording video.
Disadvantage: More complex and requires faster processing
(like needing a quick assistant who can keep up).
Why Read Mode is Best for
Mobile Robotics:
Mobile robots typically have slower processors and limited
memory. Read mode offers:

Lower CPU usage (important for the robot to perform other


tasks).
Acceptable delay (the delay can be minimized by
requesting a frame before a movement finishes).
While there might be a slight delay in receiving the image,
minimizing CPU usage is crucial for a mobile robot to
function effectively.
AWESOME
WORDS
A PICTURE IS WORTH A THOUSAND WORDS
Camera Interaction:
All camera interactions happen in the background
using interrupts, simplifying the user interface.

**Supported Cameras and Modes:**

* The provided routines work with various EyeBot


cameras and interfaces.
* Current EyeCam models only support the
"NORMAL" mode, while older QuickCam models
might have additional zoom modes.
CAMERA
Big numberCamera Initialization:**

* `CAMInit(int mode)` initializes the camera and


returns its code or an error code.

**Image Data Format:**

* Standard image size is 62 x 82 pixels for both


grayscale (1 byte per pixel) and color (3 bytes per
pixel in red, green, blue order).
* Newer cameras have higher resolutions, but these
functions still return the standard size with a 1-pixel
white border.
s catch your audience’s attention
CAM FUNCTIONS

Camera Read Functions:**

* `CAMGetFrame(image *buf)`: Reads a grayscale image.


* `CAMGetColFrame(colimage *buf, int convert)`: Reads a color
image, optionally converting it to grayscale.
* **Newer cameras** have additional functions for full resolution:
* `CAMGetFrameMono(BYTE *buf)`: Reads a grayscale image.
* `CAMGetFrameColor(BYTE *buf)`: Reads a color image in RGB
format.
* `CAMGetFrameBayer(BYTE *buf)`: Reads a color image in
Bayer format (for further processing).

**Camera Parameters and Control:**

* Different camera models have different supported parameters and


control options.
* `CAMSet(int para1, int para2, int para3)`: Sets camera parameters.
* For EyeCam C2, only the first parameter is used to set the frame
rate (FPS).
* `CAMGet(int *para1, int *para2, int *para3)`: Gets current camera
control values.
* For EyeCam C2, returns current frame rate, image width, and
height.
Limitations

* This procedural interface can be cumbersome when dealing with diverse


camera models.
* An object-oriented approach might be better suited for managing different
functionalities and complexities.

**Example Program:**

* Program 3.2 demonstrates continuous image capture and display on the EyeBot
LCD until a button press.
* It checks the camera version to potentially distinguish between color and
grayscale models.

**Alternative Functions:**

* `CAMGetColFrame` and `LCDPutColorGraphic` can be used for reading and


displaying color images instead of the grayscale functions in the example.

I hope this explanation clarifies the camera interface functionalities and


limitations from the provided text.r own work. Just right-click on it and select
“Replace image”

You might also like