Design of Intelligent Rubik's Cube Robot Based on Open CV
In this design,the Python language is used to complete the design of the image acquisition and processing algorithm of the Rubik's Cube color block on Open CV,and the pixel coordinate value of the best area of the color block is collected and calculated by ROI mask processing,which reduces the influence of edge noise and improves the authenticity and stability of the color coordinates.The image filtering uses a 7 × 7 filter core for median filtering,which reduces the influence of image noise points and ambient light brightness on recognition,and is more convenient for machine vision recognition and processing.In the compilation of the clustering algorithm,the Rubik's Cube color blocks are clustered by collecting color block data analysis,using the improved weighted Euclidean distance algorithm,and the Euclidean distance between each color block and the two-dimensional HS coordinates of the 6-sided center color block is calculated,which is more convenient for clustering than the traditional three-dimensional distance classification algorithm.This algorithm is suitable for identifying Rubik's cubes of any color,and ensures extremely high accuracy of color block recognition and clustering.