Camera in sample for GR-PEACH. This sample works on GR-LYCHEE besides GR-PEACH.
You are viewing an older revision! See the latest version
Homepage
Video Links on how to setup and run Camera_in Application:¶
Your video will be live at: https://youtu.be/XNH8jLhjeS4 Part1 of 1
Camera in sample for GR-PEACH. While USER_BUTTON0 is pressed, it will save the image to the USB memory.
The default setting of serial communication (baud rate etc.) in mbed is shown the following link.
Please refer to the link and change the settings of your PC terminal software.
The default value of baud rate in mbed is 9600, and this application uses baud rate 9600.
https://developer.mbed.org/teams/Renesas/wiki/GR-PEACH-Getting-Started#install-the-usb-serial-communication
Please refer to following link about Audio/Camera Shield.
https://developer.mbed.org/teams/Renesas/wiki/Audio_Camera-shield
- Reference information
You can configure this sample application via the following definitions:
main.cpp
/**** User Selection *********/ #define VIDEO_INPUT_METHOD (VIDEO_CVBS) /* Select VIDEO_CVBS or VIDEO_CMOS_CAMERA */ #define VIDEO_INPUT_FORMAT (VIDEO_RGB888) /* Select VIDEO_YCBCR422 or VIDEO_RGB888 or VIDEO_RGB565 */ #define USE_VIDEO_CH (0) /* Select 0 or 1 If selecting VIDEO_CMOS_CAMERA, should be 0.) */ #define VIDEO_PAL (0) /* Select 0(NTSC) or 1(PAL) If selecting VIDEO_CVBS, this parameter is not referenced.) */ /*****************************/
- VIDEO_INPUT_METHOD
Specify how to input video data. The allowable value is either VIDEO_CVBS and VIDEO_CMOS_CAMERA - VIDEO_INPUT_FORMAT
Specify the color format of input video data. The allowable value is any of VIDEO_YCBCR422, VIDEO_RGB888 or VIDEO_RGB565. Note that the captured image data is saved as Bitmap file only when VIDEO_RGB888 is specified. Otherwise, it's saved in binary (raw) data format. - USE_VIDEO_CH
Specify the channel of USB port to be used. The allowable value is either 0 or 1. For more details, please refer to the USB related description stated below. - VIDEO_PAL
Specify the video data format. When the format is NTSC, 0 should be specified. Otherwise, 1 should be specified.
Also, if you would like to configure higher resolution, you should change the definition PIXEL_HW and PIXEL_VW. In addition, you should revise sct file in order to increase the size of NC_BSS section.
(Reference information : [other]How to change sct file in mbed online compiler)
#define PIXEL_HW (320u) /* QVGA */ #define PIXEL_VW (240u) /* QVGA */
Example of sct file modification is shown below:
MBRZA1H.sct
===Bfore=== RW_DATA_NC 0x60900000 0x00100000 { * (NC_DATA) } ; Application RW data Non cached area ZI_DATA_NC +0 { * (NC_BSS) } ; Application ZI data Non cached area ===After=== RW_DATA_NC 0x60800000 0x00100000 { * (NC_DATA) } ; Application RW data Non cached area ZI_DATA_NC +0 { * (NC_BSS) } ; Application ZI data Non cached area
- USB channel available in this sample program
By default, the GR-PEACH's USB connector (USB0) is configured to be used. When using USB0, please close GR-PEACH's JP3.
Or, you can use the Audio/Camera Shield's USB connector (USB1). When using USB1, you need to close JP1 of Audio/Camera Shield.
Also, in order to use USB1, you should change the USB_HOST_CH definition (define 0:USB0、define 1:USB1) as follows:
USBHost_Custom\USBHost\TARGET_RENESAS\TARGET_RZ_A1H\usb_host_setting.h
#define USB_HOST_CH 0 ↓ #define USB_HOST_CH 1