Sie sind auf Seite 1von 12

Abstract

Project Title : Container Number Recognition System (CNR System)

Authors : T.K.S.Perera
Supervisors : Dr. (Mrs.) K.G.H.U.W.Ratnayake
Eng.G.Anthonys

CNR System is an application which integrates a set of proven technologies in order to

automate the operations at the terminal gate of SLPA cargo depot. It has been developed

with the ultimate goal of automatically recognizing the Identification Number of shipping

containers which enters in to container yard.

CNR System –Progress Report II 1


Table of Contents

Abstract............................................................................................................................1
Table of Figures...................................................................................................................2
1.1 Introduction....................................................................................................................3
1.2 Project Design............................................................................................................4
1.2.1 Event Flow Diagram...........................................................................................4
2.1 Image Acquisition Module .......................................................................................6
4.4.1 IR sensing Module..............................................................................................7
4.4.2 PC Interfacing Module......................................................................................10

Table of Figures
Figure 0-1
Figure 0-1.............................................................................................................................2

CNR System –Progress Report II 2


1.1 Introduction

CNR System is designed to recognize and record the container identification numbers. It

facilitates and enhances management and operations of modern ports and container

depots. CNR System is an intelligent solution, ideal for today's container transport

management.

There initiates with an introduction about the overall application. It will continue with an

analysis of procedures being followed at the site, solution design details of CNR System.

CNR System –Progress Report II 3


1.2 Project Design

1.2.1 Event Flow Diagram

According to the design of the CNR System software, following separate proceedings

could be identified. The diagram demonstrates those events and how they are

interconnected to each other.

A
B IR Sens
C

Figure 1.1: Event Flow Diagram

JPG
Imag
Image
CNR System –Progress Report II 4
1.2.2 Component Diagram
The CNR System module is designed as a combination of several sub modules which are

handling the different combinations of functionalities of the above event flow. According

to the design of the CNR System application, it is divided in to two major modules called

“Image Acquisition Module” and the “Image Processing Module”.

To provide security features and to administrate the entire operation, there is another

module called CNR System admin. The categorization of events in to separate modules

can be viewed as follows.

• IR Sensor circuit
• Serial port
Image Acquisition Module
• Serial port listener
• Image capturer
• Image cropper
• Number separator Image Processing Module

• Character reader
• Database writer - Database Module

PC

Image Acquisition
Module Database
server

USB Camera Image Processing


Module

CNR
System
Update Admin
Database

CNR System –Progress Report II 5


Figure 1.2 – Component Diagram of the system

This component diagram shows the main components of the system. Image

acquisition and Image processing modules are divided in to sub modules in the

implementation as desired.

2.1 Image Acquisition Module

The module of Image Acquisition has to fulfill the following requirements.

• It has to recognize the arrival of a truck which carries a shipping container at the

port yard’s gate to enter the yard.

• It should signal the program when a container is detected.

• Then it should automatically capture an image of the front side of the container.

Image Acquisition Module

IR Sensor Module

PC Interfacing
Module

Image Capture
Module

Figure 1.3 – Component Diagram of the Image Acquisition Module

For the recognition of container arrival at the gate CNR System has used an IR sensor

circuit module. This circuit has implemented with relevant techniques to differentiate

CNR System –Progress Report II 6


shipping containers from other smaller objects. When it recognizes that a shipping

container has arrived at the gate the circuit sends a signal to the computer via the serial

port. CNR System is configured to use this signal as a triggering signal for the camera.

PC Interfacing Module handles this task.

The camera is such that it gives a live video stream to the computer. So with the above

mentioned triggering signal from the IR sensor circuit, the software captures a still image

at that instance from the video stream and stores in the hard disk. This is handled via the

Image capturing module.

4.4.1 IR sensing Module

As mentioned before, in this application, initially, it is required to detect that a container

has arrived at the entrance to the port yard. Essentially this would be the main entry point

of the whole number recognition system. Therefore, this application makes use of an

Infra Red Sensor to accommodate this functionality.

An IR sensing circuit is located at the entrance to the container yard to detect the arrival

of the container. It consists of an IR transmitting circuit and an IR receiving circuit.

Therefore there exists an IR link which would be crossed if a container arrives and stops

at the entrance.

4.4.1.1 IR Receiver Circuit

This circuit mainly comprises of the following components.

CNR System –Progress Report II 7


• 4.0000 MHz crystal Oscillator

• 22 pF capacitors

• tsop1738 IR sensor

• PIC16F84A micro controller

The layout of the circuit could be represented as follows.

Figure 4.4 – IR Receiver Circuit Layout

4.4.1.2 PIC16F84A Micro controller

This micro controller is a powerful (200 nanosecond instruction execution) yet easy-to-

program (only 35 single word instructions) CMOS Flash/EEPROM-based 8-bit

microcontroller packs Microchip’s powerful PIC architecture into an 18-pin package. The

same device can be used for prototyping and production and the end application can be

CNR System –Progress Report II 8


easily updated without removing the device from the end product via the ICSP. This is

easily adapted for automotive, industrial, appliances low power remote sensors,

electronic locks and security applications. [24]

Program Memory Type Standard Flash


Program Memory Size (bytes) 1792
RAM Size (bytes) 68
Data EEPROM Size (bytes) 64
I/O pins 13
Packages 18/PDIP,18/SOIC 300mil,20/SSOP 208mil

Table 4.1 – PIC16F84A Micro Controller Data Table [24]

Figure

4.5 - Pin

diagram

of

PIC16F84A [25]

4.4.1.3 The use of the PIC Micro controller in the system

In this application, it was required to make sure that the system would be initiated

only if a container has approached the entrance to the port. That is, the Number

Recognition System should not be initiated if an interrupt from an external source

CNR System –Progress Report II 9


crosses the IR link. For example if another vehicle just passes through the gate,

the Number Recognition System should not be invoked.

Therefore PIC programming was needed to accommodate this restriction. The

programming logic used was, when it is detected that the IR link has been

crossed, the program delays for a specific period (5 seconds in this case) and

then rechecks to see whether the IR link is still absent. If so, then conclude that

a container has arrived. The Programming source code for the PIC16F84A can

be found in Annexure A.

4.4.2 PC Interfacing Module

During the development of the Image capturing module of CARGOsys we researched

about the ways of interfacing the IR sensor circuit with the application. There were

several options.

1. Using the Parallel port.

2. Using the Serial port.

First we researched about all these options and prioritize the options according to the

identified features and ease of use. According to the requirements of the application serial

port was recognized as the most appropriate solution.

The IR sensor circuit module is interfaced to the CARGOsys application via the Serial

Port (COM1). The triggering signal from the IR circuit is sent to the software through the

COM1 serial port of the personal computer. Therefore identification of this receiving

CNR System –Progress Report II 10


signal is required by the software. This was achieved using the Microsoft

Communications Control.

The Communications control allows adding both simple serial port communication

functionality to the application and advanced functionality to create a full-featured, event-

driven communications tool.

4.4.2.1 The Communications Control

The Communications control provides an interface to a standard set of communications

commands. It allows to establish a connection to a serial port, connect to another

communication device (a modem, for instance), issue commands, exchange data, and

monitor and respond to various events and errors that may be encountered during a serial

connection. The possible uses of this ActiveX control include;

• To dial a phone number.

• To monitor a serial port for incoming data.

• To create a full-featured terminal program.

Therefore in our application we got use of the second point mentioned before. That is,

this control listens and monitors the serial port (COM1) for incoming data. In this

Communications control, we are issuing API functions, which are then interpreted by

Comm.drv and passed to the device driver. [26]

CNR System –Progress Report II 11


4.4.2.2 Establishing the Serial Connection

The first step in using the Communications control is establishing the connection to the

serial port. The following table lists the properties that are used to establish the serial

connection: [26]

Properties Description
SetCommPort Sets and returns the communications port number.
SetSettings Sets and returns the baud rate, parity, data bits, and stop bits as a
string.
SetPortOpen Sets and returns the state of a communications port. Also opens
and closes a port.

Table 4.2 – Properties of MsComm ActiveX Component

CNR System –Progress Report II 12

Das könnte Ihnen auch gefallen