In this study, nuts are determined using image processing techniques and classified by k-means and k-means++ methods in rapid time. Firstly, pixel area (PA) and square area (SA) features are extracted by an image processing technique. Then, the obtained data are classified by the k-means and k-means++ clustering methods. We present a new method called the pixel area and square area method (PASAM), which is realized by clustering feature selection of PA and SA values. Our proposed method is applied on numerous real RGB images of nuts for different cases. Experimental results show that k-means++ clustering based on PASAM is more efficient than other techniques such as k-means and k-means++ clustering based on PA and SA. The nuts in the working environment are determined and classified with 100% accuracy by PASAM. The proposed research distinguishes small, medium and big nuts based on image processing and PASAM. This method is appropriate to use to separate all vegetables and fruits for which classification is important.