• No results found

On the Feasibility of Low Cost Computer Vision : Building and Testing SimpleEye

N/A
N/A
Protected

Academic year: 2021

Share "On the Feasibility of Low Cost Computer Vision : Building and Testing SimpleEye"

Copied!
31
0
0

Loading.... (view fulltext now)

Full text

(1)

On the Feasibility of Low Cost Computer Vision

Building and Testing SimpleEye

Henrik Alnestig

April 20, 2015

DVA 331

Thesis for the Degree of Bachelor in Computer Science

Examiner: Baran C

¸ ¨

ur¨

ukl¨

u

(2)

Abstract

This thesis explores a novel approach to the computer vision field in the form of low cost computer vision intended for industrial use. The system proposed in this thesis, called SimpleEye, is implemented and tested against an existing system. Different approaches to object detection and data extraction from a scene, as well as common applications of computer vision in the industry, are examined. Three algorithms are implemented, aimed at different industrial applications. These are two types of object recognition, using Canny Edge detection and connected-component labeling, as well as barcode scanning. The tests, each targeting one of the implemented approaches, show promising results for low cost computer vision. While the system is expectedly lacking in speed, it has no difficulties in achieving good result in applications which are not highly time critical. SimpleEye yielded accuracy and precision comparable to commercial systems, with parts costing approximately 100 USD. The tests show that the system is able to function in several computer vision applications used today, including visual servoing, blob detection, blob tracking, and barcode scanning.

(3)

Sammanfattning

En ny metod inom omr˚adet datorseende unders¨oks i form av ett l˚agkostnadssystem avsett f¨or industriell anv¨andning. Systemet som presenteras i denna avhandling, kallat SimpleEye, implementeras och testas mot ett befintligt system. Olika metoder f¨or objek-tdetektering och uth¨amtning av data ur en scen unders¨oks, liksom vanliga till¨ampningar av datorseende i branschen. Tre algoritmer implementeras, som syftar till olika industriella till¨ampningar. Dessa ¨ar tv˚a typer av objektigenk¨anning, med hj¨alp av Canny Edge detection och connected-component labeling, samt streckkodsl¨asning. Testerna, var och en inriktade p˚a en av de utvecklade tillv¨agag˚anss¨atten, visar lovande resultat f¨or l˚agkostnadssystem inom datorseende. Som f¨orv¨antat ¨ar systemet bristf¨alligt i hastighet. Det har dock inga sv˚arigheter med att uppn˚a bra resultat i till¨ampningar som inte ¨ar mycket tidskritiska. SimpleEye gav noggrannhet och precision j¨amf¨orbar med kommersiella system, med delar som kostar ungef¨ar 100 USD. Testerna visar att systemet fungerar i m˚anga vanliga applika-tioner av datorseende som anv¨ands i dag, inklusive visuell servoing, streckkodsl¨asning samt uppt¨ackning och sp˚arning av blobs.

(4)

Contents

1 Introduction 1

1.1 Problem Formulation and Analysis . . . 1

1.1.1 Definitions . . . 2

1.2 Contribution . . . 2

2 Background 3 2.1 Existing Systems . . . 3

2.1.1 Cognex In-Sight 5400 . . . 3

2.1.2 Other Low Cost Systems . . . 3

2.2 Applications . . . 3

2.2.1 Object Detection and Localization . . . 3

2.2.2 Visual Servoing . . . 4

2.2.3 Blob Detection . . . 4

2.2.4 Quality Control . . . 4

2.3 Algorithms and Concepts . . . 4

2.3.1 Edge Detection . . . 4

2.3.1.1 Sobel Operator . . . 5

2.3.1.2 Canny Edge Detection . . . 6

2.3.2 Color Detection . . . 7 2.3.2.1 Color Spaces . . . 7 2.3.3 Connected-Component Labeling . . . 8 2.3.4 Image Moments . . . 9 2.3.4.1 Hu Moment Invariants . . . 10 2.3.5 Barcodes . . . 10 2.3.5.1 QR Code . . . 11 2.3.5.2 Error Correction . . . 11 3 Method 12 3.1 Hardware . . . 12 3.2 Software . . . 12 3.2.1 Calibration . . . 12 3.2.2 Contour Matcher . . . 13

3.2.2.1 Contour Match Scoring . . . 14

3.2.3 Color Matcher . . . 14

3.2.3.1 Color Match Scoring . . . 15

3.2.4 Barcode Scanner . . . 15

4 Results 17 4.1 Error Sources . . . 17

4.2 Test One: Shape Matching . . . 17

4.3 Test Two: Color Matching . . . 19

4.4 Test Three: Barcode Scanning . . . 22

5 Conclusions 24 5.1 Future Work . . . 24

(5)

1

Introduction

The computer vision field tries to extract meaningful descriptions of the properties of physical objects from images. The research in the field begun in the 1950s [1] and has often strived to mimic the abilities of human vision. In the industry, computer vision systems can be an important asset to a company that utilizes automation. Compared to more traditional sensors, such as pressure sensors or semiconductors, computer vision systems offer versatility in the amount of information that can be extracted from a scene. A computer vision system can give more meaningful data in cases where they can complete the same task as traditional sensors, making it a possibly superior alternative. However, even simple applications of such systems can be expensive when compared to traditional sensors. This is why this thesis presents SimpleEye, a low cost computer vision system based on the Raspberry Pi platform, providing object recognition for only a fraction of the cost of alternative systems. The camera used in conjunction with the Raspberry Pi is the Raspberry Pi Camera Module, a camera similar to those found in current cell phones. The system is intended to be used in the industry, e.g., industrial visual servoing, but at its core will be a general purpose computer vision system.

The difficulty of low cost computer vision comes in the form of getting an accurate and fast enough system with the limited hardware capabilities. The thesis aims to build upon the low cost computer vision hardware, and explore possibilities of developing functionality for object recognition by contour matching, color matching and different types of barcode scanning, both one and two-dimensional. Furthermore, the thesis aims to compare the system with already existing and established vision systems. The comparison will be made in terms of accuracy, precision, speed, and price.

The problem formulation will be presented in the remainder of this section, followed by initial reasoning around it. Section 2 contains background which describes existing systems, applica-tions, technologies, algorithms and concepts relevant to the remainder of the thesis. The method is presented in Section 3, describing the implementation of the computer vision system and its algorithms. The results are presented in Section 4 and describe the tests to be performed on the system, how they are perfomed, and their results. Section 5 covers discussion and conclusions of the results.

1.1

Problem Formulation and Analysis

As mentioned, one problem of computer vision today is the high cost of the systems. Lowering the hardware cost of the systems is likely to also lower their usefulness. This is why the following research questions will be answered by the end of this thesis:

RQ1 How well does the system in this thesis perform in comparison to established computer vision systems regarding accuracy, precision, speed, and price?

RQ2 For which applications are the low cost computer vision system presented in this thesis feasible?

To answer the questions presented in this thesis, a low cost system needs to be built. Tests need to be conducted on the system. The thesis aims to study different applications of computer vision systems currently being used in the industry, as well as systems utilized for these applications. Test cases will be formed from these applications to analyze if they are feasible for low cost

(6)

computer vision. Each functionality should be tested with regards to accuracy, precision and speed, as described in the above question.

1.1.1 Definitions

To answer the first question of the thesis, the definitions of accuracy, precision, speed and price need to be established.

With accuracy means how close measured values by a computer vision system come to a previ-ously measured ground truth, regarded as the universally correct values.

Precision is how close the measured values are to each other, regardless of how close they are to the ground truth (i.e. how much the values are spread out). This may give an indication of how robust the system is.

Speed is simply how long real time it takes to execute requested operations, from the request to a result. This includes having the vision system receive a signal for a request, capture an image, process it, and return the results.

The price of a computer vision system is measured by simply looking at what price the system is sold at. Since the computer vision system presented in this thesis is not a commercial one, it is thus not sold at a price. A rough pricing, accounting for the material costs of the system, will be used instead.

1.2

Contribution

This thesis explores a novel type of computer vision system, which is a general purpose low cost solution intended for industry use. While low cost computer vision has been examined previously, the systems have been specialized on a single feature or function. The contributions of this thesis are threefold:

ˆ Development of a general purpose low cost computer vision system.

ˆ Comparison of such a system against an existing commercial computer vision system, Cognex In-Sight 5400.

(7)

2

Background

Computer vision has traditionally been a field for industrial use. Coupling a computer vision system with an industrial robot is a popular concept within the field. The background section presents some common applications of computer vision, as well as previously presented algorithms and ideas used for the implementation of the proposed system.

2.1

Existing Systems

There are many commercial computer vision products aimed at industrial use on the market. A complete system bundles up a camera lens, some kind of computing unit, and software to give a complete computer vision system to the user. Lowe [20] listed manufacturers of these systems, including Cognex [7], Matrox Imaging [14], VISIONx [36], and National Instruments [15]. These products, while often robust, are generally one or more orders of magnitude more expensive than the system this thesis examines.

2.1.1 Cognex In-Sight 5400

One existing system, developed by Cognex, is the In-Sight 5400. It is a stand-alone vision system intended to be used for inspection, measurement, identification and robot guidance applications in the industry [8]. The user communicates with the system via standard ethernet using the provided In-Sight Explorer software. The In-Sight 5400 is used in testing for comparison. Cognex does not publically state a price for the In-Sight 5400, but retailers sell the base product for around 10 000 USD.

2.1.2 Other Low Cost Systems

Rowe et al. [28][29][30] has done research on object recognition using object detection by color with low cost hardware. Their research has resulted in a small computer vision system intended for use in embedded systems, which costs around 69 USD. The system only tracks objects using color, and thus encounters problems when color is not a defining characteristic of the object to be recognized. This limitation makes it more specialized than the system being addressed in this thesis.

2.2

Applications

There are a wide range of applications for the field of computer vision in the industry. Some of them are described below.

2.2.1 Object Detection and Localization

Object detection is the task of recognizing and identifying an object in an image. It is the basis for almost all applications of computer vision. When an object is detected, localization is the act of extracting information from the recognized object, such as location and orientation. This information is then used in various ways, some of which are described below.

(8)

2.2.2 Visual Servoing

Visual Servoing involves sending information to an industrial robot about the location of an identified object, allowing the robot to manipulate it [32]. The localization information is often received from a computer vision system. The robot typically uses the information to pick up the object. Due to this, visual servoing requires high accuracy information about both the location and orientation of the object.

Some applications of visual servoing needs data about the height of the detected object, i.e. its position on the Z axis. Using only a single camera as input, it is not possible to distinguish between height and scale of an object. Applications who need height information and also uses objects of different scale need to use another vision system, such as a stereo vision or a time-of-flight camera. However, these areas are outside the scope of this thesis.

To allow the vision system to be able to give the robot useful information, the coordinate systems need to be synchronized between the robot and the camera. By calibrating the coordinates between the vision system and the robot, the vision system can translate its information to fit the robot’s coordinate system before providing it.

2.2.3 Blob Detection

A blob refers to a region of an image which in some way stands out from the rest of the image. The region can differ from the background in for example brightness or color. Blob detection is often used in the industry to detect if there are any specific objects in a scene. For this application, only a rough estimate of the object needs to be interpreted by the vision system. As an example, it may be enough for the vision system to know the color and area of an object, without retaining information about its shape. Due to this, blob detection is not as taxing on the computer vision system as visual servoing.

2.2.4 Quality Control

Inspecting an object to ensure it is in good condition is called quality control. One type of quality control is surface inspection, which is the act of inspecting a surface to find defects. This can be done by a computer vision system by exploiting the differences in light reflection a dent or scratch on a surface provides [19]. In a digital image, this may correspond to differences in brightness in specific patterns.

2.3

Algorithms and Concepts

This section describes algorithms and concepts used in the implementation of the computer vision system presented in this thesis.

2.3.1 Edge Detection

In computer vision, edge detection is the method of extracting points from an image where its brightness has discontinuities, e.g., the brightness changes sharply. Barrow et al. [2] showed that discontinuities in image brightness likely corresponds to discontinuities in illumination,

(9)

reflectance, depth or surface orientation. This makes edge detection a good tool to extract features of objects in an image.

Several algorithms have been proposed for detecting edges. A computer vision system that does general matching of objects needs to be able to perform well in a wide area of applications. One algorithm that has been proven to perform well in several different areas is the Canny algorithm [21][31][25].

2.3.1.1 Sobel Operator

The Sobel operator was first suggested in a talk by Sobel in 1968 [34]. It was first mentioned in literature by Pingle [24]. The Sobel operator works by first calculating the intensity gradients Gxand Gy of the image. This is done for each direction x and y by convolving the input image

Iinwith a kernel: Gx=   −1 0 1 −2 0 2 −1 0 1  ∗ Iin, Gy=   1 2 1 0 0 0 −1 −2 −1  ∗ Iin. (1)

For each pixel in the image, the resulting gradient magnitude G is calculated with the pythagorean theorem

G =qG2

x+ G2y. (2)

.

Furthermore, the gradient direction θ can be calculated by

θ = arctanGx Gy

. (3)

An example of the Sobel operator is shown in Figure 1.

(a) Input image (b) Sobel applied

(10)

2.3.1.2 Canny Edge Detection

The Canny Edge detection algorithm [5] is a multi-step algorithm used to find edges in images. The first step involves a smoothing operator aimed to reduce noise in the image. This is done using a Gaussian filter, where a kernel K is based on a Gaussian curve:

K =   1 2 1 2 4 2 1 2 1  . (4)

The output Iout of the filter is then

Iout=

1

16K ∗ Iin. (5)

An edge detection operator, such as the Sobel operator, is applied after smoothing to retrieve the gradient magnitude G and direction θ, which is rounded to only represent four directions; vertical, horizontal and the two diagonals. This is due to the discrete nature of a digital image, where pixels adjacent to an observed pixel can only be found in any of these four directions. The next step intends to thin edges by applying non-maximum suppression. Using the θ values, the algorithm traces edges and suppresses weak edges by setting their pixel value to 0.

Lastly, the algorithm uses two thresholds, one lower and one upper, for determining whether or not to suppress any remaining edges. This is done by observing the pixel’s gradient magnitude, G. Any pixel that is below the lower threshold is not considered an edge, and any pixel above the upper threshold is. Any pixel between the lower and upper thresholds is considered an edge only if it is connected to a pixel that is above the upper threshold. This method is called hysteresis thresholding. An illustration of the thresholding is shown in Figure 2. In the figure, edge A is above the upper threshold and is kept in the end result. B is connected to the upper threshold, and is also kept. C is between the two thresholds with no connection to the upper threshold, and is discarded. D is below the lower threshold and is discarded as well.

Upper Threshold Lower Threshold A B C D G

Figure 2: Thresholding used for Canny Edge detection. A and B are considered valid edges, while C and D are not.

Deciding the optimal hysteresis thresholds for a given image is difficult, and poorly chosen thresh-olds may hinder the effectiveness of the algorithm [22]. Research has been done to attempt to

(11)

calculate hysteresis thresholds automatically [23]. The original author of the algorithm recom-mends a lower to upper ratio of about 1:2 to 1:3 [5].

2.3.2 Color Detection

Segmenting regions by color is common in mobile robots where quick object recognition is needed, such as RoboCup [18]. It has been proven to be an efficient way of recognizing objects with video capturing frame rate [4]. A camera able to capture color images is required, but such a camera provides no extra cost in today’s market.

2.3.2.1 Color Spaces

There are several ways to encode the color information of a digital image [17]. Digital cameras typically encode images in the RGB color space. This color space has separate channels for red, green and blue colors, where each channel represents how much light is emitted of the respective color. It can be represented in three dimensions as a cube (see Figure 3a).

(a) RGB color space (b) HSV color space

Figure 3: Three dimensional representations of color spaces.

Another way to represent color is the HSV color space. HSV attempts to separate the brightness of a pixel with its color, and uses the channels hue, saturation and value. The concept of separating brightness from color makes it more robust to changes in brightness than RGB, which is desirable for color segmentation. The HSV color space can be thought of as a cylinder, as seen in Figure 3b. Hue is the color and is represented by the angle, saturation is represented as the distance from the center and the value (i.e. brightness) is represented by the height.

An image encoded in RGB color space may be converted to HSV color space [33]. First, we define two variables according to the minimum and maximum values of the RGB color space values:

Vmin= min(R, G, B), Vmax= max(R, G, B). (6)

(12)

C = Vmax− Vmin, (7)

and the value V of the HSV color space is simply

V = Vmax. (8)

The saturation S is retrieved by

S = ( C

Vmax, if Vmax6= 0

0, if Vmax= 0

, (9)

and the hue H, if defined as an angle in degrees 0°≤ H ≤ 360°, is calculated as

H =      60°(G−B)C , if Vmax= R 120° + 60°(B−R)C , if Vmax= G 240° + 60°(R−G)C , if Vmax= B . (10)

By convention, H = 0 corresponds to a red hue.

2.3.3 Connected-Component Labeling

Connected-component labeling is the process of assigning labels to the pixels of a binary image [9]. The labeling is done in such a way that adjacent pixels with the same value are assigned the same label, effectively forming blobs. There are two different models for determining which pixels are adjacent to a given pixel. These models are called 4-connectivity and 8-connectivity [27]. 4-connectivity means that two pixels are adjacent only if they have one side connected to each other. 8-connectivity regards two pixels as adjacent if they have either one side or one corner connected.

Connected-component labeling is normally performed using a two-pass algorithm. The first pass assigns labels to pixels, attempting to give adjacent pixels the same label. Whenever a pixel is found that is adjacent to pixels from several different labels, the pixel is assigned to either of the labels and all the labels found are marked as connected. The second pass reduces the layers, according to the marked labels from pass one, in such a way that no two layers are connected. This gives a minimal set of non-connected labels. This algorithm is shown in pseudo-code in Algorithm 1.

(13)

Algorithm 1 Two-pass connected-component labeling. for all pixels p in image where p = 1 do

assigned ← false

for all neigbours n where n has a label do if assigned then

add connection between plabel and nlabel

else

plabel← nlabel

assigned ← true end if

end for

if not assigned then plabel← new unused label

end if end for

for all pixels p in image where p = 1 do plabel← lowest label connected to p

end for

2.3.4 Image Moments

An image moment is a weighted average of a shape’s structure. Image moments are useful for describing shapes in a general way. The name is obtained from the similarity with physical moments of inertia. The goal of image moments is to describe an object viewed in an image the same way it would be described using physical moments in the real world. This gives metrics that are easily analyzed, such as the mass and centroid of an object.

A geometric image moment is defined as

mpq= Z ∞ −∞ Z ∞ −∞ xpyqf (x, y) dx dy, (11)

where p + q is the order of the moment. From this, the mass M of an object in a binary image is retrieved from

M = m00. (12)

The center of gravity, or centroid, C of an object is defined as

C = (x, y) = (m10 m00

,m01 m00

), (13)

where x and y represent coordinates on a cartesian plane.

The orientation θ of a shape can also be derived using image moments. It is defined as the between the major axis of the shape and the horizontal axis. Using second order image moments, the orientation is calculated as

(14)

θ = 1 2tan

−1( 2m11

m20− m02

), (14)

where −45°≤ θ ≤ 45°. An example of M, C and θ of a shape can be seen in Figure 4.

While the moments are typically derived from a binary image, they can be derived directly from a contour using Green’s theorem [11][37].

Figure 4: A visualization of M , C, and θ, derived from image moments.

2.3.4.1 Hu Moment Invariants

Hu [13] presented seven moment invariants based on the image moments of up to the third order. Using Hu’s set of moment invariants, one can retrieve translation, rotation and scale invariant properties of a shape. This makes moments very desirable for object matching, since it removes most of the variance when matching objects. The seven moment invariants are described below: I1= m20+ m02 I2= (m20− m02)2+ 4m211 I3= (m30− 3m12)2+ (3m21− m03)2 I4= (m30+ m12)2+ (m21+ m03)2 I5= (m30−3m12)(m30+m12)[(m30+m12)2−3(m21+m03)2]+(3m21−m03)(m21+m03)[3(m30+ m12)2− (m21+ m03)2] I6= (m20− m02)[(m30+ m12)2− (m21+ m03)2] + 4m11(m30+ m12)(m21+ m03) I7= (3m21−m03)(m30+m12)[(m30+m12)2−3(m21+m03)2]−(m30−3m12)(m21+m03)[3(m30+ m12)2− (m21+ m03)2] 2.3.5 Barcodes

A barcode is used to encode information and is designed to make it easily interpreted by machines. As such, decoding the information contained in a barcode is usually easy; the effectiveness of a barcode reader is most likely limited to the camera photographing the code. They exist in several forms, including one-dimensional and two-dimensional barcodes. A QR code (see Figure 5) is a two-dimensional barcode.

(15)

Figure 5: QR code containing the title of this article.

2.3.5.1 QR Code

The QR code is a square pattern consisting of smaller squares, called modules. As an example, the QR code depicted in Figure 5 contains 29x29 modules. The code is structured of four main parts: finder patterns, alignment patterns, timing patterns and data. [12]

The finder patterns are used to locate the code. The finder patterns are represented by the squares found in three of the four corners of the code. These squares also give the orientation of the code.

Alignment patterns are smaller squares used to help rectify a code that may be distorted due to being printed on uneven or curved surfaces. The smallest types of QR codes do not have any alignment patterns, while larger codes contain several. The code in Figure 5 contains one alignment pattern, located close to the bottom right corner.

Timing patterns are lines of alternating black and white dots, allowing the decoder to determine the size and scale of the code. They appear between the three finder patterns, one line horizontally and one vertically.

The data is contained within the rest of the code. It is read starting from the bottom right of the code and starts with metadata containing the size of the data. The data itself is represented by one or more blocks, each representing a byte. After the data comes an ending symbol followed by error correction information.

2.3.5.2 Error Correction

To further help with interpreting the image, the code contains error correction information to allow the data to be retrieved even if some parts of the matrix could not be read. Most two-dimensional barcode variations, including QR codes, use Reed-Solomon coding [26] as forward error correction. Reed-Solomon codes provide a good compromise between complexity and ef-ficiency [6]. The algorithm allows for a variable amount of data to be retrievable, which also makes it versatile. QR codes allow four different levels of error retrieval: L, M, Q and H. They allow for up to 7, 15, 25 or 30 percent of the QR code to be damaged until they are rendered ineffective, respectively. However, more redundancy also increases the data required to be stored. This means that, for any given physical size of a QR code, each individual byte block will be easier to read the lower the amount of redundancy used (since each data block will be larger in size).

(16)

3

Method

The computer vision system developed for this thesis includes low cost hardware. It is built using the Raspberry Pi [10] Model B along with its CMOS camera module. The implementation of the software is presented in this section, as well as a brief description of the used hardware. To implement the software, the OpenCV [16] library was used.

3.1

Hardware

SimpleEye is built using the Raspberry Pi Model B. It is a small single-board computer built with low cost parts. It has a 700 MHz ARM CPU, a 250 MHz VideoCore IV GPU, and 512 MB RAM shared between the CPU and the GPU.

The camera used is a Raspberry Pi camera module, a peripheral to the Raspberry Pi. The module uses an OmniVision 5647 image sensor. The sensor captures images in 8- or 10-bit raw RGB format and is connected to the Raspberry Pi using the Camera Serial Interface. The image sensor is based on complementary metal–oxide–semiconductor (i.e. CMOS) technology, commonly used in cameras in contemporary mobile phones. The specifications of the image sensor is shown in Table 1.

The sum of the price of the components used for the proposed vision system is around 100 USD.

Table 1: Specifications of the OmniVision 5647 [35] and the Cognex In-Sight 5400 [8] image sensors.

OmniVision 5647 In-Sight 5400 Active array size 2592 x 1944 640x480

Power requirements 96 mA 350 mA active Temperature range 0°C to 45°C -30°C to 70°C operating

-30°C to 80°C 0°C to 50°C standby Output formats 8-/10-bit per channel RGB 8 bit greyscale

Lens size 1/4” 1/3”

Shutter rolling shutter global shutter Shutter speed 1 ms to 330 ms 7.4µs to 1000 ms Pixel size 1.4µm x 1.4 µm 7.4µm x 7.4 µm

3.2

Software

The software developed for the system is described in this section.

3.2.1 Calibration

To synchronize coordinates between the vision system and the system using it, a scene needs to be calibrated (see Figure 6). The calibration is used to remap pixels of an image to world distance units, or vice versa. The following information is found in a calibration:

(17)

Angle The angle θ between the x axis of the image and the x axis used for the synchronization. Origin The location of the origin O of the scene expressed in pixel coordinates.

Translating pixel coordinates P of an image to world coordinates W is done as follows:

Wx= L(∆x cos θ − ∆y sin θ) (15)

Wy= L(−∆y cos θ − ∆x sin θ) (16)

where ∆x and ∆y are defined as

∆x = Ox− Px (17)

∆y = Oy− Py (18)

.

Figure 6: An image showing the world coordinates of an image, as described by a calibration.

3.2.2 Contour Matcher

For matching shapes, a contour matcher was implemented. The matcher utilizes OpenCV func-tions to match parts of images with pre-defined objects. Due to it being able to differentiate between different shapes, it may prove useful when used for visual servoing. The contour matcher can be used with greyscale images, which are more lightweight due to the reduced amount of information they contain. The steps taken is described in Algorithm 2.

(18)

Algorithm 2 Contour matching.

Let object be a previously defined object to match with. marginlow← the margin for minimum scale

marginhigh← the margin for maximum scale

threshold ← the maximum score allowed image ← take photo with camera image ← Canny(image)

contours ← findContours(image) for all contours contour in contours do

area ← contourArea(contours)

if not contourArea(object)*marginlow < area < contourArea(object)*marginhigh then

delete contour end if

score ← matchShapes(object, contour) if score > threshold then

delete contour end if

end for

Note that both contourArea() and matchShapes() uses Hu’s moment invariants.

Any remaining contours are considered matches. Their orientation and centroid are calculated and saved together with their area and scale.

3.2.2.1 Contour Match Scoring

Contour matches are scored depending on how close their Hu moment invariants are to each other. The score S is calculated from the contours of the pre-defined object a and the newly retrieved contour b as follows:

Scontour(a, b) = 7 X i=1 1 Ii(a) − 1 Ii(b) , (19)

where Ii(a) is the ith Hu moment invariant of a.

The closer S is to 0, the more closely do the two shapes resemble each other.

3.2.3 Color Matcher

The color matching algorithm that was implemented uses the HSV color space, since its features are appreciated for color segmentation. Thus, the system needs to convert the image from RGB to HSV color space first. The algorithm that the color matcher follows is described in Algorithm 3.

When a match has been found, the orientation and centroid of found matches are calculated using the moments of the blob. They are stored along with the area, which is calculated in the matching algorithm. A similar procedure can be applied to greyscale images or images in the other color spaces, assuming the thresholds for converting the image to binary format are adjusted accordingly.

(19)

Algorithm 3 Converting an image to binary using threshold ranges. Let object be a previously defined blob to match with.

marginlow← the margin for minimum scale

marginhigh← the margin for maximum scale

Thigh← high threshold for image binarization

Tlow← low threshold for image binarization

image ← take photo with camera image ← convertToHSV(image) for all pixels p in image do

if Tlow ≤ p ≤ Thigh then

p ← 1 else p ← 0 end if end for blobs ← connectedComponentLabeling(image) for all blobs blob in blobs do

if not area(object)*marginlow <area(blob) < area(object)*marginhigh then

delete blob end if end for

3.2.3.1 Color Match Scoring

The color matcher scores matched blobs depending on how close they are to the pre-defined blob in size. The score S is calculated from the pre-defined blob a and the newly retrieved blob b as follows:

The relative size R, or scale, of b to a is calculated R = Ab

Aa

(20) Then, S denotes how close R is to the allowed scale boundaries Rmin and Rmax.

S =      (R1 − 1)/( 1 Rmin− 1), if R < 1 (R − 1)/(Rmax− 1), if R > 1 0, if R = 1 (21)

The closer S is to 0, the closer the two blobs a and b are in size.

3.2.4 Barcode Scanner

For scanning barcodes, the ZBar bar code reader library [3] was used. Zbar supports many popu-lar barcode types, one-dimensional as well as two-dimensional. Rather than applying traditional digital image processing techniques to extract barcodes, Zbar performs linear scan passes over the image, treating each pixel as a single light sensor sample. A high-level description of the process is shown in Figure 7.

(20)

Figure 7: High-level description of ZBar’s barcode extraction.

Barcode extraction is done on grayscale images. Once the barcode is extracted from the image, its angle, position and area are saved, along with the type of barcode used and the information coded in the barcode.

(21)

4

Results

In order to test the feasibility of the proposed computer vision system presented in this thesis, three tests will be conducted. These tests will be aimed at showing how well the system can perform in some applications of the computer vision field. How these tests are carried out, as well as the results of the tests, will be presented in this section.

For tests one and three, the results will be measured against the results gained from performing the same test on a Cognex In-Sight 5400.

4.1

Error Sources

The light used in the tests originated from flourescent lamps, commonly used in industrial en-vironments. These particular flourescent lamps emitted more yellow light than a natural light source, which gave images produced by the tested computer vision systems a yellow tint. The lamps were also running on 50 hertz alternating current, which may induce flickering in the image. The author deems it unlikely that this had any significant impact on the tests that were conducted. As such, the topic is not discussed further in this thesis.

For tests that used printed material (i.e. tests one and three), the printer itself can introduce errors in not being able to print the test images exactly as specified.

4.2

Test One: Shape Matching

The first test to be performed will be shape matching. For this test, the contour matching algorithm will be used. The intention of the test is to see how well the system can perform in a visual servoing application.

The shape matching will be done against a digital image, printed out on a large paper. This allows for measurement of a ground truth, where orientations, locations and scales are known beforehand. The paper will be placed in such a way that it fills as large area as possible of the resulting image captured by the vision systems. Shapes printed on the paper will be matched against each other (see Figure 8).

In the first part of the test, the correlation between two arrow shapes will be tested. The second part of the test will similarly assess the correlation between four splash shapes. These shapes differ in location, orientation and scale, but are otherwise equal. The location, orientation and scale of one shape will be measured relative to the others. The relative location will be measured as an euclidean distance. The time for matching will also be measured. Each test part will be performed 30 times on each of the tested computer vision systems. All tests will be performed at an image resolution of 640x480 pixels.

Measuring objects relative to each other eliminates the placement of the printed paper as an error source. However, the measuring of the physical distance between objects is still a possible source of error.

The results of the first test are shown in Table 2. To properly fit the paper with the shapes, Sim-pleEye was mounted 65.5 centimeters above the surface, while the Cognex system was mounted 92.9 centimeters above the surface. This is due to the difference in angle of view between the two tested systems. None of the two systems had any trouble identifying the tested shapes.

(22)

(a) Arrow (b) Splash

Figure 8: The two shapes to be matched in Test one.

The Cognex system presented an average angle error of 0.3 degrees, with a standard deviation of 0.004 degrees. SimpleEye had an average error of 2.0 degrees, with a standard deviation of 0.2 degrees. For scale, it should be noted that SimpleEye returned the scale as the area of the matched shape relative to the area of the reference shape. The Cognex system, as well as the ground truth values, are represented in the scale in a single dimension. However, both dimen-sions are scaled equally in every test case. Thus, all scale values S presented for SimpleEye is calculated by

S =pSA,

where SAis the scale of the area returned by the matching algorithm. Regarding scale accuracy,

the Cognex system averaged an error in scale of about 0.9 percentage points and a standard deviation of 0.02 percentage points. SimpleEye had an average scale error of 0.8 percentage points, with a standard deviation of 0.07 percentage points. Measuring the distance between the shapes yielded a mean error of 1.4 millimeters and a standard deviation of 0.004 millimeters for the Cognex system. SimpleEye had a mean calculation error of 2.6 millimeters and a standard deviation of 0.000 millimeters.

Table 2: Results of Test 1, the shape matching.

Shape Test SimpleEye Cognex In-Sight 5400 Ground Truth Arrow Angle 103.5° 100.6° 100° Scale 119.2% 120.7% 120% Distance 235.3 237.6 239.9 Time 288ms 111ms N/A Splash 1 Angle 69.8° 69.9° 70° Scale 39.2% 39.7% 40% Distance 90.4 91.7 91.3 Splash 2 Angle 144.1° 139.7° 140° Scale 91.9% 88.4% 90% Distance 195.8 192.7 192.2 Splash 3 Angle 0.22° 0.26° 0° Scale 73.6% 74.1% 75% Distance 87.0 86.0 88.5 Time 833ms 463ms N/A

Regarding their speed of the two systems, the Cognex system proved to be about 95% faster at matching the shapes and returning the results than SimpleEye. The matching times presented in Table 2 are of matching two shapes for the arrow test, and four shapes for the splash test. This is because the original shapes, that the other shapes are being measured against, were also included in the image as a reference.

(23)

Figure 9: The spheres to be used in Test two. From the left are the yellow, pink, blue, and green spheres, respectively.

For the shape matching, SimpleEye performed well. It had no trouble finding the shapes pre-sented, and gave only slightly less accurate angles and sizes than that of the Cognex system. It was only about half as fast as the Cognex system, however, which is to be expected with the limited hardware of SimpleEye. The test shows that the system is able to match two shapes in an image in three to four frames per second, which is more than enough for many visual servoing applications. The shape matching can also be used for various blob detection applications, even if not all the data of an object might be needed.

4.3

Test Two: Color Matching

Given that blob detection is commonly used in conjunction with conveyor belts, detecting moving objects is a common application of computer vision systems. Test two will evaluate the vision system’s effectiveness in matching moving objects by their color.

The test will be focused on measuring the color matcher’s performance in identifying moving objects. This will be done by dropping a sphere from a ramp at different heights, allowing the sphere to reach different speeds when travelling under the camera lens. The speed will be measured by timing how long the sphere remains in the vision system’s field of view, which is a constant distance. The measured data for this test will be the amount of images the vision system is able to process before the sphere has travelled outside the camera’s field of view, as well as the distance the vision system reports that the sphere has travelled between each image. The spheres used will be traditional table tennis balls, having a radius of 20 millimeters with a matte finish. The aim will be to test how well low cost vision systems can perform in the application of blob detection.

The sphere that will be matched in this test will have a blue color. To ensure that the vision system does not identify differently colored blobs, three other spheres will be tested to see if the system identifies them as objects. These three spheres are pink, yellow, and green. An image of all four spheres that will be used in this test is shown in Figure 9.

For the second test, SimpleEye managed to process an image in 116 milliseconds, yielding 8.6 frames per second. With the vision system being mounted 65.5 centimeters above the surface, the sphere, with a radius of 20 millimeters, occupies about 1200 pixels in the image, which has a resolution of 640x480 pixels. This corresponds to about 0.4 percent of the image. An example image taken by SimpleEye when color matching is shown in Figure 10. In this setting, the system had no trouble identifying the sphere moving at any speed lower than 1.5 meters per second, achieving a 100% hit rate (see Figure 11). In this case, hit rate is defined as the rate of which the vision system manages to identify the object in at least one image before the object has passed the field of view.

(24)

Figure 10: An image taken by the vision system when color matching. 1 2 80 90 100 Speed (m/s) Hit rate (%)

Figure 11: The hit rates achieved at different speeds in Test two.

For lower speeds, it makes more sense to talk about how many frames the system manages to grab of the object, or rather how far the object manages to travel between each image. This is significant for tracking applications. The correlation between the speed of the object and the distance the object manages to travel between each image is shown in Figure 12. As expected, this correlation is linear.

When the speed was increased, the vision system started to have difficulties recognizing the object. At approximately 2.1 meters per second, the system succeeded only 75% of the times to identify the sphere. This occured mostly due to the large amount of motion blur occuring in the image. A demonstration of the motion blur can be seen in Figure 13. For objects that occupy a larger area of the image, the motion blur would be considerably less noticeable at a given speed.

Measuring the speed of the sphere in test two had a fairly large error rate. When the speed was increased, the measuring tools proved unable to reliably measure the speed. And since the camera could only get about one image of the sphere every time it passed at the higher speeds,

(25)

0.5 1 1.5 2 0.1 0.2 0.3 Speed (m/s) Distance p er frame (m)

Figure 12: The distances between each frame at different speeds in Test two.

it could not either get any measurement of speed. The quality of the speed measurement could be easily improved upon with proper measuring tools, such as laser measurement.

The second test shows that SimpleEye can work well for blob detection applications, even when tracking is needed. However, the system presented in this thesis was not reliably able to track very fast movement, due to insufficient computing power. Also, the camera did not have a low enough exposure time to get a clear image of the sphere tested when the speeds were increased. For fast moving objects, there is a trade-off that needs to be considered when mounting the vision system. A shorter distance to the object that is being matched means that motion blur has a lower impact on matching effectiveness, while a longer distance gives the system a longer time to be able to get images of the object. If merely detecting the presence of an object, mounting the vision system closer to the object is probably preferred. If tracking the object is also concerned, a longer distance between the object and the vision system may be preferred.

(a) 0.0 m/s (b) 0.7 m/s (c) 1.2 m/s (d) 2.1 m/s

(26)

4.4

Test Three: Barcode Scanning

This test aims to evaluate the viability of scanning barcodes with SimpleEye.

For the third test, barcodes will be shown to the SimpleEye and Cognex systems for them to try to decode the encoded data. The test will use QR codes, since QR codes are typically scanned using camera rather than laser technology. Three different QR codes will be scanned, called A, B and C. The codes will vary in data, length of data and level of redundancy (see Table 3). The Cognex system will be tested in its supported 640x480 pixels resolution. SimpleEye will be tested with three different camera resolutions. These resolutions are 640x480, 1920x1080 and 2592x1944. For each resolution and QR code, success rate and time taken to scan the image will be tested. Each QR code for each system and resolution will be tested 20 times.

Table 3: The properties of the QR codes to be tested in Test three. Name Data length (bytes) Modules Redundancy level

A 11 21x21 M

B 26 29x29 Q

C 137 61x61 H

For the results of the QR code scanning, see table 4. The Cognex computer vision system failed to read the data in the QR code with the highest density of data (i.e. QR code C) for any size of the code. It also failed to retrieve the data for A of size 73x73 millimeters.

For the same resolution as the Cognex system, SimpleEye failed to successfully scan the smallest sizes of the A and B codes. Also, it was only able to scan the largest sized C code, failing to distinguish the individual modules of the smaller sizes.

The Cognex In-Sight 5400 managed to, on average, be 8-9 times faster than SimpleEye in cases when the QR codes were successfully scanned. However, in cases where the QR code was not found, Cognex was only 0.6 times as fast. SimpleEye was more resilient to increasing the size of the QR code in the image, taking 1.9 times longer to process the largest sized C code compared to the smallest, compared to the 3.8 times increased time for the Cognex system. However, the times measured for the QR code scanning are unfortunately quite misleading. The algorithm used by the Cognex system stops scanning after having found a QR code in the image, whereas SimpleEye’s algorithm keeps scanning the image for more QR codes. This is why the times for the Cognex system increase tremendously when the algorithm fails to find a code, while the SimpleEye algorithm maintains a fairly consistent scanning time regardless of whether or not any code is found.

Furthermore, SimpleEye was more accurate when the resolution was increased. However, this increased accuracy came at the cost of heavily increased scanning times. Unsurprisingly, the scanning time increased linearly with the amount of pixels on the image. Increasing the resolution allowed the algorithm to scan any QR code presented to it except the C code of size 19x19 millimeters.

It is not clear to the author why the Cognex In-Sight 5400 failed to scan QR code C for any size of it. QR code B of size 51x51 millimeters, which measures 1.8x1.8 millimeters per module, was scanned effortlessly by the system. This makes it highly surprising that code C of size 187x187 millimeters, having each module measure 3.1x3.1 millimeters, failed to scan. This becomes even more suprising when the fact that C has a higher redundancy level is considered. It is likely that

(27)

Table 4: Results of Test three, the barcode scanning. Name Size (mm) Test Cognex SimpleEye

640x480 640x480 1920x1080 2592x1944 A 73x73 Hit Rate 100% 100% 100% 100% Time (ms) 55 475 3250 8364 49x49 Hit Rate 100% 100% 100% 100% Time (ms) 62 450 3203 8331 21x21 Hit Rate 0% 0% 100% 85% Time (ms) 336 272 3046 8267 B 174x174 Hit Rate 100% 100% 100% 100% Time (ms) 50 583 3292 9011 86x86 Hit Rate 100% 100% 100% 100% Time (ms) 59 507 3358 8558 77x77 Hit Rate 100% 100% 100% 100% Time (ms) 61 493 3249 8568 51x51 Hit Rate 100% 0% 100% 100% Time (ms) 73 426 3160 8079 C 187x187 Hit Rate 0% 100% 100% 100% Time (ms) 1313 546 3659 9469 93x93 Hit Rate 0% 0% 100% 100% Time (ms) 567 440 3358 8509 84x84 Hit Rate 0% 0% 100% 100% Time (ms) 532 330 3422 8637 19x19 Hit Rate 0% 0% 0% 0% Time (ms) 340 288 2100 6408

the system did not support the unusually large quantity of data and the high redundancy level in the QR code, and thus was unable to decode the data.

The high precision and robustness of SimpleEye in the third test can most likely be attributed to the error correction in the QR codes, allowing flaws in the image of the code to be corrected. Only when the codes, and their individual modules, get very small, do the systems fail to scan them. In the case of SimpleEye, this can be somewhat mitigated by increasing the resolution of the image to scan. Unfortunately, the large increase in scanning time makes the higher resolutions unusable for many applictions.

(28)

5

Conclusions

This thesis discussed the feasibility of low cost computer vision for industrial use. The proposed system, SimpleEye, was assembled with lost cost hardware parts using the Raspberry Pi and its CMOS camera. The software used targets different applications of computer vision. The system was tested against the Cognex In-Sight 5400, a commercial computer vision system. As was asked in RQ2, The proposed system has been shown to be feasible for many computer vision ap-plications, including visual servoing, blob detection, blob tracking, and barcode scanning. With the two tested vision systems being composed of a camera, a processor and software, it is hard to distinguish which of these components yield the largest differences in end results. The camera lens of the SimpleEye did not seem to impose any significant drawbacks over the compared Cognex system in the tests made. It is possible that the properties of the camera are more important in other applications that were not reviewed in this thesis. The algorithms used in SimpleEye are well examined in the field, but their implementation could most likely be improved and fine tuned for this specific system. The largest drawback of the system seems to be its low processing power, which makes it hard to be able to do high speed calculations, such as object tracking in high speed. Reducing the computational complexity of the software is helpful in this regard. For anything that does not require heavy calculations in short time, the system presented seems like a feasible tool for the application.

RQ1 asked how well low cost computer vision systems perform compared to current commercial ones. As the results show, SimpleEye performs slightly worse than the tested commercial system regarding accuracy and precision. In terms of speed, SimpleEye performed significantly worse in some scenarios, and slightly better in others. The pricing of the proposed vision system is roughly 100 USD, while the Cognex system costs around 10 000 USD.

5.1

Future Work

For future studying of low cost computer vision systems, the software used in such systems could be further developed. Other algorithms from the computer vision field could be implemented and tested, as well as fine tuned to require less computing power. The next step in testing the feasibility of such systems would be to test it in a real industrial setting, where a definite use case is established. Furthermore, as the technology develops, similar tests can be conducted with new hardware, while still maintaining a low cost of the system as a whole

5.2

Acknowledgements

I would like to thank Robotdalen for helping me building the proposed computer vision system, lending me their expertise in robotics and industrial computer vision. I would also like to thank Batu Akan for guiding me through the thesis and helping me structure it properly.

(29)

References

[1] D. H. Ballard and C. M. Brown. Computer Vision. Prentice-Hall, Englewood Cliffs, NJ, 1982.

[2] Harry G Barrow and Jay M Tenenbaum. Interpreting line drawings as three-dimensional surfaces. Artificial intelligence, 17(1):75–116, 1981.

[3] Jeff Brown. ZBar bar code reader. http://zbar.sourceforge.net/. Accessed 12 June 2014.

[4] James Bruce, Tucker Balch, and Manuela Veloso. Fast and inexpensive color image segmen-tation for interactive robots. In Intelligent Robots and Systems, 2000.(IROS 2000). Pro-ceedings. 2000 IEEE/RSJ International Conference on, volume 3, pages 2061–2066. IEEE, 2000.

[5] John Canny. A computational approach to edge detection. Pattern Analysis and Machine Intelligence, IEEE Transactions on, (6):679–698, 1986.

[6] CKP Clarke. Reed-Solomon error correction. R&D White Paper, 31, 2002. [7] Cognex. http://www.cognex.com/. Accessed 18 July 2014.

[8] Cognex. In-sight 5000 series vision system installation manual. http://clpa.eu/portals/ 57/VEx/Docs/Cognex_In-Sight%205000_Installation%20Manual.pdf. Accessed 30 July 2014.

[9] Michael B Dillencourt, Hanan Samet, and Markku Tamminen. A general approach to connected-component labeling for arbitrary image representations. Journal of the ACM (JACM), 39(2):253–280, 1992.

[10] Raspberry Pi Foundation. Raspberry Pi official website. http://www.raspberrypi.org/. [11] George Green. An essay on the application of mathematical analysis to the theories of

electricity and magnetism, volume 3. author, 1889.

[12] M. Hara, M. Watabe, T. Nojiri, T. Nagaya, and Y. Uchiyama. Optically readable two-dimensional code and method and apparatus using the same, March 10 1998. US Patent 5,726,435.

[13] Ming-Kuei Hu. Visual pattern recognition by moment invariants. Information Theory, IRE Transactions on, 8(2):179–187, 1962.

[14] Matrox Imaging. http://www.matrox.com/imaging/. Accessed 18 July 2014. [15] National Instruments. http://www.ni.com/vision/. Accessed 18 July 2014. [16] Itseez. Opencv official website. http://www.opencv.org/. Accessed 9 July 2014.

[17] George H Joblove and Donald Greenberg. Color spaces for computer graphics. In ACM siggraph computer graphics, volume 12, pages 20–25. ACM, 1978.

[18] Hiroaki Kitano, Minoru Asada, Yasuo Kuniyoshi, Itsuki Noda, Eiichi Osawa, and Hitoshi Matsubara. RoboCup: A challenge problem for AI. AI magazine, 18(1):73, 1997.

[19] Hugh W Lippincott and Henry Stark. Optical-digital detection of dents and scratches on specular metal surfaces. Applied optics, 21(16):2875–2881, 1982.

(30)

[20] David Lowe. The computer vision industry. http://www.cs.ubc.ca/~lowe/vision.html. Accessed 4 July 2014.

[21] Raman Maini and Himanshu Aggarwal. Study and comparison of various image edge de-tection techniques. International Journal of Image Processing (IJIP), 3(1):1–11, 2009. [22] R Medina-Carnicer, Francisco Jos´e Madrid-Cuevas, Rafael Mu˜noz-Salinas, and A

Carmona-Poyato. Solving the process of hysteresis without determining the optimal thresholds. Pat-tern Recognition, 43(4):1224–1232, 2010.

[23] R Medina-Carnicer, Rafael Mu˜noz-Salinas, Enrique Yeguas-Bolivar, and L Diaz-Mas. A novel method to look for the hysteresis thresholds for the Canny edge detector. Pattern Recognition, 44(6):1201–1211, 2011.

[24] Karl K Pingle. Visual perception by a computer. Automatic interpretation and classification of images, pages 277–284, 1969.

[25] Kunal Pithadiya, Chintan K Modi, Jayesh D Chauhan, and KR Jain. Performance eval-uation of ISEF and Canny edge detector in acrylic fiber quality control production. In Proceedings of National conference on innovations in Mechnatronics, IME, 2009.

[26] Irving S Reed and Gustave Solomon. Polynomial codes over certain finite fields. Journal of the Society for Industrial & Applied Mathematics, 8(2):300–304, 1960.

[27] Azriel Rosenfeld and John L Pfaltz. Sequential operations in digital picture processing. Journal of the ACM (JACM), 13(4):471–494, 1966.

[28] Anthony Rowe, Charles Rosenberg, and Illah Nourbakhsh. A low cost embedded color vision system. In Intelligent Robots and Systems, 2002. IEEE/RSJ International Conference on, volume 1, pages 208–213. IEEE, 2002.

[29] Anthony Rowe, Charles Rosenberg, and Illah Nourbakhsh. A second generation low cost embedded color vision system. In Computer Vision and Pattern Recognition-Workshops, 2005. CVPR Workshops. IEEE Computer Society Conference on, pages 136–136. IEEE, 2005.

[30] Anthony G Rowe, Adam Goode, Dhiraj Goel, and Illah Nourbakhsh. CMUcam3: an open programmable embedded vision sensor. 2007.

[31] Mohsen Sharifi, Mahmood Fathy, and M Tayefeh Mahmoudi. A classified and comparative study of edge detection algorithms. In Information Technology: Coding and Computing, 2002. Proceedings. International Conference on, pages 117–120. IEEE, 2002.

[32] Yoshiaki Shirai and Hirochika Inoue. Guiding a robot by visual feedback in assembling tasks. Pattern recognition, 5(2):99–108, 1973.

[33] Alvy Ray Smith. Color gamut transform pairs. In ACM Siggraph Computer Graphics, volume 12, pages 12–19. ACM, 1978.

[34] Irwin Sobel. History and definition of the Sobel operator. 2014.

[35] OmniVision Technologies. Omnivision 5647 datasheet preliminary specification. november 2009.

(31)

[37] Luren Yang and Fritz Albregtsen. Fast and exact computation of cartesian geometric mo-ments using discrete Green’s theorem. Pattern Recognition, 29(7):1061–1073, 1996.

Figure

Figure 1: A visualization of the Sobel operator.
Figure 2: Thresholding used for Canny Edge detection. A and B are considered valid edges, while C and D are not.
Figure 3: Three dimensional representations of color spaces.
Figure 4: A visualization of M , C, and θ, derived from image moments.
+7

References

Related documents

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

För att uppskatta den totala effekten av reformerna måste dock hänsyn tas till såväl samt- liga priseffekter som sammansättningseffekter, till följd av ökad försäljningsandel

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Generella styrmedel kan ha varit mindre verksamma än man har trott De generella styrmedlen, till skillnad från de specifika styrmedlen, har kommit att användas i större

Närmare 90 procent av de statliga medlen (intäkter och utgifter) för näringslivets klimatomställning går till generella styrmedel, det vill säga styrmedel som påverkar

Re-examination of the actual 2 ♀♀ (ZML) revealed that they are Andrena labialis (det.. Andrena jacobi Perkins: Paxton &amp; al. -Species synonymy- Schwarz &amp; al. scotica while

Swedenergy would like to underline the need of technology neutral methods for calculating the amount of renewable energy used for cooling and district cooling and to achieve an

Industrial Emissions Directive, supplemented by horizontal legislation (e.g., Framework Directives on Waste and Water, Emissions Trading System, etc) and guidance on operating