CMUcam4 Arduino Interface Library  For Firmware Versions 1.00 - 1.03
Application Programmable Interface Online Documentation
 All Classes Files Functions Variables Macros Pages
Classes | Macros
CMUcam4.h File Reference

Portable CMUcam4 interface library. More...

#include "CMUcom4.h"
#include <setjmp.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>

Go to the source code of this file.

Classes

struct  CMUcam4_tracking_parameters_t
 CMUcam4 tracking parameters structure. More...
struct  CMUcam4_tracking_window_t
 CMUcam4 tracking window structure. More...
struct  CMUcam4_image_data_t
 CMUcam4 binary bitmap structure. More...
struct  CMUcam4_histogram_data_1_t
 CMUcam4 1-bin histogram structure. More...
struct  CMUcam4_histogram_data_2_t
 CMUcam4 2-bin histogram structure. More...
struct  CMUcam4_histogram_data_4_t
 CMUcam4 4-bin histogram structure. More...
struct  CMUcam4_histogram_data_8_t
 CMUcam4 8-bin histogram structure. More...
struct  CMUcam4_histogram_data_16_t
 CMUcam4 16-bin histogram structure. More...
struct  CMUcam4_histogram_data_32_t
 CMUcam4 32-bin histogram structure. More...
struct  CMUcam4_histogram_data_64_t
 CMUcam4 64-bin histogram structure. More...
struct  CMUcam4_statistics_data_t
 CMUcam4 statistics data structure. More...
struct  CMUcam4_tracking_data_t
 CMUcam4 tracking data structure. More...
struct  CMUcam4_disk_information_t
 Disk information data structure. More...
struct  CMUcam4_disk_space_t
 Disk space data structure. More...
struct  CMUcam4_entry_attributes_t
 File or directory attributes data structure. More...
struct  CMUcam4_directory_entry_t
 File or directory entry data structure. More...
class  CMUcam4
 The CMUcam4 class implements a generic C++ interface library for the CMUcam4. More...

Macros

#define CMUCAM4_FIRMWARE_V100   100
 CMUcam4 firmware version 1.00.
#define CMUCAM4_FIRMWARE_V101   101
 CMUcam4 firmware version 1.01.
#define CMUCAM4_FIRMWARE_V102   102
 CMUcam4 firmware version 1.02.
#define CMUCAM4_FIRMWARE_V103   103
 CMUcam4 firmware version 1.03.
#define CMUCAM4_NATIVE_H_RES   160
 The native horizontal resolution.
#define CMUCAM4_NATIVE_V_RES   120
 The native vertical resolution.
#define CMUCAM4_BINARY_H_RES   (CMUCAM4_NATIVE_H_RES / 2)
 The binary bitmap horizontal resolution.
#define CMUCAM4_BINARY_V_RES   (CMUCAM4_NATIVE_V_RES / 2)
 The binary bitmap vertical resolution.
#define CMUCAM4_MIN_NATIVE_ROW   0
 The first native row.
#define CMUCAM4_MIN_NATIVE_COLUMN   0
 The first native column.
#define CMUCAM4_MAX_NATIVE_ROW   (CMUCAM4_NATIVE_V_RES - 1)
 The last native row.
#define CMUCAM4_MAX_NATIVE_COLUMN   (CMUCAM4_NATIVE_H_RES - 1)
 The last native column.
#define CMUCAM4_MIN_BINARY_ROW   0
 The first binary bitmap row.
#define CMUCAM4_MIN_BINARY_COLUMN   0
 The first binary bitmap column.
#define CMUCAM4_MAX_BINARY_ROW   (CMUCAM4_BINARY_V_RES - 1)
 The last binary bitmap row.
#define CMUCAM4_MAX_BINARY_COLUMN   (CMUCAM4_BINARY_H_RES - 1)
 The last binary bitmap column.
#define CMUCAM4_IN_TP_LL   0
 This is a convenient macro for comparing the pan pin to low and the tilt pin to low.
#define CMUCAM4_IN_TP_LH   1
 This is a convenient macro for comparing the pan pin to high and the tilt pin to low.
#define CMUCAM4_IN_TP_HL   2
 This is a convenient macro for comparing the pan pin to low and the tilt pin to high.
#define CMUCAM4_IN_TP_HH   3
 This is a convenient macro for comparing the pan pin to high and the tilt pin to high.
#define CMUCAM4_DIR_TP_II   0
 This is a convenient macro for specifying the pan pin to be an input and the tilt pin to be an input.
#define CMUCAM4_DIR_TP_IO   1
 This is a convenient macro for specifying the pan pin to be an output and the tilt pin to be an input.
#define CMUCAM4_DIR_TP_OI   2
 This is a convenient macro for specifying the pan pin to be an input and the tilt pin to be an output.
#define CMUCAM4_DIR_TP_OO   3
 This is a convenient macro for specifying the pan pin to be an output and the tilt pin to be an output.
#define CMUCAM4_OUT_TP_LL   0
 This is a convenient macro for specifying the pan pin to output low and the tilt pin to output low.
#define CMUCAM4_OUT_TP_LH   1
 This is a convenient macro for specifying the pan pin to output high and the tilt pin to output low.
#define CMUCAM4_OUT_TP_HL   2
 This is a convenient macro for specifying the pan pin to output low and the tilt pin to output high.
#define CMUCAM4_OUT_TP_HH   3
 This is a convenient macro for specifying the pan pin to output high and the tilt pin to output high.
#define CMUCAM4_LED_OFF   -1
 This is a convenient macro for specifying that the LED should be off when the CMUcam4 is idling.
#define CMUCAM4_LED_ON   0
 This is a convenient macro for specifying that the LED should be on when the CMUcam4 is idling.
#define CMUCAM4_PAN_SERVO   0
 This is a convenient macro for specifying the pan servo.
#define CMUCAM4_TILT_SERVO   1
 This is a convenient macro for specifying the tilt servo.
#define CMUCAM4_RED_CHANNEL   0
 This is a convenient macro for specifying the histogram's red channel.
#define CMUCAM4_GREEN_CHANNEL   1
 This is a convenient macro for specifying the histogram's green channel.
#define CMUCAM4_BLUE_CHANNEL   2
 This is a convenient macro for specifying the histogram's blue channel.
#define CMUCAM4_H1_BINS   0
 This is a convenient macro for specifying a 1-bin histogram.
#define CMUCAM4_H2_BINS   1
 This is a convenient macro for specifying a 2-bin histogram.
#define CMUCAM4_H4_BINS   2
 This is a convenient macro for specifying a 4-bin histogram.
#define CMUCAM4_H8_BINS   3
 This is a convenient macro for specifying a 8-bin histogram.
#define CMUCAM4_H16_BINS   4
 This is a convenient macro for specifying a 16-bin histogram.
#define CMUCAM4_H32_BINS   5
 This is a convenient macro for specifying a 32-bin histogram.
#define CMUCAM4_H64_BINS   6
 This is a convenient macro for specifying a 64-bin histogram.
#define CMUCAM4_HR_640   0
 This is a convenient macro for specifying a horizontal resolution of 640 pixels for CMUcam4::dumpFrame() and CMUcam4::sendFrame().
#define CMUCAM4_HR_320   1
 This is a convenient macro for specifying a horizontal resolution of 320 pixels for CMUcam4::dumpFrame() and CMUcam4::sendFrame().
#define CMUCAM4_HR_160   2
 This is a convenient macro for specifying a horizontal resolution of 160 pixels for CMUcam4::dumpFrame() and CMUcam4::sendFrame().
#define CMUCAM4_HR_80   3
 This is a convenient macro for specifying a horizontal resolution of 80 pixels for CMUcam4::dumpFrame() and CMUcam4::sendFrame().
#define CMUCAM4_VR_480   0
 This is a convenient macro for specifying a vertical resolution of 480 pixels to for CMUcam4::dumpFrame() and CMUcam4::sendFrame().
#define CMUCAM4_VR_240   1
 This is a convenient macro for specifying a vertical resolution of 240 pixels to for CMUcam4::dumpFrame() and CMUcam4::sendFrame().
#define CMUCAM4_VR_120   2
 This is a convenient macro for specifying a vertical resolution of 120 pixels to for CMUcam4::dumpFrame() and CMUcam4::sendFrame().
#define CMUCAM4_VR_60   3
 This is a convenient macro for specifying a vertical resolution of 60 pixels to for CMUcam4::dumpFrame() and CMUcam4::sendFrame().
#define CMUCAM4_ID_T_R   CMUCAM4_BINARY_V_RES
 The number of rows of bytes in the binary bitmap.
#define CMUCAM4_ID_T_C   (CMUCAM4_BINARY_H_RES / 8)
 The number of columns of bytes in the binary bitmap.
#define CMUCAM4_ID_T_LENGTH   (CMUCAM4_ID_T_R * CMUCAM4_ID_T_C)
 The number of bytes in the binary bitmap.
#define CMUCAM4_HD_1_T_LENGTH   (1 << CMUCAM4_H1_BINS)
 1-bin histogram data structure length in bytes.
#define CMUCAM4_HD_2_T_LENGTH   (1 << CMUCAM4_H2_BINS)
 2-bin histogram data structure length in bytes.
#define CMUCAM4_HD_4_T_LENGTH   (1 << CMUCAM4_H4_BINS)
 4-bin histogram data structure length in bytes.
#define CMUCAM4_HD_8_T_LENGTH   (1 << CMUCAM4_H8_BINS)
 8-bin histogram data structure length in bytes.
#define CMUCAM4_HD_16_T_LENGTH   (1 << CMUCAM4_H16_BINS)
 16-bin histogram data structure length in bytes.
#define CMUCAM4_HD_32_T_LENGTH   (1 << CMUCAM4_H32_BINS)
 32-bin histogram data structure length in bytes.
#define CMUCAM4_HD_64_T_LENGTH   (1 << CMUCAM4_H64_BINS)
 64-bin histogram data structure length in bytes.
#define CMUCAM4_VL_LENGTH   11
 Partition volume label string length in numerical form.
#define CMUCAM4_FST_LENGTH   8
 File system type string length in numerical form.
#define CMUCAM4_NAME_LENGTH   12
 Directory entry name string length in numerical form.
#define CMUCAM4_ATTR_LENGTH   6
 Directory entry attribute string length in numerical form.
#define CMUCAM4_RETURN_SUCCESS   0
 The operation was successful.
#define CMUCAM4_RETURN_FAILURE   -1
 The operation was unsuccessful.
#define CMUCAM4_NOT_ACTIVATED   -2
 The CMUcam4 and the interface library have not been initialized yet.
#define CMUCAM4_NCK_RESPONCE   -3
 The CMUcam4 responded to the command with a NCK.
#define CMUCAM4_UNSUPPORTED_VERSION   -4
 The CMUcam4 firmware version is unknown and unsupported.
#define CMUCAM4_UNEXPECTED_RESPONCE   -5
 The CMUcam4 responded to the command with something unexpected.
#define CMUCAM4_COMMAND_OVERFLOW   -6
 The command buffer overflowed.
#define CMUCAM4_RESPONCE_OVERFLOW   -7
 The responce buffer overflowed.
#define CMUCAM4_STREAM_END   -8
 The CMUcam4 is not streaming data packets.
#define CMUCAM4_SERIAL_TIMEOUT   -9
 The CMUcam4 is not responding.
#define CMUCAM4_CAMERA_TIMEOUT_ERROR   -10
 The CMUcam4 is having problems with the camera module's parallel data bus.
#define CMUCAM4_CAMERA_CONNECTION_ERROR   -11
 The CMUcam4 is having problems with the camera module's serial data bus.
#define CMUCAM4_DISK_IO_ERROR   -12
 An error occured communicating with the micro secure digital card.
#define CMUCAM4_FILE_SYSTEM_CORRUPTED   -13
 The file system is corrupted.
#define CMUCAM4_FILE_SYSTEM_UNSUPPORTED   -14
 The file system is unsupported.
#define CMUCAM4_CARD_NOT_DETECTED   -15
 A micro secure digital card was not found.
#define CMUCAM4_DISK_MAY_BE_FULL   -16
 The micro secure digital card may be full.
#define CMUCAM4_DIRECTORY_FULL   -17
 The directory entry slots in the current directory are completely full.
#define CMUCAM4_EXPECTED_AN_ENTRY   -18
 The target name of a file system path string is malformed.
#define CMUCAM4_EXPECTED_A_DIRECTORY   -19
 A directory name in a file system path string is malformed.
#define CMUCAM4_ENTRY_NOT_ACCESSIBLE   -20
 The target name of the file system path string cannot be accessed.
#define CMUCAM4_ENTRY_NOT_MODIFIABLE   -21
 The target name of the file system path string cannot be modified.
#define CMUCAM4_ENTRY_NOT_FOUND   -22
 The target or a directory in a file system path string cannot be found.
#define CMUCAM4_ENTRY_ALREADY_EXISTS   -23
 The file or directory already exists.
#define CMUCAM4_DIRECTORY_LINK_MISSING   -24
 An error occured trying to move a folder.
#define CMUCAM4_DIRECTORY_NOT_EMPTY   -25
 Directories must be empty first to be deleted.
#define CMUCAM4_NOT_A_DIRECTORY   -26
 The target of a directory only operation is not a directory.
#define CMUCAM4_NOT_A_FILE   -27
 The target of a file only operation is not a file.
#define CMUCAM4_GET_PIXEL(pointer, row, column)
 Gets a pixel (0 or 1) from a binary bitmap data structure.
#define CMUCAM4_SET_PIXEL(pointer, row, column, value)
 Sets a pixel (0 or 1) to a binary bitmap data structure.

Detailed Description

Portable CMUcam4 interface library.

Version:

1.1
Date:

2/7/2013
Authors:

Kwabena W. Agyeman & Christopher J. Leaf
Update History:

v0.1 - Beta code - 3/20/2012
v0.9 - Original release - 4/18/2012
v1.0 - Documented and updated release - 8/3/2012
v1.1 - Added support for the Arduino Due, fixed the send frame command, and fixed a number of compile time warnings - 2/7/2013.
MIT License - TERMS OF USE:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition in file CMUcam4.h.


Macro Definition Documentation

#define CMUCAM4_IN_TP_LL   0

This is a convenient macro for comparing the pan pin to low and the tilt pin to low.

See also:
CMUcam4::getInputs()

Definition at line 117 of file CMUcam4.h.

#define CMUCAM4_IN_TP_LH   1

This is a convenient macro for comparing the pan pin to high and the tilt pin to low.

See also:
CMUcam4::getInputs()

Definition at line 124 of file CMUcam4.h.

#define CMUCAM4_IN_TP_HL   2

This is a convenient macro for comparing the pan pin to low and the tilt pin to high.

See also:
CMUcam4::getInputs()

Definition at line 131 of file CMUcam4.h.

#define CMUCAM4_IN_TP_HH   3

This is a convenient macro for comparing the pan pin to high and the tilt pin to high.

See also:
CMUcam4::getInputs()

Definition at line 138 of file CMUcam4.h.

#define CMUCAM4_DIR_TP_II   0

This is a convenient macro for specifying the pan pin to be an input and the tilt pin to be an input.

See also:
CMUcam4::setOutputs()

Definition at line 145 of file CMUcam4.h.

#define CMUCAM4_DIR_TP_IO   1

This is a convenient macro for specifying the pan pin to be an output and the tilt pin to be an input.

See also:
CMUcam4::setOutputs()

Definition at line 152 of file CMUcam4.h.

#define CMUCAM4_DIR_TP_OI   2

This is a convenient macro for specifying the pan pin to be an input and the tilt pin to be an output.

See also:
CMUcam4::setOutputs()

Definition at line 159 of file CMUcam4.h.

#define CMUCAM4_DIR_TP_OO   3

This is a convenient macro for specifying the pan pin to be an output and the tilt pin to be an output.

See also:
CMUcam4::setOutputs()

Definition at line 166 of file CMUcam4.h.

#define CMUCAM4_OUT_TP_LL   0

This is a convenient macro for specifying the pan pin to output low and the tilt pin to output low.

See also:
CMUcam4::setOutputs()

Definition at line 173 of file CMUcam4.h.

#define CMUCAM4_OUT_TP_LH   1

This is a convenient macro for specifying the pan pin to output high and the tilt pin to output low.

See also:
CMUcam4::setOutputs()

Definition at line 180 of file CMUcam4.h.

#define CMUCAM4_OUT_TP_HL   2

This is a convenient macro for specifying the pan pin to output low and the tilt pin to output high.

See also:
CMUcam4::setOutputs()

Definition at line 187 of file CMUcam4.h.

#define CMUCAM4_OUT_TP_HH   3

This is a convenient macro for specifying the pan pin to output high and the tilt pin to output high.

See also:
CMUcam4::setOutputs()

Definition at line 194 of file CMUcam4.h.

#define CMUCAM4_LED_OFF   -1

This is a convenient macro for specifying that the LED should be off when the CMUcam4 is idling.

See also:
CMUcam4::LEDOn()

Definition at line 201 of file CMUcam4.h.

#define CMUCAM4_LED_ON   0

This is a convenient macro for specifying that the LED should be on when the CMUcam4 is idling.

See also:
CMUcam4::LEDOn()

Definition at line 208 of file CMUcam4.h.

#define CMUCAM4_PAN_SERVO   0

This is a convenient macro for specifying the pan servo.

See also:
CMUcam4::getServoPosition()
CMUcam4::setServoPosition()

Definition at line 215 of file CMUcam4.h.

#define CMUCAM4_TILT_SERVO   1

This is a convenient macro for specifying the tilt servo.

See also:
CMUcam4::getServoPosition()
CMUcam4::setServoPosition()

Definition at line 222 of file CMUcam4.h.

#define CMUCAM4_RED_CHANNEL   0

This is a convenient macro for specifying the histogram's red channel.

See also:
CMUcam4::getHistogram()

Definition at line 228 of file CMUcam4.h.

#define CMUCAM4_GREEN_CHANNEL   1

This is a convenient macro for specifying the histogram's green channel.

See also:
CMUcam4::getHistogram()

Definition at line 234 of file CMUcam4.h.

#define CMUCAM4_BLUE_CHANNEL   2

This is a convenient macro for specifying the histogram's blue channel.

See also:
CMUcam4::getHistogram()

Definition at line 240 of file CMUcam4.h.

#define CMUCAM4_H1_BINS   0

This is a convenient macro for specifying a 1-bin histogram.

See also:
CMUcam4::getHistogram()

Definition at line 246 of file CMUcam4.h.

#define CMUCAM4_H2_BINS   1

This is a convenient macro for specifying a 2-bin histogram.

See also:
CMUcam4::getHistogram()

Definition at line 252 of file CMUcam4.h.

#define CMUCAM4_H4_BINS   2

This is a convenient macro for specifying a 4-bin histogram.

See also:
CMUcam4::getHistogram()

Definition at line 258 of file CMUcam4.h.

#define CMUCAM4_H8_BINS   3

This is a convenient macro for specifying a 8-bin histogram.

See also:
CMUcam4::getHistogram()

Definition at line 264 of file CMUcam4.h.

#define CMUCAM4_H16_BINS   4

This is a convenient macro for specifying a 16-bin histogram.

See also:
CMUcam4::getHistogram()

Definition at line 270 of file CMUcam4.h.

#define CMUCAM4_H32_BINS   5

This is a convenient macro for specifying a 32-bin histogram.

See also:
CMUcam4::getHistogram()

Definition at line 276 of file CMUcam4.h.

#define CMUCAM4_H64_BINS   6

This is a convenient macro for specifying a 64-bin histogram.

See also:
CMUcam4::getHistogram()

Definition at line 282 of file CMUcam4.h.

#define CMUCAM4_ID_T_LENGTH   (CMUCAM4_ID_T_R * CMUCAM4_ID_T_C)

The number of bytes in the binary bitmap.

See also:
CMUcam4_image_data_t

Definition at line 346 of file CMUcam4.h.

#define CMUCAM4_HD_1_T_LENGTH   (1 << CMUCAM4_H1_BINS)

1-bin histogram data structure length in bytes.

See also:
CMUcam4_histogram_data_1_t

Definition at line 352 of file CMUcam4.h.

#define CMUCAM4_HD_2_T_LENGTH   (1 << CMUCAM4_H2_BINS)

2-bin histogram data structure length in bytes.

See also:
CMUcam4_histogram_data_2_t

Definition at line 358 of file CMUcam4.h.

#define CMUCAM4_HD_4_T_LENGTH   (1 << CMUCAM4_H4_BINS)

4-bin histogram data structure length in bytes.

See also:
CMUcam4_histogram_data_4_t

Definition at line 364 of file CMUcam4.h.

#define CMUCAM4_HD_8_T_LENGTH   (1 << CMUCAM4_H8_BINS)

8-bin histogram data structure length in bytes.

See also:
CMUcam4_histogram_data_8_t

Definition at line 370 of file CMUcam4.h.

#define CMUCAM4_HD_16_T_LENGTH   (1 << CMUCAM4_H16_BINS)

16-bin histogram data structure length in bytes.

See also:
CMUcam4_histogram_data_16_t

Definition at line 376 of file CMUcam4.h.

#define CMUCAM4_HD_32_T_LENGTH   (1 << CMUCAM4_H32_BINS)

32-bin histogram data structure length in bytes.

See also:
CMUcam4_histogram_data_32_t

Definition at line 382 of file CMUcam4.h.

#define CMUCAM4_HD_64_T_LENGTH   (1 << CMUCAM4_H64_BINS)

64-bin histogram data structure length in bytes.

See also:
CMUcam4_histogram_data_64_t

Definition at line 388 of file CMUcam4.h.

#define CMUCAM4_RETURN_SUCCESS   0

The operation was successful.

Non-negative values are usually successes.

Definition at line 413 of file CMUcam4.h.

#define CMUCAM4_RETURN_FAILURE   -1

The operation was unsuccessful.

This is usually caused by a NULL pointer.

Definition at line 418 of file CMUcam4.h.

#define CMUCAM4_COMMAND_OVERFLOW   -6

The command buffer overflowed.

This error is usually caused by passing strings that are too large to the interface library.

Definition at line 444 of file CMUcam4.h.

#define CMUCAM4_RESPONCE_OVERFLOW   -7

The responce buffer overflowed.

This error is usually caused by not handling communication with the CMUcam4 fast enough. In particular, whenever the CMUcam4 sends a large amount of binary data this can cause the responce buffer to overflow if not handled quickly.

Definition at line 452 of file CMUcam4.h.

#define CMUCAM4_FILE_SYSTEM_CORRUPTED   -13

The file system is corrupted.

Try non-quickly reformatting the file system.

Definition at line 482 of file CMUcam4.h.

#define CMUCAM4_FILE_SYSTEM_UNSUPPORTED   -14

The file system is unsupported.

Try non-quickly reformatting the file system.

Definition at line 487 of file CMUcam4.h.

#define CMUCAM4_DISK_MAY_BE_FULL   -16

The micro secure digital card may be full.

The error is "may be" because of the time it would take to verify the if disk was completely full.

Definition at line 498 of file CMUcam4.h.

#define CMUCAM4_DIRECTORY_FULL   -17

The directory entry slots in the current directory are completely full.

Some directory entries may use multiple directory entry slots.

Definition at line 504 of file CMUcam4.h.

#define CMUCAM4_GET_PIXEL (   pointer,
  row,
  column 
)
Value:
\
(((pointer)->pixels[((row) * CMUCAM4_ID_T_C) + ((column) / 8)] \
>> (7 - ((column) & 7))) & 1)

Gets a pixel (0 or 1) from a binary bitmap data structure.

This function macro is included for speed and not safety. Please use it carefully!

Parameters:
[in]pointerA pointer to the binary bitmap data structure.
[in]rowThe pixel row. Must be between 0 and 59.
[in]columnThe pixel column. Must be between 0 and 79.
Returns:
The pixel value (0 or 1).
See also:
CMUcam4_image_data_t
CMUcam4::getTypeFDataPacket()
CMUcam4::sendBitmap()
CMUcam4::getPixel()

Definition at line 1126 of file CMUcam4.h.

#define CMUCAM4_SET_PIXEL (   pointer,
  row,
  column,
  value 
)
Value:
do { \
int bitIndex = (7 - ((column) & 7)); \
int byteIndex = (((row) * CMUCAM4_ID_T_C) + ((column) / 8)); \
\
(pointer)->pixels[byteIndex] = \
(((~(1<<bitIndex))&((pointer)->pixels[byteIndex]))|(((value)?1:0)<<bitIndex)) \
; } while(false)

Sets a pixel (0 or 1) to a binary bitmap data structure.

This function macro is included for speed and not safety. Please use it carefully!

Parameters:
[out]pointerA pointer to the binary bitmap data structure.
[in]rowThe pixel row. Must be between 0 and 59.
[in]columnThe pixel column. Must be between 0 and 79.
[in]valueThe pixel value (0 or 1).
See also:
CMUcam4_image_data_t
CMUcam4::getTypeFDataPacket()
CMUcam4::sendBitmap()
CMUcam4::setPixel()

Definition at line 1157 of file CMUcam4.h.