Digital image processing comprises varieties of applications, where some of these used in medical image processing include convolution, edge detection as well as contrast enhancement. Efficient edge detection depends on choosing the threshold; the choice of threshold directly determines the results of edge detection. In this paper, Sobel edge detection operator and its enhanced algorithm are first discussed in terms of optimal thresholding in C language under Linux platform. It is implemented a competent execution time for this new enhanced algorithm to detect edges for human knee osteoarthritis images in different critical situations. The proposed method is able to exhibit discernible view of salient features of most osteoarthritis images with approximately 50% better execution time compare to classical Sobel method. Also, it is shown that the algorithm is very effective in case of noisy and blurs images.