Download 3. Installation
Transcript
Note: We have passed camera.node which indicates that the dc1394_cameracapture structure is being used and only the particular node for which the camera has been setup is being referred to. But we can as well use camera_nodes[0]. 8. Have the camera start sending the data to the user. This is done by starting the iso transmission. The following function is used dc1394_start_iso_transmission(handle,camera.node) 9. Capture one frame by calling the function dc1394_single_capture(handle,&camera) camera is a pointer to the structure dc1394_cameracapture. This function will grab the image and store it in the buffer (capture_buffer) provided by the structure. In order to capture more than one frame use a for loop and place the function inside it for( i=0;i<100 ;i++)/* to capture 100 images*/ dc1394_single_capture(handle,&camera) 10. After the image has been grabbed, stop the data transmission by calling the following function dc1394_stop_iso_transmission(handle,camera.node) 11. Add a PGM file header to the captured buffer to see the image using gimp. 12. Use fwrite to save the captured image, by writing the buffer(camera.capture_buffer) in a file. The other parameters like height and width of the image can be extracted from the same structure: camera.frame_width, camera.frame_height. 13. Close the camera. This step is necessary to save from the memory leak. 29