Alex goes through the steps of setting up a HIKROBOT SC2000 Smart Camera Vision System
The HIKROBOT SC2000 series sensors have built in software that allows for rudimentary machine vision solutions, whilst being easy to use and set up.
Unlike many HIKROBOT devices, it is not intended to be used as a camera in the standard MVS software. Instead, the sensor should be accessed via a web browser via the unit’s IP address.
1. Power Up
Once the reader is powered and connected to the same network as a computer, the reader’s IP address is required. HIK’s MVS software can be used to find this. In the list of available cameras, the device should be present.
Clicking on this camera entry will open the device information box in the bottom left of the software, which will show the device’s IP address.
2. Getting Connected
Entering the IP into a web browser URL bar will lead to a Vision Sensor login page. The password, by default, will be Abc1234, however this can be changed after logging in.
There are three main pages: Basic, Solution and System
3. Setting up the Vision System
To set up a vision system, ‘solution’ is the most important section. In order to demonstrate the reader and its software, I have made a quick and simple vision system.
The vision system I have made checks LED modules for their parts. The camera images the LED module and sends the number of metal connector pads, whether there is an LED in the centre and the coordinates of the module within the image to a command line, using a TCP server and client connection.
I mounted the camera at an angle to the LED, in order to limit reflection from the metal surfaces, keeping their appearance more consistent.
4. The Solution Section
Within the ‘solution’ section, the “common” camera settings will allow the change of useful settings such as exposure, gain and the strobing of the light. The gain and exposure both have options for automatic settings.
To check the settings of the camera, the ‘play buttons’ will take images from the camera and display them in the large area on the right side of the GUI.
Once a good image of the subject has been obtained, creating a vision system moves from the “camera” to the “tool” section of the solution page.
5. The Match Trait Tool
The match trait tool is one of the most useful tools for locating a subject, acting as a template finder tool within the vision sensor software.
To locate the metal connector pads, I created a template for each one.
Templates that only use a rectangle are not very consistent, so I also included the + or -, next to the pad, in the template, to minimise false positives
6. Template Creation
The template creation system is very intuitive and simple to use, however can struggle when trying to locate more complicated shapes. There is a polygon draw tool, but it is limited in the number of points that are supported.
Most of the important settings for the ‘match trait’ tool are shown in the Operating subsection.
Each matching object in the image will be assigned a match score, from 0 to 1, representing how similar the object is to the template. The minimum match score will filter out any possible match that has a lower match score than the set minimum match score.
The max match quantity dictates how many matches can be found for each tool, per image
7. Angle and Scale
Increasing the angle and the scale ranges, allows the system to match objects that are variable in size and rotation. If the subject is guaranteed to be imaged in the same rotation, it is best not to have as large an angle range, to decrease processing time and lessen the chance of false positives.
Another somewhat important setting, which is under the advanced tab, is maximum overlap rate. The max overlap rate changes the allowed level of overlap between multiple matches in the same tool. I set the overlap rate to 0, to ensure that one connector was not recognised multiple times. Setting the overlap to 0 is fine, as the connectors should never be overlapping with each other at all.
|I made a very similar ‘match trait’ template for recognising the LED in the center. I set this tool to have a maximum of 1 match, as there should only be one LED in the image.
I also tweaked the match score, as the LED varies more when rotated than the connector pads.
I wanted to be able to find the object’s coordinates in the image, even when the LED is not present, so I made a very simple match trait to locate it.
Fortunately, as there is not much in the image that could be recognised as similar to the object, it can be a very simple template, such as just a circle.
Once I had created all my templates, for each feature I wanted to find, I tested the system with various subjects and adjusted settings to ensure that it yielded the expected results and that everything was as accurate and consistent as possible.
8. Data Output
After setting up a vision system, the results can be output in several different ways. In this example, I used a TCP server, which is a very simple method of communication. In order to send the output of running the system, it must first be formatted.
Although it can look complicated, the format tool, which is in the tool section, is actually very simple. The different values are simply selected from the other tools, using the link button, and can be accompanied by text, if desired.
To output this, it is as simple as selecting the TCP Server in the output section. In the TCP server tab that opens, I set the input variable to be the format tool’s output. Now the server is ready and a client can be used to listen to and receive the output from the TCP server
This is a very quick and easy client I made in python that prints the data received from the server to the python console, every time an image is taken and processed.
For simple solutions, the SC2000 is a very easy to use tool to create rudimentary machine vision, such as basic presence verification. The camera is fairly small and can be easily utilised, effectively, with very minimal machine vision experience.
The camera is limited in its functionality - not surprising considering the price point. For example, it is not very customisable. It has a limited range, although large, of focusing distances and, also, a set field of view.
There is currently a range of 12 cameras, varying in focal length, resolution and mono/colour. Cameras are of between 6mm and 14.8mm focal length. The SC2000 Series Vision Sensor can be found here.