1 EXHIBIT 23 CONSENT OF INDEPENDENT ACCOUNTANTS We consent to the incorporation by reference in the registration statements of Cognex Corporation on Form S-8 (File Nos. 33- 31657, 33-32815, 33-36263, 33-72636, 33-72638, 33-81150, and 33-81152) of our reports dated January 26, 1996, except as to the information in the Subsequent Event note for which the date is February 29, 1996, on our audits of the consolidated financial statements and financial statement schedule of Cognex Corporation as of December 31, 1995 and 1994, and for each of the three years in the period ended December 31, 1995, which reports are incorporated by reference or included in this Annual Report on Form 10-K. COOPERS & LYBRAND L.L.P. Boston, Massachusetts March 26, 1996