Abstract: Introduce the structure and function classification of SDK DC280 and SDK of Kodak's digital camera development kit, and provide a typical programming example.
Digital camera is a common consumer product at present. Its basic working principle is to use CCD optocoupler device to convert optical signal into electrical signal. After A / D conversion, data compression and other processing, it is applied to PC terminal through serial port or USB port Transfer the pictures (mostly in JPEG format) to the hard disk of the PC under program control. At present, all applications on the PC are provided by the camera manufacturer. Few people have noticed that some digital camera manufacturers provide developers with relatively rich SDK (Software Development Kit) resources to facilitate the use of digital cameras for image acquisition and monitoring development. The SDK development kit generally consists of a header file (.H), a library file (.lib), and a dynamic link library file (.dll). Kodak Corporation of America is the world leader in camera manufacturing and many imaging standards. This article will use the KODAK DC280 SDK as an example to introduce the SDK and its applications, so that interested developers can self-program to apply the data camera in the engineering project.
1 SDK structure diagram
The DC280 SDK block diagram is shown in Figure 1. The SDK control layer is located between the application and the specified SDK control layer (for the DS280 camera this layer is the DC280SDK control layer), Its main function is to receive the DC280_OpenCamera () instruction of the application, and transfer the specified camera SDK control layer into the memory area; receive the DC2x0_CloseCamera () instruction, and at the same time release the memory area occupied by the specified camera SDK control layer. The designated camera SDK layer is located under the SDK control layer. This layer supports all functions for accessing the camera, and uploads the function execution result status code (that is, error code) to the application through the SDK control layer. Specify the lower layer of the camera control layer as the driver layer. Drivers are used to deal directly with external devices.
2 SDK function classification
The functions in the SDK can be generally divided into the following categories according to the role type:
(1) Camera initialization function: mainly includes _CloseCamera () and _OpenCamera ().
(2) Camera control functions: mainly include _GetStatus (), _GetConfig (), _SetConfig (), _ControlCameraTIme (), _ControlCameraID (), _ControlTakePicture (), _ResetCamera ().
(3) Picture management functions: _TakePicture (), _ResetCamera ().
(4) Picture information acquisition functions: _GetCameraPicTInfo (), _GetAllPictureName (), _GetNaTIvePicture ().
(5) File transfer function: _GetFileFormCamera (), _SetFileToCamera.
(6) Other types of functions: including the function of obtaining battery power data, the function of obtaining the return code of the last operation, etc.
3 A typical example of SDK usage
The following is a simple example of taking pictures to make readers generally understand the general mode of programming. The process is shown in Figure 2. The first is to initialize the camera, that is, turn on the camera, then read the current camera parameter settings, modify some parameter settings as needed, then take pictures, and finally close the camera to release the memory. The routine is as follows:
The following is a typical example of SDK usage:
#include "F210.h"
OSErr ret;
DC280_Camera; Camera;
DC280_ImgProcData ThumbImgInfo;
DC280_TakePicTInfo TakePictInfo;
DC280_PictInfo GenericPictInfo;
DC280_SpecificPictInfo SpecificPictInfo; // Turn on the camera
DC280_OpenCamera (VersionData, CameraData); // Get camera setting parameters
ret = DC280_ControlTakePicture (& Camera, TRUE, 0L, (VOIDPTR & TakePictInfo);
// Modify the parameters that need to be changed
ret = DC280_ControlTakePicture (& Camera, FALSE, (VOIDPTR & TakePictInfo); // Photograph
ret = DC280_TakePicture (& Camera, TRUE, & ThumbImgInfo, & GenericPictInfo, (VOIDPTR) & SpecificPictInfo);
// The file transfer function can be added as needed
DC210_CloseCamera (CameraData); // Close the camera
The second parameter of DC280_ControlTakePicture is GetSetFlag. When it is true, it means that the setting parameters are obtained from the camera; when it is false, it means that the changed parameters are sent to the camera. The data structure of DC280_Camera is as follows:
typedef struct {DC210_PortNum PortNum;
DC210_BitRate BitRate;
DC210_CameraType CamType;
BOOL CameraOpenFlag;
VOIDPTR InternalUseOnly;
} DC280_Camera;
This article provides a brief introduction to the SDK and the development of camera applications using Kodak's DC280 SDK development tool. The methods of using SDKs of other companies are basically similar, but the function names are slightly different, and the methods of use are the same. Detailed descriptions of the functions and parameters in the SDK can be found in the list of development tools on the camera manufacturer's English website.

Follow WeChat

Download Audiophile APP

Follow the audiophile class
related suggestion
For example, if we want to break the point of i = i + 2; in the C function, we first find the corresponding instruction in the disassembly file: 84d4: e2 ...

The survey revealed that all web applications have at least one security flaw, and the median number of security vulnerabilities in each application is 11. 85 ...

Structure Studios has released a new application to improve workflow in the swimming pool and landscape industry. YARD is one ...

Although dangerous incidents such as accidents, personal injuries and kidnappings abound, parents can use smartphones and other wearable devices to track the position of their children ...

Recently, Google announced that it removed 700,000 apps from the Play Store in 2017 because they violated the store ’s related ...

JDBC is a Java API for executing SQL statements, which can provide unified access to a variety of relational databases. It consists of a set of Ja ...

TeamViewer is an application that can be used for remote control in the background of any firewall and NAT proxy, desktop sharing and file transfer ...

The DS18B20 temperature sensor is a 1-wire single-bus device produced by DALLAS, which has the characteristics of simple circuit and small size ...

The UAV itself is just a flying machine, but it will be interesting to combine it with the App. That's why Drone Deplo ...

Since many people always ask this question, here is a summary for your reference. It must be explained here that the following steps are for the Linux system ...

Electronics enthusiast news: AMD is steadily advancing its goal: to transform itself into SoCs companies compatible with industry chips. AMD is expected to be ...

Electronic Tips Network Core Tips: This article explains some common misunderstandings and misunderstandings about embedded platforms and proposes a correctly determined discussion framework, clear ...

This article introduces the application design of the embedded detection system, which is a detection device based on the USB interface. The task of the application is to put the user on the device ...

Intel Capital (Intel Capital), a subsidiary of Intel Corporation, has announced the establishment of a ...
The city of Malmo has launched smart phone applications such as Android and iPhone. This app includes what people can find ...
Since the desktop Windows runs on the X86 platform in most cases, there is no portability problem of different platforms.

Software application developers – and those who use laptops on their living room sofas – how should they estimate their applications ...