Developer World
Spresense Arduino Library v3.2.0-77d75a4
Camera.h File Reference

Camera Library for Arduino IDE on Spresense. More...

#include <stdint.h>
#include <stdlib.h>
#include <semaphore.h>
#include <pthread.h>
#include <mqueue.h>
#include <nuttx/video/video.h>
Include dependency graph for Camera.h:

Go to the source code of this file.

Classes

class  ImgBuff
 [en] Camera Image memory management class. This is internal class.
[ja] Cameraのイメージメモリ管理用クラス。内部利用Class。 More...
 
class  CamImage
 [en] The class which is to control Image from Camera.
[ja] Cameraから得られる画像データを利用するためのクラス。 More...
 
class  CameraClass
 [en] The class to control Spresense Camera.
[ja] SpresenseのCamera機能を制御するためのクラス。 More...
 

Macros

#define CAM_IMGSIZE_QQVGA_H   (160)
 
#define CAM_IMGSIZE_QQVGA_V   (120)
 
#define CAM_IMGSIZE_QVGA_H   (320)
 
#define CAM_IMGSIZE_QVGA_V   (240)
 
#define CAM_IMGSIZE_VGA_H   (640)
 
#define CAM_IMGSIZE_VGA_V   (480)
 
#define CAM_IMGSIZE_HD_H   (1280)
 
#define CAM_IMGSIZE_HD_V   (720)
 
#define CAM_IMGSIZE_QUADVGA_H   (1280)
 
#define CAM_IMGSIZE_QUADVGA_V   (960)
 
#define CAM_IMGSIZE_FULLHD_H   (1920)
 
#define CAM_IMGSIZE_FULLHD_V   (1080)
 
#define CAM_IMGSIZE_3M_H   (2048)
 
#define CAM_IMGSIZE_3M_V   (1536)
 
#define CAM_IMGSIZE_5M_H   (2560)
 
#define CAM_IMGSIZE_5M_V   (1920)
 
#define CAM_ISO_SENSITIVITY_25   (25000)
 
#define CAM_ISO_SENSITIVITY_32   (32000)
 
#define CAM_ISO_SENSITIVITY_40   (40000)
 
#define CAM_ISO_SENSITIVITY_50   (50000)
 
#define CAM_ISO_SENSITIVITY_64   (64000)
 
#define CAM_ISO_SENSITIVITY_80   (80000)
 
#define CAM_ISO_SENSITIVITY_100   (100000)
 
#define CAM_ISO_SENSITIVITY_125   (125000)
 
#define CAM_ISO_SENSITIVITY_160   (160000)
 
#define CAM_ISO_SENSITIVITY_200   (200000)
 
#define CAM_ISO_SENSITIVITY_250   (250000)
 
#define CAM_ISO_SENSITIVITY_320   (320000)
 
#define CAM_ISO_SENSITIVITY_400   (400000)
 
#define CAM_ISO_SENSITIVITY_500   (500000)
 
#define CAM_ISO_SENSITIVITY_640   (640000)
 
#define CAM_ISO_SENSITIVITY_800   (800000)
 
#define CAM_ISO_SENSITIVITY_1000   (1000000)
 
#define CAM_ISO_SENSITIVITY_1250   (1250000)
 
#define CAM_ISO_SENSITIVITY_1600   (1600000)
 

Enumerations

enum  CAM_IMAGE_PIX_FMT {
  CAM_IMAGE_PIX_FMT_RGB565 = V4L2_PIX_FMT_RGB565 , CAM_IMAGE_PIX_FMT_YUV422 = V4L2_PIX_FMT_UYVY , CAM_IMAGE_PIX_FMT_JPG = V4L2_PIX_FMT_JPEG , CAM_IMAGE_PIX_FMT_GRAY ,
  CAM_IMAGE_PIX_FMT_NONE
}
 [en] Camera Image Pixcel format
[ja] Camera画像のピクセルフォーマット More...
 
enum  CamErr {
  CAM_ERR_SUCCESS = 0 , CAM_ERR_NO_DEVICE = -1 , CAM_ERR_ILLEGAL_DEVERR = -2 , CAM_ERR_ALREADY_INITIALIZED = -3 ,
  CAM_ERR_NOT_INITIALIZED = -4 , CAM_ERR_NOT_STILL_INITIALIZED = -5 , CAM_ERR_CANT_CREATE_THREAD = -6 , CAM_ERR_INVALID_PARAM = -7 ,
  CAM_ERR_NO_MEMORY = -8 , CAM_ERR_USR_INUSED = -9 , CAM_ERR_NOT_PERMITTED = -10
}
 [en] Camera Error Codes.
[ja] Cameraのエラーコード More...
 
enum  CAM_DEVICE_TYPE { CAM_DEVICE_TYPE_UNKNOWN , CAM_DEVICE_TYPE_ISX012 , CAM_DEVICE_TYPE_ISX019 }
 [en] Camera device type which is being used
[ja] 使用されているカメラデバイスの種類 More...
 
enum  CAM_WHITE_BALANCE {
  CAM_WHITE_BALANCE_AUTO = V4L2_WHITE_BALANCE_AUTO , CAM_WHITE_BALANCE_INCANDESCENT = V4L2_WHITE_BALANCE_INCANDESCENT , CAM_WHITE_BALANCE_FLUORESCENT = V4L2_WHITE_BALANCE_FLUORESCENT , CAM_WHITE_BALANCE_DAYLIGHT = V4L2_WHITE_BALANCE_DAYLIGHT ,
  CAM_WHITE_BALANCE_FLASH = V4L2_WHITE_BALANCE_FLASH , CAM_WHITE_BALANCE_CLOUDY = V4L2_WHITE_BALANCE_CLOUDY , CAM_WHITE_BALANCE_SHADE = V4L2_WHITE_BALANCE_SHADE
}
 [en] Camera White Balance setting parameters
[ja] Cameraホワイトバランス設定値 More...
 
enum  CAM_SCENE_MODE {
  CAM_SCENE_MODE_NONE = V4L2_SCENE_MODE_NONE , CAM_SCENE_MODE_BACKLIGHT = V4L2_SCENE_MODE_BACKLIGHT , CAM_SCENE_MODE_BEACH_SNOW = V4L2_SCENE_MODE_BEACH_SNOW , CAM_SCENE_MODE_CANDLE_LIGHT = V4L2_SCENE_MODE_CANDLE_LIGHT ,
  CAM_SCENE_MODE_DAWN_DUSK = V4L2_SCENE_MODE_DAWN_DUSK , CAM_SCENE_MODE_FALL_COLORS = V4L2_SCENE_MODE_FALL_COLORS , CAM_SCENE_MODE_FIREWORKS = V4L2_SCENE_MODE_FIREWORKS , CAM_SCENE_MODE_LANDSCAPE = V4L2_SCENE_MODE_LANDSCAPE ,
  CAM_SCENE_MODE_NIGHT = V4L2_SCENE_MODE_NIGHT , CAM_SCENE_MODE_PARTY_INDOOR = V4L2_SCENE_MODE_PARTY_INDOOR , CAM_SCENE_MODE_PORTRAIT = V4L2_SCENE_MODE_PORTRAIT , CAM_SCENE_MODE_SPORTS = V4L2_SCENE_MODE_SPORTS ,
  CAM_SCENE_MODE_SUNSET = V4L2_SCENE_MODE_SUNSET
}
 [en] Camera Scene Mode setting parameters.
[ja] Cameraのシーンモード設定値 More...
 
enum  CAM_COLOR_FX {
  CAM_COLOR_FX_NONE = V4L2_COLORFX_NONE , CAM_COLOR_FX_BW = V4L2_COLORFX_BW , CAM_COLOR_FX_SEPIA = V4L2_COLORFX_SEPIA , CAM_COLOR_FX_NEGATIVE = V4L2_COLORFX_NEGATIVE ,
  CAM_COLOR_FX_EMBOSS = V4L2_COLORFX_EMBOSS , CAM_COLOR_FX_SKETCH = V4L2_COLORFX_SKETCH , CAM_COLOR_FX_SKY_BLUE = V4L2_COLORFX_SKY_BLUE , CAM_COLOR_FX_GRASS_GREEN = V4L2_COLORFX_GRASS_GREEN ,
  CAM_COLOR_FX_SKIN_WHITEN = V4L2_COLORFX_SKIN_WHITEN , CAM_COLOR_FX_VIVID = V4L2_COLORFX_VIVID , CAM_COLOR_FX_AQUA = V4L2_COLORFX_AQUA , CAM_COLOR_FX_ART_FREEZE = V4L2_COLORFX_ART_FREEZE ,
  CAM_COLOR_FX_SILHOUETTE = V4L2_COLORFX_SILHOUETTE , CAM_COLOR_FX_SOLARIZATION = V4L2_COLORFX_SOLARIZATION , CAM_COLOR_FX_ANTIQUE = V4L2_COLORFX_ANTIQUE , CAM_COLOR_FX_SET_CBCR = V4L2_COLORFX_SET_CBCR ,
  CAM_COLOR_FX_PASTEL = V4L2_COLORFX_PASTEL
}
 [en] Camera Color effect setting parameters.
[ja] Cameraの画像エフェクトの設定値 More...
 
enum  CAM_HDR_MODE { CAM_HDR_MODE_OFF = 0 , CAM_HDR_MODE_AUTO = 1 , CAM_HDR_MODE_ON = 2 }
 [en] Camera HDR mode definitions.
[ja] CameraのHDRモードの設定値 More...
 
enum  CAM_VIDEO_FPS {
  CAM_VIDEO_FPS_NONE , CAM_VIDEO_FPS_5 , CAM_VIDEO_FPS_6 , CAM_VIDEO_FPS_7_5 ,
  CAM_VIDEO_FPS_15 , CAM_VIDEO_FPS_30 , CAM_VIDEO_FPS_60 , CAM_VIDEO_FPS_120
}
 [en] Camera Video Framerate setting parameters. [ja] Cameraのフレームレート設定値 More...
 
typedef void(* camera_cb_t) (CamImage img)
 [en] Camera Callback type definition.
[jp] Cameraからのコールバック関数の型定義
 
CameraClass theCamera
 

Detailed Description

Camera Library for Arduino IDE on Spresense.

Author
Sony Semiconductor Solutions Corporation

By using this library, you can use the follow features on SPRESENSE.

  • Get Picture from Camera module as a Jpeg format data.
  • Get Image from Camera module for preview image. このライブラリを使うことで、以下の機能をSPRESENSE上で利用することが出来ます。
  • SPRESENSE CameraモジュールからJpegフォーマットデータとして写真を取得
  • SPRESENSE Cameraモジュールからプレビューイメージとして画像を取得