IMPROVEMENT OF THE ACCURACY OF DETERMINING MOVEMENT PARAMETERS OF CUTS ON CLASSIFICATION HUMPS BY METHODS OF VIDEO

The complex of automation and remote control systems for railway transport includes a variety of sensors. A human operator actually performs the same functions as the system, primarily only on the basis of visual perception of information (a station duty officer, a hump duty operator, etc.). The development of a mathematical framework for software to process video images facilitates new opportunities for modernizing and devising innovative control systems for train traffic. To compute movement parameters of cuts on classification humps, it is advisable to use classical methods of analysing video: the optical flow method and the background subtraction method [1]. However, each of these methods is insufficiently accurate for using it in automated systems. The accuracy can be increased by combining the methods. The obtained results can be used to improve and automate the processes of controlling cuts’ detaching on classification humps. 2. Literature review and problem statement


Introduction
The complex of automation and remote control systems for railway transport includes a variety of sensors.A human operator actually performs the same functions as the system, primarily only on the basis of visual perception of information (a station duty officer, a hump duty operator, etc.).The development of a mathematical framework for software to process video images facilitates new opportunities for modernizing and devising innovative control systems for train traffic.
To compute movement parameters of cuts on classification humps, it is advisable to use classical methods of analysing video: the optical flow method and the background subtraction method [1].However, each of these methods is insufficiently accurate for using it in automated systems.The accuracy can be increased by combining the methods.The obtained results can be used to improve and automate the processes of controlling cuts' detaching on classification humps.

Literature review and problem statement
The tasks of automatic selection and maintenance of objects on the basis of their movement in images received from various DVRs are very important not only on classification humps [1] but also for solving the tasks of automated operation of trains [2], for prevention of dangerous situations on railway crossings [3], and for monitoring other objects of the track infrastructure [4].Similar studies are conducted in many countries [5][6][7].
A previously considered unconventional method of interframe difference [1] was based on analysing image changes on a given background (a reference point).The testing of this method for video processing has proved high effectiveness of this approach indoors [1], but the method is very sensitive to changes in the reference background, which makes it impossible to determine movement of objects in various weather conditions; moreover, the method does not exclude motion detection of small objects, considering them a target for monitoring (a rolling stock).This implies that the system
There is a wide range of studies aimed at improving the use of video analysis methods in different economic sectors [8], but often universal methods require considering the peculiarities of the problems to be solved.Optical flow algorithms are described in [9] to solve the problem of selecting images of vehicles.In [10], the analysed techniques are the standard Lucas-Kanade algorithm, which was used to calculate displacement vectors for points, and the Horn-Schunck algorithm, which helped provide segmentation by the displacement vectors.The approaches in [11] are suggested to improve the optical flow method.However, the methods of optical flow largely fail to track objects that can disappear from the frame or significantly change their shape, as in the case with cuts moving away.
In [12], techniques and models are suggested for refreshing the frame of the background for the method of detecting moving objects behind the interframe binary mask on the basis of a difference between the current and the reference frames.This model is shown to be able to adapt quickly to a smooth change in the brightness of pixels of a scene, which facilitates its appropriate work outdoors, in the case of a gradual change in lighting, and with swaying branches of trees.However, the use of the method in question does not take into account the presence of movement of people and animals, which should not be recorded as objects of control.
In [13], there is a description of building a tree of filters of an arbitrary structure, for example, for simultaneous watching of a processed video image on the monitor screen and its saving in a computer file.The converting filters can help process video footage.The study also considers a system of indexing and finding videodata.
The analysis of the sources of information has revealed a need to improve and detail the procedures of using a method or a complex of methods in the case of monitoring objects of a complex shape on a changing background, in the presence of small moving objects that are not subject to tracking.

The aim and tasks of the study
The aim of the study is to improve the accuracy of movement parameters of cuts on classification humps by methods of video analysis.
To achieve the goal, it is necessary to solve the following tasks: -to choose a method or a synthesis of methods that will accurately determine the basic parameters of movement of cuts on classification humps; -to determine the arrangement of using the chosen mathematical apparatus for monitoring the parameters of cuts; -to conduct field tests to receive quantitative values of the accuracy of determining the parameters of cuts.

The mathematical apparatus for automatic video analysis
Most often, a video sequence is described as g(x, y, t), where (x, y) is a point on the image plane, and t is time.Most methods of optical flow are based on the assumption that images of the objects whose movement is monitored do not change over time: where u, v can be viewed as the field shift.Since this is not the real fact, the Gaussian blur of each frame K ρ (x, y) is used along with tracking the shift of some uniform field of the flow (∇f=(f x , f y ) T ).Particularly, the underlying assumption of the classical Lucas-Kanade method is that an unknown optical flow vector is constant for some ρ area, and the field shift characteristics can be obtained by minimizing the function: However, the solution to this problem does not imply that the image can disappear from the frame at the edge of the image or change the shape, as in the case of an object moving away.
The problem can be solved by synthesizing the optical flow method with the Horn-Schunck method, which will help restrict the flow analysis by some frames of images.The Horn-Schunck method determines the unknown functions u(x, y, t) and v(x, y, t) as a result of minimizing the global function: where the size of the blur α>0 is a regulation parameter.At the same time, the Horn-Schunck method alone as a tool to determine changes in the current frame relative to the reference (background) frame provides good results indoors if there is stable lighting [14,15] and much worse results in case of changing lighting and environmental conditions [1].

A synthesis of video control methods for automation of reading the parameters of cuts on classification humps
An analysis of studies [1] and papers [9,10] has determined that combining the two above-described methods for movement tracking is more effective.The main requirement is low complexity of the used algorithms, as data should be processed quickly.
To reduce the number of calculations, it is suggested to refresh the background frame only once every 240 frames.This significantly reduces the processing power involved, but it leads to: (1) a significant time delay in recording changes that occur in the reference frame (e.g., the speed of shooting 25 frames per second will be delayed about 10 seconds); (2) uneven computational loading: the refreshing of the reference frame will involve a sharp increase in the number of computations; (3) big consumption of memory to store temporary information.
The easiest and fastest way to detect relocation is to subtract frames or interframe difference [2].
The result obtained by subtracting frames did not provide proper quality in video processing [1], as this method involved reading not only the movement of a cut but also small changes in the video frame.Therefore, another method is considered; it consists in building an optical flow of a matrix of vectors corresponding to the moving object points in two pictures [9].
The algorithms for constructing an optical flow are divided into two types: -the displacement vector is calculated for each point in the image; -the displacement vector is built only for some reference points.
In the described tests, the underlying principal model was built on the basis of the Horn-Schunck method and implemented while using the software package MathLab, Tacking Wagons Using Optical Flow (Fig. 1).
The suggested method is also sensitive to certain sounds.Simulations by using this method have given the results shown in Fig. 2.
The noise level on the classification hump can significantly vary (rain, snow, fog, wind, etc.).A series of approbations of the standard methods showed an unacceptably high error of their use to determine the parameters of movement of cuts [1].
As a way to improve the accuracy, it is suggested to use a difference accumulating procedure that is based on a preliminary distinction of the contours of moving objects followed by calculating the optical flow estimation that is used during tracing moving objects [9,10].For the primary moving objects, we will take, for example, square pixel blocks of the size of WxW.Let us assume that a pixel square WxW is considered to be moving if the amount of the speed modules of the grid points included in the square exceeds some number y.This number can be chosen empirically -for example, by counting the median of the speed modules of points for the first several frames.
When dividing an image into elementary cells, a more thinned sub-grid will be formed above the grid of the optical flow.The size of each cell will be equal to the product of the size of the grid h on a side of a square W. The side of the square is chosen depending on the expected size of the moving objects.
Let us designate the matrix of the identifier of the squares movement as R, with each item of it being either 0 or 1 (fixed and mobile, respectively).To form sections that can be viewed as a single moving object, we suggest the following three-step algorithm: Step one.This step is intended to remove the "aperture problem".The optical flow is well-defined at the object edges, but in the case of a monophonic object it can be equal to 0 in the centre of the object.Thus, there may be a situation where squares that are adjacent to the square R are moving, but this square is considered to be motionless.This problem is solved by assigning the value of 1 to the motionless square, and if K squares have been identified as moving, the constant K is better to be chosen empirically (the optimum values are 4 and 5).
Step two.While considering the matrix R, starting with the first square, let us assign the value of Q=1 to each moving square, where the Q-matrix of the numbers of moving squares is of the same size as the matrix R.
The factor k is chosen in accordance with the number of neighbouring pixels.
The steps that are suggested for various situations are the following.
If all adjacent squares are stationary areas of the picture, the square that moves is assigned a new number that is not currently used.
If there is one nearby square that moves with a nonzero number, its number is assigned to a moving square.
If there is more than one moving square near the area of the image, this area is assigned the number of any of the adjacent and already moving numbered squares.
If the numbers of the neighbours differ -when there is the so-called clash of numbers, -the numbers of the pair are kept as equivalent.After passing through the matrix, the resulting pairs are saved in a separate data structure.
Step three.All moving squares are numbered as a result of the first step, but some areas remain having different numbers as a result the clash of numbers.While reviewing the entire matrix, we re-number the moving squares, using available information about the numbers in the data structure.As a result, there is a formed matrix Q of the numbers of moving squares, which can restore the contour of the object.
Next, we proceed to the second operation -namely, interframe tracing of moving objects as stable over time groups of connected image elements that are moving uniformly.A moving object is assumed as a coherent region of pixels that moves across the image plane at a certain speed and is characterized by the following parameters: the time of monitoring and the time of losing the region in the video sequence.
At the intake, each frame receives a set of areas drawn by the matrix Q.Let us designate it as a vector of fields.Let us recognize that there is also a set of previously identified objects with corresponding object fields.Let us mark it as Ω.It is necessary to identify a compliance of Q regions with Ω regions, which have been attributed to already existing objects.The possible cases are: 1.A new area w does not match any available region Ω.In this case, the w section is perceived as new, and a new object is formed for it in the list.
2. An existing Ω region does not have any match in any new area w.Hereby, an object with the domain Ω is considered to be lost by one frame.If the number of frames in which the object is lost exceeds some predetermined and admissible maximum number of frames N, the object is removed from the set.
3. A new area w corresponds to several regions Ω j1 ,…, Ω jk .This effect is called the effect of a "collision".The ways of solving this problem are the following: either to consider the fields Ω j1 ,…, Ω jk to be the same but corresponding to different objects or to use a region with the lowest number in the follow-up monitoring.The disadvantage of the first approach is that after this all the k (possibly different) objects are traced as one.The disadvantage of the second approach is that an arbitrarily removed object is the one that can be separated and perceived as new.
To assess the quality of the suggested theoretical solutions, we developed a simulation by using MathLab of the Simulink package.In the course of this work, we used video recordings of disintegrating a rolling stock on a classification hump.The records contained videodata of detaching 162 railway wagons into 60 cuts.The total number included 32 tank-wagons, 28 platforms, and 102 railway wagons of other types.The recordings were made by the camera Сanon EOS 600D on a day with cloudy weather.
The camera was fixed on a pole of the hump traffic lights facing the tracks of the classification yard.The total time of the video was 68 minutes and 12 seconds; the total volume of the files was 781 MB in an avi format.
Fig. 3 shows an example of using the suggested approach for identifying and monitoring an overall big moving object.Below, there is an initial image of the currently processed frame of a video sequence.Above, there is a relevant normalized difference of accumulated images, which is displayed under the calculated optical flow estimation and far-reaching rectangles that restrict the outlined moving objects.
In the first stage, the video records are processed using the basic model by the Horn-Schunck method, which gave the following results: the number of correctly identified railway wagons is 72; the number of specified moving objects is 130; the number of non-specified railway wagons is 90.The conditional probability of correct work of the method used can be defined as 0.44.The reject rate is 57 %.
The next step in video processing involved using an advanced model that combined the Horn-Schunck method and the interframe difference method.The results are: the number of correctly identified railway wagons is 159; the number of specified moving objects is 191; the number of non-specified railway wagons is 3.The conditional probability of correct work of the method used can be defined as 0.8332.
The conducted research makes it possible to conclude that the synthesis of the methods of optical flow and background subtraction can increase the accuracy of recognizing cuts on a classification hump.The conditional probability of correct work of this approach is 0.8332, compared with 0.44 in the case of the classical Horn-Schunck method used in the same conditions.The disadvantages include the fact that the resulting probability of correct work is not sufficient for widespread practical use of the research findings.Moreover, of practical interest are the following parameters of movement of cuts: the traffic speed, the track number, the category of the railways wagons of a cut, etc., but the obtained quantitative results relate only to identifying a cut as such.However, the conducted study is a necessary step in the development of a complete automatic video monitoring of the movement of cuts on a classification hump.This system will significantly improve control over disintegration of railway wagons and ensure prevention of damage to wagons and freight in case of a railway collision.
A further increase in the accuracy of movement parameters of cuts on a classification hump is possible only after a significant improvement of identifying a cut as such.The detailing of the movement parameters requires establishment of a link between the movement of a cut and the reference grid for the discharge part of the hump and taking into account the perspective view with the cut moving away from the camera.It is possible to obtain more accurate results with an automatic analysis of a video stream from several cameras, constructing 2D or 3D models of the movement of cuts.

Conclusions
1.The study has defined a synthesis of the methods of optical flow and background subtraction as the main tool to improve the accuracy of movement parameters of cuts on classification humps.This combination of the methods makes the results obtained by the optical flow method more resistant to changes in the projection of the observed objects and makes it possible to specify the size of the observation zones by the method of background subtraction, which becomes an effective instrument for adaptation to the conditions of using it.
2. We have specified the procedures of implementing the synthesis of the methods based on their use in a classification yard for recognition of cuts.The specification describes the procedures of choosing the size of control zones and analysing a joint movement in these areas, which makes it possible to identify the movement of a cut even if the cut has been formed from different categories of wagons.
3. The suggested algorithms were tested on the classification hump at Odesa -the Classifying Section station (Ukraine).The obtained quantitative characteristics of the accuracy of recognizing cuts show that the conditional probability of correct work of the suggested approach is 0.8332, compared with 0.44 in the case of the classical Horn-Schunck method under the same conditions.

Introduction
The port terminals are the most important sections of transportation logistics chains, in which there takes place interaction of traffic streams of related types of transport.On efficiency of such an interaction there depend terms and cost of cargoes delivery, as well as their safety.While working out of projects of organization of new and reconstruction of acting terminals one of the main problems is finding of optimum capacity of fronts of cargoes delivery and pickup, which are determined according to size of delivered cargoes, uninterrupted and regular work of transport.In turn, the stated capacity is determined by numerical values of characteristics of the main technological elements of a terminal, namely: moorages, storehouses, unloaders, access roads and etc. Whereby, the capacity of moorages, storehouses and access roads are to be coordinated with each other.
Typically for formal description of functioning of a terminal there is used combination of methods of the queueing theory (QT) and the storage (inventory) theory.For example, the significance of QT for project calculations lies in the fact that it makes it possible to predict variation of length of queues and

A METHOD OF DETERMINATION OF PORT TERMINAL CAPACITY UNDER IRREGULAR CARGO DELIVERY AND PICKUP M . P o s t a n
Doctor of Economic Sciences, Professor, Head of Department* E-mail: postan@ukr.net

Fig. 3 .
The results of the simulation: a is the difference of the accumulated images; b is the initial image