1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004


Download 424.29 Kb.
Name1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004
page9/12
A typeDocumentation
manual-guide.com > manual > Documentation
1   ...   4   5   6   7   8   9   10   11   12


There are two methods by which image data can be retrieved from a Silicon Imaging USB camera: Snap Mode & Live Mode. The snap mode is the simplest method to capture an image from the camera. The live mode is used for continuous image capture for live display or high-speed sequence capture.

Snap Mode


The first method, which we will call “Snap Mode”, typically involves use of the SI_SnapBulkImage() function. to retrieve one image from the camera and transfer it into a buffer created at the application level. For this method, application level interaction is required to request every image captured. This is ideal for hardware-triggered or software initiated events. The camera may be placed in a stopped or non-scanning mode with a the optional (-T) Trigger model, by issuing the command SI_ArmTriggerWait(). Once the trigger event occurs, the snap command is sent to the camera to initiate exposure and perform readout. The function returns to the application layer with the image buffer filled with new data. The captured image is typically processed and displayed in a GUI application. The process is then repeated, often as a single threaded application.
Sample:
int result;

BYTE commandClock[3] = {0x37, 0xCB, 0x8F}; // clock settings for 30 MHz

int iColumns, iRows, iSize, iPixelDepth, iBytesRead;

char driver[8] = "ezusb-0";

unsigned char* ImageBuffer;
iRows = 512;

iColumns = 512;

iPixelDepth = 8;

iSize = iRows * iColumns;

// open camera

result = SI_OpenCamera (0, driver); // camera 0

if (SI_STATUS_SUCCESS != result)

return result;
ImageBuffer = (unsigned char *) malloc(iSize);

// set image size in camera

SI_InitWindowMode(0, 0, iRows , 0, iColumns, 0, 0);

// set clock

SI_TransferControlData(0, 0xE2, 0, 0, 0, 3, commandClock);
// Wait for External TTL trigger

SI_ArmTriggerWait(1);

// snap single image

result = SI_SnapBulkImage(0, iColumns, iRows, iPixelDepth, image, &iBytesRead);

if (SI_STATUS_SUCCESS != result)

return result;
// free memory

free(pImageBuffer1);
// close camera

SI_CloseCamera(0);

The minimum delay between the completion of one capture and the initiation of another capture at the camera level is unknown in a Windows programming environment and might vary from 1-3 ms. Therefore, in a continuous capture operation with fixed timing between frame (vertical blanking) to allow for the variations, the maximum consistent frame rate will be limited by the maximum time delay or vertical blanking. For example, If the readout of a frame takes 30msec and the maximum delay which may occur is 3msec until the next frame begin can be initiated, the frame time must be set to 33msec (30 + 3msec) to maintain smooth continuous motion video.


30msec (3) 30msec (3) 30msec (3) 30msec (3) 30msec (3)






NO

XFER








SNAP


If the application is delayed in its request beyond the 3 msec vertical blanking delay, the next frame will internally scan inside the camera, but will not be transferred out to the host. This is done maintain consistent frame-to-frame timing and correct exposure in rolling shutter operation. The image cannot start in the middle of the frame, so the next image starting at the top of frame will be transferred to complete the snap request.


Live Mode
With the second method, which we call “Live Mode” can be used to capture continuously or for a specified number of images by the camera driver without any user level application intervention.
The functions SI_SnapBulkLiveStart and SI_SnapBulkLiveStop are the primary functions employed for this method.

Key Functions for Live Mode:
SI_SnapBulkLiveStart (int iCamID, int iColumns, int iRows, int iSequenceNumber, unsigned char* ImageBuffer, HANDLE hEvent1, HANDLE hEvent2, HANDLE hEvent3)

SI_SnapBulkLiveStop (int iCamID)
These functions are documented in greater detail in the API User’s Manual


Note: All Silicon Imaging USB cameras support live mode with the exception of the SI3170.
High-level Description of Continuous Live Mode
Continuous live mode is illustrated in the diagram below. The application creates a buffer which is twice the size of a modulo 512 single image. If the image is monochrome and 1024 x 768 in size, the total buffer size would be 2 x 1024 x 768 or 1572864 bytes since the image size is already modulo 512 (if the image size is not modulo 512, it should be increased to the next multiple of 512). Thus each of the halves of this buffer (Buffer 1 and Buffer 2) will contain one image. If the mode is color the size of the overall buffer should be doubled.
After the usual control functions are called such as SI_InitWindowMode, the continuous capture process is initiated by a call to SI_SnapBulkLiveStart with the iSequenceCount parameter set to zero. Prior to this call, the application will have created the two events for notification (event1 and event2). SI_SnapBulkLiveStart will not return to the user until the continous capture process is terminated (see below).
The first captured image will be transferred into Buffer 1 and Event1 set immediately after that transfer is completed. At this point display and processing can be done from Buffer 1 while the second image is captured into Buffer 2. Event2 is set immediately upon the fill of Buffer 2. The process continues by alternating the fill and setting of events between Buffers 1 and 2. If processing and display on one buffer is not completed prior to the other buffer being filled, the camera will simply start writing over the buffer that you are working with. Thus the capture of any image cannot held up from the application level. If the capture rate will exceed the display and processing rate the user should use the single snap function SI_SnapBulkImage which initiates a capture with every call from the application level.



Typically, the function SI_SnapBulkLiveStart will be called from a separate thread created from a main thread. To stop the continuous live capture process, the user should call SI_SnapBulkLiveStop from the main or another thread. The capture process will then terminate when the current image is finished being captured. At that point, SI_SnapBulkLiveStart will return to the user.

1   ...   4   5   6   7   8   9   10   11   12

Related:

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconSurveyor Scan Control Release Notes (Version 5, Build 032) Revision History

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconHow a scrappy little camera company turned its customers into a stoked...

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconDigital Camera Specifications

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconMedium format digital camera

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconActivity: Using a digital video camera

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconDino-Eye Digital Microscope Eyepiece Camera am422XN

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconCanon Digital Camera Software Developers Kit General Information

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconCanon Digital Camera Software Developers Kit General Information

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconRelated Work Experience Digital Video Camera Expert: Best Buy Stores, md education

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconThank you for purchasing rd32, hd digital waterproof video camera....

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconAbstract In August of 2004, the aef center published its aef center...

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconSony has just announced three new consumer video cameras for the...

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconThe master minimum equipment list which is distributed by the department...

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconThe master minimum equipment list which is distributed by the department...

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconThis product is a high-definition video products for market demand,...

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconAbstract: This technical recommended practice provides guidelines...

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconResearch Assistant. August 1997 August 2002

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconGen II hayabusa progressive nos harness

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconThe master minimum equipment list which is distributed by the department...

1. 3 Million Pixel Progressive Scan Digital Camera Revision 2 August 3, 2004 iconThe master minimum equipment list which is distributed by the department...




manual


When copying material provide a link © 2017
contacts
manual-guide.com
search