This study offers a novel solution to deal with the low signal-to-noise ratio and slow execution rate of the first derivative edge detection algorithms namely, Roberts, Prewitt and Sobel algorithms. Since the two problems are brought about by the complex mathematical operations being used by the algorithms, these were replaced by a discriminant. The developed discriminant, equivalent to the product of total difference and intensity divided by the normalization values, is based on the "pixel pair formation" that produces optimal peak signal to noise ratio. Results of the study applying the discriminant for the edge detection of green coffee beans shows improvement in terms of peak signal to noise ratio (PSNR), mean square error (MSE), and execution time. It was determined that accuracy level varied according to the total difference of pixel values, intensity, and normalization values. Using the developed edge detection technique led to improvements in the PSNR of 2.091%, 1.16 %, and 2.47% over Sobel, Prewitt, and Roberts respectively. Meanwhile, improvement in the MSE was measured to be 13.06%, 7.48 %, and 15.31% over the three algorithms. Likewise, improvement in execution time was also achieved at values of 69.02%, 67.40 %, and 65.46% over Sobel, Prewitt, and Roberts respectively.