The study is based on computer vision technology for apple detection and maturity assessment. Firstly, the YOLOv7 algorithm is used for target detection of apples, and the number of apples in the image is counted to generate a distribution histogram of the number of apples. Then, the position of each apple is detected by the YOLOv7 algorithm and a 2D scatter plot of the geometric coordinates of the apples is drawn. Next, apple foreground was extracted by interactive ROI tagging and GrabCut algorithms, and a mathematical model was developed to assess the maturity of apples based on the histogram analysis of apple colours in HSV colour space model. In addition, the Faster R-CNN model is used to detect apples and estimate the quality of apples based on the 2D area of apples to generate a distribution histogram of apple quality. Finally, a convolutional neural network is used to build a fruit recognition model and draw a distribution histogram of apple image ID numbers. This study provides computer vision technical support for apple picking robots to improve apple production efficiency.