ADVANCED SOFTWARE ARCHITECTURE OF AN AUTOMATIC … Atanasov_77-82.pdf · A. Atanassov 77 Journal of...

6
Journal of the University of Chemical Technology and Metallurgy, 47, 1, 2012, 77-82 ADVANCED SOFTWARE ARCHITECTURE OF AN AUTOMATIC VEHICLE NUMBER PLATE RECOGNITION SYSTEM A. Atanassov University of Chemical Technology and Metallurgy 8 Kl. Ohridski, 1756 Sofia, Bulgaria E-mail: [email protected] ABSTRACT The paper presents the selection and development of a flexible software architecture intended to an Automatic Number Plate Recognition (ANPR) System. The capabilities of the available on the market competitors ANPR systems were analyzed and the requirements to the new generation of ANPR system were recognized and/or formulated. Different software architectures, matching the requirements, were analyzed and the WEBbased one was selected. The appropriate software components corresponding to the requirements were identified.. The components were developed using the process-oriented approach based on the Theory of the Communicating Sequential Processes (CSP). All ANPR components were decomposed to the CSP processes exchanging specific messages via channels. Finally, these processes were mapped to the operating systems processes and threads communicating in parallel. As a result an advanced reconfigurable ANPR System minimizing the execution time was provided to the customers. Keywords: ANPR system, WEB based UI, traffic control software, CSP. Received 09 November 2011 Accepted 10 January 2012 INTRODUCTION The automatic number plate recognition (ANPR) systems become of great importance for on-line traffic control. There are different types of ANPR systems deployed in special scopes: traffic control, traffic violation, control of parking lots, highway lots, control of the access to cities centers, etc. Those systems, in general, are based on the Charge-Coupled Device (CCD) infrared or color cameras, radars (optional), some digital inputs and outputs, Optical Character Recognition (OCR) software for number plate recognition, Data Bases (DB) and Graphical User Interface (GUI) for interaction to the operators. Usually, the process (Fig. 1) of number plate recognition [1, 2] includes: getting image stream from the camera and sending it to the operator PC; converting the image stream to the sequence of im- ages in appropriate image format (TIF, GIF, JPG, BMP) used by the OCR software. It is done by SW for image handling (IH); recognition or not of the number plate via OCR [3]; verification of the found plate number using plates data in DB; and visualizing the found number (and car image, im- age stream) to the operator. In some cases sending some data or signals to the digi- tal outputs or reading additional data from the inputs. Most of the existing ANPR systems [4] are with specific purposes corresponding to one or more of mentioned above scopes. In most of them the camera hardware and the computer(s) running the software (OCR, GUI and DB) are placed on different places and the connection between them is based on coaxial or optical cables. A great majority of systems are still using this architecture. This is no robust architecture because if the PC controlling the camera fails the whole ANPR system fails. It requires complex installation and start- up. It is necessary to install video and control wire for each one of the cameras, furthermore, it is necessary to provide power supply cable to the cameras. If the dis- tance between the lanes is too long, the signal of the

Transcript of ADVANCED SOFTWARE ARCHITECTURE OF AN AUTOMATIC … Atanasov_77-82.pdf · A. Atanassov 77 Journal of...

Page 1: ADVANCED SOFTWARE ARCHITECTURE OF AN AUTOMATIC … Atanasov_77-82.pdf · A. Atanassov 77 Journal of the University of Chemical Technology and Metallurgy, 47, 1, 2012, 77-82 ADVANCED

A. Atanassov

77

Journal of the University of Chemical Technology and Metallurgy, 47, 1, 2012, 77-82

ADVANCED SOFTWARE ARCHITECTUREOF AN AUTOMATIC VEHICLE NUMBER PLATE RECOGNITION SYSTEM

A. Atanassov

University of Chemical Technology and Metallurgy

8 Kl. Ohridski, 1756 Sofia, Bulgaria

E-mail: [email protected]

ABSTRACT

������������������������� ������������������������ ���������������� ������ �������������� �

����������������� �������������� ���������� � ������������ ��������������!������� ���"������������

���������#�����������$� ������������������� �������������������������� #�����%������������ �& �����

������������ ������'����� �������$� �����'����������#���������()*+�������������������� ������������ ��

������������������������� �� �� ��� ��$� ����������� �� � �� ������������������������������ �� ��

�������,�� �������������������������������������-���� �� ����$�� ��������������-��� �����������������

���������������������-������������������� ������ � ������������ �������� �. ����'���������������������������

���������� �������"��������������������������� �� �� ��������� ��������������������������� ������������

������� � # ���������� �� ����������� �����������������

/�������0�����������'�()*�������12'����� ���������������'�-��

Received 09 November 2011

Accepted 10 January 2012

INTRODUCTION

�������������� �������������������������

������� ����������������������������������������

��������������� ���� ��������� ������ �������� ������

��������� �� ������� �������� ������� ��������� ������

����������������������!������������"����������������

��� ����������� ����������������� ����������� �������� �

������������� ������������#������#�������$� ����##$�

����������������������������������������������������

������ ���� ���������%������#������������������

�%#�������"���������� ��������������������$����&����

�$&������'��������(����)����������'()���������������

������������������(���������������������*���+������� ��

����������������,+��-.���������

• �������������������������������������������

�����������������#/

• ��� �����������������������������0����������

������������������������������)*��')*��1�'��&2��

����� ������%#������"�����)��������� ��34��������

���������)5�/

• �������������������������� ��������� ��%#��,6./

• ������������������������������ ��������������

�������$&/

• ���� ����7��������������� ������������������

���������������������������

• )������������������������������������������������

��������������������������������������������������

2������������8�����������������,9.�����"��

������� ��������� ������������� ��� ���� ������� ��

��������� � ����������)����������������������

����"���� ���� ���� ����������� ������� ���� ����"���

�%#���'()�����$&�����������������������������������

���� ���������� ��"���� ���� �� �������� ���8��� ��

��������� ��������������:����������������������������

���������������������������� ���������������� ������

�������#�������������������������������"���������

������������)����0����������8����������������������

����)������������������������ ����������������"������

����������������������������������������������������

��� �����"������������ ������������������)���������

������ ��"������������������������������������������

Page 2: ADVANCED SOFTWARE ARCHITECTURE OF AN AUTOMATIC … Atanasov_77-82.pdf · A. Atanassov 77 Journal of the University of Chemical Technology and Metallurgy, 47, 1, 2012, 77-82 ADVANCED

Journal of the University of Chemical Technology and Metallurgy, 47, 1, 2012

78

�������"���������� ��"���������������������#�����

�������������� �����8���� �� ��������������"�������

���� ��� ��� ����������� ����������� ��� "���� ���

���������������������������������

%��������������������� ���������������"��

����"���������������������)5�����%#�������������

;������������������������������*���-������� �����

����������������������������� ��������������������

�������������� ����������������������������#������

"����"����8��������������������"����������������������

����������)5��%#����������������34����������

!��"��������������������3�����������������������

���� ��������������������������8����������������

���������������7��������� ������������

������ ���������������������������������������

������ ,<.������������� �����������������������������

����������������������������������������������

�0��������� ������������ ��=��������������������

��������"������������������������)��������������

��������������������������������������������������

���������������"��!��������������������������������������

�������)���������������������������������)���������������

����������� ���--> ��=�����������"��!�������������

����������������� ���������������������������

������������������������������������������������

#����������������������������"����8 �����������

������������ ������������������������������ ���

���������%��������3������%3��������������������������

��0���������������������������������������������

��������� �������������� ���������������������#����

������3�0����������������� �#3������������������

��� ����4=&� �����'()���������������������)��������

������ �������������:�������������������������������

54�����34��������������������������������

SOFTWARE REQUIREMENTS TO ANPR SYSTEMS

����������� ��� ����������������������������

������������ ������� ���������������?������ ,@.�

;�������?���� ,A.��5������ 3�������� ,B.�� ����� ���

������������������� ���������� ��0�������� ���� ��

����������������������������"�����������

'���������0��������

• %��������������������������������� ������C

�� ����������

• %���������������������������������%#�����

������������� ������C��� ����������

• ��� �������������������������������� ��� �� ������������������� :�������������

• 3���� �������������� �� ����������������

���������������������������

• ?����7�������������������� ���������

• 3�������������� �����"������������������

������ ������ �� ���� �&���!� ����4���� ������ ���

��� �����������������$&���������������������������

��� ���������� ������������������ ��� ������4���D

&���!�����

• #����������������������������������������

��������� �� ������� �������� �=���� ��� ����� �����

�� ��������������������� ������� ���� ������������

'��3�

• #���������������������������������������

��� �������������������������������������������������

����������������������%#������������

Fig. 1. Hardware and software components of ANPR system.

Fig. 2. All-in-one ANPR Systems.

Page 3: ADVANCED SOFTWARE ARCHITECTURE OF AN AUTOMATIC … Atanasov_77-82.pdf · A. Atanassov 77 Journal of the University of Chemical Technology and Metallurgy, 47, 1, 2012, 77-82 ADVANCED

A. Atanassov

79

• ����������������������������������� ������

�������������������

• ����������������������������������

• ����������������������������������������

���������������"������ �����������"��������������

����������������

3��������0��������

• #������������������������������������8������

��������$&���� �����'��3�������

• ��:����������������������#%2���������������

��������������!���������"�������

• $�"���������������������������������������

����"������������

• 3������������������ �������������������������������������������� �������������"�����"��������

=���������� ���� ������"�����8�������������������

�����������

• #������������ ���������� ����� �������7��D���

������7����� �������������������

• #�����������������������������������

• 3���������������������� ��������!��"���� �� ����������������������������:��������������%#�

��������

IDENTIFYING CSP PROCESSES

����#3���������,E.�������"���������������������

����������� ����������������� ����������������

������������������"����������������0��������������������

����������� �����3����������������� ��������������

������ ��� �� ���������� ���� ��������� ���� ����� ���

������������������������������������������������

�����������������������������������=�����������

�������� ��� �"�� �������� ��������"���� �� ���

�� :�����������#3���������

���������������������������������������������

��������"������ ������������������������������#3�

���������� �������%3�������������� ���������2�������

#3�� ��������� ���������� ���� �8������� ��� ��� ���

��������� ����"����� ���� ��� "���� ��� ��� ���

�� ������������������8 �������������������������������

���������������������������0���������������

� � ���������!������������������������������� ����

,+>.�������������������� ��������������������������

#3������������������ �����������"����*��6�������

�������

�� ����� ����� ������������� �� ������� ��

�������������"�� ���������������)�����������������

�����������������������')*���)*����1�='�������

����� ������%#���������������)5�������������������

������������������������2���������������

����������������������������������������F�����

�������� ������������ ��� ��� ���������������������

���� �������� ��������2��������������� ���� �������

��������

������������ �������������2�����������

����� ������������������������������ ������4�

3�� �������������������������������)����������������

�� ��������������������������������=�������"���

��������� ��� ����4� �3�� ������D��� ��� ����������$&

3�� �����2� �� ����� ������� ��� ���� ����!���"������

������������ �������������������������� ����������

&���!� ���4���� ��������� ������ ��� �� ���� �� ��

���������������������������������� ��4� �()��)�

�������������������������������3������2��������������

�������4� �3�� �������$&�3�� �����2���������� ��

����)D%���������������

������������� ������������������������"���

������������������������� �����������������������

�����������������#��)�����������������������������

����"�������������������3������2��������������������

������������� ���2��������4� �3�� ������ ����� �

��������

����4=&�3�� ����������� ������ ���� � �� �����

����������������������������4� �()� ��"���������������

)���������������� ���������������:������������������

�����C����������������������������������8�������� ��

�"����4� �()� ��"���������2� ��4=&�3�� �����������

������� ������������2����������� ���������

�����������C��"�����"������������������������������

Fig. 3. CSP Processes forming ANPR System.

Page 4: ADVANCED SOFTWARE ARCHITECTURE OF AN AUTOMATIC … Atanasov_77-82.pdf · A. Atanassov 77 Journal of the University of Chemical Technology and Metallurgy, 47, 1, 2012, 77-82 ADVANCED

Journal of the University of Chemical Technology and Metallurgy, 47, 1, 2012

80

����� �����������F����������������������������������

��� ����������������

�������������� �������� ��!"����#������

�����������������8�����������"����#3������������"���

���� ���������� ��� ���� ����� 3����� �������� �

�����������������

IDENTIFYING CSP CHANNELS AND MESSAGES

��������"���������������6��������������������

�������� #3�� ���������� % ��� ������ ��������� ���

���������������8�����������������#��������������

�����2� ��� ���� ����������� ���������� ���� ����

��GGG� �"�����GGG� ������������ ��� ���� ��������

���������������������������*��GGG�������������

����2�������8�����*��%#�������%#���3�����

���� �������� ��"���� ������ ����"���� ���� ����"���

�����������)�������������������������������"��������F

��������"��� ��������������������������������

����������������������8������������������#3?���

G2;������������������������������������� ��� ��

��������������������7������������������� ���������

�����������������

DECOMPOSITION OF ANPR MANAGER PROCESS������������ � �������2����������������

�����������������������"������������������������

�*���9�����������8������������

• �����!$��������������������������������

��� �����2��"���� ��� ����� ���� �������2����������

����������������������� �����������������������

���������������������$������������������8������

�����2�����������)5�����%#��������������� ��������

�������

• %#$�� �$�� ������� "�$����� �������� �������

���������� � ������� ���� ��� ���� ��������� �����

����������������� ��������� �������������������

������������

• �����% $ ����������������=���������������

$&�3�� ��� ��� ���#%2������� �� ����� ���� �������

�������������������������*����8�������������=����

����$&�3�� ���������������������� ���������������

����4������������"�������������������� ����������%#�

�����������������������B>H�

• !"��� �������������� �������=����� �������

����$&�3�� ����)������������=�����7������������*��

���������

• &����������������������������������4�

3�� ���� )�� ������� ���� � �������������=�� ��������

�����������������4� �3�� ����)��������8�����������

������������������������������� ���� ������4�

()����������

• ��'�(���&����������������������� ������

����������"�����%3�������������������������������

�����������������������������

• � ����������������������� ��������������

�������#%2�������

������������� � ��������������������=�����

$&�#����������)D%�#%2�������#����������34�(������

����()����������� ��������8����������������������

�����������4=&�3�� �������3������2����������������

�� ����"��������

MAPPING THE CSP PROCESSES TO OSPROCESSES AND THREADS

������������������������������������"��

���������������� ��#3������������������2�����������

�����"������������� ����� ���������������������� �����

��� ������!������������� �������������������������

���������%3���������������������������������������

Fig. 4. ANPR Manager Process sub processes.

Fig. 5. CSP composition of ANPR System.

Page 5: ADVANCED SOFTWARE ARCHITECTURE OF AN AUTOMATIC … Atanasov_77-82.pdf · A. Atanassov 77 Journal of the University of Chemical Technology and Metallurgy, 47, 1, 2012, 77-82 ADVANCED

A. Atanassov

81

����������3��%#���)����5�������������$��������

���������� ���� = ������� ������� &���������� �

�8�������"������������������%��������������������

�2��� �������������������4� �3�� �����������3�����

2�������������������������"�����"��������

��8��#3����������*���<�������������������������

����������������������������������������������

��������II������ ���������������8�����������"�

���������������������������������������������−<|| ����������

�8�����������"������������"�������������������������

�������������������������������

���� ������%3��������������,++��+-.�"��������

��7������������������������������������%3������������

��������������������������3���������������������

�������������%3��������������������0������������

"�������������� ����������� ����������������%3

���������� "��� �0���� �������� "����� ����� �������

�������� ���� ��� ��� ��� ����#3����������� �%����

�������������"������������������� ������ ���������

%3�����������"��������������������"����������������

��������������� ����������#3����������������� ��

��� ����������%3�����������"��� ��������� ��������

����������� ���������������������F�&��!������8�����

�����������,+6.�������������������������������������

������ ��������������������"����0�������������"����

��������������������������� ����������#3���������

�������������������������������� �������������������

"���������������������"������������������������

���� ��� ������ ����#3������������������ ���� ��� ���

���������������������� �������������"�������������

������;����������������"����� ���������� � ��� ��

������������� ����������������������������"���������

������������ ������������������������� ������"��

��������������

��� ����������C��� �������������������������

����"�����������������,+9.���������������������������

���������������������������������������������������

������ ���������������������������������������

����&��!��������������������0��������������� �����

������������������������������8���"���������������

������������������� �����������&��!������� ����

������������ ��"���� ��������������������������� ���

��������������������������;����������������������

���� ���� ���� ��� ���� �������� ������� ������� ���

���������������������������������������������

�������������������������������������������

"�������������������������������������������������#3�

�������������������2����������3�������������"��

��!��������������2��������������%3���������� ���

����� ���������������������������������������������#3�

�� �������������������2�����������$���������������

���� ���� �������� )�� ��������� ���� ����� ��� �����

�������������8������������������������������������

������������������ ������������ :������������������

��������"�����������������������D� �����

*����������������3�����"������������� �

%3����������� �������� �� �"����������� ���� ���� )5�

%#�������2������������������"�����4=&�3�� ������

3������2������������������)����������2��������������

����� ������ �"�� �� ���� ��� ��������� ������� ���� �2

Fig. 6. Result view from ANPR System in Web UI.

Page 6: ADVANCED SOFTWARE ARCHITECTURE OF AN AUTOMATIC … Atanasov_77-82.pdf · A. Atanassov 77 Journal of the University of Chemical Technology and Metallurgy, 47, 1, 2012, 77-82 ADVANCED

Journal of the University of Chemical Technology and Metallurgy, 47, 1, 2012

82

$�������������=��&����������������������������

�������������������

���� ������� ��� ������� )5� ����%#�� ��

����������%3�������������� ��� ���� ���� ����� ����� �

��������� ������� ����� ���� ����� ������ ����"���

��8����� ����"���!��"����)��������������� �������

�����������������������8���������������

���� 4� � 3�� ��� "��� ��������� ��� �

����������������������������� ����������������������

������,+>.��)���������������������������3�� ���,+<.

������������������������#�

���� ����� ����� ������ �*��� @�� �������� �

3����� �� �������� ���"��!� ��4���"�� ����%���

= ������%3� �� ������� ���� ���� �������C� ���

���������C���������������� ������������ �������

��8��������������������� ���� � ����8��������� ����#�D

)�����!����

CONCLUSIONS

����������������������������������������������

������������������� ������"����������������������"���

������������������������������ �����������������

����#3�� ���������� ��� �������������%3� ���!�� ���

��������������� �������������� ������� ������������

����������������8 ����������� ���������8���������

����������������������������������������������������������

�*���@������"������������������������������ ����������

��������� ���� ���������� ��� ��������� ����� ����

������������������)����������������������������"��

�� �8������� "��� ��������������� �%3� ��������

������� ���������������������������������%3����������

���������������"����"��������������������������

�����������������

REFERENCES

+�����'�������;������������ ���������� �����������

��� ���������"������������������������'���

������� ->>A�

-��%��2�����!����������������2��������������

������������������� �������������������3���

�����(� ������&�����->>A��<�+B�

6����������������"�"������!������������ �����3�

������������������->><��+�+-�

9�����&���5�������������� ������;����������������

��������;����3������?)3;����������->>-�����

������������DD ���������������D���:����D->>6"-9D

<�� �����DD"""��������������D##�?�#�����3��

���D;��������#����D���8�����

@��������DD"""� ��������D��D�����������������D����D�

A�������DD"""�����������D�;�������?����

B��������DD8���������D���8����J�����K+L!K9L�� K6>

5������3��������

E��#�5������ �#��������� 3�0������� ����������

��������5�����+EB<����������->>9�

+>�������������� ��*����� ���4� �&�����3� �����

*���������%��������������������� �������

�������3������38���)������������#����������

#����������)��5�����=��������������������

)��-+���#�������� 3�7������&�������� ->>B�� 6EE�

9>-�

++��2��&������)������������������2��������3��������/

= ������ 3������ ��������/

"""�� ����������->>+�

+-��$��M����!��� ->>+�#����8�� 3"���/� = �����

3��������������/������� ���"""�� ������

��/� ->>+�

+6��$���������������2��������4�6-���������

2�����������������= ������3���"����$� ��������

23$��2��������#�����������+EEB�

+9������������� ������������������������������#������

)���������#�����������������������������C

���������� 3������� 1������� ��������� L

)���������)���3������->>E��9@�<6�

+<�����5�������3��������������&������"� �����������

"��� ���� ������� 1� �� ����"��!�� � 2�����

�� ��������#����->>6�