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-36262, 33-36263, 33-72636, 33-72638, 33-81150, 33-81152, 333-2151, and
333-4621) of our reports dated January 23, 1998 on our audits of the
consolidated financial statements and financial statement schedule of Cognex
Corporation as of December 31, 1997 and 1996, and for each of the three years in
the period ended December 31, 1997, which reports are incorporated by reference
or included in this Annual Report on Form 10-K.

Boston, Massachusetts                              /s/ COOPERS & LYBRAND L.L.P.
March 27, 1998