Abstract

In order to improve the speed and accuracy of mahjong factory packaging detection, the neural network-based chess and card recognition system designed in this paper mainly includes image preprocessing and image recognition. The image preprocessing uses the OpenCV computer vision library to segment the complete chess and cards into individual chess and cards. It is mainly to grayscale the image, use Gaussian blur to denoise the image, calculate the gradient of the image, transform the gradient image into a threshold image, perform morphological operations on the image, and perform contour detection to find the surrounding matrix of the contour. The target and the background can be divided by the vertex coordinates, and a 9x4 grid is superimposed on the divided target image and can be divided into a single mahjong chess card for neural network recognition. Image recognition uses the Vision Transformer neural network. In this paper, we first use the convolution layer to obtain the feature map, and use the feature map as the input of the Vision Transformer. The data set is mainly derived from the shooting of the mobile phone and the image expansion. Here, the image is mainly expanded according to the image brightness, blur and rotation at a certain angle. Finally, the accuracy rate of the model on the test set can reach 98%. Finally, the trained model is deployed on the android mobile terminal using TensorFlow-Lite.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.