Daheng Imaging MARS USB3 User manual

MARS USB3 Vision Cameras
User Manual
Version: V1.0.1
Date: 2020-03-09
China Daheng Group, Inc. Beijing Image Vision Technology Branch

All rights reserved. No parts of this manual may be used or reproduced, in any forms or by any means,
without prior written permission of China Daheng Group, Inc. Beijing Image Vision Technology Branch.
The right is also reserved to modify or change any parts of this manual in the future without prior notification.
All other trademarks are the properties of their respective owners.
© 2020 China Daheng Group, Inc. Beijing Image Vision Technology Branch
Web:
http://www.daheng-imaging.com/en/
Sales Email:
Sales Tel:
+86 10 8282 8878
Support Email:

Preface
We really appreciate your choosing of DAHENG IMAGING products.
The MARS USB3.0 series camera is DAHENG IMAGING's latest area scan industrial digital camera with
large and high-quality sensor, featuring high resolution, high definition and extremely low noise. The
camera is equipped with standard USB3.0 interface, is easy to install and use.
The MARS family cameras are especially suitable for machine vision applications such as industrial
inspection, medical, scientific research, education, security and so on.
This manual describes in detail on how to install and use the MARS USB3 Vision digital cameras.

© China Daheng Group, Inc. Beijing Image Vision Technology Branch I
Contents
1. Introduction......................................................................................................................1
1.1. Series Introduction .................................................................................................. 1
1.2. Naming Rules.......................................................................................................... 1
1.3. Standards................................................................................................................ 1
1.4. Document, CAD/Technical Drawing and Software Downloads................................ 2
2. Precautions......................................................................................................................3
2.1. Guideline for Avoiding EMI and ESD....................................................................... 3
2.2. Environmental Requirements.................................................................................. 3
2.3. Camera Mechanical Installation Precautions........................................................... 3
3. Installation Guideline ......................................................................................................4
3.1. Host Preparation ..................................................................................................... 4
3.1.1. Software Package............................................................................................................. 4
3.1.2. User Software Interface .................................................................................................... 4
3.2. Camera Power ........................................................................................................ 5
3.3. Camera Driver Installation....................................................................................... 6
3.3.1. System Requirements....................................................................................................... 6
3.3.2. Driver Installation .............................................................................................................. 6
3.4. Open Device and Start Acquisition.......................................................................... 6
4. General Specification......................................................................................................7
4.1. Explanation of Important Parameters...................................................................... 7
4.1.1. About Spectral Response.................................................................................................. 7
4.2. MARS-1230-23U3M/C ............................................................................................ 7
4.2.1. Parameter......................................................................................................................... 7
4.2.2. Spectral Response.......................................................................................................... 10
4.3. MARS-1231-32U3M/C .......................................................................................... 10
4.3.1. Parameter....................................................................................................................... 10
4.3.2. Spectral Response.......................................................................................................... 13
5. Dimensions....................................................................................................................15
5.1. Camera Dimensions.............................................................................................. 15
5.2. Optical Interface.................................................................................................... 15
5.3. Tripod Adapter Dimensions ................................................................................... 16
6. Filters and Lenses.........................................................................................................18
6.1. Filters .................................................................................................................... 18

© China Daheng Group, Inc. Beijing Image Vision Technology Branch II
6.2. Lens Selection Reference ..................................................................................... 19
6.2.1. HN-2M Series ................................................................................................................. 20
6.2.2. HN-5M Series ................................................................................................................. 20
7. Electrical Interface.........................................................................................................22
7.1. LED Light............................................................................................................... 22
7.2. USB Port ............................................................................................................... 22
7.3. I/O Port.................................................................................................................. 22
7.3.1. Line0 (Opto-isolated Input) Circuit .................................................................................. 23
7.3.2. Line1 (Opto-isolated Output) Circuit................................................................................ 25
7.3.3. GPIO 2/3 (Bidirectional) Circuit....................................................................................... 27
7.3.3.1. Line2/3 is Configured as Input.................................................................................. 27
7.3.3.2. Line2/3 is Configured as Output............................................................................... 29
8. Features..........................................................................................................................32
8.1. I/O Control............................................................................................................. 32
8.1.1. Input Mode Operation ..................................................................................................... 32
8.1.2. Output Mode Operation................................................................................................... 33
8.1.3. Read the LineStatus........................................................................................................ 37
8.2. Image Acquisition Control...................................................................................... 37
8.2.1. Acquisition Start and Stop............................................................................................... 37
8.2.1.1. Acquisition Start........................................................................................................ 37
8.2.1.2. Acquisition Stop........................................................................................................ 38
8.2.2. Acquisition Mode............................................................................................................. 39
8.2.3. Trigger Type Selection .................................................................................................... 40
8.2.4. Switching Trigger Mode................................................................................................... 42
8.2.5. Continuous Mode and Configuration............................................................................... 43
8.2.6. Software Trigger Acquisition and Configuration .............................................................. 43
8.2.7. External Trigger Acquisition and Configuration ............................................................... 44
8.2.8. Set Exposure .................................................................................................................. 46
8.2.9. Overlapping Exposure and Non-overlapping Exposure .................................................. 48
8.3. Basic Features ...................................................................................................... 50
8.3.1. Gain ................................................................................................................................ 50
8.3.2. Pixel Format.................................................................................................................... 51
8.3.3. ROI.................................................................................................................................. 54
8.3.4. Auto Exposure/Auto Gain................................................................................................ 55
8.3.4.1. ROI Setting of Auto Exposure/ Auto Gain................................................................. 55
8.3.4.2. Auto Gain.................................................................................................................. 56
8.3.4.3. Auto Exposure.......................................................................................................... 57
8.3.5. Auto White Balance......................................................................................................... 57
8.3.5.1. Auto White Balance ROI........................................................................................... 57
8.3.5.2. Auto White Balance Adjustment................................................................................ 58

© China Daheng Group, Inc. Beijing Image Vision Technology Branch III
8.3.6. Lookup Table................................................................................................................... 59
8.3.7. Test Pattern..................................................................................................................... 60
8.3.8. User Set Control ............................................................................................................. 61
8.3.9. Device User ID................................................................................................................ 64
8.3.10. Timestamp .................................................................................................................... 64
8.3.11. Binning.......................................................................................................................... 64
8.3.12. Decimation.................................................................................................................... 67
8.3.13. Reverse X and Reverse Y............................................................................................. 69
8.3.14. Digital Shift.................................................................................................................... 70
8.3.15. Acquisition Status.......................................................................................................... 72
8.3.16. Black Level.................................................................................................................... 72
8.3.17. Remove Parameter Limits............................................................................................. 73
8.3.18. User Data Area ............................................................................................................. 74
8.3.19. Timer............................................................................................................................. 74
8.3.20. Counter......................................................................................................................... 75
8.4. Image Processing.................................................................................................. 76
8.4.1. Color Transformation Control.......................................................................................... 76
8.4.2. Gamma........................................................................................................................... 78
8.4.3. Sharpness....................................................................................................................... 79
8.4.4. Lookup Table................................................................................................................... 80
8.4.5. Defect Pixel Correction ................................................................................................... 81
8.5. Image Transmission.............................................................................................. 81
8.5.1. Calculate Frame Rate..................................................................................................... 81
8.5.2. USB Interface Bandwidth................................................................................................ 82
8.5.3. DeviceLinkThroughputLimit............................................................................................. 82
8.5.4. Camera Acquisition Time ................................................................................................ 83
8.6. Events ................................................................................................................... 83
8.6.1. ExposureEnd Event ........................................................................................................ 85
8.6.2. BlockDiscard Event......................................................................................................... 85
8.6.3. BlockNotEmpty Event ..................................................................................................... 85
8.6.4. FrameStartOvertrigger Event.......................................................................................... 85
8.6.5. FrameBurstStartOvertrigger Event.................................................................................. 85
8.6.6. FrameStartWait Event..................................................................................................... 85
8.6.7. FrameBurstStartWait Event............................................................................................. 85
9. Software Tool.................................................................................................................86
9.1. LUT Create Tool .................................................................................................... 86
9.1.1. GUI.................................................................................................................................. 86
9.1.2. User Guide...................................................................................................................... 87
9.1.2.1. User Case ................................................................................................................ 87
9.1.2.2. GroupBox ................................................................................................................. 87

© China Daheng Group, Inc. Beijing Image Vision Technology Branch IV
9.1.2.3. Auto Create Lut......................................................................................................... 91
9.1.2.4. Save Lut................................................................................................................... 92
9.1.3. Precautions..................................................................................................................... 92
9.1.3.1. Read From Device.................................................................................................... 92
9.1.3.2. Write To Device ........................................................................................................ 93
9.1.3.3. Directory Structure.................................................................................................... 93
9.2. Frame Rate Calculation Tool................................................................................. 93
10. FAQ...............................................................................................................................95
11. Revision History ..........................................................................................................97
12. Contact Us....................................................................................................................98
12.1. Contact Sales...................................................................................................... 98
12.2. Contact Support .................................................................................................. 99

1.Introduction
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 1
1. Introduction
1.1. Series Introduction
The MARS USB3 Vision series camera is DAHENG IMAGING's mature area scan industrial digital camera,
featuring outstanding performance, powerful features, outstanding price/performance ratio. The MARS-U3
series cameras are available in a variety of resolutions and frame rates, and are available with CMOS
sensors from leading chip manufacturers, which is easy to install and use.
The MARS-U3 series digital camera transmits image data through the USB3.0 data interface. Thanks to
the locking screw connectors, the MARS series cameras can secure the reliability of cameras deployed in
harsh industrial environments. Featuring high reliability and high price/performance ratio, the MARS series
cameras are especially suitable for machine vision applications such as industrial inspection, medical,
scientific research, education, security and so on.
1.2. Naming Rules
Details of the MARS USB3 Vision series (MARS-U3) camera are given in the general specifications below.
Each camera model name is determined by its sensor's maximum resolution, maximum frame rate at
maximum resolution, the color/monochrome type of the sensor, etc.
Figure 1-1 Naming rules
1.3. Standards
The camera follows the USB3 Vision1.0 standard, and its development interface GalaxySDK is
implemented based on the GEN<i>CAM standard.

1.Introduction
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 2
1.4. Document, CAD/Technical Drawing and Software Downloads
Product related document, CAD/Technical drawing and software can be downloaded from the Downloads
of DAHENG IMAGING website. The relevant contents are as follows:
Document
MARS USB3 Vision Cameras User Manual
CAD/Technical Drawing
DAHENG IMAGING MARS-U3 CAD/Technical Drawing
Software
Galaxy Windows SDK—USB3.0, GigE, MERCURY USB2.0 Cameras
Galaxy Linux SDK—USB3.0, GigE, MERCURY USB2.0 Cameras
Galaxy Android SDK—USB3.0 Cameras

2.Precautions
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 3
2. Precautions
2.1. Guideline for Avoiding EMI and ESD
You should consider the EMI (Electro Magnetic Interference) and ESD (Electro-Static discharge) problem
in the process of using the camera, to guarantee the camera to work in a relatively good electromagnetic
environment. The main measures are as follows:
1) USB cables certificated by USB IF with lock screw are recommended.
2) Using shielded cable can avoid electro-magnetic interface. Shielding layer of the cable should conduct
to ground nearby and not until stretched too long. When many devices need conduct to ground, using
single point grounding to avoid earth loop.
3) Keep your cameras away from equipment with high voltage, or high current (such as motor, inverter,
relay, etc.). If necessary, use additional shielding.
4) ESD (electro-static discharge) may damage cameras permanently, so use suitable clothing (cotton)
and shoes, and touch the metal to discharge the electro-static before operating cameras.
2.2. Environmental Requirements
1) Housing temperature during operation: 0°C ~ 45°C, humidity during operation: 10% ~ 80%.
Storage temperature: -20°C ~ 70°C.
2) To avoid collecting dust in the optical filter, always keep the plastic cap on cameras when no lens is
mounted.
3) PC requirement: Intel Core 2 Duo, 2.4GHz or above, and 2GB memory or above.
4) USB3.0 host controller requirement: Intel controller integrated in mainboard is recommend. Select
Renesas controller if external frame grabber is needed.
5) The cable must have a locking screw at the end of the device.
6) Make sure that cameras are transported in the original factory packages.
2.3. Camera Mechanical Installation Precautions
Camera installation requirements:
1) The screw and camera have a screw length between 3 and 4.8 mm.
2) Screw assembly torque ≤1.8N.M. If the screw assembly torque is too large, it may cause the camera
thread stripping.

3.Installation Guideline
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 4
3. Installation Guideline
3.1. Host Preparation
3.1.1. Software Package
The software package of DAHENG IMAGING's MARS series is used to control the MARS series camera
to provide stable, real-time image transmission, and provides multiple samples and easy-to-integrate
SDKs for various programming tools. The package is composed of the following modules:
1) Driver Package (Driver): This package provides the MARS series camera driver program, such as:
the USB3.0 cameras' driver program.
2) Interface Library (API): This package provides the camera control interface library and the image
processing interface library, supports the user for secondary development.
3) Demonstration Program (GalaxyView.exe): This demonstration program is used to display the camera
control, image acquisition and image processing functions, the user can control the camera directly
by the demonstration program, and the user can develop their own control program based on the
camera interface library.
4) Sample: These samples demonstrate cameras' functions, the user can easily use these samples to
control cameras, or refer to the samples to develop their own control programs.
5) Programmer's Manual: This manual is the users programming guide that instructs the users how to
configure the programming environment and how to control cameras and acquire images through the
camera interface library.
You can download the latest software package from the website: www.daheng-
imaging.com/en/Downloads.
3.1.2. User Software Interface
After installing the MARS series camera software package, the user can use the demonstration program
and the samples to control the camera, also the user can control the camera by the program which is
written by the user themselves. The software package provides three kinds of program interface, the user
can select the suitable one for use according to their own requirements:
1) API Interface
In order to simplify the users' programming complexity, the package provides the general C programming
interface GxIAPI.dll and image processing algorithm interface DxImageProc.dll for the user to control the
camera, and provides the samples and software development manual which are based on these interfaces.
The API interface supports C/C++/C#/Python, etc.
2) GenTL Interface
This interface is developed according to the standard of general transport layer in GEN<i>CAM standard,
DAHENG IMAGING follows the GEN<i>CAM standard and provides the GenTL interface for the user, the

3.Installation Guideline
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 5
user can use the GenTL interface directly to develop their own control program. The definition and usage
of GenTL interfaces can be downloaded from the website of EMVA.
In addition, users can use some third-party software that supports GEN<i>CAM standard to control the
camera, such as HALCON.
3) USB3 Vision interface
The MARS series USB3.0 camera is compatible with the USB3 Vision protocol, which allows the user to
control the camera directly through the USB3 Vision protocol. In addition, the user can use some third-
party software that supports the USB3 Vision protocol to control the camera, such as HALCON.
Note
GEN<i>CAM standard: GEN<i>CAM is administered by the European Machine Vision Association (EMVA).
GenICam provides a generic programming interface for all kinds of cameras and devices. It provides a
standard application programming interface (API), no matter what interface technology is being used. It
mainly includes the following modules:
GenAPI: an XML description file format defining how to capture the features of a device and how to
access and control these features in a standard way
GenTL: a generic Transport Layer Interface, between software drivers and libraries, that transports
the image data from the camera to the application running on a PC
SFNC: common naming convention for camera features, which promotes interoperability between
products from different manufacturers
Figure 3-1 GEN<i>CAM standard schematic diagram
3.2. Camera Power
MARS-U3 series camera is powered by the USB 3.0 interface.

3.Installation Guideline
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 6
3.3. Camera Driver Installation
3.3.1. System Requirements
GalaxySDK is suitable for all cameras in the MARS series. The GalaxySDK contains various operating
systems such as Windows, Android and Linux. The requirements for the operating system and version of
the installation package are as follows:
Operating Systems
Applicable Version
Windows
Windows XP (32bit, 64bit)
Windows 7 (32bit, 64bit)
Windows 8 (32bit, 64bit)
Windows 8.1 (32bit, 64bit)
Windows 10 (32bit, 64bit)
Linux
Ubuntu 12.04 or above, kernel version 3.5.0.23 or above
Android
Android6 or above
3.3.2. Driver Installation
The steps to install the Galaxy SDK under Windows are as follows:
1) Download the corresponding version of the installation package from www.daheng-
imaging.com/en/Downloads.
2) Run the installer.
3) Follow the instructions of the installation wizard to complete the installation process. During the
installation process, you can choose the camera interface you need (USB2.0, USB3 Vision, GigE
Vision, etc.).
During the installation process, especially when installing the *.sys file, you must always pay attention to
whether the anti-virus software intercepts the driver. If intercepted, it may cause the driver installation to
fail.
3.4. Open Device and Start Acquisition
After powering the device, connecting the device to the USB3.0 interface of the host. Double-click the
GalaxyView software to acquire image. The steps are as follows:
1) Click the icon on the toolbar in the GalaxyView to refresh device list.
2) After the device is enumerated, double-click the device enumerated in the device list.
3) Click the icon on the toolbar to perform the Start Acquisition operation on the current device.

4.General Specification
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 7
4. General Specification
4.1. Explanation of Important Parameters
4.1.1. About Spectral Response
QE: Quantum efficiency, which is the ratio of the average number of photoelectrons produced per unit time
to the number of incident photons at a wavelength.
Sensitivity: The change of the sensor output signal relative to the incident light energy. The commonly
used sensitivity units are V/((W/m2)·s), V/lux·s, e-/((W/m2)·s) or DN/ ((W/m2)·s).
The spectral response graphs given by different manufacturers are different. Some graphs' ordinate is
relative sensitivity response, and abscissa is wavelength. Some graphs' ordinate is QE, and abscissa is
wavelength.
4.2. MARS-1230-23U3M/C
4.2.1. Parameter
Specifications
MARS-1230-23U3C
Resolution
4096×3000
Sensor Type
Sony IMX304 LQR global shutter CMOS
Optical Size
1.1 inch
Pixel Size
3.45μm×3.45μm
Frame Rate
23.4fps @ 4096 ×3000
ADC Bit Depth
12bit
Pixel Bit Depth
8bit, 12bit
Shutter Time
28μs~1s
Gain
0dB~24dB
Pixel Data Formats
Bayer RG8/Bayer RG12
Signal Noise Ratio
40.59dB
Synchronization
External trigger, software trigger

4.General Specification
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 8
I/O
1 input and 1 output with opto-isolated, 2 programmable GPIOs
Operating Temp.
0°C~45°C
Storage Temp.
-20°C~70°C
Operating Humidity
10%~80%
Power Consumption
< 4W@5V
Lens Mount
C
Dimensions
62mm×62 mm×50.4mm
Weight
281g
Software
Windows XP/Win7/Win8/Win10 32bit, 64bit OS
Data Interface
USB3.0
Programmable Control
Image size, gain, exposure time, trigger polarity, flash polarity
Conformity
CE, RoHS, FCC, USB3 Vision, GenICam
Table 4-1 MARS-1230-23U3C camera specifications
Specifications
MARS-1230-23U3M
Resolution
4096×3000
Sensor Type
Sony IMX304 LLR global shutter CMOS
Optical Size
1.1 inch
Pixel Size
3.45μm×3.45μm
Frame Rate
23.4fps @ 4096 ×3000
ADC Bit Depth
12bit
Pixel Bit Depth
8bit, 12bit
Shutter Time
28μs~1s

4.General Specification
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 9
Gain
0dB~24dB
Pixel Data Formats
Mono8/Mono12
Signal Noise Ratio
40.47dB
Synchronization
External trigger, software trigger
I/O
1 input and 1 output with opto-isolated, 2 programmable GPIOs
Operating Temp.
0°C~45°C
Storage Temp.
-20°C~70°C
Operating Humidity
10%~80%
Power Consumption
< 4W@5V
Lens Mount
C
Dimensions
62mm×62 mm×50.4mm
Weight
281g
Software
Windows XP/Win7/Win8/Win10 32bit, 64bit OS
Data Interface
USB3.0
Programmable Control
Image size, gain, exposure time, trigger polarity, flash polarity
Conformity
CE, RoHS, FCC, USB3 Vision, GenICam
Table 4-2 MARS-1230-23U3M camera specifications

4.General Specification
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 10
4.2.2. Spectral Response
Figure 4-1 MARS-1230-23U3C sensor spectral response
Figure 4-2 MARS-1230-23U3M sensor spectral response
4.3. MARS-1231-32U3M/C
4.3.1. Parameter
Specifications
MARS-1231-32U3C
Resolution
4096×3000

4.General Specification
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 11
Sensor Type
Sony IMX253 LQR global shutter CMOS
Optical Size
1.1 inch
Pixel Size
3.45μm×3.45μm
Frame Rate
32.1fps @ 4096 ×3000
ADC Bit Depth
10bit
Pixel Bit Depth
8bit, 10bit
Shutter Time
24μs~1s
Gain
0dB~24dB
Pixel Data Formats
Bayer RG8/Bayer RG10
Signal Noise Ratio
40.79dB
Synchronization
External trigger, software trigger
I/O
1 input and 1 output with opto-isolated, 2 programmable GPIOs
Operating Temp.
0°C~45°C
Storage Temp.
-20°C~70°C
Operating Humidity
10%~80%
Power Consumption
< 4W@5V
Lens Mount
C
Dimensions
62mm×62 mm×50.4mm
Weight
281g
Software
Windows XP/Win7/Win8/Win10 32bit, 64bit OS
Data Interface
USB3.0
Programmable Control
Image size, gain, exposure time, trigger polarity, flash polarity

4.General Specification
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 12
Conformity
CE, RoHS, FCC, USB3 Vision, GenICam
Table 4-3 MARS-1231-32U3C camera specifications
Specifications
MARS-1231-32U3M
Resolution
4096×3000
Sensor Type
Sony IMX253 LLR global shutter CMOS
Optical Size
1.1 inch
Pixel Size
3.45μm×3.45μm
Frame Rate
32.1fps @ 4096 ×3000
ADC Bit Depth
10bit
Pixel Bit Depth
8bit, 10bit
Shutter Time
24μs~1s
Gain
0dB~24dB
Pixel Data Formats
Mono8/Mono10
Signal Noise Ratio
40.63dB
Synchronization
External trigger, software trigger
I/O
1 input and 1 output with opto-isolated, 2 programmable GPIOs
Operating Temp.
0°C~45°C
Storage Temp.
-20°C~70°C
Operating Humidity
10%~80%
Power Consumption
< 4W@5V
Lens Mount
C
Dimensions
62mm×62 mm×50.4mm

4.General Specification
© China Daheng Group, Inc. Beijing Image Vision Technology Branch 13
Weight
281g
Software
Windows XP/Win7/Win8/Win10 32bit, 64bit OS
Data Interface
USB3.0
Programmable Control
Image size, gain, exposure time, trigger polarity, flash polarity
Conformity
CE, RoHS, FCC, USB3 Vision, GenICam
Table 4-4 MARS-1231-32U3M camera specifications
4.3.2. Spectral Response
Figure 4-3 MARS-1231-32U3C sensor spectral response
Table of contents
Other Daheng Imaging Digital Camera manuals

Daheng Imaging
Daheng Imaging VENUS USB3 Series User manual

Daheng Imaging
Daheng Imaging MERCURY2 GigE Series User manual

Daheng Imaging
Daheng Imaging MARS GigE User manual

Daheng Imaging
Daheng Imaging VENUS USB3 Series User manual

Daheng Imaging
Daheng Imaging MERCURY2 GigE Series User manual

Daheng Imaging
Daheng Imaging MERCURY2 USB3 User manual

Daheng Imaging
Daheng Imaging VEN-134-90U3M-D User manual

Daheng Imaging
Daheng Imaging MER-030-120UC-L User manual

Daheng Imaging
Daheng Imaging VENUS USB3 Series User manual