Breast cancer is caused by the abnormal and rapid growth of breast cells. An early diagnosis can ensure an easier and effective treatment. A mass in the breast is a significant early sign of breast cancer, even though differentiating the cancerous mass's tissue from normal tissue for diagnosis is a difficult task for radiologists. The development of computer-aided detection systems in recent years has led to nondestructive and efficient cancer diagnostic techniques. This paper proposes a comprehensive method to locate the cancerous region in the mammogram image. This method employs image noise reduction, optimal image segmentation based on the convolutional neural network, a grasshopper optimization algorithm, and optimized feature extraction and feature selection based on the grasshopper optimization algorithm, thereby improving precision and decreasing the computational cost. This method was applied to the Mammographic Image Analysis Society Digital Mammogram Database and Digital Database for Screening Mammography breast cancer databases and the simulation results were compared with 10 different state-ofthe-art methods to analyze the proposed system's efficiency. Final results showed that the proposed method had 96% Sensitivity, 93% Specificity, 85% PPV, 97% NPV, 92% accuracy, and better efficiency than other traditional methods in terms of Sensitivity, Specificity, PPV, NPV, and Accuracy. K E Y W O R D S breast cancer, convolutional neural networks, feature extraction, feature selection, grasshopper optimization algorithm, image classification, image segmentation