With the wide application of Internet of Things technologies, the apple harvesting method is transformed from manual to intelligent and automatic mode. The accurate apple recognition and localization in the orchard is the basic step for the automatic picking. However, most of the existing research focused on the one part of the detection system or just detection of apples in the orchard, which often lead to the not applicable in real-life environment or long computation time of detection. To meet these issue, an integrated framework for apple recognition and localization using deep learning and machine vision is proposed. Firstly, the two sided stereovision camera is configured to establish an automatic apple recognition and localization system. Secondly, the Yolo v3 algorithm is applied to fulfil the apple recognition target. Then, the three dimensional (3D) model reconstruction technology is used to achieve the apple localization goal. At last, a case from our lab is used to demonstrate the feasibility and effectiveness of the proposed method.