WITHROBOT oCam-1CGN-U User manual

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 0
WITHROBOT Inc.
USER MANUAL
oCam-1CGN-U
Version 1.0
July 2017
www.withrobot.com
Copyright(c) 2017 WITHROBOT Inc. All rights reserved.

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 1
Document version history
Date
Document version
Description
Jul 2017
1.0
Initial release

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 2
TABLE OF CONTENTS
DOCUMENT VERSION HISTORY..........................................................................................................................1
1. INTRODUCTION..............................................................................................................................................4
1.1. Specifications..................................................................................................................................................................4
1.2. Applications.....................................................................................................................................................................4
1.3. Technical resource........................................................................................................................................................5
2. SPECIFICATIONS .............................................................................................................................................6
2.1. PCB dimensions.............................................................................................................................................................6
2.2. External look...................................................................................................................................................................6
2.3. Electrical specifications...............................................................................................................................................7
2.4. Camera specifications.................................................................................................................................................7
3. HOW TO CONNECT OCAM-1CGN-U TO WINDOWS HOST ..................................................................8
3.1. Connection of oCam-1CGN-U to host computer..........................................................................................8
3.2. oCam-Viewer installation ..........................................................................................................................................8
3.3. Run the oCam-Viewer................................................................................................................................................8
3.4. Color correction ......................................................................................................................................................... 10
4. HOW TO CONNECT OCAM-1CGN-U TO LINUX HOST........................................................................ 10
4.1. oCam-Viewer download & build........................................................................................................................ 10
4.2. Connection of oCam-1CGN-U to host computer....................................................................................... 11
4.3. Run the oCam-Viewer............................................................................................................................................. 11
5. FIRMWARE UPDATE.................................................................................................................................... 14
6. RECOMMENDATIONS................................................................................................................................. 14
7. FAQS............................................................................................................................................................... 14
7.1. Image acquisition using OpenCV....................................................................................................................... 14
7.2. Guvcview ....................................................................................................................................................................... 15

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 3
7.3. Bayer RGB ..................................................................................................................................................................... 15
7.4. DIY Fixture .................................................................................................................................................................... 15
7.5. Technical support...................................................................................................................................................... 15
APPENDIX.............................................................................................................................................................. 16
1. DEFAULT M12 LENS SPECIFICATIONS .................................................................................................... 16
2. M12 LENS HOLDER DIMENSIONS ........................................................................................................... 18
3. TRIPOD MOUNT: OCAM-TM .................................................................................................................... 19

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 4
1. Introduction
The oCam-1CGN-U is a Global Shutter, 1 Mega pixel, Color, UVC compliant, USB3.0 SuperSpeed
camera from WITHROBOT Inc. It uses AR0134 of On Semiconductor as the image sensor and
provides the image through USB3.0 interface to be easily connected to hosts with USB3.0 ports.
The camera is backward compatible with USB2.0 interface so for the hosts with USB2.0 ports the
connection is automatically adjusted to High Speed interface.
As the camera supports UVC1.0 specifications, the images of various resolutions of 1280 x
960(45FPS), 1280 x 720(60FPS), 640 x 480(80FPS), 320 x 240(160FPS) are readily available to
hosts of Linux or Windows operating systems without any special drivers. The electronic global
shutter mechanism of the camera provides clear images with less blur. The oCam-1CGN-U with
M12 lens holder allows various M12 lenses to be interchangeably used on the camera to suit to
various applications.
1.1. Specifications
Sensor: OnSemi AR0134 CMOS image sensor
Sensor Size: 1/3 inch
Interface: USB 3.0 SuperSpeed
Power: USB bus power
Operating temperature: 0°C~70°C
Rating: DC5V/180mA
Shutter: electric global shutter
Field of View (FOV): 65°
Camera Control: Exposure, Gain, White Balance Red, White Balance Blue
Weight: 33.5 g
PCB Size: 39 x 39 mm
Case Size: 42 x 42 x 17 mm
Lens: M12 type lens
1.2. Applications
Computer vision
Web cam
Embedded camera
Visual servo for face tracking

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 5
Smart camera
1.3. Technical resource
Latest updates of the related firmware and software are available at
https://github.com/withrobot/oCam/tree/master/Products/oCam-1CGN-U.
Figure 1. Online technical resource repository.

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 6
2. Specifications
2.1. PCB dimensions
Figure 2. PCB dimensions (in mm)
2.2. External look
Figure 3. External look (42 x 42 x 17mm)

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 7
2.3. Electrical specifications
Item
Min
Max
Unit
Source Voltage, VDD
5.0
V
Current
180
mA
Operating Temperature
-40
85
℃
Table 1. Electrical specifications
2.4. Camera specifications
Item
Specification
Notes
Image format
Bayer RGB
Image resolutions
Horizontal x Vertical (FPS)
1280 x 960(45fps)
1280 x 720(60fps)
640 x 480(80fps)
320 x 240(160fps)
Shutter
Global Shutter
Camera control
Gain
Exposure (Absolute)
White Balance Red
White Balance Blue
Auto Exposure
Not supported
Auto White Balance
Not supported
External Trigger
Not supported
Lens Correction
Not supported
White Balance Auto Setup
Supported
oCam_Viewer
Table 2. Camera specifications

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 8
3. How to connect oCam-1CGN-U to Windows host
3.1. Connection of oCam-1CGN-U to host computer
Insert USB3.0 cable to oCam-1CGN-U.
Connect USB3.0 cable to USB3.0 port of the host computer.
Wait about 1 minute until the message window appears.
Figure 4 . Connection success messsage window
3.2. oCam-Viewer installation
Open the site https://github.com/withrobot/oCam/tree/master/Software/oCam-viewer_Win/bin.
Download the oCam-Viewer:
For 64bit system, download “libCamCap-amd64.dll”and “oCam-Viewer-amd64.exe”.
For 32bit system, download “libCamCap.dll”and “oCam-Viewer.exe”.
3.3. Run the oCam-Viewer
Start oCam-Viewer.
Once the oCam-1CGN-U is connected successfully, the viewer main window will appear as
follows.
Figure 5. oCam-Viewer main window

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 9
Click [Play] to show the image window.
Figure 6. Camera image view window
Click [Stop] and click the dropdown arrow to open the list of resolutions supported by the
connected camera.
Figure 7. Image resolution list
Click [Stop] and click [Cam Ctrl] to open the camera control window.

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 10
Figure 8. Camera control window
Click [Exit] to terminate the program.
3.4. Color correction
The viewer program provides special function for oCam-1CGN-U camera to adjust the White
Balance automatically.
Click [Reset] to enable the [Color Correction] button.
Click [Color Correction] to set the White Balance based on the current image.
4. How to connect oCam-1CGN-U to Linux host
4.1. oCam-Viewer download & build
Install the packages using the following commands.
Create a working directory and download the source code into the working directory.
$ sudo apt-get update
$ sudo apt-get install qt4-default libv4l-dev libudev-dev

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 11
Here, the YOUR_WORKING_DIRECTORY should be set as the directory name that
you choose.
The name of the source code can be different from the shown below as it is updated.
Build the code using the following commands.
Run the viewer using the following command.
4.2. Connection of oCam-1CGN-U to host computer
Insert USB3.0 cable into the oCam-1CGN-U.
Connect USB3.0 cable to USB3.0 port of the host computer.
Run “lsusb”to check the connection status.
“Cypress Semiconductor Corp”should appear as Cypress FX3 is used in the oCam-
1CGN-U.
On successful connection of USB3.0, ID appears as “04b4:00f9”.
If the connection is made as USB2.0, ID appears as “04b4:00f8”.
4.3. Run the oCam-Viewer
If the oCam-1CGN-U is connected successfully, the following window should appear on the
execution of the oCam-Viewer.
The device name and the serial number should appear correctly.
$ mkdir YOUR_WORKING_DIRECTORY
$ cd YOUR_WORKING_DIRECTORY
$ svn export
https://github.com/withrobot/oCam/trunk/Software/oCam_viewer_Linu
x_1705
$ cd oCam_viwer_Linux_1705
$ mkdir build
$ cd ./build
$ qmake ..
$ make release
$ ./oCam-viewer
$ lsusb
Bus 004 Device 026: ID 04b4:00f9 Cypress Semiconductor Corp.

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 12
Figure 9. oCam-Viewer window on Linux host
Click [Connect] to open the image window.
Select tabs on the right.
[Formats] shows the image formats.
Figure 10. Image formats

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 13
[Controls] shows the control parameters.
Figure 11. Image control parameters.
[Miscellaneous] shows the White Balance control
Figure 12. White Balance controls.

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 14
5. Firmware update
You can find the latest firmware at https://github.com/withrobot/oCam/tree/master/Firmware .
Correct file for the oCam-1CGN-U should be selected for the firmware update.
You can find the firmware writing program at
https://github.com/withrobot/oCam/tree/master/Firmware .
Uncompress the downloaded “UpdateFW.ZIP”.
Follow the instruction described at
https://github.com/withrobot/oCam/tree/master/Firmware.
6. Recommendations
The oCam-1CGN-U supports interchangeable M12 lens. Accordingly, the lens can be rotated
under vibration. It is recommended to fix the lens in vibrating environment with glue.
On the resolution of 320 x 240, the image is cropped from the full resolution. Therefore, the
field of view will be reduced accordingly.
The exposure time affects the image rate. With higher exposure, the FPS will drop as the
camera uses longer time for acquiring the image. For higher FPS, the exposure time should
be reduced.
There are differences on the sensitivity of pixels in an image sensor with the global shutter
mechanism. For high gain, the output of those pixels with higher sensitivity will be saturated,
providing noises as a consequence. It is recommended to use low gain for less noisy image.
7. FAQs
7.1. Image acquisition using OpenCV
The VideoCapture Class of the OpenCV cannot read the BAYER_RGB image which the
oCam-1CGN-U uses.
On Linux hosts, you can read the image of the oCam-1CGN-U using V4L and convert it to
RGB image using the cvtcolor(BAYER2RGB) function of the OpenCV.
You can refer the source code at
https://github.com/withrobot/oCam/tree/master/Examples/opencv-basic_1MGN .

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 15
On Windows hosts, you can use the dll file of the oCam-Viewer to acquire the image. You can
use cvtColor(BAYER2RGB) function of the OpenCV to get the RGB image as in the Linux
host.
You can refer the source code at
https://github.com/withrobot/oCam/tree/master/Examples/libCamCap-withOpenCV .
7.2. Guvcview
On Linux host, you can use guvcview to view the image of the oCam-1CGN-U.
Download the guvcview using the following commands.
7.3. Bayer RGB
The Bayer RGB format shows the image as captured by the image sensor.
Refer https://en.wikipedia.org/wiki/Bayer_filter for further information.
It is recommended to resize the 1280 x 960 to 640 x 480 for better image quality.
7.4. DIY Fixture
As a DIY fixture for oCam-1CGN-U, the 3D printable files are available at
https://github.com/withrobot/oCam/tree/master/DIY_Fixture.
7.5. Technical support
E-mail technical support is available at wit[email protected].
$ sudo apt-get install guvcview
$ guvcview -d /dev/video0

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 16
APPENDIX
1. Default M12 lens specifications
Item
Description
Focal Length
3.6mm ±5%
Relative Aperture
2.0
Image Size
1/2.9'', 1/2.7”
Angle Of View
1/2.9'' : 50˚(V) X 92.8˚(H) X 110˚(D)
1/2.7” : 59˚(V) X 103˚(H) X 125˚(D)
Back Focal Length
6.17mm ±5%
Flange Back Length
5.4mm ±0.2mm
Lens Length
15.6mm ±0.3mm
TTL
21.0mm ±0.4mm
MTF on-axis(at 50 lp/mm)
0.7F (at 50 lp/mm)
87.5% 86.2%(R), 78.4%(T)

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 17
Relative Illumination
44.5%(Full image circle)
Flange Type
M12 * P0.5
Head Size
¢15.0
Operating Temperature Range
-20℃~ +70℃, Under RH 90%
Storage Temperature Range
-25℃~ +85℃, Under RH 99%
Lens Construction
4G [All Glass] With IR Cut Filter(650nm)

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 18
2. M12 lens holder dimensions

oCam-1CGN-U USER MANUAL Verion 1.0
July 2017
www.withrobot.com Page 19
3. Tripod mount: oCam-TM
Optionally available sold separately
.
Table of contents
Other WITHROBOT Digital Camera manuals