Storing Data in On-Camera Flash Memory

Overview of Flash Memory

The flash memory available on the Applicable Product(s) provides users with non-volatile data storage, which is useful for saving data such as calibration files, software license keys, or images. This data will not be erased when the camera is disconnected from power. The following table shows the amount of memory available by camera model.

Table 1: Storage space by camera family

Camera Model

Memory Size

Method for Accessing

Bumblebee BB2/BBX3

512 KB

Camera registers

Blackfly

512 KB

Camera registers

Blackfly S

6 MB

File access control

Chameleon

256 KB

Image storing utility

Chameleon3

1 MB

Camera registers

Cricket

2 Images

Snapshot

Dragonfly2

512 KB

Camera registers

Firefly S / Firefly DL

24 MB

File access control

Firefly FFMV/FMVU

256 KB

Image storing utility

Flea / Flea2 / Flea2G

256 KB

Image storing utility

Flea3

1 MB

Camera registers

Forge

4 MB

File access control

Gazelle

4 MB

Serial Port Access

Grasshopper / Grasshopper2

512 KB

Camera registers

Grasshopper3

2 MB

Camera registers

Grasshopper Express

1 MB

Camera registers

Ladybug3

512 KB

Camera registers

Ladybug5+ / Ladybug6

1 MB

Camera registers

Oryx

4 MB

File access control

Zebra2

1 MB

Camera registers

Writing Data to Flash Memory

There are four mechanisms available for users to write data to flash memory.

  • Using File access control. This is available for GenICam cameras.
  • Using registers either with DATA_FLASH_CTRL and DATA_FLASH_DATA or the PGR_Save_Read_Compressed_Images.exe tool. This is available for IIDC cameras.
  • Using serial port access. This is available for Gazelle only.
  • Using snapshot function. This is available for Cricket only.

Using File Access Control

The camera is capable of storing files through the File Access control feature of GenICam. This is available using the SpinView application provided by the Spinnaker SDK (available from the Downloads page). A separate Camera Imaging utility is available from support for users who wish to use a command line tool for this purpose.

To save a file

  1. Connect the camera to the PC.
  2. Launch the SpinView application.
  3. Select the camera from the Devices list.
  4. Start acquisition.
  5. From the Display pane, save a file to disk.

To upload a file to the camera

  1. In SpinView, on the Features pane, click the File Access tab.
  2. From the Camera File Access drop-down, select UserFile1.
  3. Click Upload.
  4. Select the file saved to disk in the steps above.
  5. Click OK.

To retrieve a file from the camera

  1. In SpinView, on the Features pane, click the File Access tab.
  2. From the Camera File Access drop-down, select UserFile1.
  3. Click Download.

Using Camera Registers

The DATA_FLASH_CTRL and DATA_FLASH_DATA camera registers are available on the Camera Models listed in Table 1 above with 512 KB or 1 MB of memory. The following sections provide a description of these registers. Addresses are offsets from the IEEE-1394 base address.

For an example of how to apply these registers using the FlyCapture API, refer to the SaveImageToFlashEx sample program included with the FlyCapture SDK. For more information on Point Grey camera Control and Status Registers, consult the Point Grey Digital Camera Register Reference.

DATA_FLASH_CTRL Register 1240h

This register controls access to the camera’s on-board flash memory. Each bit in the data flash is initially set to 1.

The user can transfer as much data as necessary to the offset address (1244h), then perform a single write to the control register to commit the data to flash. Any modified data is committed by writing to this register, or by accessing any other control register.

Format:

Field

Bit

Description

Presence_Inq

[0]

Presence of this feature
0: Not Available, 1: Available

 

[1-5]

Reserved

Clean_Page

[6]

Read:
1: Page is clean
0: Page is dirty

Write:
1: Write page to data flash
0: No-op

 

[7]

Reserved

Page_Size

[8-19]

8 == 256 byte page
9 == 512 byte page

Num_Pages

[20-31]

11 == 2048 pages
13 == 8192 pages

DATA_FLASH_DATA Register 1244h

This register provides the 32-bit offset to the start of where the data is stored in the flash memory.

Format:

Field

Bit

Description

DF_Data

[0-31]

32-bit offset to the start of data

Using the Image Storing Utility

The PGR_Save_Read_Compressed_Images.exe is a simple command prompt utility. It is used with the Camera Models listed in Table 1 above with 256 KB of memory, but only for storing image data. If you require assistance with this tool, please contact support.

Using Serial Port Access (Gazelle Only)

The camera has 4 MB of non-volatile memory for users to store data. Data must be written to individual pages in 528-byte data chunks.

To get the size of the flash memory on the camera:

Read syntax: dfi
This command returns the following, in order:

  • Total size of flash memory
  • number of pages
  • page size

To write data to flash memory:

Write syntax: dfw page_number num_bytes ASCII_string
page_number can be specified from 0 to 8191
num_bytes can be specified from 0 to 527

If the size of ASCII_string is more than 528 bytes, it is cut to 528 to fit the page size.

To read a page of flash memory:

Read syntax: dfr page_number
page_number can be specified from 0 to 8191

To clear individual pages of flash memory:

Write syntax: dfw page_number 0 0
page_number can be specified from 0 to 8191

To clear all pages of flash memory:

Write syntax: dfclear

Using Snapshot (Cricket Only)

The camera is capable of storing the most recent image from each stream as a snapshot. This is saved on board the camera and retrievable even after a power cycle. The images are stored permanently, until the user chooses to store a new one.
To take a snapshot

  1. Ensure the Cricket has powered up and is connected to the network.
  2. In your web browser, enter https://<IP Address>.
  3. Enter your user name and password and click the Log in button.
  4. On the Home page, click the Snapshot button for the stream. The snapshot image appears in a popup window of the browser.

To retrieve a snapshot
The snapshot is retrievable from:

  • Stream 1— https://<IP Address>/snapshot-1.jpg
  • Stream 2—https://<IP Address>/snapshot-2.jpg

For more detailed information on using the Cricket, including how to determine the IP Address, see the Cricket Technical Reference.

Storing Images in Flash Memory

Some degree of JPEG compression is generally required to store images in flash memory, depending on the number of images being stored and the amount of memory available (as noted in Table 1 above). The following table shows the number of images, captured in a sample of standard resolutions that can be stored in flash memory. The table assumes a JPEG compression rate of 1/20 original size and an 8-bit pixel format.

Note:  Not all megapixels/resolutions are available on all cameras. This section does not apply to Cricket. The Cricket camera stores 2 images only.

MP

Maximum Resolution

Number of Images Stored

256 KB

512 KB

1 MB

2 MB

4 MB

6 MB

0.3

640x480

17

33

65

130

260

391

0.5

808x608

10

21

41

81

163

244

0.8

1024x768

7

13

25

51

102

153

0.9

1288x728

5

11

21

43

85

128

1.0

1024x1024

5

10

19

38

76

114

1.2

1280x960

4

8

16

33

65

98/p>

1.3

1280x960

4

8

16

33

65

98

1.4

1384x1036

4

7

14

28

56

84

2.0

1624x1224

3

5

10

20

40

60

2.2

2048x1088

2

5

9

18

36

54

2.3

1920x1200

2

4

9

17

35

52

2.8

1932x1452

2

4

7

14

29

43

3.2

2080x1552

2

3

6

12

25

37

4.1

2048x2048

1

2

5

10

19

29

5.0

2448x2048

1

2

4

8

16

24

6.0

2736x2192

1

2

3

7

13

20

8.8

4096x2160

1

1

2

5

9

14

9.1

3376x2704

1

1

2

4

9

13