25
www.intechopen.com

A Cellular Automaton Framework for Image Processing on GPU

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Cellular Automaton Framework for Image Processing on GPU

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

��

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

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

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

���������#���$%�&����������$' (���)���������*���+��,�-�����.�/��0���/�������

���������#���1����&��������

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

���������� �������������� ���������������������������������������������������������� �!����"��!#������������������$��������������������$� �����������������������% ������������������������&��������� ���������� ��������� �����'�(�� ���� ��������!������� ��������$����� ���� ��� )*� ��������� ��������&�����������+��%������������������&���������������� ���������������'�,�������!������� �������� ��� ��� ���� ��� ���� ����� ��� ������ � ������ ����� �� ������ ��� ������������-����'� (� ��-��� ����������� �� ����� ���������� �� ��!�� ���� ���� ����� �� ������ %������������������������� ������ �����������'�,�������������������.�������������������������������������� %��������+������������ ����������(,/�0�������122���!��������������22�������������3/*/(���4�����45���!���� ��������$��22)�'�(�������$������$������������������������ ����� ������ ��� �� �� ��!� �������� � 6� ��!�� ���� ���� ������%�������� ��������� �����������"����!#� ����� �������� ��� �������&��� ��� ������ � ���������� ���� �������$%������������ �� ��'� ������$��� ���� ��!7�� ��.�� ����������$� ���� ��� ���� ���� �� �������� � ���� ����� �� ��������$� �� ��.�������� ����������$� �������� ������ ����� �� ��� ��!��� ��� .������������������� ��������� ��� ������ ��� �����.�� ��������� �� ������� �� �� ������� ��������� ���������8�����!����������������'���!���������$�� ���� ��������� ������ ������% ��������������������� �������� � ������������'� 4��� �� ���� �.��.���� ���� ���� ������ �� ���� ���� �� ��!������������������������ ������������������������������������������"9����������'���22:��9����������'���221#'�,����� ������������������������������!���.������� ����������������������������.����� ������ �������� � ������������� ����� ��� ������ ��� ���� ����� �� �� ���� ���� ��� �� ��������� '�(��� � ���� ����� ���������� ������������� ��� ����� ����� ���� ������ �������� ��� ��� ���� ����������������.�� ���������������������� ����������������������� �� '�

����� ������� ����������!��;������� ��� �� ������������������������� �$���� ����8����������� ��� ����������������&$����������� �� ��$����������������������������������������� ����$�";*�,#������ ���������������� ��� �� � ";0/#'� ,��� �.��������� �������� �� ������ ��� ��� ��� ���� ���.���� ���� ����

�"

www.intechopen.com

Page 2: A Cellular Automaton Framework for Image Processing on GPU

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

������� �����������&���������������� ��� ���� ��������� ������������������������������'�,������.��������� ����������� �������������� ���� ���� �� )*� ��� <*� ��� ��'� /�� ��������� ������ �� ��� �������������� ��� �+������ =���������.�� ���� =��������.�� ����������� ���� ������ ��� ���� ��� �����������&��� ���� �����&��� ��$'� ,��� &����� ���&���� ��� ���� �������������� ���� �+��������� ������������� ��� ������� ����� �������� ��&������ ��� �*� ��� )*� ��� ��� &$� �� �������� ��������� ���������'� /�� �� ��������� � ��� ��� �� �������� .������ ����� ���$� ��� ��������������$��������� �����������������������&����������������.��������������!�'�;������� ��� �� ��������� � ���������� �� ��� �� ��� �� �� ���&����� ���� ��� ����� ����� ��������������� ���� �� ���������� ������ ���� ����� &�� �������� ��� �������� ������ ���� ��������������������'�/����.���������������$������������� ������������������������&�����������=�����$��� ��� ��� ��� �������$� ������� &$� .����&����$� ��� ��� �� � ������������ ������ ������$� ����������� ����� ���� ��� �.��� ����'� ,��������� ������������ ������������������ ����� ���� ����� ����������� ������ ����������������� ���)*����<*� ��� ��� ����� ������������ ������������� � ������������������������&������������������������'�;���������� �������������+����������&���������� ������.���������� ����������$�������������.����������������������������'�/����������������������.��������������������������������.������������������������������������������������ ����� ���� �� ���������� �������� �������� �� �����&��� ��������'� ,���� ��������� ��� ������� ��� ����������������+��&��������� ����������������������������� ����������&�������������������������� ����'� ,��� ���������� ��� ����� �� �� ��.��� ��� �� ������������ � ��� ����� ��� ��������8�� ���%��.������������������&$�������������'������������$��������������������������������������� ������&&������&���� ������� ����������������"�������&�������������������������&-���#����������������� �� ��� ������������$� �� ������� &$� ����� ���� � ������ ��&���� �.��� ���� ������ ��� �'� /���������������������������������������������.������������������'����������� �����������������������.��&���������$�����������.��$��������� ���$����.���������������� ���������� �������������������� ��������>.�������� ��� ���� ����������������������� ��� "?��� ���� �������� �221#�� ��������� ��� �������� ��� �� ������8������ "@�� ��� ��'�� �22A���������������'���22A#���������������.���� ������������� ��� ������������ �"3�8���.���������'�� �22B�� C��� ��� ��'�� �22<�� 0������ ��� ��'�� �22<�� ;��������� ���� ?�������� ��:#'� ,������� ���������� ����������� ���$� ��� ��� ����%��������%&����� ������=���'� 4���� ����� ����%���.�������&��������� �����������������������������������������������������&�&����$�������������&��������+��� ���&������ ���� ���������������� ��&��'� /�� ������ ������=����� ���� ��� �� ���� �������� ��� �� ���������� ��+���� ��� ������ ���� �� ��� ��������� � ��� �&���� � ��+���'� ������ ��������� ����������&$�?�$��.����� D���$� "?�$��.����� D���$�� �222#�� ��������������������������&������ �� .��$� ��������.����$� ��� ���������.�� �� ��� �� ���������� ����������� ��� �� � �����������������&����������� �������������������� ���� ��������������&������&�������"5����� ��'�� �221�� ��������� ���� �������� �221�� ����E������ ���� ��&&����� �221#'� (����������$�� ���� ����������� ��������������� ���� &�� ����� ��� �� �������� ����� �� ��������� ������� ������=������������� ��� "4���F�� ��� ��'�� �22<#��������� ��� ���� ��� ���������������&$� ������ ��������$�

"��������������$���221#'�/��������������&������������������������������� ����������������� ���� ���������� �� ������� &����� ��� ���� ������8������ ��

�������'� ,��$� ������� ����� ����

������������������ ���� ������������ ��������������������"?�$��.�����4����%G�����22A#�����0������H������"����$�����4����%G�����22<#����������������������������������������=�I� �����=�I�����������.��$'������� ����%������� ��������������������������$����.$������� ������������ ����������������&���� ����� ��� ���� ���������� ��� ���������� ������ �� �������� ��� �������� ��������'� ,������������������������������'��

www.intechopen.com

Page 3: A Cellular Automaton Framework for Image Processing on GPU

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

,��� ����� ��������� ����������!������������������ ��������%����&����� �������"3��������������$������ �22:�� *�+��� ��� ��'�� �22B#� ��� ���.�� ���� ������>��+���� ���&���'� 0������������������������*���� �������������������!����������������.��$��������� �"3��������������$������ �22:#'� ��.����������� ��� ��� ���������� ��� ������� ����� ���� ��������������� ����������������� ��!*(�� �� ��������� �������� � ������������� ��.������� &$��3/*/(�������������� ����� ���� �3/*/(� ��!�� ���� ���� �:5� ������� ��� �����'� ��������� ��� ���� ��.������ �� ���� �!*(� ������ ���$� �� ������ ������� � ���.�� ��� &����� ����� �� ��������� &��� ���������������������������������3/*/(������'��(����������������������������������������!���������������������� ��������������+����.���"3����.� ���� *�����#� ��=������ &$� ��������� �������� ��� ��� �� �� ���������� ����� ����������8��%������ ��� ��� ���� ���� ��������� ��� �� ������� ������� �$����� ��� ������� &$� ������������������ �� ������� "(������ ��� ��'�� �22B#'� /�������������� �� ������ �� �������� ��� ��������� ��������� ���� ��� ����� �������� ��� ����� ���� ���� $� ��� ��.������ � ������� �������.���� ������������������&�����������������������������������'�

���#����������� ���$�� ��������������������� ������������� ���� ��$�� ����� 3��� �������� ���� !���� "3��� �������� ���� ?������ �AA#� �������������� �������������������������������� "�(#������� �����������&������H������J(������������������E�"H��������22�#��������������������������(�������������������������������.������������������'�(���+������.�� ���.�$��� ��������������� ������������������ ���������� ���������������&����������"��� ��$������'���22)#'��(�&���������������������������������$��������������������� �A2E��������D���������$���.�����������������������������&�����2���� �%� ��%�������������$����������8������������������$�����.�� �������"��������� �12#'�,������������$�������������������������&���+��������&$��������������������������������$���������������� �������+��$���������������������������������$'��(��������������������"�(#������������������������������ ����������%*�����������������������������7������������ ������������������������������� ������������������������������������������������������� �&����� ������'�,$������$�� ��������� ���������� � ���������������� ��� ����������������������� ���������������� ���.��� ��������� ��� ����������� ��� ���������� �����������������$'�,��������������������������������������������+������������������������$���������������������������������������������������������������������� �&�������'�(�������������������������������������$����������$'�,��������������������������������������.����������������������������'�/���������������� ���� ���������������������� ��� ��������� ��� �����������������'� /�� �������� �������� ������������������������$����������"�����#������������������ ���'�K����������������������������� �����������������������&�������$�� ��������� ������� ���������������������������'�,����������������������� �+����$������ ������!� ��� ������ �������������� ��� ������� ��;*������������������ ������ �����;��������*���'�,���������$��������������������������������)�%&������� ��������������� %�������������������������&�$���������� ������%�����������������������'�K����������������������������������� ��&��������$�"��L �����M����������#�����������������������!��� ���$� ���� ����������� &���� ����� ��&�����$� ���������� ��� ������� ��&��������$�"L�������M#� "9����� ��� ��'�� �22:#'� ,���� ��� ������ � ������ ��� ����%������� ��� ��� �������������������(��������$��������������&������������������������������ ������+�������������'���������������������������������������L�/;*M�������� ���/������������;��������*���'�,�����������������&������������������ ��(�������!���.������������������$������ "N������22:#�� &���� ����� "��&���� ��� ��'�� �221#� ��� ��$����� ����� "(������ (����8�� ��� ��'�� �22B#�

www.intechopen.com

Page 4: A Cellular Automaton Framework for Image Processing on GPU

��� �!���� ��� ��#

���������'�/������������&����������� ������������������������������������$����(��� ���������������������������!�����������$��.����&����������������������������������'�

����%�������&������

9��� ����� ������ ��� ��.����� ������� �(� �� �������� ��� ������� �������� �����%��&����� ��������������������&����������������������%*���������������������� ����������������������������������� ������������������"��!�#'��/�������������������������������.��$�������������������������������4���%?������7������������������� �������"4?(#����������� ����%&������� ���������'��,����������������&��������4?(��������������'�,�����������������������%�������������������������������� �������������%*� ��� ���������� ���� ����������������������������.���������������8��� ��������� ��� ������� ����%&����� ������� �� ���������� ����%*� ��� ��'� /�� ������������� ��� ������� ����� ���� ����� ���� .���������$� ���� ���� ��� �� ����������� &��������������������� �������$� ���� ��������� �������&����$'� /������� ���� 4?(� ��������� ���������������� ���� � 9����G%� � ��� �� �� ��� ���� ������ ���� .�����%�������� ����������������'�,�����������&����������������� ������������������������������+��&������������������ ��� ������� ������������$� ���� ��������� "�3/*/(���4����� A� ���(,/� 222� ������� ������������#'�

��#�� ��'���

,����%*���� ����������������������������&-��������������������� ������������������+���".�+��#���� �� ����� ����� ��� .����+'� (� ���������� ����%�������� ��� ����� ��� ����������8�� ���� �� ����&����� � ���� ��-������ ������ ��������� ��� ���� ��� �&������'� ,��� ����%�������� ��� ����� �������������������� ��������%����%������ "��%����#������� ���� ����� ���������� ����������$� ��&�����.��������������������'�,����� ����������������� ����&�������&$������� � ���� ����� ��������� ������������ ��� ����� �������������� ����'�,����� ��������������&$������������������������������ ���������������� �'�K��������� ������������������8���&$����������������������������&����������� ���� %��&���� &���� � ��� %�������� �&-����� ��� ���� ��� �'� ,��� �� ���������� �� ��������������.��$��.��.�������������������� ���&������������������������������%*���� ������� ������������&-����'�K������ ���� ��� ����� ���������� ���&������������ �������������������� �����������&��'��/������������� ������������������%*� ��$���������� ������� ����� � ���� �� ��������������3�

.��������� ��� ������� ���� �� ���� �� �� ��� ����� �� � ������� � ���� ��� �&���� � .���������

� ���� ��������&$�������� �&������'�,������ ����� ��������� �����.��������������� ��

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

.������ ��� ��� �������'� � � � ���� � �� � ���������� ���� .����� ���� ���� ��&��� ���� ���� ��� ��

.����+���������.��$'� �� �����������"���������#�.����+��������&��� � ������ �������.��������������������� ������ '��4������������&�����.����+��������������������������������������������������������������������������� ������������ ��������������'�/����������������%���������%��&����� ������� .����+� �� �� ���������&����� .����+� �� ���� ����� ���� &�� ������������ &$� ��%

www.intechopen.com

Page 5: A Cellular Automaton Framework for Image Processing on GPU

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

������.���������������������������%������������������%��&��'�(��������&$��=�������" #������

��&����������������

�� ����������������������������.��������������������������� �� &�������

.�������� � �������� �� ����� ����'�

� ��� �

� � � � " #�

�,��� ����.����+����������&��������������&$���%������.������ � �� � ����� � ��� '�,��������

.����+� ��&���� ���������� � �� � ��� "�#�� �������.��� ���� ������%�������&$� �� �� ������.����+�

����� ������������%��&��'�,�����&������� ���� ���.����+� � � ��� ���� ��&����� �����������������

� '�

� �� ��

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

�H����������������������������&���������������������� �����������&% ������&$��������� �%����'�/�������������������� ��������������%���������� ������������� ������%����� �����'�/������������ �������� �� ������ ���� ��%����� ��������������������������'�H������� ��� ������+���������������������������%��%���������&��������������������������.����$'�

�#���(�)���*��������+,��� ���'��������'�������' �

*�-�����7������������������� �������"*�-������� �B�#������������������������������������������� ��������� ����� &������� ���� .�������� �� �� �� ��� &������� �� ������ .����+� � � ���� ���� ������

.��������� � ��� �� ����'� *�-�����7�� �� ������� ��� �� ����%&������������ ����� ��������������

������+��$����9�"���� ��#��&��������������+��$�����&����������&$�����������������=���������������������������"C��8�.������'���22A#'�O���.���� �������$�������� ���������$�=����������.��$��������� ������������8������������� �����.����������� ��������������� ������ ���� ��� ��������������������������'��(�������������������������������������������������������.��������4���������������.����+����������4���%?������7���� �������"?�������� �BA��4����D��� �BA#�������&������(� ������� �&����'�,����B2%$���%������ ������� �.������������� �������8����+�������������������%������8���������&���'� ,��� ����� ��������� ���=��� ���� ���������.�� ������� �� ����� �� ������� ��� ����� �.������� ������.������������&������������ �����$������� "�.����������$#�� ������ ������������� ������������������������������%�������������������.��$�.����+��������������.����+�"K.���� �1�#'�K����.����+���������$�����+�����.����� ������������ ������ ����������.�� �������������������$� ��&��� ��������'� ,���� ���������� ������� �� ���� 4���%?������7�� �� ������� ���� ��� ��� �������������� &������� ��� ������� ��� �������� ��������� ��������������� ����� ���� &�� �����.��� &$���������������������������������������������� ��������'���������

www.intechopen.com

Page 6: A Cellular Automaton Framework for Image Processing on GPU

��� �!���� ��� ��%

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

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

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

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

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

�,������ ������� �������8���*�-�����7���� ���������� ��������.�� ��� ���.��������� ����&����������� �$����� �� ���� �� ���.�� ��� ���'� !����������$�� ��� ���.��������� ��=������������������� ���� �� ������� ������ '5�16� ����� ��� �������� �� ��������� ���������� �%.����+���� ����� ����'� (� ��������� �������� ��������� ��������������� ��� ��������� &$�"������������$��� �22 #'� /�� ����� ������� ���� ������� ����������� �� �������� ����� ��������������+� ��������������� �� ���� 4���%?������� �� ������� ��� �� �,(0%�������'� ,��� �,(0%�������� ��� ��� ���������.�� ��������� �$����� �� ���� �/;*� �$�������� .�������� ��������� '� ,��� ���� �� ���� ����$����� ��� ���������� ���� 4���%?������� �� ������� ��� �� ������������ � �,(0���������������-����$����������������������.������������������+��$'�

�#���-!������������,��������������� ������(������������������������������ ����������%*�����������������������������7������������ ������������������������������� ������������������������������ ������������������������ �&����� ������'�,�������������������������������� �.�������������������$�����������������������������.������������������������������������������� �&������������������������.��������������'�(���������������� �������� ���� �������� �$����������$'� ,���� ���� ������ �� ���� ������� �������� ��.������ ������������ ����� �����'� 4��� �� �*� ��� ��� ����;����� ��� .�������������� �&��������� ����&�������� ������ ��� )*�� ���� �������� �+�������� �� ������ ��� �&��������� �.��� ��� A� ���� �A���� �&�������������.��$'�4������� ������������������(����������$�&��������������%*���� ���"�������#� ������������ &$� �� ����� ��� ������ ������ ���� ��+���� "��� .�+���#� �� ����� ��� �� ����.�������������� ����'�H�� ���� ����������� ���� �(� ����� ����� ���������� ��� ����� ����� ����� "�#�� ���� 4���%?������7���� �������&$������������ ��=�������6��

� ���

��� ��

���

��

�� �����

����������� � ")#�

H������� ���������� �&�����������'�

K=������� ")#������� ����� ����4���%?������7���(����������&���������� �����.��$������������������������'�,����������������(����������������$����������������������")#��$����������$�������� ������ ���� ��� �������� ��� ��� � ��� ��$� ����� ���� ��� ���� �����'� ,��� ��������� ")#� ��������� �������������������� ���� .�������� ��� �� ���� �� �������� �������� �����'� /�� ����� ������ ��� ���� ������ ������ ������������.��������������&���������������������&��'�/��������� �������������������������������� ������ ���������.��$�� ��� ���� ��� ��� % ����� �� ������ ��.�� � %��&����� ��� ����� %��&����&���� ����%���������&-����'�/�������������������������&��������&����������������������������������������������������������'�H���������������������������%������������.��������������������(�"(� ��������#��������4?(������%��&���������� ������������������'�(�������������������������������&�����������������&-�������������������������&��� �����'�

www.intechopen.com

Page 7: A Cellular Automaton Framework for Image Processing on GPU

���������������� ������������������������� ��� ���� ��&

4������������ ��� ���������&��� �������� ����������������� ��� �����������������������6����������� ������ ������������������������������ �

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

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

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

��� ���� �

� ��

��

� �����

���

����� �

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

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

������

�#�#�.���'&��'���������������������4������*���� �������;��������.�������������� �&�������������&�����������������)*���������������&����� �.�������)*��� ��������������.��$�"���������������A�� :������A%��������������I �� � ����� � ���������.��$'��

� �������� ������ � "<#�

�H�����

� �������������������������������K������������������ ��� ������.�+������������)*�

�����������'���(�� ��� ���$� ����%&����� �� ���������� �� �������� "?�$��.� ���� 4����%G���� �22A������E������������&&������221������$�����4����%G�����22<������������������������221#�������� ����� �������������� ����������$����� ���&�������������� �&���� � ��������������7'�/���� ����������������������

��� ����&��������������&$������������ ���������6�

� ���� ������� � ���� ��� � "B#�

�,��� ���������� �� ��� ������ �� �������� ��� ���� �� �� �����8������ ����� ������ ����������� ���� ������������������&�����������.�������'��

�#�/��,������� ������'��0���'�������� �H��������� ��������� ��� ���� �� ���� ����� �������� �������� ��� ��� �� �� ���������'� ,������������� ���������������� �����$����������&$� "*� �&�������G�����-����� �11#����� �����������.������"?�����������G�����-����� �1�#'�,������������������������&����������������� ������� ���������������� ��� �� ��&���� ���������� ��&��� �������������� ����������+��� ������������ ���'� ,��� �������.�� ����� ������$�� � ����� ������� ������ ���� �� ����$� 6� ����� ������������������� ��������������������������������������������������������.���� ���������

www.intechopen.com

Page 8: A Cellular Automaton Framework for Image Processing on GPU

��� �!���� ��� �#'

���� &������ �� ����������� �� ����� ����� � �.��� ���� �� ���'� ,��� .������� ������8���������������������� ������������ ������������������ ��������������������������&����.����� ����������������'�9������&������������������������������������.���� �������&$�"3������������������� �� #��������� ������ ���� ��� &����� ��� ��������� ��������� &$� ";�$���� ��<#'� ;����.���� ������������������ ���� ������$� &����� ��� ��=�������� �� �������� &��� ����� � ���� ����� �������� ������������������������������������������������������������� ����"K��������'���221���� ����� ��1���'�;� �������'�� ��:#'�!����������$����������������������������������=����������������������������� ��� ����$�� �� ��� ��� ��� ���� ���������� ���������� ����� �������� �� ��&��� ���������'�,������������$������������������������&���+���������������������������������������������"0������������;��-�������222#'�9������������������������������������������������������������������ ���������� &����� ��� �� ��������� ���������� "�(#� ����� ��������� 4���%?������7�����������������"�������������������22:#'��9��� �(� �� �������� ���������� �&�.��� ����� ���� �������� ���������� �����'� (��� ��+���� ������� ���������� ����� &������ ��� ����� ���� ���� �� &������ ������������ ���� ��� �� �����'� ,���� ��� �������=������ �� ���� ������ ���������� �� ���� �(� �� ������� ����� ��� .��$� ��.���� ����� ��� ����������� ����������������� �������������� ��������� "0������������;��-�������222#'�!����������������������� ��������������(��� �����������������������������������������������������������������������������������+��������������������� ������+���������������� ������'�,��������������=�������������������������������(������������������������������������������������������$����������$������������������'�

�#�1������ ��� ������������,��,��� ������� ����� ��� �� ��� ��� /����������� ;�������� *���� "�/;*#� ��������'� ,���� �$��� ��������������������������$��.����&���&��������������������������� �������������������/;*�������������������������$����������� ��� �� ������������� ���� ������ �����'� /�� ���� �27�� ���������� ����� ��������� ������� ������ �$���� �� ���������� "��� �+������ ���� �����������������;������� &$� ,������ �;�������� ������������ /��'#� &��� ��� ���� ������������ ��� ���� �������������'�O� �� �����.������� ��� �� ���� ��� ���� ������ �� ���������� ���������� ���� ���� ������������ ������ � �������$� �� �/;*� ����� ����� ����� ��������.�'� ,��� �+�������� ������� ������ ���� ����� ����� �� ��.����� ���� ������� ����� ��� ���� ��.������'� ������$�� �/;*� �����.����&������.��$������������������������&����������������'��O���.���������� �������/;*��������������������������������������$�������������� �������'����������� ������������������������ �����!P� ����������!����������������.�� ��� ������������ "����� ����� ��� ���������$��.����&��� ��� ���� ������� ����#�� �� �� ������������� ������������ ���������$� &������� �������������'� ��!�� ���� � ������� ��.����� ��� �+������ �(� ����6� ����� ��� ���� ��� ���� ���� ����� �(��� �����������$� ���$���� ������ ����������� "����������� �&����� ���� ������ ������� ����������$���������#'��,������$��������������������������������������������������������� ������������������� ��������(�&$� ������!�"������������������������$����������$��� ���&������������������#'�,���������������$���������.����� �&����������������������"�Q #��������������������"�#'�/�������������������$����������$���������������������������������������������������&���'�G��E��������&�����������.����� ���������������.����������������������4?(��� ������6�,���������� ���� ����� ���� ���� ��������� ��� ����� �� 0�?� )�� &���� ����� ������� ��+����� "���&������������������� ������������&���.����&���������������������� ������ �������������#'�/������������������ "0#����� ���� ���� ��� �� ������ ��� ���� ����� �������� "�#����� ���� ���� ������������ �����������������������������?������������"?#�������������������&����������������������

www.intechopen.com

Page 9: A Cellular Automaton Framework for Image Processing on GPU

���������������� ������������������������� ��� ���� �#(

.����+'�,���.����+���&���� ��������������.�������&������������������������.�� ���������������� &��� ��� ��� ����� �������� ��� ������� ���� ��&���� ��� ����� ���������� &������� �� �������� ����.����&���������������������������'�����������.����+����������������$����������$�����������������������������.����������������&���'�,���&����� �������=������������������������ %��� � �������� ����� ������� R���&��� &����� 7'� /�� ��� ����� ������ � ������=��� ���������� ����&��������������������������������������.������/>9��������������� '�*�����������&�������&��� ����������������� ������+�� ����������� ��� �����&$� �������������'�,����&���� ������=������������������+����.����������$'�,���R������7���� �����������������&���+���������������.����+�� ��������������9����G�� �����������������������������������'� /�� ������������ ���������������������� �� ���� 4?(� �=�������� ��� ������&��� ��� �� ������� �'� ,��� �(� ��� ��������� ���������������&���������������������&�������������������+����������������?�����������'�/������������������������ ������������������$����.�� ���������������������.��&��������������������������.�� �����������������������+��������� �����������������'�,����������������������������.��������������������R������7��������������������������&���������������'��9��� ��������� ����� ���� ����� &������� �� ������ � ��� ������ ��������� ���� �� &��� ��������&������������ ������������'�H����������.������������������������������� ����������� ��!*(��&���������.��������������������������.������������������������=��������'�

��/��-!��� ������������

,��������������������&������������4?(%��!�������������������������'�/���������������$������������������ ������������������ ���������������������������*�����)*���� ��'�,������������������������$���������!������������������������������!�������8���.�������������������������������'�,��� ������� ����$� ���������� ���� ���� �� ���� 4?(%��!� ��������� ��� ������� ��������� �������������� ������������������ �����������'�(������������.���������������������&����$������������$���������!%4?(��� ������������������������������)*������$��� ������������� �� �����������.�� ����$� ������� � �2��� ������ ���������� �� �� ����$� ";0(#� ��=���������'�,������������������������������&������������������� �������������������4?(%��!���������� ���� �� ��!� ��������������� �� ���� �� ������'� 4�����$�� ���� 4?(%��!� ����&����������� ��� �.����&��� ������� ��������7�� ��� ������ ��� ������� ���� �����.������ ������������������������������ ������������'�

��/���2��'�������������������(����+������������������������������������������� �����������.��&�������������������/�����5����*���������")��O8#��������?�0(;��������(,/�0������5 �B2����� �����������������B ��;?��� ��������������$'��/�������������������������������������������.���������$����� ��������������������&��������������������� �������$� ���� ��������� �������&����$'� /������� ���� 4?(� ��������� ���������������� ���� � 9����G%� � ��� �� �� ��� �������� &������ �� ���%����� ������� �����'�,���� ������� &������� ���������� � ��� �� ����������� �������� �����+�� &������� ��� ���� ���� ����������������������$����������������.���������3/*/(���4�����A�������(,/� 222� �������������������'�

��

www.intechopen.com

Page 10: A Cellular Automaton Framework for Image Processing on GPU

��� �!���� ��� �#)

/���������0���'�������� �/�����������������������(%H������������������������ ����������������������������������� ���&$����� ���������������� �.��������������'���

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

�������2����������������������� ��������'�,�������������������������������������&$����������� ����������������&������� �������������&$����������.�������������+������������������ ���'�,���������� ����������� �������������������������$���� ���� ��������������� ���� ������ ��� �� +���������6��

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

��

� � "1#�

�H���������������������������� �&����������'��,���������*���������������������������� ������������������� ��";0/#����������$����� ����� ������������"� ���� #���������������������������������������� ����G����"� �����#'�,������+������� ����� ����� �������������� �� ����� �.���� �� ���������������� ��� ���� ��� ����������������� ���� ������� ��������������� �� &���������'� 9�� &���� ��� ��� ��� �������� �������������� ��������� &$� ��������� � ���� ��8�� �� ���� ��������� ������� � �������� ����� �����������������������������������"�#������������ �����������"�#'�(���������������8��������������������&��������������������������������������������� ������������������� ���������������������&$�� ����� ������'���

www.intechopen.com

Page 11: A Cellular Automaton Framework for Image Processing on GPU

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

�4� '� '� ;0/� ��� �� �� �� �����$� ���� � ���� �� ������ ������ "�#�� �����$� ��� �� �������� &$� �����������"&���#��������������.���������������������� ���"������#'��

www.intechopen.com

Page 12: A Cellular Automaton Framework for Image Processing on GPU

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

�4� '��'� /�� ����G���� "�#��������������.�������� "����#�&$������������ �������'�H����������������"������#������������� ������������������.����� ���"���&���#'��(�� ��� ���� ���� ��� ���� ������� ����$�� ���� ���&��� �� ����������� ������� ��� ����� ���� 4?(��� ����������.�� �������������������K������������ ������������ ���� �������������&��������%��&������.�������'�H����������������.��$�������������� ��������������������������&�����������������������4?(�������������&��������������������&������������%��&������������"��������������������������������� �&������#���� �������$�������������������$�������������������������� ��� �������� ���.�� ���������'�,���� ��� ���������$� ����� ��� ���� �����+��������$� ��� ��������� ��� ����������� ��� �� ���������������� ���� ������������� ���� �� �����$� ������� �.��� ���������� ��� �� �������'� 4������� � ���� ��� �� ����� ��������� ���� ��������� &������� ���� ����������������� ���������� ���������������������� ���������� �������.�� ������� ������ ������'�(������=����������������������������4?(������������������������������$������������������������������������� �����$�������&������.���������� ������������������������������&��������������������������'��,��� �������� � �������$� �� ���� ��!%�(%H��������� ���� �.�������� &$� �������� � ���������� � ����� ��� ���������� � ����������QQ� ����������������� ����,�&� ���� ��� �������������&��� ��� "4��������� ��2�� G��� ��� ��'�� �22A#'� ,��� �������� )*� ��� ��� ����� ��� ������ �����&����������������������,%�������=�������������8��B ��&$�B ��&$�B ����+���'�,����������������������������� ���� � ���� �������� ��� �&��� �������� /�� ������ ��� �&����� ���������� �����������8�������������������A<�&$�A<�&$�A<���+���'�,�����!�������!������������� ����������������������������)*��������������������������.���������� ��������������������'���

www.intechopen.com

Page 13: A Cellular Automaton Framework for Image Processing on GPU

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

�4� '�)'������������&���������!�������!��������� ������"��#�������������������������&�+���8������ ����������'�

�,��� ���������������+���������� ��������������� � ����)�� � ����� ����� ������!��(%H����������������� �'B� ������ ������ ����� �����QQ�������8���.��������� ����,�&� ���� ����������'�;����.���� ����� �������� ������ ��� �.���� �� ��!� ���� �����$� &�� ���������� &$� ���� � ��������������������� �����������������������������,�&���)��������������� ��������'��

��/�#��,��������������� ���������

,��� �����������$�������� ����.������� ���� ���������&����$������������$��� ����4?(������������������������� ������������������.�����������������������.������$�������� ��2��� ������������������ �� ����$� ";0(#� ��=���������'�,��� ���������������������������� ���� 4?(%��!���������������������������������!����������������������*�-�����7������������������� ������'� 4�����$�� ���� 4?(%��!� ������������������� &����������� ��� �.����&��� ���������������� ��� ������ ��� ������� ���� �����.������ �� ������������ ����� ��� �������� ������������'�,�������������(%��!��� ����������������=�������.����������+�����������$�&$��������� ����� ������ .������� ��� ;0(� ��=���������� �� �����$� ��������� ������� &$� �$��������������.�������� �������'� ,��� �����+�� �� .���������� ���� ��� ����$� ���� ������� ��� ������� �������������)*��� ���������������������$��&����������������������&�����������'�4������������ ������������������������������$����������.��������������������'�������� ���� 6� (��� ;0(� ����� ��������� ��� �� 'B� ,� ;� ������ 3������ ����� "���������K���� ����������$#����� ��������������$�&��$�����'� �,�����=�������������������������)*� ������������������������������������������������$������� ��$������/3������������������������������ ���'�,����$������ ��� �������+���8��"5CN#�����B ��&$�B ��&$� B2���+��������������������������+����������������2':���2':������ '�B���'�(�������������.���������������;0(�

www.intechopen.com

Page 14: A Cellular Automaton Framework for Image Processing on GPU

��� �!���� ��� �##

����&��������&������������ ����)'�/����������� �������������$���������������������������������������������������-������������������&���&���.��6���������������������������������������+�"����������� ���#����������������������������������������"�������� ���� ��$����&����#'�,��������$� ��� �� &���%������� ���������������� ��������� �����.�� ���� ���.�+� �������'� ,��� �������� ��� �� ����� ���� )*� �����$� �������$��� "�����+� �����������#'� ,���������� ������������������ ���6������$�����������$�&���������������������������������������.����������&������������� ���� ������ ��� ������ ���� ������ �����$� ������� ���� �� ��P�� �������$�� ����.�������� ���������������$�����������=�����$���;0(���=�����������������������������������������&����������������$���������&��� ������������������� ���� &'�4�����$�������� ������������������������&�� �&��� ��� ����� ����� ��������� �$���� "�������� �� ��� �+������� ��� �� &����� ����� � ��� ���� �� ��������$���� ���� �#�������������&���+����������������� ���������'��

�4� '�)'�;0(���=��������������������������)*� ���������������=�����������������������������������������$������� ��$������/3������������������������������ ���'�,��������$��������������?���%����������������������������-������������������&���&���.��6���������������������������������������+�"����������� ���#������������������������������������"�������� ���� ��$����&����#'� �� ���������������� ��� ���� ������� ��� ���������� ���� &�� �&���.��� ��� ���� ��� ��������� ������ ������� ��� ���� �� ���������'� ����� ��������� &������� ���� �����+� ���� ����&��� ������ ���� &�� �&���.��� ��� ���� ���� �����$� "G#� ��� � ���� &� ���� �'� ��������� �$����"�������� �� ��� �+������������&���������� ���� ���� �� ��������$��� � ���� �#�������+����������������� ���������'��,��� �������� ����� ���� 4?(%��!� �������� ����� ��� �� &������� ������� ��� �� ����� ���� <2������$�� ��� ;0(� ��� ��'� ,��� ���������� �� ���������� ���� �������� ���� ����� ���������&�����������'� /�������� ������������8�� ������ �������������������&������� ������������� ��������������� ����������������&������'�*���� �����������������������������.� ������������)*�;0(� �������� ����� �� ��� ����� ����� ������������ ��������������� ";�0#� ���� � �� �����%���.����$�������8���)*�������'�(������������������ ����<�������������.�����������������������������������������$������������������������$������������������+����.���'���

www.intechopen.com

Page 15: A Cellular Automaton Framework for Image Processing on GPU

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

�4� '�<'�;������������������������� ��������������$��������+����������"�#������ ������ �������"&#� ���� �� �������� ������ "�#'� (� �$�������8��� ������� "$������ ������� �����#� ���� ����� �����.� ���� ��� ����)*���������'�,������������.������������������� ������������� ���������$������������������������$������������������+����.���'��/�����������������&������������������������������������������������� ��$���������� ����������&���������������� ���������� ������������������� ����B'�,�����������������������&�������������������������$�����������&�������������������������������������$�"4� '�B#'�,���4?(%��!������������������������������������������$�����������������+������&���������������'�,��������������� � )*� �����$� �� ���������� ������� ��� ������������ ��� � ���� A'� ,��� ���&��� ������������������������ 22�"������.���.��.����#�������������$��� �������������������������������������.�� ������������� ����������������&������������������'�

�4� '�B'� /�������8�������� ���� �� ������������ �����������+���� "�#�� �������� "&#������� ������ "�#�������'�,�������� ��� ��$������ ���� �������� ��&����� ���������� ���������� � ����P� ��������

www.intechopen.com

Page 16: A Cellular Automaton Framework for Image Processing on GPU

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

����������������������������������$�����������&�������������������������������������$'�)*�.���������������������� �������������������"�#'��

�4� '� A'� K+������ �� �� �� ������� �����$'� ,��� ���� �.����$� ����������� ���� ������������ �������������������&�������&$�����4?(��!��������������� 22�����������'�����$�39/���������������������+����"�#����������"&#������� ������"�#����������������)*�.����"�#'���� �� � ��6� ,��� ���� �������� ��������� ���� )*� �� ���������� �� <2� �����$�� "���� ���� �2�;0(#� ���� � ���� 4?(%��!� ��������',��� ����� ���� ��������� ��.������� �� ���� �����$�.����������������&$������������������������8������,�&��� '��

0������ 3������"�G#�6�;����S��*�

0������ ���� � <2'A�S�)1'�)�

0������ ������ <2'�21�S�)1'����

,�&��� '�*��������.���������������<2��� ������������$�.��������,��� �����%�&���.��� ����$���� &������� ������� T � ���� T�� ��� �������8��� ��� ,�&��� �� &����'�,��������������������������������%�&���.������������&����$���������$�.����������������������+��������� /��I2'��:� "2'��1%2'���#� ���� ����� ��� �&������� .������ ��������� "���U������������$� .������#� �� ' AU� S� 2':A'� ��� ������������$� �� �������� ���������� ����� �&���.����"�I2'<)#�&��������������T �����T���������.������������������&$�����������'���

www.intechopen.com

Page 17: A Cellular Automaton Framework for Image Processing on GPU

���������������� ������������������������� ��� ���� �#&

������

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

/���"�BU#��/�"���%�����#�

3���������"U#�;����S��*�

(&��.���������"U#�;����S��*�

��.����������������,%������

�)*��(%��!��

2'��:�"2'��1%2'���#�

%2'� �S� '<<� ' A�S�2':A� 2'<)�

,�&����'������������������������<2�������.������������������������������� �6�,����������� ���������������������4?(%��!��������������&��.�������� ���� ��������8������ ������������ ��� ���������������� � " �������� �.��� �#� ���� ��� ������!������������������")'A���S�2'�#'�,���� �.������������������������� �������������������������� ���� 2<��� ��� �.��� ��� ���� �����$'� 4��� ������������ ;0(� ������� ����� ����� ���� �������&����������������������$������������������������������ ������ �����������������'�O���.���������������������.����+�������)����'�������� ������� � ���6� /�� ����� ������������.��������� �����$��������� ���������4?(%��!��� ������������������������� ��� ������� ���������������+��� ���������!����������������������������'� ,�� ������� ����� ���������.�� ����$������� ������������ ����*�-�����7�� ���� �������������������"(���#��� �����������QQ������ ���&����$�����'�,����� ��������������������������� ���������������&�����������&$����������%��&����� ������������������'��(�����!� �� ���������� ����������� ��������� ������������$� &$� ���� � ���� ���.�����$� ��.�����&��������������������&$���������������� ����������.��������������$'��,�����������������������&�����������*�-�������� �������"*(#�����4?(����������������������*(� �������������������� �������$�@����� ����������� �� ������ � ����������� ���������'�,����� ����������.�� ������������������������������������������������������&$��+������ ����� ������%�����.�������� ��������������������.�� ������� ������������ ��������$����� ����� ������ ������� ������ ����� ��������� P� ��� �������� ��������� ��� ����� ����� ��������� �� ��&���$�����������������'�/�������������������.���������������������$��.����&������������.������������&����.������'� /�� ����4?(����������������.����+����������$�����+�����.����� ������������ ������ ����������.�� �������������������$� ��&�����������'�,�������������������.���� ��������������������������������������������.����&�������&���������������������������������������������������.�� ���������������'�,������&�����������������������������.�� �������������������� ������������ ���� �������������&����������%��&������.����+���������������.����������������� ����� &������� ���� �������� �%��&������ .�������'� ,���� ������ ����� ���� ���&��� �� ������������������ ��� ���.�� �� �������� ��� ���� ��������� ������+��$� �� ���� �&-���� ��� �� ����'� ,���������������������������$����������4?(�������������������$���������������������� ���������&-���� ����� ����8�� ����� ��� ����� ��� ����� ��� ���������$'�?���������������� �� ���������������+��� �� ������ �� ���� "��.���� �����$�� &������ ������� �����$���V#���� ������� ����� �������&�����������������*������&������������&$������=��������":#���������������������������������������+����� ��������� K��������� ��������� &������� ���� ����� �������� ������� ������� "�#� ������������"�#������� �����������.��$'�

� ��

� ��� �

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

"

���#

�����

� � ":#�

H�����;������������������������&�������������.�� ���&�������������������.��$'��4��������� �������������������������������.���.��.��������*���� �.���&$���W�<'��

www.intechopen.com

Page 18: A Cellular Automaton Framework for Image Processing on GPU

��� �!���� ��� �$'

���� �!� ���6� ,��� �.��� �� �� ���� *(%��!� �������� � ����� ���� ):'B�� S� :� ������ ���������������� �4?(%��!��������� 22����������������)'A��S�2'�'�,������.�� ����������������4?(%��!���������������.��������&$��������� ������� �������������������&���������������+������&��������������������������$����.�� ���������� �.���&$�����*(%��!�������'�H����������� ����1����������� 2�������������������������&������������������������4?(������������ ���� ������ .������ ���� )2':U������� ����� B2� ������������ ����� ������������� ����������$��������� ���2' �U'�H���������������� �������<2������$��� �������������������������������&���.��� ����� A2� ����������'� ,���� -�������� ����� ��� �+��� ���� ���&��� �� ����������� ��� 22�"������.���.��.����#���������� �����������+���������������������������������'�/���������&�������� ����� ��� ���� ������������ ���� �� ��������������� ���$� ���.�� ��� �� ��� ��������������������������������������.�� �����������������������+��������� �����������������'�����"������#6�H�������������������������������.���������������������������������4?(%��!��������������������� ������������������.����&������������� �� ���&�'�,��������������������.����������������������������������������.���������������������������!�������!������������� ������ ������� ��� ���� ���� ���������� �����$� �� ���������� �+��������'� ,�&��� )��������8������������������������ ��������������4?(������������ ������������������������'�,�����!������ ��� �.������������$���� ���������� ������������ ����4?(�����'�,��������%����� ��� ���� ����� ���������� ��� ����� �������� ���>��� ���� .����������$� ���� ���� 4?(%������������������������������������������ 22������������������4���%?��������� ������'���

�4� '� 1'� *�������� "K��#� &������� ���� 4?(� �� ������� �����$� .������ ���� ���� ���.�� �������������������� 2�����������'�K���������������������U����������.�� ���.�����'��

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

�����������������$� �����%����� 4?(%����� ��������������

(,/�0������O*�<:12� ::B� BA)� ��1�

�.�������4������,5��A2� : �� ���� B���

www.intechopen.com

Page 19: A Cellular Automaton Framework for Image Processing on GPU

���������������� ������������������������� ��� ���� �$(

(,/�0������O*�)�12� �>�� � � <�B�

�3/*/(���4������:22��,� 2)�� :<)� )�2�

�:22� �+��.������������ 2A � �B2� ��:�

0������5 �B2������ �2A� )2<1� �:�

�3/*/(���4�����1�B2��,� < �� B<<<� �2�

,�&��� )'� ?���������� � �� 4?(� ������ � ������ "��#� ��� �������� �������� ��������'� ,��������������������� �.����������������������4?(%��������������������4?(%����'�

��1��(����������

,��� �������� �� ���� ����� ���� ��� ������������ ����� ������� ��������� ��������� �� ����������������������� ��������� ����������������� ������������������� ��� ����������� � ����������%*�����������������'�,������������������������4���%?������7���� ������������������������������������������������������������������������������������������������������������� ����� ���������'�

�1���0���'�������� ��

(� ����������� &������� ���� ��!� ���������� ��������������� ���� ��� �������� ��!���������������� �� ���� ���������� ��������� ������� ����� �� ��!� ��������� &����� ��� �������.��$���������� ����������������� ����4���%?��������� �������������������������������!���������������������������������� ������'��������� ��������������������������&�����������������������������������4?(%��!����������&������������� ������������������8���&$������ �����&������������������������������������������������������������ �&������'�(���������������������������������� ���������� ��� ��������������$� ��� ���������������������� ��������������.�� ���������'�O���.�����������&���������������������&����������������������������������� ����������������.�� ���� ������������������������������� ��$���.��������������� ������������&$������ �����������������'�,����������������������������������������������������������������������������������������������������������������������.�� ������������������'�H������������������4?(%��!������������������������$����������.�����!��������������������� ��� ����������� ��� ���������$� ��� �� ��� ��� ������������������������'� � /�������� ������� ����$&������!%��!��������������&������������'�

��1���3��������� ���������

,��� ������� �������� �� ����� ����$� ���� ��� ������������ ����� ���� 4?(%��!� ��������� ������������$�&����������������������������� ����� �������������)*��������������������������� �� �� ���� �� �����&����$� ���� �������$'� ,��� �� �� ���������&����$� �� ������ .��������� ���������� "�����%�&���.��� ������������ /��I2'��:#� ���&����� ��� ���� �������$� "������&�������������X� 'BU#�������������������.��������������������'��,����������������&�������������.��������� �������&$�������������������������������������������������4?(�������������&����������������������������'�,�����+������&�������������&���������������������������)' �U���������������������������������������������.���������������������������$��������&$�����.����&����$������ �����������������������������������������������;0/������������������������� &������� �����$� �������$��� ���� &��� ������ ��� ���� ��������� �� ��.����

www.intechopen.com

Page 20: A Cellular Automaton Framework for Image Processing on GPU

��� �!���� ��� �$)

����.���������������� ��� ��������������� � ���� &'�;����.���� ���� ������ ����� ��=������&$� ������������ ������������������"X������#���������������������������&��������������������������'��/���������������������������������$�����.��������������������������������$����������!��4���%?���������������������������������!����������������������*�-�����7���� ������'�4������������$��� ����������" 22�����������#�������������������� 2�&�������������!�������!������� � ����'� ,���� �������� ������ ���� �����$� &�� ���������� ��� B2� &$� ���� � �� ����� ������� ��������������������������������������+����!�&����������������'�9�����!%&�����.��������� ���� 4?(� �� ������� ��� ������� ��� ���������� ���� ��������� ������ ��� ��� ���������.�� ����������8��� ��������� ��� ������� ����%&����� �� ���������� ��� �� ����� ��� ������ ��������������������"3��������������$�������22:��?��8������'���22)��4�� �����;������22:��������������'���221����������22:#'�9������������.���������$����� ��������������������&����������������������������$�������������� �������&����$'� /������� ���� 4?(� ������������� ������������ ���� � 9����G� � ���� �� �������������&����������������� �������������'��H�������&���������������4?(������.����������� �����������������",�&���)#���.����&��������������� ���� ��� ������������ ��� �� � ������������ ��� ������ ��� �� ��� ��� "���� �+������.�#���������� ������������������������������!��&���������������������������������������� ����������'�9������������&$��������� �����4?(%������������������!��������������������� 2����� �����&������� ����������������������� ������� ������������������������������� ������� ����� B� &������� ���� ��!� ����� ��� ����� ����$� ���� ���� (,/� 0������ O*� <:12'�� ,��������%����������.������ ��������������� ��������� ����������������'�9������������������ ������!��������� ��������������� ���$����������������������.����&������������&�'��

��1�#���������&������'�������4�,�����!E����������������� ���&������� �����&����$���������&����$��������������������������������$� ����� ���� ����������$� ������� �� &����� ��� �� �� ��������������$� �������� ��������+����&��������������!�"9����������'���22:#'�H�������!����������������� ����������.�������������������������������������� �%���������������������$����������$����������&������������������������$���������������!�����������'�/���������������� �����4?(%��!��������������������������������������������������� ���������������� ������������.��������������������� �.��� ����� ������������ ��������� ��� ���� *(%��!� ��������'� C���� ��� ����� ����� ��� ��������$�����4?(������������������������������������������&����� ���������������������$'�4��� ����� �������� ��� �� ���� ����� ������������ ����������� &������� ��!� ���� ��!�����������������&���������$��� ������������ ��&�����������.������������ ����������������������+����������������+��$��������� �����������&�������������'�O���.���� ��������������� ��������������� ������������!�'�,��� ����� �������������������� ���������%����� ������ ����������� ���� �������� ����� ������� ��� ���� ����� �������� ���>��� ����.����������$'�����������.����������$������������������ ��������/�K+��������������������������������������0(;�������'�/�����������������������&���������������������.���&$������� ���������������������� ������������7�������$��������������������������������&��������'�4��������������� ��� ��������������� ��� ����� �������.�� ������� ����4?(��������� �������������������� �������&����� ����������'�(� ������� �������������������� ���� ��������������� ���� �$���������� ���������&������'�/�����������������������.�����&�����������������������!�"��������������� ������������ �����#����� ����� ���������������&�� ��� ���������� ��� ����������������������&����� ���������� ������������ ������!�����+������'��

www.intechopen.com

Page 21: A Cellular Automaton Framework for Image Processing on GPU

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

5�������������

H����.����������������!%&��������������(������������������������������ ����������� ������� ��� ��� �� ��� �� ��������'� 9��� ����� ��� &����� ��� ���� 4���%?������7�� ��������� �������� ������� ������ ��� ����� �������� ��� �������� ���� ���������� ��������� ���� �������$� ����������������������������&����� �������������� ��������%*������������ ��������������������������������������������8�����'�3���������������������������;0(��+�������������������� �� �����%�&���.��� ���������&����$� ���� �������$� ����� ������� ���� ������� ��� &�� ����� �������������������'�9������������������������4?(�����������������(����������������������������� ������������������&�� ������������ ��� ���������.�����%������������ �������� �����'�9����������������� �$�����.�����&$��������������������������� �����������������$������������������!����������!'�,����+����������� ������ �������������;0(�����������������������+������� �������������������������!���������������'�,������������� ������������������� ��� �������� �� ��!� ��������������� �� 4?(� ��� �� ��������� ���������� ��� ������� ������������������������������������ ��������������*���� ��'�

��6��7���������

(������� �'�� ����$�� G'� Y� ��������8�� ,'� "�22B#���!� ������������ �������������� �� ������� ������ ���� ������������� ���������������.����������� '���� ����������'�

(������(����8��� 4'��0�=����������Z��� D'������[��(�&�������('��0�-��\�.���8�� D'� G'�� �\����8�;�]�8�� D'� D'�� ;���[��8� �\����8�� D'� Y� 3������ ��^.������ ;'� "�22B#� (� ���&�&��������;���������������K����������(���.��$�?�������������������(���������$����'�)�4����"���8����������������9��5+�����6��$%&�< %<1'�

?���� 5'� Y� �������� �'� "�221#� (� ��������� 4��������� ��� 4���� /��������.�� /�� �� ���� 3������� ��������������;����� '���'� %:'�

?��������0'�" �BA#�'��:�)'�;+�2�.)'<%"���*������,���������/����������������'�?���������'�Y�G�����-������'�" �1�#�!������������������������������������'�/�6�+�����������

0��!��������+����.���������,�3��'� 1����'��' _�' �'�?��8�� D'��4������� /'������������K'�Y�����`�������'� "�22)#�������������+����.������� ������!6�

���-� ���� ������������������ ���'���'�� 1%��<'�(�;�����C������C��!�('�?�$��.�� C'� Y� 4����%G���� �'� "�22A#� ������ ����� ���� K������� �*/�� �� �� ���������'�

+�����������=�/������ ����/���3�������'(&� 2�% ) '�?�$��.�� C'� Y� D���$�� ;'� �'� "�222#� /��������.�� 9� ��� �� ���������� !��� � ������ ����'�

%"�;�)"��';"��+���'�.�;")���+"��"&��1A%�:A'�����E��������'�Y���&&�����('� "�221#�0������H���� ����4���������� ���������H���������

(�-�����$�����������;������&���/�� ���� ���������'���'� %1'�*� �&���� O'� Y� G�����-����� �'� " �11#� /������.�� �� �������'� DG� ��������� K��'� /�6� :���� �/�

��������*����/�"/��������>:���*���#/�����4�������������/�/��������������������������/?��<������������������,�0��������3���� ��������4�����'�

*�-������� K'� H'� " �B�#� (� ����� ��� ���� ���&����� ��� �����+���� ����� �����'� �/��������������!���&��A�%�1 '�

*�+���� �'�� ���.���� 0'�� ���� ����� �'� Y� ������=���� �'� "�22B#� ��!%����6� ���&����������9������������������������������ �!���������(�����.��9&-����K+�����������!%����6��� �����������79&-����'�

www.intechopen.com

Page 22: A Cellular Automaton Framework for Image Processing on GPU

��� �!���� ��� �$"

K���� �'�� ������3'�Y�(����?'� "�221#����������H���������6�(���������� /���������������� ����H���������,�������������������!��.������;������'�+"+�"�;):��:�;+'������+� ������������*�����)(&�1� %1�<'�

K.�����'�" �1�#�������(� �������'�0���.����'���@����/�����������.�������*)'�4���������D'�" ��2#�,�&� �������������������������������������� ���������'�3��'� '�4���F��� ('� 5'�� ������� D'� Y� ��� (������� G������ 0'� "�22<#� ,��� /�� �� 4������� � ,�������6�

,����$�� (� ��������� ���� (�����������'� +"""� ;):��:�;+'��� '�� .:;;")��:�:%A�+��:����:��+�"�+�;"%%+2"��"&� �%��'�

4����D���G'�0'�" �BA#��K,H90�4G9H�,OK90C'�4�� ��D'�Y�;������'�"�22:#�!��� � ����������.����������.����6���!%&�����/�� ����������� �

�������������3�����'���'��% �'���� ��$���'����������?'�'��*��������('������� �����'�Y�������������'��'�"�22)#�(����.�$����

�����������������'������������4����*�� �;��������*��;���������)����������� ��������.�� ����������/���'�

��������� ;'� " �12#� ;������������ �����6� ,��� 4��������� ���&��������� �� D���� �����$7���������������������RG��7'������� ���:����������+&� �2% �)'�

��������N'�������������,'��/.���/'��;�������;'��(����,'�Y�O���%��������'�"�221#���!%&������� �����.������������������������%������������.���&-������������ '�/�6�:����+22):.��$��-��!�����,�(�;������*�� ������������'�

��&����� �'�� *�.�������� 4'� Y�O����� ?'� "�221#� 0������ ����������� ���� � ��������� ��������� ������!���� ������ '���������3����������:�������������%&�)) %)<�'�

����$��G'�Y�4����%G�����'�"�22<#�;����%��&���/�� ���� �������������;�������(������������?�������������%,���������K��������������������'�%"�;�)"��';"��+���'�.�;")���+"��"&��)2%�<B'�

���������'�Y���������'�"�22:#����������������������������%����������������������������!'�/�6�+�.)�$��B,���'� %<'�,�����&�$��4G��!�('�

��������� 3'�� 3�8���.����� 3'� Y� ;������� 0'� "�22A#� /��������.�� /�� �� ������8������ ����0�������� �&����������������;���G�������'���'��) _�)<'�

�������/'�"�22:#�4������(� �&�����(� �������������������������� ����&����'�/�6�.������������ � ���1��� ������������ �����7/�/����:/�����%���/����� ����.����������.��� +,������ ��%3���� ��0�$�-�.����/������'�

G���� C'� �'�� ,����� C'� �'��O�� �� C'� �'� Y� ������ N'� �'� "�22A#� ����������� &������� ���������%&�����������&� ��%&������������������ ���� ���������'�+"""�;):��:�;+'���'��+�:2"�.)'�"��+�2�� B��A)�%A<2'�

;�$����4'�" ��<#�,��� �����������������������������������'��������.�����������+%&� )% �B'�;����������K'��'�Y�?��������H'�('�" ��:#�/��������.���� ���������������/������ ������������'�

2��������������������+����.�����������,(&�)<�%):<'��'� ;� ��� ('�� ����������� ?'� Y� ��&&��-�� ;'� " ��:#� ��������� ���������� ��������������

�� �������������� ���� ���������'�.�����������/������*&� �: %�22 '�������������$���('� �'� "�22 #�(��(��������.��3��������� ���� ?������%4����(� ������� ���

4����� �����������������������*��������������'�%"�;�)"��';"��+���'�.�;")���+"��"&��:B%���'�

�� �����*'�" ��1#�(������.��$���������� �������������������������������&�������������������������'� /�6� +"""� +����������� ��� ������� ��� :��������������� ��� �*�����:������/��������.���������,���'�1� %1�<'�

www.intechopen.com

Page 23: A Cellular Automaton Framework for Image Processing on GPU

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

9������ D'�*'��O��������;'�� G��&����*'��������� �'�� ������� D'� K'�Y����������� D'��'� "�22:#���!��������� '�/�6�.������������ ����+"""���C�5�6����*,�

9������D'�*'��G��&����*'����.������-����'��O�������;'���� ����D'��G������('�K'�Y����������,'�D'�"�221#�(����.�$��� ������%����������������������� ����������������'�3��'��A����'�:2% )'�?�����������&������ �G��'�

���������� ('� Y� �������� �'� "�221#� /��������.�� /�� �� �� ���������� .��� (�����.�� H�� �����*��������'�+"""�;):��:�;+'���'��+�:2"�.)'�"��+�2���,&� 2<A'�

@���C'��H�� ��,'�,'�Y�O�� ���'�('�"�22A#�;�� ��������8�����'�.������������ �:����+22):.��$������$&� � <% ��2'�

0��������� D'� Y� ;��-������ ('� "�222#� ,��� ���������� ��������6� *����������� �� �������� �������������8������������ ���'��������������������*��*�&� :1%� �:'�

0��������'������ ���.��3'�Y�?������('�"�22<#�a����&���a6����������.����� �������+������������� ���������� ���������'�:���;��������������2��������5;'26���+&�)2�%) <'�

�������('�'�Y�����$��G'�"�221#�(��������/�� ���� ����������4���������!��$�� ������������(���0������H������H�����C������(�����(� ������'���'� %:'�

3�8���.����� 3'�� ����������� 3'� Y�;������� 0'� "�22B#� L�������M%/��������.��;����%G�&����*/�� ���� ����������?$����������(�������'���'� B2_ BA'�

3�������� G'� Y� �������� �'� " �� #�H���������� ��� �� ����� ������6� ��� �������� �� ������� &����������������������������'�+"""�;):��:�;+'���'��.:;;")��:�:%A�+��:����:��+�"�+�;"%%+2"��"���+&�B:)%B�:'�

3�������3'�Y�����$�������'�D'�"�22:#��!*(�����6�4���� �������������������!'���'� %:'�3����.�� 3'� Y� *������� D'� !��� � ��!�� ��� (���������� ���� ?��������� (� ������� ��� 4����� �

K� ��.���������$��������,����� �����;�������'�3������������ D'� Y� ?������ ('�H'� " �AA#�;����*� � � ��� �������/����� �/�����!��.�����$� ��

/��������������!�&���'�H��������'�"�22�#�(�������������������'�'�����������+%@�0�� ��������'�5����'�� (��-����'�Y� ?������� 0'� "�221#�9&-���� �� ���������� ���� � ����� ����� &����� ����.��

��������'����/���3����������+�������������������('&�� 2%��<'�C��8�.�� G'�� ?������ ���� ('�Y� �������� �'� "�22A#�9� "�#� ��������������� �� ���� ����������� �

�� ������'�=�/������ ����/�������.�*���������&�)�)%)��'�C���� G'�� D����� �'�� ���%��� �� ,'� Y� O��� %C��� �� �'� "�22<#� G�8$� ������� '� /�6� :���

�+22):.��$��&�.�����,�(�;��G���(� ���������������'�N�����C'� "�22:#�G�������?���8�����&������*K����.������ ������!'�;���3��/������/�����*&�

)�)%)))'��

www.intechopen.com

Page 24: A Cellular Automaton Framework for Image Processing on GPU

��� �!���� ��� �$#

www.intechopen.com

Page 25: A Cellular Automaton Framework for Image Processing on GPU

Pattern RecognitionEdited by Peng-Yeng Yin

ISBN 978-953-307-014-8Hard cover, 568 pagesPublisher InTechPublished online 01, October, 2009Published in print edition October, 2009

InTech EuropeUniversity Campus STeP Ri Slavka Krautzeka 83/A 51000 Rijeka, Croatia Phone: +385 (51) 770 447 Fax: +385 (51) 686 166www.intechopen.com

InTech ChinaUnit 405, Office Block, Hotel Equatorial Shanghai No.65, Yan An Road (West), Shanghai, 200040, China

Phone: +86-21-62489820 Fax: +86-21-62489821

For more than 40 years, pattern recognition approaches are continuingly improving and have been used in anincreasing number of areas with great success. This book discloses recent advances and new ideas inapproaches and applications for pattern recognition. The 30 chapters selected in this book cover the majortopics in pattern recognition. These chapters propose state-of-the-art approaches and cutting-edge researchresults. I could not thank enough to the contributions of the authors. This book would not have been possiblewithout their support.

How to referenceIn order to correctly reference this scholarly work, feel free to copy and paste the following:

Claude Kauffmann and Nicolas Piche (2009). A Cellular Automaton Framework for Image Processing on GPU,Pattern Recognition, Peng-Yeng Yin (Ed.), ISBN: 978-953-307-014-8, InTech, Available from:http://www.intechopen.com/books/pattern-recognition/a-cellular-automaton-framework-for-image-processing-on-gpu